@cimulate/copilot-widget 1.16.0 → 1.17.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/cimulate-copilot-widget.css +1 -1
- package/dist/cimulate-copilot-widget.d.ts +23 -3
- package/dist/cimulate-copilot-widget.es.js +7069 -6948
- package/dist/cimulate-copilot-widget.umd.js +29 -29
- package/dist/copilot.css +1 -1
- package/dist/copilot.es.js +7067 -6946
- package/dist/copilot.umd.js +29 -29
- package/dist/messaging.css +1 -1
- package/dist/messaging.d.ts +30 -11
- package/dist/messaging.es.js +11169 -10195
- package/dist/messaging.umd.js +35 -35
- package/package.json +1 -1
package/dist/messaging.umd.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
(function(Ie,Fe){typeof exports=="object"&&typeof module!="undefined"?Fe(exports):typeof define=="function"&&define.amd?define(["exports"],Fe):(Ie=typeof globalThis!="undefined"?globalThis:Ie||self,Fe(Ie.CimulateMessaging={}))})(this,(function(Ie){"use strict";var Z9=Object.defineProperty,eF=Object.defineProperties;var tF=Object.getOwnPropertyDescriptors;var zc=Object.getOwnPropertySymbols;var i2=Object.prototype.hasOwnProperty,o2=Object.prototype.propertyIsEnumerable;var xs=(Ie,Fe)=>(Fe=Symbol[Ie])?Fe:Symbol.for("Symbol."+Ie),nF=Ie=>{throw TypeError(Ie)},ou=Math.pow,Sm=(Ie,Fe,We)=>Fe in Ie?Z9(Ie,Fe,{enumerable:!0,configurable:!0,writable:!0,value:We}):Ie[Fe]=We,B=(Ie,Fe)=>{for(var We in Fe||(Fe={}))i2.call(Fe,We)&&Sm(Ie,We,Fe[We]);if(zc)for(var We of zc(Fe))o2.call(Fe,We)&&Sm(Ie,We,Fe[We]);return Ie},ie=(Ie,Fe)=>eF(Ie,tF(Fe));var sn=(Ie,Fe)=>{var We={};for(var rt in Ie)i2.call(Ie,rt)&&Fe.indexOf(rt)<0&&(We[rt]=Ie[rt]);if(Ie!=null&&zc)for(var rt of zc(Ie))Fe.indexOf(rt)<0&&o2.call(Ie,rt)&&(We[rt]=Ie[rt]);return We};var Ze=(Ie,Fe,We)=>Sm(Ie,typeof Fe!="symbol"?Fe+"":Fe,We);var $e=(Ie,Fe,We)=>new Promise((rt,yt)=>{var dt=Tt=>{try{Lt(We.next(Tt))}catch(an){yt(an)}},Pe=Tt=>{try{Lt(We.throw(Tt))}catch(an){yt(an)}},Lt=Tt=>Tt.done?rt(Tt.value):Promise.resolve(Tt.value).then(dt,Pe);Lt((We=We.apply(Ie,Fe)).next())}),uo=function(Ie,Fe){this[0]=Ie,this[1]=Fe},Am=(Ie,Fe,We)=>{var rt=(Pe,Lt,Tt,an)=>{try{var lo=We[Pe](Lt),ws=(Lt=lo.value)instanceof uo,jc=lo.done;Promise.resolve(ws?Lt[0]:Lt).then($n=>ws?rt(Pe==="return"?Pe:"next",Lt[1]?{done:$n.done,value:$n.value}:$n,Tt,an):Tt({value:$n,done:jc})).catch($n=>rt("throw",$n,Tt,an))}catch($n){an($n)}},yt=Pe=>dt[Pe]=Lt=>new Promise((Tt,an)=>rt(Pe,Lt,Tt,an)),dt={};return We=We.apply(Ie,Fe),dt[xs("asyncIterator")]=()=>dt,yt("next"),yt("throw"),yt("return"),dt},Cm=Ie=>{var Fe=Ie[xs("asyncIterator")],We=!1,rt,yt={};return Fe==null?(Fe=Ie[xs("iterator")](),rt=dt=>yt[dt]=Pe=>Fe[dt](Pe)):(Fe=Fe.call(Ie),rt=dt=>yt[dt]=Pe=>{if(We){if(We=!1,dt==="throw")throw Pe;return Pe}return We=!0,{done:!1,value:new uo(new Promise(Lt=>{var Tt=Fe[dt](Pe);Tt instanceof Object||nF("Object expected"),Lt(Tt)}),1)}}),yt[xs("iterator")]=()=>yt,rt("next"),"throw"in Fe?rt("throw"):yt.throw=dt=>{throw dt},"return"in Fe&&rt("return"),yt},s2=(Ie,Fe,We)=>(Fe=Ie[xs("asyncIterator")])?Fe.call(Ie):(Ie=Ie[xs("iterator")](),Fe={},We=(rt,yt)=>(yt=Ie[rt])&&(Fe[rt]=dt=>new Promise((Pe,Lt,Tt)=>(dt=yt.call(Ie,dt),Tt=dt.done,Promise.resolve(dt.value).then(an=>Pe({value:an,done:Tt}),Lt)))),We("next"),We("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{margin-top:0;margin-bottom:0;line-height:normal;font-size:var(--cim-widget-header-text-font-size)}@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{margin-top:0;margin-bottom:0;line-height:normal;font-size:var(--cim-widget-header-text-font-size)}.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{flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem}.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: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}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(Fe);function We(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rt={exports:{}},yt={},dt={exports:{}},Pe={};var Lt;function Tt(){if(Lt)return Pe;Lt=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 T(I){return I===null||typeof I!="object"?null:(I=g&&I[g]||I["@@iterator"],typeof I=="function"?I:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,v={};function A(I,W,O){this.props=I,this.context=W,this.refs=v,this.updater=O||y}A.prototype.isReactComponent={},A.prototype.setState=function(I,W){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,W,"setState")},A.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function C(){}C.prototype=A.prototype;function k(I,W,O){this.props=I,this.context=W,this.refs=v,this.updater=O||y}var R=k.prototype=new C;R.constructor=k,w(R,A.prototype),R.isPureReactComponent=!0;var U=Array.isArray,Y=Object.prototype.hasOwnProperty,F={current:null},X={key:!0,ref:!0,__self:!0,__source:!0};function ce(I,W,O){var be,Oe={},Re=null,He=null;if(W!=null)for(be in W.ref!==void 0&&(He=W.ref),W.key!==void 0&&(Re=""+W.key),W)Y.call(W,be)&&!X.hasOwnProperty(be)&&(Oe[be]=W[be]);var ve=arguments.length-2;if(ve===1)Oe.children=O;else if(1<ve){for(var qe=Array(ve),ut=0;ut<ve;ut++)qe[ut]=arguments[ut+2];Oe.children=qe}if(I&&I.defaultProps)for(be in ve=I.defaultProps,ve)Oe[be]===void 0&&(Oe[be]=ve[be]);return{$$typeof:e,type:I,key:Re,ref:He,props:Oe,_owner:F.current}}function de(I,W){return{$$typeof:e,type:I.type,key:W,ref:I.ref,props:I.props,_owner:I._owner}}function z(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function oe(I){var W={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(O){return W[O]})}var he=/\/+/g;function ae(I,W){return typeof I=="object"&&I!==null&&I.key!=null?oe(""+I.key):W.toString(36)}function se(I,W,O,be,Oe){var Re=typeof I;(Re==="undefined"||Re==="boolean")&&(I=null);var He=!1;if(I===null)He=!0;else switch(Re){case"string":case"number":He=!0;break;case"object":switch(I.$$typeof){case e:case t:He=!0}}if(He)return He=I,Oe=Oe(He),I=be===""?"."+ae(He,0):be,U(Oe)?(O="",I!=null&&(O=I.replace(he,"$&/")+"/"),se(Oe,W,O,"",function(ut){return ut})):Oe!=null&&(z(Oe)&&(Oe=de(Oe,O+(!Oe.key||He&&He.key===Oe.key?"":(""+Oe.key).replace(he,"$&/")+"/")+I)),W.push(Oe)),1;if(He=0,be=be===""?".":be+":",U(I))for(var ve=0;ve<I.length;ve++){Re=I[ve];var qe=be+ae(Re,ve);He+=se(Re,W,O,qe,Oe)}else if(qe=T(I),typeof qe=="function")for(I=qe.call(I),ve=0;!(Re=I.next()).done;)Re=Re.value,qe=be+ae(Re,ve++),He+=se(Re,W,O,qe,Oe);else if(Re==="object")throw W=String(I),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.");return He}function Te(I,W,O){if(I==null)return I;var be=[],Oe=0;return se(I,be,"","",function(Re){return W.call(O,Re,Oe++)}),be}function Ce(I){if(I._status===-1){var W=I._result;W=W(),W.then(function(O){(I._status===0||I._status===-1)&&(I._status=1,I._result=O)},function(O){(I._status===0||I._status===-1)&&(I._status=2,I._result=O)}),I._status===-1&&(I._status=0,I._result=W)}if(I._status===1)return I._result.default;throw I._result}var ee={current:null},V={transition:null},q={ReactCurrentDispatcher:ee,ReactCurrentBatchConfig:V,ReactCurrentOwner:F};function S(){throw Error("act(...) is not supported in production builds of React.")}return Pe.Children={map:Te,forEach:function(I,W,O){Te(I,function(){W.apply(this,arguments)},O)},count:function(I){var W=0;return Te(I,function(){W++}),W},toArray:function(I){return Te(I,function(W){return W})||[]},only:function(I){if(!z(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},Pe.Component=A,Pe.Fragment=n,Pe.Profiler=o,Pe.PureComponent=k,Pe.StrictMode=r,Pe.Suspense=d,Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=q,Pe.act=S,Pe.cloneElement=function(I,W,O){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var be=w({},I.props),Oe=I.key,Re=I.ref,He=I._owner;if(W!=null){if(W.ref!==void 0&&(Re=W.ref,He=F.current),W.key!==void 0&&(Oe=""+W.key),I.type&&I.type.defaultProps)var ve=I.type.defaultProps;for(qe in W)Y.call(W,qe)&&!X.hasOwnProperty(qe)&&(be[qe]=W[qe]===void 0&&ve!==void 0?ve[qe]:W[qe])}var qe=arguments.length-2;if(qe===1)be.children=O;else if(1<qe){ve=Array(qe);for(var ut=0;ut<qe;ut++)ve[ut]=arguments[ut+2];be.children=ve}return{$$typeof:e,type:I.type,key:Oe,ref:Re,props:be,_owner:He}},Pe.createContext=function(I){return I={$$typeof:u,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:a,_context:I},I.Consumer=I},Pe.createElement=ce,Pe.createFactory=function(I){var W=ce.bind(null,I);return W.type=I,W},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(I){return{$$typeof:c,render:I}},Pe.isValidElement=z,Pe.lazy=function(I){return{$$typeof:p,_payload:{_status:-1,_result:I},_init:Ce}},Pe.memo=function(I,W){return{$$typeof:h,type:I,compare:W===void 0?null:W}},Pe.startTransition=function(I){var W=V.transition;V.transition={};try{I()}finally{V.transition=W}},Pe.unstable_act=S,Pe.useCallback=function(I,W){return ee.current.useCallback(I,W)},Pe.useContext=function(I){return ee.current.useContext(I)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(I){return ee.current.useDeferredValue(I)},Pe.useEffect=function(I,W){return ee.current.useEffect(I,W)},Pe.useId=function(){return ee.current.useId()},Pe.useImperativeHandle=function(I,W,O){return ee.current.useImperativeHandle(I,W,O)},Pe.useInsertionEffect=function(I,W){return ee.current.useInsertionEffect(I,W)},Pe.useLayoutEffect=function(I,W){return ee.current.useLayoutEffect(I,W)},Pe.useMemo=function(I,W){return ee.current.useMemo(I,W)},Pe.useReducer=function(I,W,O){return ee.current.useReducer(I,W,O)},Pe.useRef=function(I){return ee.current.useRef(I)},Pe.useState=function(I){return ee.current.useState(I)},Pe.useSyncExternalStore=function(I,W,O){return ee.current.useSyncExternalStore(I,W,O)},Pe.useTransition=function(){return ee.current.useTransition()},Pe.version="18.3.1",Pe}var an;function lo(){return an||(an=1,dt.exports=Tt()),dt.exports}var ws;function jc(){if(ws)return yt;ws=1;var e=lo(),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={},T=null,y=null;h!==void 0&&(T=""+h),d.key!==void 0&&(T=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(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:T,ref:y,props:g,_owner:o.current}}return yt.Fragment=n,yt.jsx=u,yt.jsxs=u,yt}var $n;function c2(){return $n||($n=1,rt.exports=jc()),rt.exports}var x=c2();const sr=Object.create(null);sr.open="0",sr.close="1",sr.ping="2",sr.pong="3",sr.message="4",sr.upgrade="5",sr.noop="6";const su=Object.create(null);Object.keys(sr).forEach(e=>{su[sr[e]]=e});const $c={type:"error",data:"parser error"},km=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Nm=typeof ArrayBuffer=="function",Om=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Vc=({type:e,data:t},n,r)=>km&&t instanceof Blob?n?r(t):Im(t,r):Nm&&(t instanceof ArrayBuffer||Om(t))?n?r(t):Im(new Blob([t]),r):r(sr[e]+(t||"")),Im=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Rm(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let qc;function d2(e,t){if(km&&e.data instanceof Blob)return e.data.arrayBuffer().then(Rm).then(t);if(Nm&&(e.data instanceof ArrayBuffer||Om(e.data)))return t(Rm(e.data));Vc(e,!1,n=>{qc||(qc=new TextEncoder),t(qc.encode(n))})}const Pm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_s=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Pm.length;e++)_s[Pm.charCodeAt(e)]=e;const f2=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=_s[e.charCodeAt(r)],u=_s[e.charCodeAt(r+1)],c=_s[e.charCodeAt(r+2)],d=_s[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},h2=typeof ArrayBuffer=="function",Yc=(e,t)=>{if(typeof e!="string")return{type:"message",data:Lm(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:p2(e.substring(1),t)}:su[n]?e.length>1?{type:su[n],data:e.substring(1)}:{type:su[n]}:$c},p2=(e,t)=>{if(h2){const n=f2(e);return Lm(n,t)}else return{base64:!0,data:e}},Lm=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Dm="",m2=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{Vc(a,!1,c=>{r[u]=c,++o===n&&t(r.join(Dm))})})},g2=(e,t)=>{const n=e.split(Dm),r=[];for(let o=0;o<n.length;o++){const a=Yc(n[o],t);if(r.push(a),a.type==="error")break}return r};function E2(){return new TransformStream({transform(e,t){d2(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 Wc;function au(e){return e.reduce((t,n)=>t+n.length,0)}function uu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let 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 y2(e,t){Wc||(Wc=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(au(n)<1)break;const d=uu(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(au(n)<2)break;const d=uu(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(au(n)<8)break;const d=uu(n,8),h=new DataView(d.buffer,d.byteOffset,d.length),p=h.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue($c);break}o=p*Math.pow(2,32)+h.getUint32(4),r=3}else{if(au(n)<o)break;const d=uu(n,o);c.enqueue(Yc(a?d:Wc.decode(d),t)),r=0}if(o===0||o>e){c.enqueue($c);break}}}})}const Mm=4;function St(e){if(e)return b2(e)}function b2(e){for(var t in St.prototype)e[t]=St.prototype[t];return e}St.prototype.on=St.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},St.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},St.prototype.off=St.prototype.removeListener=St.prototype.removeAllListeners=St.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},St.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},St.prototype.emitReserved=St.prototype.emit,St.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},St.prototype.hasListeners=function(e){return!!this.listeners(e).length};const lu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),On=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),T2="arraybuffer";function rF(){}function Fm(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const x2=On.setTimeout,w2=On.clearTimeout;function cu(e,t){t.useNativeTimers?(e.setTimeoutFn=x2.bind(On),e.clearTimeoutFn=w2.bind(On)):(e.setTimeoutFn=On.setTimeout.bind(On),e.clearTimeoutFn=On.clearTimeout.bind(On))}const _2=1.33;function v2(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 Bm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function A2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function C2(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 Gc extends St{constructor(t){super(),this.writable=!1,cu(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=Yc(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=A2(t);return n.length?"?"+n:""}}class N2 extends Gc{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)};g2(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,m2(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]=Bm()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Um=!1;try{Um=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const O2=Um;function I2(){}class R2 extends N2{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 ar extends St{constructor(t,n,r){super(),this.createRequest=t,cu(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=Fm(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=ar.requestsCount++,ar.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=I2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete ar.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(ar.requestsCount=0,ar.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",Hm);else if(typeof addEventListener=="function"){const e="onpagehide"in On?"pagehide":"unload";addEventListener(e,Hm,!1)}}function Hm(){for(let e in ar.requests)ar.requests.hasOwnProperty(e)&&ar.requests[e].abort()}const P2=(function(){const e=zm({xdomain:!1});return e&&e.responseType!==null})();class L2 extends R2{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 ar(zm,this.uri(),t)}}function zm(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||O2))return new XMLHttpRequest}catch(n){}if(!t)try{return new On[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const jm=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class D2 extends Gc{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=jm?{}:Fm(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;Vc(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&lu(()=>{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]=Bm()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Kc=On.WebSocket||On.MozWebSocket;class M2 extends D2{createSocket(t,n,r){return jm?new Kc(t,n,r):n?new Kc(t,n):new Kc(t)}doWrite(t,n){this.ws.send(n)}}class F2 extends Gc{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=y2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=E2();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&&lu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const B2={websocket:M2,webtransport:F2,polling:L2},U2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,H2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Qc(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=U2.exec(e||""),a={},u=14;for(;u--;)a[H2[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=z2(a,a.path),a.queryKey=j2(a,a.query),a}function z2(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 j2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Xc=typeof addEventListener=="function"&&typeof removeEventListener=="function",du=[];Xc&&addEventListener("offline",()=>{du.forEach(e=>e())},!1);class $r extends St{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=Qc(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=Qc(n.host).host);cu(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=C2(this.opts.query)),Xc&&(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"})},du.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Mm,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&&$r.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",$r.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+=v2(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,lu(()=>{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($r.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(),Xc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=du.indexOf(this._offlineEventListener);r!==-1&&du.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}$r.protocol=Mm;class $2 extends $r{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;$r.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;$r.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=n.name,this.emitReserved("upgradeError",T)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=g=>{const T=new Error("probe error: "+g);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};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 V2=class extends $2{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=>B2[a]).filter(a=>!!a)),super(r?o:t,o)}};function q2(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=Qc(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 Y2=typeof ArrayBuffer=="function",W2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,$m=Object.prototype.toString,G2=typeof Blob=="function"||typeof Blob!="undefined"&&$m.call(Blob)==="[object BlobConstructor]",K2=typeof File=="function"||typeof File!="undefined"&&$m.call(File)==="[object FileConstructor]";function Jc(e){return Y2&&(e instanceof ArrayBuffer||W2(e))||G2&&e instanceof Blob||K2&&e instanceof File}function fu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(fu(e[n]))return!0;return!1}if(Jc(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return fu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&fu(e[n]))return!0;return!1}function Q2(e){const t=[],n=e.data,r=e;return r.data=Zc(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Zc(e,t){if(!e)return e;if(Jc(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]=Zc(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]=Zc(e[r],t));return n}return e}function X2(e,t){return e.data=ed(e.data,t),delete e.attachments,e}function ed(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]=ed(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=ed(e[n],t));return e}const J2=["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 Z2{constructor(t){this.replacer=t}encode(t){return(t.type===Ke.EVENT||t.type===Ke.ACK)&&fu(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=Q2(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class td extends St{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 e_(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Jc(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(!t_(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(td.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Ke.CONNECT:return Vm(n);case Ke.DISCONNECT:return n===void 0;case Ke.CONNECT_ERROR:return typeof n=="string"||Vm(n);case Ke.EVENT:case Ke.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&J2.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 e_{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 t_=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function Vm(e){return Object.prototype.toString.call(e)==="[object Object]"}const n_=Object.freeze(Object.defineProperty({__proto__:null,Decoder:td,Encoder:Z2,get PacketType(){return Ke}},Symbol.toStringTag,{value:"Module"}));function Vn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const r_=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class qm extends St{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=[Vn(t,"open",this.onopen.bind(this)),Vn(t,"packet",this.onpacket.bind(this)),Vn(t,"error",this.onerror.bind(this)),Vn(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(r_.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 co(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}co.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},co.prototype.reset=function(){this.attempts=0},co.prototype.setMin=function(e){this.ms=e},co.prototype.setMax=function(e){this.max=e},co.prototype.setJitter=function(e){this.jitter=e};class nd extends St{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,cu(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 co({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||n_;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 V2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Vn(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=Vn(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(Vn(t,"ping",this.onping.bind(this)),Vn(t,"data",this.ondata.bind(this)),Vn(t,"error",this.onerror.bind(this)),Vn(t,"close",this.onclose.bind(this)),Vn(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){lu(()=>{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 qm(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 vs={};function rd(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=q2(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=vs[o]&&a in vs[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new nd(r,t):(vs[o]||(vs[o]=new nd(r,t)),d=vs[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(rd,{Manager:nd,Socket:qm,io:rd,connect:rd});const Ym=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&Ym.call(Blob),typeof File=="function"||typeof File!="undefined"&&Ym.call(File);var Wm;(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"})(Wm||(Wm={}));var Z=lo();const _i=We(Z);class i_{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 o_{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 $e(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 $e(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 PB=Object.defineProperty,IB=Object.defineProperties;var RB=Object.getOwnPropertyDescriptors;var ad=Object.getOwnPropertySymbols;var t2=Object.prototype.hasOwnProperty,n2=Object.prototype.propertyIsEnumerable;var Is=(Pe,Fe)=>(Fe=Symbol[Pe])?Fe:Symbol.for("Symbol."+Pe),LB=Pe=>{throw TypeError(Pe)},Eu=Math.pow,i0=(Pe,Fe,Ge)=>Fe in Pe?PB(Pe,Fe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Pe[Fe]=Ge,B=(Pe,Fe)=>{for(var Ge in Fe||(Fe={}))t2.call(Fe,Ge)&&i0(Pe,Ge,Fe[Ge]);if(ad)for(var Ge of ad(Fe))n2.call(Fe,Ge)&&i0(Pe,Ge,Fe[Ge]);return Pe},oe=(Pe,Fe)=>IB(Pe,RB(Fe));var an=(Pe,Fe)=>{var Ge={};for(var rt in Pe)t2.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&&n2.call(Pe,rt)&&(Ge[rt]=Pe[rt]);return Ge};var $e=(Pe,Fe,Ge)=>i0(Pe,typeof Fe!="symbol"?Fe+"":Fe,Ge);var Ve=(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),Rs=(Dt=yo.value)instanceof Eo,ud=yo.done;Promise.resolve(Rs?Dt[0]:Dt).then(Gn=>Rs?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[Is("asyncIterator")]=()=>pt,bt("next"),bt("throw"),bt("return"),pt},s0=Pe=>{var Fe=Pe[Is("asyncIterator")],Ge=!1,rt,bt={};return Fe==null?(Fe=Pe[Is("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||LB("Object expected"),Dt(xt)}),1)}}),bt[Is("iterator")]=()=>bt,rt("next"),"throw"in Fe?rt("throw"):bt.throw=pt=>{throw pt},"return"in Fe&&rt("return"),bt},r2=(Pe,Fe,Ge)=>(Fe=Pe[Is("asyncIterator")])?Fe.call(Pe):(Pe=Pe[Is("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(P){return P===null||typeof P!="object"?null:(P=g&&P[g]||P["@@iterator"],typeof P=="function"?P:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function A(P,G,O){this.props=P,this.context=G,this.refs=S,this.updater=O||y}A.prototype.isReactComponent={},A.prototype.setState=function(P,G){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,G,"setState")},A.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function C(){}C.prototype=A.prototype;function k(P,G,O){this.props=P,this.context=G,this.refs=S,this.updater=O||y}var I=k.prototype=new C;I.constructor=k,x(I,A.prototype),I.isPureReactComponent=!0;var j=Array.isArray,Y=Object.prototype.hasOwnProperty,F={current:null},te={key:!0,ref:!0,__self:!0,__source:!0};function ce(P,G,O){var ye,Oe={},Ie=null,He=null;if(G!=null)for(ye in G.ref!==void 0&&(He=G.ref),G.key!==void 0&&(Ie=""+G.key),G)Y.call(G,ye)&&!te.hasOwnProperty(ye)&&(Oe[ye]=G[ye]);var ve=arguments.length-2;if(ve===1)Oe.children=O;else if(1<ve){for(var Ye=Array(ve),dt=0;dt<ve;dt++)Ye[dt]=arguments[dt+2];Oe.children=Ye}if(P&&P.defaultProps)for(ye in ve=P.defaultProps,ve)Oe[ye]===void 0&&(Oe[ye]=ve[ye]);return{$$typeof:e,type:P,key:Ie,ref:He,props:Oe,_owner:F.current}}function pe(P,G){return{$$typeof:e,type:P.type,key:G,ref:P.ref,props:P.props,_owner:P._owner}}function U(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function re(P){var G={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(O){return G[O]})}var ae=/\/+/g;function de(P,G){return typeof P=="object"&&P!==null&&P.key!=null?re(""+P.key):G.toString(36)}function se(P,G,O,ye,Oe){var Ie=typeof P;(Ie==="undefined"||Ie==="boolean")&&(P=null);var He=!1;if(P===null)He=!0;else switch(Ie){case"string":case"number":He=!0;break;case"object":switch(P.$$typeof){case e:case t:He=!0}}if(He)return He=P,Oe=Oe(He),P=ye===""?"."+de(He,0):ye,j(Oe)?(O="",P!=null&&(O=P.replace(ae,"$&/")+"/"),se(Oe,G,O,"",function(dt){return dt})):Oe!=null&&(U(Oe)&&(Oe=pe(Oe,O+(!Oe.key||He&&He.key===Oe.key?"":(""+Oe.key).replace(ae,"$&/")+"/")+P)),G.push(Oe)),1;if(He=0,ye=ye===""?".":ye+":",j(P))for(var ve=0;ve<P.length;ve++){Ie=P[ve];var Ye=ye+de(Ie,ve);He+=se(Ie,G,O,Ye,Oe)}else if(Ye=b(P),typeof Ye=="function")for(P=Ye.call(P),ve=0;!(Ie=P.next()).done;)Ie=Ie.value,Ye=ye+de(Ie,ve++),He+=se(Ie,G,O,Ye,Oe);else if(Ie==="object")throw G=String(P),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.");return He}function be(P,G,O){if(P==null)return P;var ye=[],Oe=0;return se(P,ye,"","",function(Ie){return G.call(O,Ie,Oe++)}),ye}function we(P){if(P._status===-1){var G=P._result;G=G(),G.then(function(O){(P._status===0||P._status===-1)&&(P._status=1,P._result=O)},function(O){(P._status===0||P._status===-1)&&(P._status=2,P._result=O)}),P._status===-1&&(P._status=0,P._result=G)}if(P._status===1)return P._result.default;throw P._result}var Z={current:null},q={transition:null},W={ReactCurrentDispatcher:Z,ReactCurrentBatchConfig:q,ReactCurrentOwner:F};function v(){throw Error("act(...) is not supported in production builds of React.")}return Re.Children={map:be,forEach:function(P,G,O){be(P,function(){G.apply(this,arguments)},O)},count:function(P){var G=0;return be(P,function(){G++}),G},toArray:function(P){return be(P,function(G){return G})||[]},only:function(P){if(!U(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},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=W,Re.act=v,Re.cloneElement=function(P,G,O){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var ye=x({},P.props),Oe=P.key,Ie=P.ref,He=P._owner;if(G!=null){if(G.ref!==void 0&&(Ie=G.ref,He=F.current),G.key!==void 0&&(Oe=""+G.key),P.type&&P.type.defaultProps)var ve=P.type.defaultProps;for(Ye in G)Y.call(G,Ye)&&!te.hasOwnProperty(Ye)&&(ye[Ye]=G[Ye]===void 0&&ve!==void 0?ve[Ye]:G[Ye])}var Ye=arguments.length-2;if(Ye===1)ye.children=O;else if(1<Ye){ve=Array(Ye);for(var dt=0;dt<Ye;dt++)ve[dt]=arguments[dt+2];ye.children=ve}return{$$typeof:e,type:P.type,key:Oe,ref:Ie,props:ye,_owner:He}},Re.createContext=function(P){return P={$$typeof:u,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:a,_context:P},P.Consumer=P},Re.createElement=ce,Re.createFactory=function(P){var G=ce.bind(null,P);return G.type=P,G},Re.createRef=function(){return{current:null}},Re.forwardRef=function(P){return{$$typeof:c,render:P}},Re.isValidElement=U,Re.lazy=function(P){return{$$typeof:p,_payload:{_status:-1,_result:P},_init:we}},Re.memo=function(P,G){return{$$typeof:h,type:P,compare:G===void 0?null:G}},Re.startTransition=function(P){var G=q.transition;q.transition={};try{P()}finally{q.transition=G}},Re.unstable_act=v,Re.useCallback=function(P,G){return Z.current.useCallback(P,G)},Re.useContext=function(P){return Z.current.useContext(P)},Re.useDebugValue=function(){},Re.useDeferredValue=function(P){return Z.current.useDeferredValue(P)},Re.useEffect=function(P,G){return Z.current.useEffect(P,G)},Re.useId=function(){return Z.current.useId()},Re.useImperativeHandle=function(P,G,O){return Z.current.useImperativeHandle(P,G,O)},Re.useInsertionEffect=function(P,G){return Z.current.useInsertionEffect(P,G)},Re.useLayoutEffect=function(P,G){return Z.current.useLayoutEffect(P,G)},Re.useMemo=function(P,G){return Z.current.useMemo(P,G)},Re.useReducer=function(P,G,O){return Z.current.useReducer(P,G,O)},Re.useRef=function(P){return Z.current.useRef(P)},Re.useState=function(P){return Z.current.useState(P)},Re.useSyncExternalStore=function(P,G,O){return Z.current.useSyncExternalStore(P,G,O)},Re.useTransition=function(){return Z.current.useTransition()},Re.version="18.3.1",Re}var un;function yo(){return un||(un=1,pt.exports=xt()),pt.exports}var Rs;function ud(){if(Rs)return bt;Rs=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 a2(){return Gn||(Gn=1,rt.exports=ud()),rt.exports}var _=a2();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 u2(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+/",Ls=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<f0.length;e++)Ls[f0.charCodeAt(e)]=e;const l2=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=Ls[e.charCodeAt(r)],u=Ls[e.charCodeAt(r+1)],c=Ls[e.charCodeAt(r+2)],d=Ls[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},c2=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:d2(e.substring(1),t)}:yu[n]?e.length>1?{type:yu[n],data:e.substring(1)}:{type:yu[n]}:ld},d2=(e,t)=>{if(c2){const n=l2(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="",f2=(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))})})},h2=(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 p2(){return new TransformStream({transform(e,t){u2(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 m2(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 g2(e)}function g2(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")(),E2="arraybuffer";function DB(){}function g0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const y2=Ln.setTimeout,T2=Ln.clearTimeout;function xu(e,t){t.useNativeTimers?(e.setTimeoutFn=y2.bind(Ln),e.clearTimeoutFn=T2.bind(Ln)):(e.setTimeoutFn=Ln.setTimeout.bind(Ln),e.clearTimeoutFn=Ln.clearTimeout.bind(Ln))}const b2=1.33;function _2(e){return typeof e=="string"?x2(e):Math.ceil((e.byteLength||e.size)*b2)}function x2(e){let t=0,n=0;for(let r=0,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 w2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function S2(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class v2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class pd extends 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 v2(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=fd(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=w2(t);return n.length?"?"+n:""}}class A2 extends pd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};h2(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,f2(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=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 C2=y0;function k2(){}class N2 extends A2{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(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=k2,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 O2=(function(){const e=b0({xdomain:!1});return e&&e.responseType!==null})();class P2 extends N2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=O2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new hr(b0,this.uri(),t)}}function b0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||C2))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 I2 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 R2 extends I2{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 L2 extends pd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=m2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=p2();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 D2={websocket:R2,webtransport:L2,polling:P2},M2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,F2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function gd(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=M2.exec(e||""),a={},u=14;for(;u--;)a[F2[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=B2(a,a.path),a.queryKey=U2(a,a.query),a}function B2(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function U2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,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 Gr extends Ct{constructor(t,n){if(super(),this.binaryType=E2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=gd(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=gd(n.host).host);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=S2(this.opts.query)),Ed&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},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&&Gr.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",Gr.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+=_2(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(Gr.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}}}Gr.protocol=m0;class H2 extends Gr{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;Gr.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;Gr.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 z2=class extends H2{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=>D2[a]).filter(a=>!!a)),super(r?o:t,o)}};function j2(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=gd(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const $2=typeof ArrayBuffer=="function",V2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,x0=Object.prototype.toString,q2=typeof Blob=="function"||typeof Blob!="undefined"&&x0.call(Blob)==="[object BlobConstructor]",Y2=typeof File=="function"||typeof File!="undefined"&&x0.call(File)==="[object FileConstructor]";function yd(e){return $2&&(e instanceof ArrayBuffer||V2(e))||q2&&e instanceof Blob||Y2&&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 W2(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 G2(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 X2=["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 K2{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=W2(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 Q2(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(!J2(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"&&X2.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 Q2{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=G2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const J2=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function w0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Z2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:_d,Encoder:K2,get PacketType(){return Ke}},Symbol.toStringTag,{value:"Module"}));function Xn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const eS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class 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(eS.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type: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||Z2;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 z2(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 Ds={};function wd(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=j2(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=Ds[o]&&a in Ds[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new xd(r,t):(Ds[o]||(Ds[o]=new xd(r,t)),d=Ds[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 V=yo();const Ni=Ge(V);let tS=class{constructor(){this.listeners=new Map,this.onceListeners=new Map}on(t,n){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(n)}once(t,n){this.onceListeners.has(t)||this.onceListeners.set(t,new Set),this.onceListeners.get(t).add(n)}off(t,n){var r,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 nS{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 Ve(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 Ve(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 Vr extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let s_=class extends Vr{constructor(t,n,r,o){super(t,"api",o),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class Gm extends Vr{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let id=class extends Vr{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class a_{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 u_ extends i_{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:o={}}){var u,c,d,h,p,g,T;super(),this._accessToken=null,this._tokenExpiresAt=0,this._conversationId=null,this._isConnected=!1,this._usingContinuationToken=!1,this.sseReader=null,this.reconnectAttempts=0,this.reconnectTimeout=null,this.intentionalDisconnect=!1,this.baseURL=t.replace(/\/+$/,""),this.orgId=n,this.esDeveloperName=r;const a={maxRetries:(u=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:(T=o.capabilitiesVersion)!=null?T:"1"};this.maxRetries=a.maxRetries,this.timeout=a.timeout,this.maxReconnectAttempts=a.maxReconnectAttempts,this.reconnectDelay=a.reconnectDelay,this.platform=a.platform,this.capabilitiesVersion=a.capabilitiesVersion,this.logger=new a_(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 $e(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 $e(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 $e(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new Vr("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 $e(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 $e(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 $e(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:[]}})}resumeConversation(t){if(this.assertConnected(),!t)throw new Vr("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return $e(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 $e(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 o_(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(()=>$e(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 T=g.participant,y=g.displayName||(T==null?void 0:T.displayName)||((o=t.conversationEntry)==null?void 0:o.senderDisplayName)||"Agent",w=(T==null?void 0:T.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:w,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",T=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(T)})}}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 $e(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 id("Token response missing accessToken field");return this._tokenExpiresAt=this.getTokenExpiry(n.accessToken),n.accessToken})}executeRequest(t,n,r,o){return $e(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 T=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 id(`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 id(`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 s_(`Request ${t} ${n} failed (${g.status}): ${T}`,g.status,T)}return g.status===204||t==="DELETE"?{}:g.text().then(T=>T?JSON.parse(T):null)}catch(d){if(clearTimeout(c),d instanceof Vr)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new Gm("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 Gm(`Network error: ${d.message}`,u,{cause:d})}throw new Vr(`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 Vr("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 D="cim-widget",Cr=`--${D}`,qr={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},l_=(e=qr)=>({[`${Cr}-primary-color`]:e.primaryColor||qr.primaryColor,[`${Cr}-secondary-color`]:e.secondaryColor||qr.secondaryColor,[`${Cr}-font-color`]:e.fontColor||qr.fontColor,[`${Cr}-font-family`]:e.fontFamily||qr.fontFamily,[`${Cr}-background-color`]:e.backgroundColor||qr.backgroundColor,[`${Cr}-border-color`]:e.borderColor||qr.borderColor,[`${Cr}-border-radius`]:e.borderRadius||qr.borderRadius});function Km(e,t){return function(){return e.apply(t,arguments)}}const{toString:c_}=Object.prototype,{getPrototypeOf:hu}=Object,{iterator:pu,toStringTag:Qm}=Symbol,mu=(e=>t=>{const n=c_.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qn=e=>(e=e.toLowerCase(),t=>mu(t)===e),gu=e=>t=>typeof t===e,{isArray:fo}=Array,ho=gu("undefined");function Ss(e){return e!==null&&!ho(e)&&e.constructor!==null&&!ho(e.constructor)&&un(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Xm=qn("ArrayBuffer");function d_(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Xm(e.buffer),t}const f_=gu("string"),un=gu("function"),Jm=gu("number"),As=e=>e!==null&&typeof e=="object",h_=e=>e===!0||e===!1,Eu=e=>{if(mu(e)!=="object")return!1;const t=hu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Qm in e)&&!(pu in e)},p_=e=>{if(!As(e)||Ss(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},m_=qn("Date"),g_=qn("File"),E_=e=>!!(e&&typeof e.uri!="undefined"),y_=e=>e&&typeof e.getParts!="undefined",b_=qn("Blob"),T_=qn("FileList"),x_=e=>As(e)&&un(e.pipe);function w_(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const Zm=w_(),e0=typeof Zm.FormData!="undefined"?Zm.FormData:void 0,__=e=>{if(!e)return!1;if(e0&&e instanceof e0)return!0;const t=hu(e);if(!t||t===Object.prototype||!un(e.append))return!1;const n=mu(e);return n==="formdata"||n==="object"&&un(e.toString)&&e.toString()==="[object FormData]"},v_=qn("URLSearchParams"),[S_,A_,C_,k_]=["ReadableStream","Request","Response","Headers"].map(qn),N_=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Cs(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),fo(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Ss(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 t0(e,t){if(Ss(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 vi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,n0=e=>!ho(e)&&e!==vi;function od(...e){const{caseless:t,skipUndefined:n}=n0(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&t0(r,u)||u,d=sd(r,c)?r[c]:void 0;Eu(d)&&Eu(a)?r[c]=od(d,a):Eu(a)?r[c]=od({},a):fo(a)?r[c]=a.slice():(!n||!ho(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++)e[a]&&Cs(e[a],o);return r}const O_=(e,t,n,{allOwnKeys:r}={})=>(Cs(t,(o,a)=>{n&&un(o)?Object.defineProperty(e,a,{__proto__:null,value:Km(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),I_=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),R_=(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)},P_=(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&&hu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},L_=(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},D_=e=>{if(!e)return null;if(fo(e))return e;let t=e.length;if(!Jm(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},M_=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&hu(Uint8Array)),F_=(e,t)=>{const r=(e&&e[pu]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},B_=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},U_=qn("HTMLFormElement"),H_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),sd=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),z_=qn("RegExp"),r0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Cs(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},j_=e=>{r0(e,(t,n)=>{if(un(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(un(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+"'")})}})},$_=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return fo(e)?r(e):r(String(e).split(t)),n},V_=()=>{},q_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Y_(e){return!!(e&&un(e.append)&&e[Qm]==="FormData"&&e[pu])}const W_=e=>{const t=new WeakSet,n=r=>{if(As(r)){if(t.has(r))return;if(Ss(r))return r;if(!("toJSON"in r)){t.add(r);const o=fo(r)?[]:{};return Cs(r,(a,u)=>{const c=n(a);!ho(c)&&(o[u]=c)}),t.delete(r),o}}return r};return n(e)},G_=qn("AsyncFunction"),K_=e=>e&&(As(e)||un(e))&&un(e.then)&&un(e.catch),i0=((e,t)=>e?setImmediate:t?((n,r)=>(vi.addEventListener("message",({source:o,data:a})=>{o===vi&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),vi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",un(vi.postMessage)),Q_=typeof queueMicrotask!="undefined"?queueMicrotask.bind(vi):typeof process!="undefined"&&process.nextTick||i0,G={isArray:fo,isArrayBuffer:Xm,isBuffer:Ss,isFormData:__,isArrayBufferView:d_,isString:f_,isNumber:Jm,isBoolean:h_,isObject:As,isPlainObject:Eu,isEmptyObject:p_,isReadableStream:S_,isRequest:A_,isResponse:C_,isHeaders:k_,isUndefined:ho,isDate:m_,isFile:g_,isReactNativeBlob:E_,isReactNative:y_,isBlob:b_,isRegExp:z_,isFunction:un,isStream:x_,isURLSearchParams:v_,isTypedArray:M_,isFileList:T_,forEach:Cs,merge:od,extend:O_,trim:N_,stripBOM:I_,inherits:R_,toFlatObject:P_,kindOf:mu,kindOfTest:qn,endsWith:L_,toArray:D_,forEachEntry:F_,matchAll:B_,isHTMLForm:U_,hasOwnProperty:sd,hasOwnProp:sd,reduceDescriptors:r0,freezeMethods:j_,toObjectSet:$_,toCamelCase:H_,noop:V_,toFiniteNumber:q_,findKey:t0,global:vi,isContextDefined:n0,isSpecCompliantForm:Y_,toJSONObject:W_,isAsyncFn:G_,isThenable:K_,setImmediate:i0,asap:Q_,isIterable:e=>e!=null&&un(e[pu])},X_=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"]),J_=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[s0]=this[s0]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=ks(u);r[c]||(av(o,u),r[c]=!0)}return G.isArray(t)?t.forEach(a):a(t),this}};tn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(tn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),G.freezeMethods(tn);const uv="[REDACTED ****]";function lv(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 cv(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 tn&&(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)&&lv(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const h=n.has(c.toLowerCase())?uv:o(d);G.isUndefined(h)||(u[c]=h)}}return r.pop(),u};return o(e)}let Ae=class a2 extends Error{static from(t,n,r,o,a,u){const c=new a2(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?cv(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 dv=null;function ld(e){return G.isPlainObject(e)||G.isArray(e)}function a0(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function cd(e,t,n){return e?e.concat(t).map(function(o,a){return o=a0(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function fv(e){return G.isArray(e)&&!e.some(ld)}const hv=G.toFlatObject(G,{},null,function(t){return/^is[A-Z]/.test(t)});function bu(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(cd(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)&&fv(v)||(G.isFileList(v)||G.endsWith(A,"[]"))&&(k=G.toArray(v)))return A=a0(A),k.forEach(function(U,Y){!(G.isUndefined(U)||U===null)&&t.append(u===!0?cd([A],Y,a):u===null?A:A+"[]",p(U))}),!1}return ld(v)?!0:(t.append(cd(C,A,a),p(v)),!1)}const T=[],y=Object.assign(hv,{defaultVisitor:g,convertValue:p,isVisitable:ld});function w(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(T.indexOf(v)!==-1)throw Error("Circular reference detected in "+A.join("."));T.push(v),G.forEach(v,function(R,U){(!(G.isUndefined(R)||R===null)&&o.call(t,R,G.isString(U)?U.trim():U,A,y))===!0&&w(R,A?A.concat(U):[U],C+1)}),T.pop()}}if(!G.isObject(e))throw new TypeError("data must be an object");return w(e),t}function u0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function dd(e,t){this._pairs=[],e&&bu(e,this,t)}const l0=dd.prototype;l0.append=function(t,n){this._pairs.push([t,n])},l0.toString=function(t){const n=t?function(r){return t.call(this,r,u0)}:u0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function pv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function c0(e,t,n){if(!t)return e;const r=n&&n.encode||pv,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 dd(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class d0{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 fd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},mv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:dd,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},hd=typeof window!="undefined"&&typeof document!="undefined",pd=typeof navigator=="object"&&navigator||void 0,gv=hd&&(!pd||["ReactNative","NativeScript","NS"].indexOf(pd.product)<0),Ev=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",yv=hd&&window.location.href||"http://localhost",Yt=B(B({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hd,hasStandardBrowserEnv:gv,hasStandardBrowserWebWorkerEnv:Ev,navigator:pd,origin:yv},Symbol.toStringTag,{value:"Module"}))),mv);function bv(e,t){return bu(e,new Yt.classes.URLSearchParams,B({visitor:function(n,r,o,a){return Yt.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 xv(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 f0(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]=xv(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 po=(e,t)=>e!=null&&G.hasOwnProp(e,t)?e[t]:void 0;function wv(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 Ns={transitional:fd,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(f0(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=po(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return bv(t,d).toString();if((c=G.isFileList(t))||r.indexOf("multipart/form-data")>-1){const h=po(this,"env"),p=h&&h.FormData;return bu(c?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),wv(t)):t}],transformResponse:[function(t){const n=po(this,"transitional")||Ns.transitional,r=n&&n.forcedJSONParsing,o=po(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,po(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Ae.from(d,Ae.ERR_BAD_RESPONSE,this,null,po(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yt.classes.FormData,Blob:Yt.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=>{Ns.headers[e]={}});function md(e,t){const n=this||Ns,r=t||n,o=tn.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 h0(e){return!!(e&&e.__CANCEL__)}let Os=class extends Ae{constructor(t,n,r){super(t==null?"canceled":t,Ae.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function p0(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 vv(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,T=0;for(;g!==o;)T+=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(T*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 Tu=(e,t,n=3)=>{let r=0;const o=vv(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)},m0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},g0=e=>(...t)=>G.asap(()=>e(...t)),Av=Yt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Yt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Yt.origin),Yt.navigator&&/(msie|trident)/i.test(Yt.navigator.userAgent)):()=>!0,Cv=Yt.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 Nv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function E0(e,t,n){let r=!kv(t);return e&&(r||n===!1)?Nv(e,t):t}const y0=e=>e instanceof tn?B({},e):e;function Si(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,T){return G.isPlainObject(h)&&G.isPlainObject(p)?G.merge.call({caseless:T},h,p):G.isPlainObject(p)?G.merge({},p):G.isArray(p)?p.slice():p}function o(h,p,g,T){if(G.isUndefined(p)){if(!G.isUndefined(h))return r(void 0,h,g,T)}else return r(h,p,g,T)}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(y0(h),y0(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,T=G.hasOwnProp(e,p)?e[p]:void 0,y=G.hasOwnProp(t,p)?t[p]:void 0,w=g(T,y,p);G.isUndefined(w)&&g!==c||(n[p]=w)}),n}const Ov=["content-type","content-length"];function Iv(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{Ov.includes(r.toLowerCase())&&e.set(r,o)})}const Rv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),b0=e=>{const t=Si({},e),n=T=>G.hasOwnProp(t,T)?t[T]: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=tn.from(c),t.url=c0(E0(h,g,p),e.params,e.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?Rv(d.password):""))),G.isFormData(r)&&(Yt.hasStandardBrowserEnv||Yt.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):G.isFunction(r.getHeaders)&&Iv(c,r.getHeaders(),n("formDataHeaderPolicy"))),Yt.hasStandardBrowserEnv&&(G.isFunction(o)&&(o=o(t)),o===!0||o==null&&Av(t.url))){const y=a&&u&&Cv.read(u);y&&c.set(a,y)}return t},Pv=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=b0(e);let a=o.data;const u=tn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:h}=o,p,g,T,y,w;function v(){y&&y(),w&&w(),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 R=tn.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),Y={data:!c||c==="text"||c==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:R,config:e,request:A};p0(function(X){n(X),v()},function(X){r(X),v()},Y),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(U){const Y=U&&U.message?U.message:"Network Error",F=new Ae(Y,Ae.ERR_NETWORK,e,A);F.event=U||null,r(F),v(),A=null},A.ontimeout=function(){let U=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const Y=o.transitional||fd;o.timeoutErrorMessage&&(U=o.timeoutErrorMessage),r(new Ae(U,Y.clarifyTimeoutError?Ae.ETIMEDOUT:Ae.ECONNABORTED,e,A)),v(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&G.forEach(o0(u),function(U,Y){A.setRequestHeader(Y,U)}),G.isUndefined(o.withCredentials)||(A.withCredentials=!!o.withCredentials),c&&c!=="json"&&(A.responseType=o.responseType),h&&([T,w]=Tu(h,!0),A.addEventListener("progress",T)),d&&A.upload&&([g,y]=Tu(d),A.upload.addEventListener("progress",g),A.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=R=>{A&&(r(!R||R.type?new Os(null,e,A):R),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&&!Yt.protocols.includes(k)){r(new Ae("Unsupported protocol "+k+":",Ae.ERR_BAD_REQUEST,e));return}A.send(a||null)})},Lv=(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 Os(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},Dv=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},Mv=function(e,t){return Am(this,null,function*(){try{for(var n=s2(Fv(e)),r,o,a;r=!(o=yield new uo(n.next())).done;r=!1){const u=o.value;yield*Cm(Dv(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new uo(o.call(n)))}finally{if(a)throw a[0]}}})},Fv=function(e){return Am(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Cm(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new uo(t.read());if(n)break;yield r}}finally{yield new uo(t.cancel())}})},T0=(e,t,n,r)=>{const o=Mv(e,t);let a=0,u,c=h=>{u||(u=!0,r&&r(h))};return new ReadableStream({pull(h){return $e(this,null,function*(){try{const{done:p,value:g}=yield o.next();if(p){c(),h.close();return}let T=g.byteLength;if(n){let y=a+=T;n(y)}h.enqueue(new Uint8Array(g))}catch(p){throw c(p),p}})},cancel(h){return c(h),o.return()}},{highWaterMark:2})};function Bv(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 w=r.charCodeAt(y+1),v=r.charCodeAt(y+2);(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=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 T=Math.floor(u/4)*3-(d||0);return T>0?T: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 gd="1.16.1",x0=64*1024,{isFunction:xu}=G,w0=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Uv=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?xu(o):typeof fetch=="function",d=xu(a),h=xu(u);if(!c)return!1;const p=c&&xu(n),g=c&&(typeof r=="function"?(C=>k=>C.encode(k))(new r):C=>$e(null,null,function*(){return new Uint8Array(yield new a(C).arrayBuffer())})),T=d&&p&&w0(()=>{let C=!1;const k=new a(Yt.origin,{body:new n,method:"POST",get duplex(){return C=!0,"half"}}),R=k.headers.has("Content-Type");return k.body!=null&&k.body.cancel(),C&&!R}),y=h&&p&&w0(()=>G.isReadableStream(new u("").body)),w={stream:y&&(C=>C.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(C=>{!w[C]&&(w[C]=(k,R)=>{let U=k&&k[C];if(U)return U.call(k);throw new Ae(`Response type '${C}' is not supported`,Ae.ERR_NOT_SUPPORT,R)})});const v=C=>$e(null,null,function*(){if(C==null)return 0;if(G.isBlob(C))return C.size;if(G.isSpecCompliantForm(C))return(yield new a(Yt.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)=>$e(null,null,function*(){const R=G.toFiniteNumber(C.getContentLength());return R==null?v(k):R});return C=>$e(null,null,function*(){let{url:k,method:R,data:U,signal:Y,cancelToken:F,timeout:X,onDownloadProgress:ce,onUploadProgress:de,responseType:z,headers:oe,withCredentials:he="same-origin",fetchOptions:ae,maxContentLength:se,maxBodyLength:Te}=b0(C);const Ce=G.isNumber(se)&&se>-1,ee=G.isNumber(Te)&&Te>-1;let V=o||fetch;z=z?(z+"").toLowerCase():"text";let q=Lv([Y,F&&F.toAbortSignal()],X),S=null;const I=q&&q.unsubscribe&&(()=>{q.unsubscribe()});let W;try{if(Ce&&typeof k=="string"&&k.startsWith("data:")&&Bv(k)>se)throw new Ae("maxContentLength size of "+se+" exceeded",Ae.ERR_BAD_RESPONSE,C,S);if(ee&&R!=="get"&&R!=="head"){const ve=yield A(oe,U);if(typeof ve=="number"&&isFinite(ve)&&ve>Te)throw new Ae("Request body larger than maxBodyLength limit",Ae.ERR_BAD_REQUEST,C,S)}if(de&&T&&R!=="get"&&R!=="head"&&(W=yield A(oe,U))!==0){let ve=new a(k,{method:"POST",body:U,duplex:"half"}),qe;if(G.isFormData(U)&&(qe=ve.headers.get("content-type"))&&oe.setContentType(qe),ve.body){const[ut,pn]=m0(W,Tu(g0(de)));U=T0(ve.body,x0,ut,pn)}}G.isString(he)||(he=he?"include":"omit");const O=d&&"credentials"in a.prototype;if(G.isFormData(U)){const ve=oe.getContentType();ve&&/^multipart\/form-data/i.test(ve)&&!/boundary=/i.test(ve)&&oe.delete("content-type")}oe.set("User-Agent","axios/"+gd,!1);const be=ie(B({},ae),{signal:q,method:R.toUpperCase(),headers:o0(oe.normalize()),body:U,duplex:"half",credentials:O?he:void 0});S=d&&new a(k,be);let Oe=yield d?V(S,ae):V(k,be);if(Ce){const ve=G.toFiniteNumber(Oe.headers.get("content-length"));if(ve!=null&&ve>se)throw new Ae("maxContentLength size of "+se+" exceeded",Ae.ERR_BAD_RESPONSE,C,S)}const Re=y&&(z==="stream"||z==="response");if(y&&Oe.body&&(ce||Ce||Re&&I)){const ve={};["status","statusText","headers"].forEach(Jn=>{ve[Jn]=Oe[Jn]});const qe=G.toFiniteNumber(Oe.headers.get("content-length")),[ut,pn]=ce&&m0(qe,Tu(g0(ce),!0))||[];let Wi=0;const ei=Jn=>{if(Ce&&(Wi=Jn,Wi>se))throw new Ae("maxContentLength size of "+se+" exceeded",Ae.ERR_BAD_RESPONSE,C,S);ut&&ut(Jn)};Oe=new u(T0(Oe.body,x0,ei,()=>{pn&&pn(),I&&I()}),ve)}z=z||"text";let He=yield w[G.findKey(w,z)||"text"](Oe,C);if(Ce&&!y&&!Re){let ve;if(He!=null&&(typeof He.byteLength=="number"?ve=He.byteLength:typeof He.size=="number"?ve=He.size:typeof He=="string"&&(ve=typeof r=="function"?new r().encode(He).byteLength:He.length)),typeof ve=="number"&&ve>se)throw new Ae("maxContentLength size of "+se+" exceeded",Ae.ERR_BAD_RESPONSE,C,S)}return!Re&&I&&I(),yield new Promise((ve,qe)=>{p0(ve,qe,{data:He,headers:tn.from(Oe.headers),status:Oe.status,statusText:Oe.statusText,config:C,request:S})})}catch(O){if(I&&I(),q&&q.aborted&&q.reason instanceof Ae){const be=q.reason;throw be.config=C,S&&(be.request=S),O!==be&&(be.cause=O),be}throw O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message)?Object.assign(new Ae("Network Error",Ae.ERR_NETWORK,C,S,O&&O.response),{cause:O.cause||O}):Ae.from(O,O&&O.code,C,S,O&&O.response)}})},Hv=new Map,_0=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=Hv;for(;c--;)d=a[c],h=p.get(d),h===void 0&&p.set(d,h=c?new Map:Uv(t)),p=h;return h};_0();const Ed={http:dv,xhr:Pv,fetch:{get:_0}};G.forEach(Ed,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const v0=e=>`- ${e}`,zv=e=>G.isFunction(e)||e===null||e===!1;function jv(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,!zv(r)&&(o=Ed[(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 Xr extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let rS=class extends Xr{constructor(t,n,r,o){super(t,"api",o),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class C0 extends Xr{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let Sd=class extends Xr{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class iS{constructor(t){this.prefix="[Agentforce]",this.enabled=t}info(t,...n){this.enabled&&console.log(`${this.prefix} ${t}`,...n)}warn(t,...n){this.enabled&&console.warn(`${this.prefix} ${t}`,...n)}error(t,...n){this.enabled&&console.error(`${this.prefix} ${t}`,...n)}debug(t,...n){this.enabled&&console.debug(`${this.prefix} ${t}`,...n)}}class oS extends tS{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 iS(a.enableLogging),this.logger.info(`Client initialized for ${this.baseURL}`)}get isConnected(){return this._isConnected}get conversationId(){return this._conversationId}get accessToken(){return this._accessToken}connect(t){return Ve(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 Ve(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 Ve(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new Xr("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 Ve(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 Ve(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 Ve(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:[]}})}resumeConversation(t){if(this.assertConnected(),!t)throw new Xr("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return Ve(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 Ve(this,null,function*(){this.closeSSE();const n=`${this.baseURL}/eventrouter/v1/sse`,r={Authorization:`Bearer ${this._accessToken}`,"X-Org-Id":this.orgId};t&&(r["Last-Event-ID"]=t),this.sseReader=new nS(n,r,(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(()=>Ve(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)||"",S=g.operation||g.event||"";this.emit("participant_changed",{conversationId:this._conversationId||"",participant:{role:x,name:y},action:this.normalizeParticipantAction(S)})}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 Ve(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 Ve(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 rS(`Request ${t} ${n} failed (${g.status}): ${b}`,g.status,b)}return g.status===204||t==="DELETE"?{}:g.text().then(b=>b?JSON.parse(b):null)}catch(d){if(clearTimeout(c),d instanceof Xr)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 Xr(`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 Xr("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"},sS=(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:aS}=Object.prototype,{getPrototypeOf:vu}=Object,{iterator:Au,toStringTag:N0}=Symbol,Cu=(e=>t=>{const n=aS.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 Ms(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 uS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&O0(e.buffer),t}const lS=ku("string"),ln=ku("function"),P0=ku("number"),Fs=e=>e!==null&&typeof e=="object",cS=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)},dS=e=>{if(!Fs(e)||Ms(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},fS=Kn("Date"),hS=Kn("File"),pS=e=>!!(e&&typeof e.uri!="undefined"),mS=e=>e&&typeof e.getParts!="undefined",gS=Kn("Blob"),ES=Kn("FileList"),yS=e=>Fs(e)&&ln(e.pipe);function TS(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const I0=TS(),R0=typeof I0.FormData!="undefined"?I0.FormData:void 0,bS=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]"},_S=Kn("URLSearchParams"),[xS,wS,SS,vS]=["ReadableStream","Request","Response","Headers"].map(Kn),AS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Bs(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(Ms(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(Ms(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]&&Bs(e[a],o);return r}const CS=(e,t,n,{allOwnKeys:r}={})=>(Bs(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),kS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),NS=(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)},OS=(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},PS=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},IS=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},RS=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&vu(Uint8Array)),LS=(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])}},DS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},MS=Kn("HTMLFormElement"),FS=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),BS=Kn("RegExp"),M0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Bs(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},US=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+"'")})}})},HS=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return bo(e)?r(e):r(String(e).split(t)),n},zS=()=>{},jS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function $S(e){return!!(e&&ln(e.append)&&e[N0]==="FormData"&&e[Au])}const VS=e=>{const t=new WeakSet,n=r=>{if(Fs(r)){if(t.has(r))return;if(Ms(r))return r;if(!("toJSON"in r)){t.add(r);const o=bo(r)?[]:{};return Bs(r,(a,u)=>{const c=n(a);!_o(c)&&(o[u]=c)}),t.delete(r),o}}return r};return n(e)},qS=Kn("AsyncFunction"),YS=e=>e&&(Fs(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)),WS=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Oi):typeof process!="undefined"&&process.nextTick||F0,X={isArray:bo,isArrayBuffer:O0,isBuffer:Ms,isFormData:bS,isArrayBufferView:uS,isString:lS,isNumber:P0,isBoolean:cS,isObject:Fs,isPlainObject:Nu,isEmptyObject:dS,isReadableStream:xS,isRequest:wS,isResponse:SS,isHeaders:vS,isUndefined:_o,isDate:fS,isFile:hS,isReactNativeBlob:pS,isReactNative:mS,isBlob:gS,isRegExp:BS,isFunction:ln,isStream:yS,isURLSearchParams:_S,isTypedArray:RS,isFileList:ES,forEach:Bs,merge:vd,extend:CS,trim:AS,stripBOM:kS,inherits:NS,toFlatObject:OS,kindOf:Cu,kindOfTest:Kn,endsWith:PS,toArray:IS,forEachEntry:LS,matchAll:DS,isHTMLForm:MS,hasOwnProperty:Ad,hasOwnProp:Ad,reduceDescriptors:M0,freezeMethods:US,toObjectSet:HS,toCamelCase:FS,noop:zS,toFiniteNumber:jS,findKey:L0,global:Oi,isContextDefined:D0,isSpecCompliantForm:$S,toJSONObject:VS,isAsyncFn:qS,isThenable:YS,setImmediate:F0,asap:WS,isIterable:e=>e!=null&&ln(e[Au])},GS=X.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),XS=e=>{const t={};let n,r,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]&&GS[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function KS(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 QS=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),JS=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Cd(e,t){return X.isArray(e)?e.map(n=>Cd(n,t)):KS(String(e).replace(t,""))}const ZS=e=>Cd(e,QS),ev=e=>Cd(e,JS);function B0(e){const t=Object.create(null);return X.forEach(e.toJSON(),(n,r)=>{t[r]=ev(n)}),t}const U0=Symbol("internals");function Us(e){return e&&String(e).trim().toLowerCase()}function Ou(e){return e===!1||e==null?e:X.isArray(e)?e.map(Ou):ZS(String(e))}function tv(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const nv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function kd(e,t,n,r,o){if(X.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!X.isString(t)){if(X.isString(r))return t.indexOf(r)!==-1;if(X.isRegExp(r))return r.test(t)}}function rv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function iv(e,t){const n=X.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=Us(d);if(!p)throw new Error("header name must be a non-empty string");const g=X.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)=>X.forEach(c,(h,p)=>a(h,p,d));if(X.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(X.isString(t)&&(t=t.trim())&&!nv(t))u(XS(t),n);else if(X.isObject(t)&&X.isIterable(t)){let c={},d,h;for(const p of t){if(!X.isArray(p))throw TypeError("Object iterator must return a key-value pair");c[h=p[0]]=(d=c[h])?X.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=Us(t),t){const r=X.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return tv(o);if(X.isFunction(n))return n.call(this,o,r);if(X.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Us(t),t){const r=X.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||kd(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=Us(u),u){const c=X.findKey(r,u);c&&(!n||kd(r,r[c],c,n))&&(delete r[c],o=!0)}}return X.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||kd(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return X.forEach(this,(o,a)=>{const u=X.findKey(r,a);if(u){n[u]=Ou(o),delete n[a];return}const c=t?rv(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 X.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&X.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[U0]=this[U0]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=Us(u);r[c]||(iv(o,u),r[c]=!0)}return X.isArray(t)?t.forEach(a):a(t),this}};nn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),X.reduceDescriptors(nn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),X.freezeMethods(nn);const ov="[REDACTED ****]";function sv(e){if(X.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(X.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function av(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||X.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof nn&&(a=a.toJSON()),r.push(a);let u;if(X.isArray(a))u=[],a.forEach((c,d)=>{const h=o(c);X.isUndefined(h)||(u[d]=h)});else{if(!X.isPlainObject(a)&&sv(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const h=n.has(c.toLowerCase())?ov:o(d);X.isUndefined(h)||(u[c]=h)}}return r.pop(),u};return o(e)}let Ce=class i2 extends Error{static from(t,n,r,o,a,u){const c=new i2(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&&X.hasOwnProp(t,"redact")?t.redact:void 0,r=X.isArray(n)&&n.length>0?av(t,n):X.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Ce.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ce.ERR_BAD_OPTION="ERR_BAD_OPTION",Ce.ECONNABORTED="ECONNABORTED",Ce.ETIMEDOUT="ETIMEDOUT",Ce.ECONNREFUSED="ECONNREFUSED",Ce.ERR_NETWORK="ERR_NETWORK",Ce.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ce.ERR_DEPRECATED="ERR_DEPRECATED",Ce.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ce.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ce.ERR_CANCELED="ERR_CANCELED",Ce.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ce.ERR_INVALID_URL="ERR_INVALID_URL",Ce.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const uv=null;function Nd(e){return X.isPlainObject(e)||X.isArray(e)}function H0(e){return X.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 lv(e){return X.isArray(e)&&!e.some(Nd)}const cv=X.toFlatObject(X,{},null,function(t){return/^is[A-Z]/.test(t)});function Pu(e,t,n){if(!X.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=X.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,C){return!X.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&&X.isSpecCompliantForm(t);if(!X.isFunction(o))throw new TypeError("visitor must be a function");function p(S){if(S===null)return"";if(X.isDate(S))return S.toISOString();if(X.isBoolean(S))return S.toString();if(!h&&X.isBlob(S))throw new Ce("Blob is not supported. Use a Buffer instead.");return X.isArrayBuffer(S)||X.isTypedArray(S)?h&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function g(S,A,C){let k=S;if(X.isReactNative(t)&&X.isReactNativeBlob(S))return t.append(Od(C,A,a),p(S)),!1;if(S&&!C&&typeof S=="object"){if(X.endsWith(A,"{}"))A=r?A:A.slice(0,-2),S=JSON.stringify(S);else if(X.isArray(S)&&lv(S)||(X.isFileList(S)||X.endsWith(A,"[]"))&&(k=X.toArray(S)))return A=H0(A),k.forEach(function(j,Y){!(X.isUndefined(j)||j===null)&&t.append(u===!0?Od([A],Y,a):u===null?A:A+"[]",p(j))}),!1}return Nd(S)?!0:(t.append(Od(C,A,a),p(S)),!1)}const b=[],y=Object.assign(cv,{defaultVisitor:g,convertValue:p,isVisitable:Nd});function x(S,A,C=0){if(!X.isUndefined(S)){if(C>d)throw new Ce("Object is too deeply nested ("+C+" levels). Max depth: "+d,Ce.ERR_FORM_DATA_DEPTH_EXCEEDED);if(b.indexOf(S)!==-1)throw Error("Circular reference detected in "+A.join("."));b.push(S),X.forEach(S,function(I,j){(!(X.isUndefined(I)||I===null)&&o.call(t,I,X.isString(j)?j.trim():j,A,y))===!0&&x(I,A?A.concat(j):[j],C+1)}),b.pop()}}if(!X.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 dv(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||dv,o=X.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=X.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){X.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Id={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},fv={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,hv=Rd&&(!Ld||["ReactNative","NativeScript","NS"].indexOf(Ld.product)<0),pv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",mv=Rd&&window.location.href||"http://localhost",Wt=B(B({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Rd,hasStandardBrowserEnv:hv,hasStandardBrowserWebWorkerEnv:pv,navigator:Ld,origin:mv},Symbol.toStringTag,{value:"Module"}))),fv);function gv(e,t){return Pu(e,new Wt.classes.URLSearchParams,B({visitor:function(n,r,o,a){return Wt.isNode&&X.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Ev(e){return X.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function yv(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&&X.isArray(o)?o.length:u,d?(X.hasOwnProp(o,u)?o[u]=X.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!c):((!X.hasOwnProp(o,u)||!X.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&X.isArray(o[u])&&(o[u]=yv(o[u])),!c)}if(X.isFormData(e)&&X.isFunction(e.entries)){const n={};return X.forEachEntry(e,(r,o)=>{t(Ev(r),o,n,0)}),n}return null}const xo=(e,t)=>e!=null&&X.hasOwnProp(e,t)?e[t]:void 0;function Tv(e,t,n){if(X.isString(e))try{return(t||JSON.parse)(e),X.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Hs={transitional:Id,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=X.isObject(t);if(a&&X.isHTMLForm(t)&&(t=new FormData(t)),X.isFormData(t))return o?JSON.stringify(q0(t)):t;if(X.isArrayBuffer(t)||X.isBuffer(t)||X.isStream(t)||X.isFile(t)||X.isBlob(t)||X.isReadableStream(t))return t;if(X.isArrayBufferView(t))return t.buffer;if(X.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 gv(t,d).toString();if((c=X.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),Tv(t)):t}],transformResponse:[function(t){const n=xo(this,"transitional")||Hs.transitional,r=n&&n.forcedJSONParsing,o=xo(this,"responseType"),a=o==="json";if(X.isResponse(t)||X.isReadableStream(t))return t;if(t&&X.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"?Ce.from(d,Ce.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}}};X.forEach(["delete","get","head","post","put","patch","query"],e=>{Hs.headers[e]={}});function Dd(e,t){const n=this||Hs,r=t||n,o=nn.from(r.headers);let a=r.data;return X.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 zs=class extends Ce{constructor(t,n,r){super(t==null?"canceled":t,Ce.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 Ce("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ce.ERR_BAD_REQUEST:Ce.ERR_BAD_RESPONSE,n.config,n.request,n))}function bv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function _v(e,t){e=e||10;const n=new Array(e),r=new Array(e);let 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 xv(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=_v(50,250);return xv(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)=>X.asap(()=>e(...t)),wv=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,Sv=Wt.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];X.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),X.isString(r)&&c.push(`path=${r}`),X.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),X.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 vv(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Av(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function K0(e,t,n){let r=!vv(t);return e&&(r||n===!1)?Av(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 X.isPlainObject(h)&&X.isPlainObject(p)?X.merge.call({caseless:b},h,p):X.isPlainObject(p)?X.merge({},p):X.isArray(p)?p.slice():p}function o(h,p,g,b){if(X.isUndefined(p)){if(!X.isUndefined(h))return r(void 0,h,g,b)}else return r(h,p,g,b)}function a(h,p){if(!X.isUndefined(p))return r(void 0,p)}function u(h,p){if(X.isUndefined(p)){if(!X.isUndefined(h))return r(void 0,h)}else return r(void 0,p)}function c(h,p,g){if(X.hasOwnProp(t,g))return r(h,p);if(X.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 X.forEach(Object.keys(B(B({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const g=X.hasOwnProp(d,p)?d[p]:o,b=X.hasOwnProp(e,p)?e[p]:void 0,y=X.hasOwnProp(t,p)?t[p]:void 0,x=g(b,y,p);X.isUndefined(x)&&g!==c||(n[p]=x)}),n}const Cv=["content-type","content-length"];function kv(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{Cv.includes(r.toLowerCase())&&e.set(r,o)})}const Nv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),J0=e=>{const t=Pi({},e),n=b=>X.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?Nv(d.password):""))),X.isFormData(r)&&(Wt.hasStandardBrowserEnv||Wt.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):X.isFunction(r.getHeaders)&&kv(c,r.getHeaders(),n("formDataHeaderPolicy"))),Wt.hasStandardBrowserEnv&&(X.isFunction(o)&&(o=o(t)),o===!0||o==null&&wv(t.url))){const y=a&&u&&Sv.read(u);y&&c.set(a,y)}return t},Ov=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 S(){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()),Y={data:!c||c==="text"||c==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:I,config:e,request:A};W0(function(te){n(te),S()},function(te){r(te),S()},Y),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 Ce("Request aborted",Ce.ECONNABORTED,e,A)),S(),A=null)},A.onerror=function(j){const Y=j&&j.message?j.message:"Network Error",F=new Ce(Y,Ce.ERR_NETWORK,e,A);F.event=j||null,r(F),S(),A=null},A.ontimeout=function(){let j=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const Y=o.transitional||Id;o.timeoutErrorMessage&&(j=o.timeoutErrorMessage),r(new Ce(j,Y.clarifyTimeoutError?Ce.ETIMEDOUT:Ce.ECONNABORTED,e,A)),S(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&X.forEach(B0(u),function(j,Y){A.setRequestHeader(Y,j)}),X.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 zs(null,e,A):I),A.abort(),S(),A=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const k=bv(o.url);if(k&&!Wt.protocols.includes(k)){r(new Ce("Unsupported protocol "+k+":",Ce.ERR_BAD_REQUEST,e));return}A.send(a||null)})},Pv=(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 Ce?h:new zs(h instanceof Error?h.message:h))}};let a=t&&setTimeout(()=>{a=null,o(new Ce(`timeout of ${t}ms exceeded`,Ce.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=()=>X.asap(u),c},Iv=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},Rv=function(e,t){return o0(this,null,function*(){try{for(var n=r2(Lv(e)),r,o,a;r=!(o=yield new Eo(n.next())).done;r=!1){const u=o.value;yield*s0(Iv(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Eo(o.call(n)))}finally{if(a)throw a[0]}}})},Lv=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=Rv(e,t);let a=0,u,c=h=>{u||(u=!0,r&&r(h))};return new ReadableStream({pull(h){return Ve(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 Dv(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),S=r.charCodeAt(y+2);(x>=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102)&&(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=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}=X,tg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Mv=e=>{const t=X.global!==void 0&&X.global!==null?X.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=X.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=>Ve(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(()=>X.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 j=k&&k[C];if(j)return j.call(k);throw new Ce(`Response type '${C}' is not supported`,Ce.ERR_NOT_SUPPORT,I)})});const S=C=>Ve(null,null,function*(){if(C==null)return 0;if(X.isBlob(C))return C.size;if(X.isSpecCompliantForm(C))return(yield new a(Wt.origin,{method:"POST",body:C}).arrayBuffer()).byteLength;if(X.isArrayBufferView(C)||X.isArrayBuffer(C))return C.byteLength;if(X.isURLSearchParams(C)&&(C=C+""),X.isString(C))return(yield g(C)).byteLength}),A=(C,k)=>Ve(null,null,function*(){const I=X.toFiniteNumber(C.getContentLength());return I==null?S(k):I});return C=>Ve(null,null,function*(){let{url:k,method:I,data:j,signal:Y,cancelToken:F,timeout:te,onDownloadProgress:ce,onUploadProgress:pe,responseType:U,headers:re,withCredentials:ae="same-origin",fetchOptions:de,maxContentLength:se,maxBodyLength:be}=J0(C);const we=X.isNumber(se)&&se>-1,Z=X.isNumber(be)&&be>-1;let q=o||fetch;U=U?(U+"").toLowerCase():"text";let W=Pv([Y,F&&F.toAbortSignal()],te),v=null;const P=W&&W.unsubscribe&&(()=>{W.unsubscribe()});let G;try{if(we&&typeof k=="string"&&k.startsWith("data:")&&Dv(k)>se)throw new Ce("maxContentLength size of "+se+" exceeded",Ce.ERR_BAD_RESPONSE,C,v);if(Z&&I!=="get"&&I!=="head"){const ve=yield A(re,j);if(typeof ve=="number"&&isFinite(ve)&&ve>be)throw new Ce("Request body larger than maxBodyLength limit",Ce.ERR_BAD_REQUEST,C,v)}if(pe&&b&&I!=="get"&&I!=="head"&&(G=yield A(re,j))!==0){let ve=new a(k,{method:"POST",body:j,duplex:"half"}),Ye;if(X.isFormData(j)&&(Ye=ve.headers.get("content-type"))&&re.setContentType(Ye),ve.body){const[dt,mn]=G0(G,Iu(X0(pe)));j=Z0(ve.body,eg,dt,mn)}}X.isString(ae)||(ae=ae?"include":"omit");const O=d&&"credentials"in a.prototype;if(X.isFormData(j)){const ve=re.getContentType();ve&&/^multipart\/form-data/i.test(ve)&&!/boundary=/i.test(ve)&&re.delete("content-type")}re.set("User-Agent","axios/"+Md,!1);const ye=oe(B({},de),{signal:W,method:I.toUpperCase(),headers:B0(re.normalize()),body:j,duplex:"half",credentials:O?ae:void 0});v=d&&new a(k,ye);let Oe=yield d?q(v,de):q(k,ye);if(we){const ve=X.toFiniteNumber(Oe.headers.get("content-length"));if(ve!=null&&ve>se)throw new Ce("maxContentLength size of "+se+" exceeded",Ce.ERR_BAD_RESPONSE,C,v)}const Ie=y&&(U==="stream"||U==="response");if(y&&Oe.body&&(ce||we||Ie&&P)){const ve={};["status","statusText","headers"].forEach(ir=>{ve[ir]=Oe[ir]});const Ye=X.toFiniteNumber(Oe.headers.get("content-length")),[dt,mn]=ce&&G0(Ye,Iu(X0(ce),!0))||[];let to=0;const si=ir=>{if(we&&(to=ir,to>se))throw new Ce("maxContentLength size of "+se+" exceeded",Ce.ERR_BAD_RESPONSE,C,v);dt&&dt(ir)};Oe=new u(Z0(Oe.body,eg,si,()=>{mn&&mn(),P&&P()}),ve)}U=U||"text";let He=yield x[X.findKey(x,U)||"text"](Oe,C);if(we&&!y&&!Ie){let ve;if(He!=null&&(typeof He.byteLength=="number"?ve=He.byteLength:typeof He.size=="number"?ve=He.size:typeof He=="string"&&(ve=typeof r=="function"?new r().encode(He).byteLength:He.length)),typeof ve=="number"&&ve>se)throw new Ce("maxContentLength size of "+se+" exceeded",Ce.ERR_BAD_RESPONSE,C,v)}return!Ie&&P&&P(),yield new Promise((ve,Ye)=>{W0(ve,Ye,{data:He,headers:nn.from(Oe.headers),status:Oe.status,statusText:Oe.statusText,config:C,request:v})})}catch(O){if(P&&P(),W&&W.aborted&&W.reason instanceof Ce){const ye=W.reason;throw ye.config=C,v&&(ye.request=v),O!==ye&&(ye.cause=O),ye}throw O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message)?Object.assign(new Ce("Network Error",Ce.ERR_NETWORK,C,v,O&&O.response),{cause:O.cause||O}):Ce.from(O,O&&O.code,C,v,O&&O.response)}})},Fv=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=Fv;for(;c--;)d=a[c],h=p.get(d),h===void 0&&p.set(d,h=c?new Map:Mv(t)),p=h;return h};ng();const Fd={http:uv,xhr:Ov,fetch:{get:ng}};X.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}`,Bv=e=>X.isFunction(e)||e===null||e===!1;function Uv(e,t){e=X.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,!Bv(r)&&(o=Fd[(c=String(r)).toLowerCase()],o===void 0))throw new Ce(`Unknown adapter '${c}'`);if(o&&(X.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(rg).join(`
|
|
12
|
+
`):" "+rg(u[0]):"as no adapter specified";throw new Ce("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const ig={getAdapter:Uv,adapters:Fd};function Bd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zs(null,e)}function og(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),ig.getAdapter(e.adapter||Hs.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(!Y0(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 sg={};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 Ce(o(u," has been removed"+(n?" in "+n:"")),Ce.ERR_DEPRECATED);return n&&!sg[u]&&(sg[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 Hv(e,t,n){if(typeof e!="object")throw new Ce("options must be an object",Ce.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 Ce("option "+a+" must be "+d,Ce.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ce("Unknown option "+a,Ce.ERR_BAD_OPTION)}}const Du={assertOptions:Hv,validators:Lu},Dn=Du.validators;let Ii=class{constructor(t){this.defaults=t||{},this.interceptors={request:new V0,response:new V0}}request(t,n){return Ve(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=Si(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&_u.assertOptions(r,{silentJSONParsing:In.transitional(In.boolean),forcedJSONParsing:In.transitional(In.boolean),clarifyTimeoutError:In.transitional(In.boolean),legacyInterceptorReqResOrdering:In.transitional(In.boolean)},!1),o!=null&&(G.isFunction(o)?n.paramsSerializer={serialize:o}:_u.assertOptions(o,{encode:In.function,serialize:In.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),_u.assertOptions(n,{baseUrl:In.spelling("baseURL"),withXsrfToken:In.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"],w=>{delete a[w]}),n.headers=tn.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||fd;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,T;if(!d){const w=[A0.bind(this),void 0];for(w.unshift(...c),w.push(...h),T=w.length,p=Promise.resolve(n);g<T;)p=p.then(w[g++],w[g++]);return p}T=c.length;let y=n;for(;g<T;){const w=c[g++],v=c[g++];try{y=w(y)}catch(A){v.call(this,A);break}}try{p=A0.call(this,y)}catch(w){return Promise.reject(w)}for(g=0,T=h.length;g<T;)p=p.then(h[g++],h[g++]);return p}getUri(t){t=Si(this.defaults,t);const n=E0(t.baseURL,t.url,t.allowAbsoluteUrls);return c0(n,t.params,t.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(t){Ai.prototype[t]=function(n,r){return this.request(Si(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(Si(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Ai.prototype[t]=n(),t!=="query"&&(Ai.prototype[t+"Form"]=n(!0))});let Vv=class u2{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 Os(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 u2(function(o){t=o}),cancel:t}}};function qv(e){return function(n){return e.apply(null,n)}}function Yv(e){return G.isObject(e)&&e.isAxiosError===!0}const bd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(bd).forEach(([e,t])=>{bd[t]=e});function k0(e){const t=new Ai(e),n=Km(Ai.prototype.request,t);return G.extend(n,Ai.prototype,t,{allOwnKeys:!0}),G.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return k0(Si(e,o))},n}const xt=k0(Ns);xt.Axios=Ai,xt.CanceledError=Os,xt.CancelToken=Vv,xt.isCancel=h0,xt.VERSION=gd,xt.toFormData=bu,xt.AxiosError=Ae,xt.Cancel=xt.CanceledError,xt.all=function(t){return Promise.all(t)},xt.spread=qv,xt.isAxiosError=Yv,xt.mergeConfig=Si,xt.AxiosHeaders=tn,xt.formToJSON=e=>f0(G.isHTMLForm(e)?new FormData(e):e),xt.getAdapter=S0.getAdapter,xt.HttpStatusCode=bd,xt.default=xt;const{Axios:cF,AxiosError:dF,CanceledError:fF,isCancel:hF,CancelToken:pF,VERSION:mF,all:gF,Cancel:EF,isAxiosError:yF,spread:bF,toFormData:TF,AxiosHeaders:xF,HttpStatusCode:wF,formToJSON:_F,getAdapter:vF,mergeConfig:SF,create:AF}=xt;class Wv{constructor(t,n,r,o=!1,a,u){Ze(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Ze(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Ze(this,"CIMULATE_SEARCH_API_PATH","api/v1");Ze(this,"baseApiUrl");Ze(this,"headers",{});Ze(this,"fetchConfig",()=>$e(this,null,function*(){try{const t=yield xt.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}}));Ze(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 Gv{constructor(t,n,r,o=!1,a,u){Ze(this,"apiService");Ze(this,"config",null);Ze(this,"getConfig",()=>$e(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}}));Ze(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Ze(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Ze(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Ze(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Ze(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Ze(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Ze(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Ze(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Ze(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Ze(this,"getProductField",t=>this.config?this.config[t]:"");Ze(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new Wv(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 Ci=(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 Kv{constructor(t=!1){Ze(this,"isDevelopment");Ze(this,"_log",(t,n,...r)=>{Ci(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 Qv={copilot:"Your Search Assistant",messaging:"Commerce Client"},N0=Z.createContext(null),Xv=({mode:e,logoUrl:t,headerText:n="Your Search Assistant",headerConfig:r,globalClassName:o="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:h,baseCatalogParams:p,searchPlaceholder:g,searchButtonLabel:T,searchConfig:y,componentConfig:w,conversationHistory:v,resetConversationMessage:A="",apiKey:C,apiToken:k,baseUrl:R,customerId:U,tenantId:Y,theme:F,isDevelopment:X,__features:ce,routingAttributes:de,children:z})=>{const oe=e==="messaging",he=Z.useMemo(()=>{const q=de==null?void 0:de.isCartMgmtSupported;return q===!0||q==="true"},[de]),ae=Z.useMemo(()=>oe?{config:null}:new Gv(R,C,k,X,U,Y),[oe,R,C,k,X,U,Y]),se=Z.useMemo(()=>new Kv(X),[X]);Z.useEffect(()=>{oe||!ae||ae.config||ae.getConfig()},[ae,oe]);const Te=Z.useMemo(()=>l_(F),[F]),Ce=Z.useMemo(()=>{const q=(y==null?void 0:y.placeholder)||g,S=(y==null?void 0:y.buttonLabel)||T;let I="icon";return y!=null&&y.buttonType?I=y.buttonType:T&&(I="text"),ie(B({},y||{}),{placeholder:q,buttonLabel:S,buttonType:I})},[y,g,T]),ee=Z.useMemo(()=>ie(B({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:n||Qv[e!=null?e:"copilot"]}),[r,t,n,e]),V=Z.useMemo(()=>({configModule:ae,mode:e!=null?e:"copilot",headerConfig:ee,entryMessage:a,globalClassName:o,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:h,baseCatalogParams:p,themeVariables:Te,logger:se,searchConfig:Ce,enableMinimize:!!(w!=null&&w.enableMinimize),resetConversationMessage:A,conversationHistory:{sinceHours:typeof(v==null?void 0:v.sinceHours)=="number"?v.sinceHours:1,limit:v==null?void 0:v.limit},features:ce,isCartMgmtSupported:he}),[ae,e,ee,a,o,h,p,c,d,u,Ce,w,A,se,Te,v,ce,he]);return x.jsx(N0.Provider,{value:V,children:z})},At=()=>{const e=Z.useContext(N0);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},Jv=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart"],vu=-1;function Zv(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 Jv.includes(t.type)?t:null}catch(t){}return{type:"markdown",index:vu,data:{content:e}}}function eS(e,t){if(t.index===vu){const o=e[e.length-1];if(o&&o.type==="markdown"&&o.index===vu&&t.type==="markdown"){const a={type:"markdown",index:vu,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 O0={connectionStatus:"disconnected",loading:!0,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1};function tS(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=Zv(t.token);return n?ie(B({},e),{streamingBlocks:eS(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({},O0),{connectionStatus:e.connectionStatus,loading:!0});default:return e}}const I0=Z.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:()=>{}});function Td(e,t){return`cim_af_conv_${e}_${t}`}function xd(e,t){return Date.now()-e>t}function nS(e,t,n){try{const r=Td(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"||xd(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function Is(e,t,n){try{const r=Td(e,t),o={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(o))}catch(r){}}function Su(e,t){try{const n=Td(e,t);sessionStorage.removeItem(n)}catch(n){}}function wd(e,t){return`cim_af_ct_${e}_${t}`}function R0(e,t,n){try{const r=wd(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 rS(e,t,n,r){try{const o=wd(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(o,JSON.stringify(a))}catch(o){}}function iS(e,t){try{const n=wd(e,t);sessionStorage.removeItem(n)}catch(n){}}function oS(e,t){return`cim_af_conv_${e}_${t}`}function sS(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=oS(e,t);return new BroadcastChannel(n)}catch(n){return null}}function aS(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 uS(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 lS(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function cS(e){if(e)try{e.close()}catch(t){}}function dS(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function fS(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function P0(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 hS(e){if(e.entryType!=="Message")return null;const n=fS(e.entryPayload).abstractMessage;if(!n)return null;const r=P0(n,"staticContent","text")||P0(n,"content","text")||"";if(!r)return null;const o=dS(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 pS(e){const t=[];for(const n of e){const r=hS(n);r&&t.push(r)}return t}const L0="onCimulateWidgetReady",mS=5e3;function Rs(e={}){const{routingAttributes:t,timeoutMs:n=mS}=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(L0,{detail:c,cancelable:!0});if(!!window.dispatchEvent(d)){u();return}a.timer=setTimeout(u,n)})}function gS(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:o}=e,a=Z.useRef(null),u=Z.useRef(null),c=Z.useRef(null),d=o.sinceHours*60*60*1e3,h=Z.useCallback(()=>(c.current||(c.current=aS(a.current)),c.current),[]);Z.useEffect(()=>{const A=sS(t,n);a.current=A,c.current=null;const C=uS(A,()=>{const k=u.current;if(!k)return null;const R=R0(t,n,d);return{conversationId:k,continuationToken:R==null?void 0:R.accessToken,lastEventId:R==null?void 0:R.lastEventId}},()=>{Su(t,n),u.current=null});return()=>{C(),cS(A),a.current=null}},[t,n,d]);const p=Z.useCallback(A=>$e(null,null,function*(){let C=nS(t,n,d);if(!C){const k=yield h();k&&!xd(k.storedAt,d)&&(C=k)}if(!C){const k=yield A.createConversation(yield Rs({routingAttributes:r}));return Is(t,n,k),u.current=k,{conversationId:k,restoredMessages:[],resumed:!1}}try{const k=Date.now()-d,U=(yield A.listConversations({conversationId:C.conversationId,startTimestamp:k})).conversations.find(F=>F.conversationId===C.conversationId&&!F.isConversationClosed);if(!U){Su(t,n);const F=yield A.createConversation(yield Rs({routingAttributes:r}));return Is(t,n,F),u.current=F,{conversationId:F,restoredMessages:[],resumed:!1}}A.resumeConversation(U.conversationId),u.current=U.conversationId,Is(t,n,U.conversationId);let Y=[];try{const F=yield A.listConversationEntries(U.conversationId,{limit:o.limit,startTimestamp:k,direction:"FromStart"});Y=pS(F.conversationEntries)}catch(F){}return{conversationId:U.conversationId,restoredMessages:Y,resumed:!0}}catch(k){Su(t,n);const R=yield A.createConversation(yield Rs({routingAttributes:r}));return Is(t,n,R),u.current=R,{conversationId:R,restoredMessages:[],resumed:!1}}}),[t,n,r,o,d,h]),g=Z.useCallback(A=>{Is(t,n,A),u.current=A},[t,n]),T=Z.useCallback(()=>{Su(t,n),iS(t,n),lS(a.current),u.current=null},[t,n]),y=Z.useCallback(()=>{const A=R0(t,n,d);return A?{continuationToken:A.accessToken,lastEventId:A.lastEventId}:null},[t,n,d]),w=Z.useCallback(()=>$e(null,null,function*(){const A=yield h();return!(A!=null&&A.continuationToken)||xd(A.storedAt,d)?null:{continuationToken:A.continuationToken,lastEventId:A.lastEventId}}),[d,h]),v=Z.useCallback(A=>$e(null,null,function*(){try{const{accessToken:C,lastEventId:k}=yield A.generateContinuationToken();rS(t,n,C,k)}catch(C){}}),[t,n]);return{initializeConversation:p,persistConversationId:g,clearPersistedConversation:T,getStoredConnectOptions:y,getPeerConnectOptions:w,persistContinuationToken:v}}const ur={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 ES(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 mo(e){const{type:t,statusCode:n}=ES(e);if(t==="api"&&typeof n=="number")return n===429?ur.rateLimit:n>=500?ur.server:ur.default;switch(t){case"network":return ur.network;case"sse":return ur.interrupted;case"auth":return ur.connect;default:return ur.default}}function D0(e){switch(e.code){case"MAX_RECONNECT":return ur.lost;case"ROUTING_FAILED":return ur.routing;default:return ur.connect}}const yS="Your session ended due to inactivity. Starting a new session…";function M0(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 bS(e){var T;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((T=e.variants)!=null?T:[]).filter(y=>y.value),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 F0=({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}=At(),[T,y]=Z.useReducer(tS,O0),w=Z.useRef(T);w.current=T;const v=gS({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:g}),A=Z.useRef(null),C=Z.useRef(c),k=Z.useRef(d),R=Z.useRef(u),U=Z.useRef(!1),Y=Z.useRef(!1),F=Z.useRef(0),X=Z.useRef(null);C.current=c,k.current=d,R.current=u,Z.useEffect(()=>{const ee=new u_({baseURL:e,orgId:t,esDeveloperName:n,options:B({enableLogging:a},o?{capabilitiesVersion:o}:{})});A.current=ee,ee.on("connected",()=>{var q;y({type:"SET_CONNECTION_STATUS",status:"connected"}),(q=R.current)==null||q.call(R)}),ee.on("disconnected",()=>{y({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),ee.on("reconnecting",()=>{y({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),ee.on("message",q=>{var I;const S={id:q.messageId||crypto.randomUUID(),role:"agent",content:q.content,timestamp:q.timestamp,sender:q.sender,raw:q};p==null||p.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:S.id,tokensBeforeFlush:F.current,streamedFinalOnly:F.current===0}),F.current=0,y({type:"FLUSH_STREAMING",message:S}),(I=C.current)==null||I.call(C,S)}),ee.on("streaming_token",q=>{F.current+=1,y({type:"APPEND_STREAMING_TOKEN",token:q.token})}),ee.on("typing_started",()=>{y({type:"SET_AGENT_TYPING",isTyping:!0})}),ee.on("typing_stopped",()=>{y({type:"SET_AGENT_TYPING",isTyping:!1})}),ee.on("progress_indicator",q=>{y({type:"ADD_PROGRESS_STEP",message:q.message})}),ee.on("routing_result",q=>{var S;if(y({type:"SET_ROUTING_RESULT",result:q}),!q.isSuccessful){const I=`Routing failed: ${q.failureType||"unknown"}`;y({type:"SET_ERROR",error:D0({code:"ROUTING_FAILED"})}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(S=k.current)==null||S.call(k,I)}}),ee.on("participant_changed",q=>{if(q.participant.name==="Automated Process")return;const S={id:crypto.randomUUID(),role:"system",content:q.action==="add"?`${q.participant.name||"Agent"} joined the conversation`:`${q.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()};p==null||p.log("🦜 MessagingProvider participant_changed event received",{event:q}),y({type:"ADD_MESSAGE",message:S})}),ee.on("conversation_closed",()=>{const q={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};y({type:"ADD_MESSAGE",message:q}),y({type:"SET_CONVERSATION_ID",id:null}),v.clearPersistedConversation()}),ee.on("error",q=>{var S;if(p==null||p.log("🦜 MessagingProvider ERROR event received",{event:q}),q.code==="SESSION_EXPIRED"){Y.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"}),y({type:"SET_LOADING",isLoading:!1});return}y({type:"SET_ERROR",error:D0(q)}),q.recoverable||y({type:"SET_CONNECTION_STATUS",status:"error"}),(S=k.current)==null||S.call(k,q.message)}),y({type:"SET_CONNECTION_STATUS",status:"connecting"});const V=()=>$e(null,null,function*(){let q=v.getStoredConnectOptions(),S=!1;q||(q=yield v.getPeerConnectOptions(),S=!!q);try{yield ee.connect(q!=null?q:void 0)}catch(W){if(q)p==null||p.log("Continuation token failed, falling back to fresh connect"),S||v.clearPersistedConversation(),yield ee.connect();else throw W}yield v.persistContinuationToken(ee);const I=yield v.initializeConversation(ee);y({type:"SET_CONVERSATION_ID",id:I.conversationId}),I.resumed&&I.restoredMessages.length>0&&y({type:"LOAD_HISTORY",messages:I.restoredMessages})});return X.current=V,V().catch(q=>{var S;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:mo(q)}),(S=k.current)==null||S.call(k,q.message)}),()=>{ee.disconnect(),ee.off(),A.current=null,X.current=null}},[e,t,n,o]),Z.useEffect(()=>{const ee=()=>{document.visibilityState==="visible"&&A.current&&!Y.current&&A.current.reconnect()};return document.addEventListener("visibilitychange",ee),()=>{document.removeEventListener("visibilitychange",ee)}},[]);const ce=Z.useCallback(ee=>$e(null,null,function*(){var q;const V=A.current;if(!(!V||U.current)){U.current=!0,Y.current=!1,y({type:"SET_SESSION_EXPIRED",expired:!1}),y({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:yS,timestamp:new Date().toISOString()}}),v.clearPersistedConversation(),y({type:"SET_CONNECTION_STATUS",status:"connecting"});try{V.disconnect(),yield V.connect(),yield v.persistContinuationToken(V);const S=yield V.createConversation(yield Rs({routingAttributes:r}));y({type:"SET_CONVERSATION_ID",id:S}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(S),ee&&(y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),yield V.sendMessage(ee))}catch(S){const I=S instanceof Error?S.message:String(S);y({type:"SET_ERROR",error:mo(S)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(q=k.current)==null||q.call(k,I)}finally{U.current=!1}}}),[r,v]),de=Z.useRef(ce);de.current=ce;const z=Z.useCallback((ee,V)=>{const q=A.current;if(!q)return;const S={id:crypto.randomUUID(),role:"user",content:V!=null?V:ee,timestamp:new Date().toISOString()};if(y({type:"CLEAR_SEND_ERROR"}),y({type:"ADD_MESSAGE",message:S}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),Y.current){de.current(ee);return}q.sendMessage(ee).catch(I=>{var W;if(M0(I)){de.current(ee);return}y({type:"SET_SEND_ERROR",error:{text:ee,displayContent:V,message:mo(I)}}),(W=k.current)==null||W.call(k,I.message)})},[]),oe=Z.useCallback(ee=>{ee.trim()&&z(ee)},[z]),he=Z.useCallback(ee=>{if(!A.current)return;const{prompt:V,display:q}=bS(ee);z(V,q)},[z]),ae=Z.useCallback(()=>{const ee=A.current,V=w.current.sendError;if(!(!ee||!V)){if(y({type:"CLEAR_SEND_ERROR"}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),Y.current){de.current(V.text);return}ee.sendMessage(V.text).catch(q=>{var S;if(M0(q)){de.current(V.text);return}y({type:"SET_SEND_ERROR",error:ie(B({},V),{message:mo(q)})}),(S=k.current)==null||S.call(k,q.message)})}},[]),se=Z.useCallback(()=>{const ee=A.current,V=X.current;!ee||!V||(Y.current=!1,ee.disconnect(),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),V().catch(q=>{var S;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:mo(q)}),(S=k.current)==null||S.call(k,q.message)}))},[]),Te=Z.useCallback(()=>{const ee=A.current;ee&&(Y.current=!1,v.clearPersistedConversation(),y({type:"RESET"}),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),ee.endConversation().then(()=>(ee.disconnect(),ee.connect())).then(()=>$e(null,null,function*(){return yield v.persistContinuationToken(ee),ee.createConversation(yield Rs({routingAttributes:r}))})).then(V=>{y({type:"SET_CONVERSATION_ID",id:V}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(V)}).catch(V=>{var q;y({type:"SET_ERROR",error:mo(V)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(q=k.current)==null||q.call(k,V.message)}))},[r,v]),Ce=Z.useMemo(()=>({connectionStatus:T.connectionStatus,isConnected:T.connectionStatus==="connected"&&T.conversationId!==null,isAgentTyping:T.isAgentTyping,conversationId:T.conversationId,messages:T.messages,streamingBlocks:T.streamingBlocks,progressMessage:T.progressMessage,progressSteps:T.progressSteps,error:T.error,sendError:T.sendError,loading:T.loading,sessionExpired:T.sessionExpired,sendMessage:oe,addToCart:he,resetConversation:Te,retryLastMessage:ae,retryConnection:se}),[T,oe,he,Te,ae,se]);return x.jsx(I0.Provider,{value:Ce,children:h})};function TS(){var e=Z.useRef(!0);return e.current?(e.current=!1,!0):e.current}function xS(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function wS(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var _d=typeof window!="undefined",Au=function(e){Z.useEffect(e,[])},_S=function(e){var t=Z.useRef(e);t.current=e,Au(function(){return function(){return t.current()}})},vS=function(e){var t=Z.useRef(0),n=Z.useState(e),r=n[0],o=n[1],a=Z.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return _S(function(){cancelAnimationFrame(t.current)}),[r,a]},SS=function(e,t){return e===t};function AS(e,t){t===void 0&&(t=SS);var n=Z.useRef(),r=Z.useRef(e),o=TS();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var CS=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=vS({width:_d?window.innerWidth:r,height:_d?window.innerHeight:a}),d=c[0],h=c[1];return Z.useEffect(function(){if(_d){var p=function(){var g=window.innerWidth,T=window.innerHeight;h({width:g,height:T}),u&&u(g,T)};return xS(window,"resize",p),function(){wS(window,"resize",p)}}},[]),d};const vd="cimulate:ui-state-update",kS=e=>{window.addEventListener(vd,e)},NS=e=>{window.removeEventListener(vd,e)},OS=(e,t)=>{const n=new CustomEvent(vd,{detail:{property:e,value:t}});window.dispatchEvent(n)},B0=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},ki=e=>{const t=tt.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;tt.statusProxy.isOpen=n,n&&(tt.statusProxy.isMinimized=!1)},Cu=e=>{const t=tt.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;tt.statusProxy.isMinimized=n,n&&(tt.statusProxy.isOpen=!1)},Sd=e=>{tt.modalProxy.isFullscreen=e},ku=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"},Ad=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},IS=e=>{const t=tt.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;tt.dialogProxy.isFullHeight=n};class RS{constructor(){Ze(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}});Ze(this,"connectedProxy");Ze(this,"modeProxy");Ze(this,"entryTypeProxy");Ze(this,"statusProxy");Ze(this,"dialogProxy");Ze(this,"modalProxy",{isFullscreen:!1});Ze(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ze(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return OS(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 RS,U0=Z.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}),PS=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=Z.useState(e!=null?e:tt.entryTypeProxy.entryType),[u,c]=Z.useState(tt.modeProxy.mode),[d,h]=Z.useState({type:n||tt.statusProxy.type,isOpen:tt.statusProxy.isOpen,isMinimized:tt.statusProxy.isMinimized}),[p,g]=Z.useState(tt.dialogProxy.position),[T,y]=Z.useState(tt.dialogProxy.isFullHeight),[w,v]=Z.useState(tt.dialogProxy.width),[A,C]=Z.useState(tt.modalProxy.isFullscreen),k=AS(d.type);Z.useEffect(()=>{const U=Y=>{const{property:F,value:X}=Y.detail||{};if(!(!F||X===void 0)){if(F==="mode"){c(X);return}if(F==="entryType"){a(X);return}if(F==="isMinimized"){h(ce=>ie(B({},ce),{isMinimized:X}));return}if(F==="isOpen"){h(ce=>ie(B({},ce),{isOpen:X}));return}if(F==="type"){h(ce=>ie(B({},ce),{type:X}));return}if(F==="position"){g(X);return}if(F==="isFullHeight"){y(X);return}if(F==="width"){v(X);return}if(F==="isFullscreen"){C(X);return}}};return kS(U),()=>{NS(U)}},[]),Au(()=>{e&&B0(e)}),Au(()=>{const U=n||(t==null?void 0:t.type);U&&ku(U),t&&"isOpen"in t&&ki(!!t.isOpen),t&&"isMinimized"in t&&Cu(!!t.isMinimized)}),Au(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:U}=t.options;U&&Ad(U),"dialogFullHeight"in t.options&&IS(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&Sd(!!t.options.isModalFullscreen)});const R=Z.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:k||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:w,isModalFullscreen:A}),[u,o,d,k,p,T,w,A]);return x.jsx(U0.Provider,{value:R,children:r})},H0=({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:T,entryType:y,entryMessage:w,disclaimerText:v,disclaimerMarkdown:A,clientContext:C,searchPlaceholder:k,searchButtonLabel:R,searchConfig:U,resetConversationMessage:Y,conversationHistory:F,messagingConfig:X,__features:ce,children:de})=>x.jsx(Xv,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:o,headerText:a,headerConfig:u,entryMessage:w,theme:c,globalClassName:h,openLinksInNewTab:d,searchPlaceholder:k,searchButtonLabel:R,searchConfig:U,componentConfig:T,clientContext:C,disclaimerMarkdown:A,disclaimerText:v,resetConversationMessage:Y,conversationHistory:F,isDevelopment:p,__features:ce,routingAttributes:X==null?void 0:X.routingAttributes,children:x.jsx(PS,{entryType:y,componentConfig:T,componentType:g,children:x.jsx(F0,{scrt2Url:(X==null?void 0:X.scrt2Url)||"",orgId:(X==null?void 0:X.orgId)||"",esDeveloperName:(X==null?void 0:X.esDeveloperName)||"",routingAttributes:(X==null?void 0:X.routingAttributes)||{},capabilitiesVersion:X==null?void 0:X.capabilitiesVersion,enableLogging:p,children:de})})}),Ni=()=>{const e=Z.useContext(U0);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};var Cd={exports:{}},ln={},kd={exports:{}},Nd={};var z0;function LS(){return z0||(z0=1,(function(e){function t(V,q){var S=V.length;V.push(q);e:for(;0<S;){var I=S-1>>>1,W=V[I];if(0<o(W,q))V[I]=q,V[S]=W,S=I;else break e}}function n(V){return V.length===0?null:V[0]}function r(V){if(V.length===0)return null;var q=V[0],S=V.pop();if(S!==q){V[0]=S;e:for(var I=0,W=V.length,O=W>>>1;I<O;){var be=2*(I+1)-1,Oe=V[be],Re=be+1,He=V[Re];if(0>o(Oe,S))Re<W&&0>o(He,Oe)?(V[I]=He,V[Re]=S,I=Re):(V[I]=Oe,V[be]=S,I=be);else if(Re<W&&0>o(He,S))V[I]=He,V[Re]=S,I=Re;else break e}}return q}function o(V,q){var S=V.sortIndex-q.sortIndex;return S!==0?S:V.id-q.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,T=3,y=!1,w=!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 R(V){for(var q=n(h);q!==null;){if(q.callback===null)r(h);else if(q.startTime<=V)r(h),q.sortIndex=q.expirationTime,t(d,q);else break;q=n(h)}}function U(V){if(v=!1,R(V),!w)if(n(d)!==null)w=!0,Ce(Y);else{var q=n(h);q!==null&&ee(U,q.startTime-V)}}function Y(V,q){w=!1,v&&(v=!1,C(ce),ce=-1),y=!0;var S=T;try{for(R(q),g=n(d);g!==null&&(!(g.expirationTime>q)||V&&!oe());){var I=g.callback;if(typeof I=="function"){g.callback=null,T=g.priorityLevel;var W=I(g.expirationTime<=q);q=e.unstable_now(),typeof W=="function"?g.callback=W:g===n(d)&&r(d),R(q)}else r(d);g=n(d)}if(g!==null)var O=!0;else{var be=n(h);be!==null&&ee(U,be.startTime-q),O=!1}return O}finally{g=null,T=S,y=!1}}var F=!1,X=null,ce=-1,de=5,z=-1;function oe(){return!(e.unstable_now()-z<de)}function he(){if(X!==null){var V=e.unstable_now();z=V;var q=!0;try{q=X(!0,V)}finally{q?ae():(F=!1,X=null)}}else F=!1}var ae;if(typeof k=="function")ae=function(){k(he)};else if(typeof MessageChannel!="undefined"){var se=new MessageChannel,Te=se.port2;se.port1.onmessage=he,ae=function(){Te.postMessage(null)}}else ae=function(){A(he,0)};function Ce(V){X=V,F||(F=!0,ae())}function ee(V,q){ce=A(function(){V(e.unstable_now())},q)}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(V){V.callback=null},e.unstable_continueExecution=function(){w||y||(w=!0,Ce(Y))},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):de=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(V){switch(T){case 1:case 2:case 3:var q=3;break;default:q=T}var S=T;T=q;try{return V()}finally{T=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(V,q){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var S=T;T=V;try{return q()}finally{T=S}},e.unstable_scheduleCallback=function(V,q,S){var I=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?I+S:I):S=I,V){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=S+W,V={id:p++,callback:q,priorityLevel:V,startTime:S,expirationTime:W,sortIndex:-1},S>I?(V.sortIndex=S,t(h,V),n(d)===null&&V===n(h)&&(v?(C(ce),ce=-1):v=!0,ee(U,S-I))):(V.sortIndex=W,t(d,V),w||y||(w=!0,Ce(Y))),V},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(V){var q=T;return function(){var S=T;T=q;try{return V.apply(this,arguments)}finally{T=S}}}})(Nd)),Nd}var j0;function DS(){return j0||(j0=1,kd.exports=LS()),kd.exports}var $0;function MS(){if($0)return ln;$0=1;var e=lo(),t=DS();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 T(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 w(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,b,_){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=b,this.removeEmptyString=_}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 R(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")&&(w(s,l,E,f)&&(l=null),f||E===null?T(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 U=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),F=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),ce=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),oe=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),ae=Symbol.for("react.suspense"),se=Symbol.for("react.suspense_list"),Te=Symbol.for("react.memo"),Ce=Symbol.for("react.lazy"),ee=Symbol.for("react.offscreen"),V=Symbol.iterator;function q(i){return i===null||typeof i!="object"?null:(i=V&&i[V]||i["@@iterator"],typeof i=="function"?i:null)}var S=Object.assign,I;function W(i){if(I===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);I=s&&s[1]||""}return`
|
|
17
|
-
`+
|
|
18
|
-
`),
|
|
19
|
-
`),
|
|
20
|
-
`+E[_].replace(" at new "," at ");return i.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",i.displayName)),H}while(1<=_&&0<=L);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?W(i):""}function Oe(i){switch(i.tag){case 5:return W(i.type);case 16:return W("Lazy");case 13:return W("Suspense");case 19:return W("SuspenseList");case 0:case 2:case 15:return i=be(i.type,!1),i;case 11:return i=be(i.type.render,!1),i;case 1:return i=be(i.type,!0),i;default:return""}}function Re(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 X:return"Fragment";case F:return"Portal";case de:return"Profiler";case ce:return"StrictMode";case ae:return"Suspense";case se:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case oe:return(i.displayName||"Context")+".Consumer";case z:return(i._context.displayName||"Context")+".Provider";case he:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case Te:return s=i.displayName||null,s!==null?s:Re(i.type)||"Memo";case Ce:s=i._payload,i=i._init;try{return Re(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 Re(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 ve(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function qe(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ut(i){var s=qe(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,b=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return E.call(this)},set:function(_){f=""+_,b.call(this,_)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return f},setValue:function(_){f=""+_},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function pn(i){i._valueTracker||(i._valueTracker=ut(i))}function Wi(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),f="";return i&&(f=qe(i)?i.checked?"true":"false":i.value),i=f,i!==l?(s.setValue(i),!0):!1}function ei(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 Jn(i,s){var l=s.checked;return S({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function Ta(i,s){var l=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;l=ve(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 xa(i,s){s=s.checked,s!=null&&R(i,"checked",s,!1)}function Ko(i,s){xa(i,s);var l=ve(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")?Qo(i,s.type,l):s.hasOwnProperty("defaultValue")&&Qo(i,s.type,ve(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Ol(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 Qo(i,s,l){(s!=="number"||ei(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var ti=Array.isArray;function ni(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=""+ve(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 wa(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return S({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Il(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(ti(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:ve(l)}}function Rl(i,s){var l=ve(s.value),f=ve(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 Pl(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 xe(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,Ye=(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 Xe(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var jt={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},Lr=["Webkit","ms","Moz","O"];Object.keys(jt).forEach(function(i){Lr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),jt[s]=jt[i]})});function Mn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||jt.hasOwnProperty(i)&&jt[i]?(""+s).trim():s+"px"}function ri(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var f=l.indexOf("--")===0,E=Mn(l,s[l],f);l==="float"&&(l="cssFloat"),f?i.setProperty(l,E):i[l]=E}}var Gi=S({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 $t(i,s){if(s){if(Gi[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 xr(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 Sn=null;function Hh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var zh=null,Xo=null,Jo=null;function xT(i){if(i=Va(i)){if(typeof zh!="function")throw Error(n(280));var s=i.stateNode;s&&(s=nc(s),zh(i.stateNode,i.type,s))}}function wT(i){Xo?Jo?Jo.push(i):Jo=[i]:Xo=i}function _T(){if(Xo){var i=Xo,s=Jo;if(Jo=Xo=null,xT(i),s)for(i=0;i<s.length;i++)xT(s[i])}}function vT(i,s){return i(s)}function ST(){}var jh=!1;function AT(i,s,l){if(jh)return i(s,l);jh=!0;try{return vT(i,s,l)}finally{jh=!1,(Xo!==null||Jo!==null)&&(ST(),_T())}}function _a(i,s){var l=i.stateNode;if(l===null)return null;var f=nc(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 $h=!1;if(c)try{var va={};Object.defineProperty(va,"passive",{get:function(){$h=!0}}),window.addEventListener("test",va,va),window.removeEventListener("test",va,va)}catch(i){$h=!1}function oM(i,s,l,f,E,b,_,L,H){var te=Array.prototype.slice.call(arguments,3);try{s.apply(l,te)}catch(fe){this.onError(fe)}}var Sa=!1,Ll=null,Dl=!1,Vh=null,sM={onError:function(i){Sa=!0,Ll=i}};function aM(i,s,l,f,E,b,_,L,H){Sa=!1,Ll=null,oM.apply(sM,arguments)}function uM(i,s,l,f,E,b,_,L,H){if(aM.apply(this,arguments),Sa){if(Sa){var te=Ll;Sa=!1,Ll=null}else throw Error(n(198));Dl||(Dl=!0,Vh=te)}}function Ki(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 CT(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 kT(i){if(Ki(i)!==i)throw Error(n(188))}function lM(i){var s=i.alternate;if(!s){if(s=Ki(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 b=E.alternate;if(b===null){if(f=E.return,f!==null){l=f;continue}break}if(E.child===b.child){for(b=E.child;b;){if(b===l)return kT(E),i;if(b===f)return kT(E),s;b=b.sibling}throw Error(n(188))}if(l.return!==f.return)l=E,f=b;else{for(var _=!1,L=E.child;L;){if(L===l){_=!0,l=E,f=b;break}if(L===f){_=!0,f=E,l=b;break}L=L.sibling}if(!_){for(L=b.child;L;){if(L===l){_=!0,l=b,f=E;break}if(L===f){_=!0,f=b,l=E;break}L=L.sibling}if(!_)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 NT(i){return i=lM(i),i!==null?OT(i):null}function OT(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=OT(i);if(s!==null)return s;i=i.sibling}return null}var IT=t.unstable_scheduleCallback,RT=t.unstable_cancelCallback,cM=t.unstable_shouldYield,dM=t.unstable_requestPaint,_t=t.unstable_now,fM=t.unstable_getCurrentPriorityLevel,qh=t.unstable_ImmediatePriority,PT=t.unstable_UserBlockingPriority,Ml=t.unstable_NormalPriority,hM=t.unstable_LowPriority,LT=t.unstable_IdlePriority,Fl=null,wr=null;function pM(i){if(wr&&typeof wr.onCommitFiberRoot=="function")try{wr.onCommitFiberRoot(Fl,i,void 0,(i.current.flags&128)===128)}catch(s){}}var Zn=Math.clz32?Math.clz32:EM,mM=Math.log,gM=Math.LN2;function EM(i){return i>>>=0,i===0?32:31-(mM(i)/gM|0)|0}var Bl=64,Ul=4194304;function Aa(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 Hl(i,s){var l=i.pendingLanes;if(l===0)return 0;var f=0,E=i.suspendedLanes,b=i.pingedLanes,_=l&268435455;if(_!==0){var L=_&~E;L!==0?f=Aa(L):(b&=_,b!==0&&(f=Aa(b)))}else _=l&~E,_!==0?f=Aa(_):b!==0&&(f=Aa(b));if(f===0)return 0;if(s!==0&&s!==f&&(s&E)===0&&(E=f&-f,b=s&-s,E>=b||E===16&&(b&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-Zn(s),E=1<<l,f|=i[l],s&=~E;return f}function yM(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 bM(i,s){for(var l=i.suspendedLanes,f=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var _=31-Zn(b),L=1<<_,H=E[_];H===-1?((L&l)===0||(L&f)!==0)&&(E[_]=yM(L,s)):H<=s&&(i.expiredLanes|=L),b&=~L}}function Yh(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function DT(){var i=Bl;return Bl<<=1,(Bl&4194240)===0&&(Bl=64),i}function Wh(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function Ca(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Zn(s),i[s]=l}function TM(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-Zn(l),b=1<<E;s[E]=0,f[E]=-1,i[E]=-1,l&=~b}}function Gh(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var f=31-Zn(l),E=1<<f;E&s|i[f]&s&&(i[f]|=s),l&=~E}}var nt=0;function MT(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var FT,Kh,BT,UT,HT,Qh=!1,zl=[],ii=null,oi=null,si=null,ka=new Map,Na=new Map,ai=[],xM="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 zT(i,s){switch(i){case"focusin":case"focusout":ii=null;break;case"dragenter":case"dragleave":oi=null;break;case"mouseover":case"mouseout":si=null;break;case"pointerover":case"pointerout":ka.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Na.delete(s.pointerId)}}function Oa(i,s,l,f,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:s,domEventName:l,eventSystemFlags:f,nativeEvent:b,targetContainers:[E]},s!==null&&(s=Va(s),s!==null&&Kh(s)),i):(i.eventSystemFlags|=f,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function wM(i,s,l,f,E){switch(s){case"focusin":return ii=Oa(ii,i,s,l,f,E),!0;case"dragenter":return oi=Oa(oi,i,s,l,f,E),!0;case"mouseover":return si=Oa(si,i,s,l,f,E),!0;case"pointerover":var b=E.pointerId;return ka.set(b,Oa(ka.get(b)||null,i,s,l,f,E)),!0;case"gotpointercapture":return b=E.pointerId,Na.set(b,Oa(Na.get(b)||null,i,s,l,f,E)),!0}return!1}function jT(i){var s=Qi(i.target);if(s!==null){var l=Ki(s);if(l!==null){if(s=l.tag,s===13){if(s=CT(l),s!==null){i.blockedOn=s,HT(i.priority,function(){BT(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 jl(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=Jh(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var f=new l.constructor(l.type,l);Sn=f,l.target.dispatchEvent(f),Sn=null}else return s=Va(l),s!==null&&Kh(s),i.blockedOn=l,!1;s.shift()}return!0}function $T(i,s,l){jl(i)&&l.delete(s)}function _M(){Qh=!1,ii!==null&&jl(ii)&&(ii=null),oi!==null&&jl(oi)&&(oi=null),si!==null&&jl(si)&&(si=null),ka.forEach($T),Na.forEach($T)}function Ia(i,s){i.blockedOn===s&&(i.blockedOn=null,Qh||(Qh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,_M)))}function Ra(i){function s(E){return Ia(E,i)}if(0<zl.length){Ia(zl[0],i);for(var l=1;l<zl.length;l++){var f=zl[l];f.blockedOn===i&&(f.blockedOn=null)}}for(ii!==null&&Ia(ii,i),oi!==null&&Ia(oi,i),si!==null&&Ia(si,i),ka.forEach(s),Na.forEach(s),l=0;l<ai.length;l++)f=ai[l],f.blockedOn===i&&(f.blockedOn=null);for(;0<ai.length&&(l=ai[0],l.blockedOn===null);)jT(l),l.blockedOn===null&&ai.shift()}var Zo=U.ReactCurrentBatchConfig,$l=!0;function vM(i,s,l,f){var E=nt,b=Zo.transition;Zo.transition=null;try{nt=1,Xh(i,s,l,f)}finally{nt=E,Zo.transition=b}}function SM(i,s,l,f){var E=nt,b=Zo.transition;Zo.transition=null;try{nt=4,Xh(i,s,l,f)}finally{nt=E,Zo.transition=b}}function Xh(i,s,l,f){if($l){var E=Jh(i,s,l,f);if(E===null)mp(i,s,f,Vl,l),zT(i,f);else if(wM(E,i,s,l,f))f.stopPropagation();else if(zT(i,f),s&4&&-1<xM.indexOf(i)){for(;E!==null;){var b=Va(E);if(b!==null&&FT(b),b=Jh(i,s,l,f),b===null&&mp(i,s,f,Vl,l),b===E)break;E=b}E!==null&&f.stopPropagation()}else mp(i,s,f,null,l)}}var Vl=null;function Jh(i,s,l,f){if(Vl=null,i=Hh(f),i=Qi(i),i!==null)if(s=Ki(i),s===null)i=null;else if(l=s.tag,l===13){if(i=CT(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 Vl=i,null}function VT(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(fM()){case qh:return 1;case PT:return 4;case Ml:case hM:return 16;case LT:return 536870912;default:return 16}default:return 16}}var ui=null,Zh=null,ql=null;function qT(){if(ql)return ql;var i,s=Zh,l=s.length,f,E="value"in ui?ui.value:ui.textContent,b=E.length;for(i=0;i<l&&s[i]===E[i];i++);var _=l-i;for(f=1;f<=_&&s[l-f]===E[b-f];f++);return ql=E.slice(i,1<f?1-f:void 0)}function Yl(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 Wl(){return!0}function YT(){return!1}function An(i){function s(l,f,E,b,_){this._reactName=l,this._targetInst=E,this.type=f,this.nativeEvent=b,this.target=_,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(l=i[L],this[L]=l?l(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Wl:YT,this.isPropagationStopped=YT,this}return S(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=Wl)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Wl)},persist:function(){},isPersistent:Wl}),s}var es={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ep=An(es),Pa=S({},es,{view:0,detail:0}),AM=An(Pa),tp,np,La,Gl=S({},Pa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ip,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==La&&(La&&i.type==="mousemove"?(tp=i.screenX-La.screenX,np=i.screenY-La.screenY):np=tp=0,La=i),tp)},movementY:function(i){return"movementY"in i?i.movementY:np}}),WT=An(Gl),CM=S({},Gl,{dataTransfer:0}),kM=An(CM),NM=S({},Pa,{relatedTarget:0}),rp=An(NM),OM=S({},es,{animationName:0,elapsedTime:0,pseudoElement:0}),IM=An(OM),RM=S({},es,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),PM=An(RM),LM=S({},es,{data:0}),GT=An(LM),DM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},MM={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"},FM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function BM(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=FM[i])?!!s[i]:!1}function ip(){return BM}var UM=S({},Pa,{key:function(i){if(i.key){var s=DM[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Yl(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?MM[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ip,charCode:function(i){return i.type==="keypress"?Yl(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Yl(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),HM=An(UM),zM=S({},Gl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),KT=An(zM),jM=S({},Pa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ip}),$M=An(jM),VM=S({},es,{propertyName:0,elapsedTime:0,pseudoElement:0}),qM=An(VM),YM=S({},Gl,{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}),WM=An(YM),GM=[9,13,27,32],op=c&&"CompositionEvent"in window,Da=null;c&&"documentMode"in document&&(Da=document.documentMode);var KM=c&&"TextEvent"in window&&!Da,QT=c&&(!op||Da&&8<Da&&11>=Da),XT=" ",JT=!1;function ZT(i,s){switch(i){case"keyup":return GM.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ex(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var ts=!1;function QM(i,s){switch(i){case"compositionend":return ex(s);case"keypress":return s.which!==32?null:(JT=!0,XT);case"textInput":return i=s.data,i===XT&&JT?null:i;default:return null}}function XM(i,s){if(ts)return i==="compositionend"||!op&&ZT(i,s)?(i=qT(),ql=Zh=ui=null,ts=!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 QT&&s.locale!=="ko"?null:s.data;default:return null}}var JM={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 tx(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!JM[i.type]:s==="textarea"}function nx(i,s,l,f){wT(f),s=Zl(s,"onChange"),0<s.length&&(l=new ep("onChange","change",null,l,f),i.push({event:l,listeners:s}))}var Ma=null,Fa=null;function ZM(i){Tx(i,0)}function Kl(i){var s=ss(i);if(Wi(s))return i}function e9(i,s){if(i==="change")return s}var rx=!1;if(c){var sp;if(c){var ap="oninput"in document;if(!ap){var ix=document.createElement("div");ix.setAttribute("oninput","return;"),ap=typeof ix.oninput=="function"}sp=ap}else sp=!1;rx=sp&&(!document.documentMode||9<document.documentMode)}function ox(){Ma&&(Ma.detachEvent("onpropertychange",sx),Fa=Ma=null)}function sx(i){if(i.propertyName==="value"&&Kl(Fa)){var s=[];nx(s,Fa,i,Hh(i)),AT(ZM,s)}}function t9(i,s,l){i==="focusin"?(ox(),Ma=s,Fa=l,Ma.attachEvent("onpropertychange",sx)):i==="focusout"&&ox()}function n9(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Kl(Fa)}function r9(i,s){if(i==="click")return Kl(s)}function i9(i,s){if(i==="input"||i==="change")return Kl(s)}function o9(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var er=typeof Object.is=="function"?Object.is:o9;function Ba(i,s){if(er(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)||!er(i[E],s[E]))return!1}return!0}function ax(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function ux(i,s){var l=ax(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=ax(l)}}function lx(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?lx(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function cx(){for(var i=window,s=ei();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=ei(i.document)}return s}function up(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 s9(i){var s=cx(),l=i.focusedElem,f=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&lx(l.ownerDocument.documentElement,l)){if(f!==null&&up(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,b=Math.min(f.start,E);f=f.end===void 0?b:Math.min(f.end,E),!i.extend&&b>f&&(E=f,f=b,b=E),E=ux(l,b);var _=ux(l,f);E&&_&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==_.node||i.focusOffset!==_.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),b>f?(i.addRange(s),i.extend(_.node,_.offset)):(s.setEnd(_.node,_.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 a9=c&&"documentMode"in document&&11>=document.documentMode,ns=null,lp=null,Ua=null,cp=!1;function dx(i,s,l){var f=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;cp||ns==null||ns!==ei(f)||(f=ns,"selectionStart"in f&&up(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}),Ua&&Ba(Ua,f)||(Ua=f,f=Zl(lp,"onSelect"),0<f.length&&(s=new ep("onSelect","select",null,s,l),i.push({event:s,listeners:f}),s.target=ns)))}function Ql(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var rs={animationend:Ql("Animation","AnimationEnd"),animationiteration:Ql("Animation","AnimationIteration"),animationstart:Ql("Animation","AnimationStart"),transitionend:Ql("Transition","TransitionEnd")},dp={},fx={};c&&(fx=document.createElement("div").style,"AnimationEvent"in window||(delete rs.animationend.animation,delete rs.animationiteration.animation,delete rs.animationstart.animation),"TransitionEvent"in window||delete rs.transitionend.transition);function Xl(i){if(dp[i])return dp[i];if(!rs[i])return i;var s=rs[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in fx)return dp[i]=s[l];return i}var hx=Xl("animationend"),px=Xl("animationiteration"),mx=Xl("animationstart"),gx=Xl("transitionend"),Ex=new Map,yx="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 li(i,s){Ex.set(i,s),a(s,[i])}for(var fp=0;fp<yx.length;fp++){var hp=yx[fp],u9=hp.toLowerCase(),l9=hp[0].toUpperCase()+hp.slice(1);li(u9,"on"+l9)}li(hx,"onAnimationEnd"),li(px,"onAnimationIteration"),li(mx,"onAnimationStart"),li("dblclick","onDoubleClick"),li("focusin","onFocus"),li("focusout","onBlur"),li(gx,"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 Ha="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(" "),c9=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ha));function bx(i,s,l){var f=i.type||"unknown-event";i.currentTarget=l,uM(f,s,void 0,i),i.currentTarget=null}function Tx(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 b=void 0;if(s)for(var _=f.length-1;0<=_;_--){var L=f[_],H=L.instance,te=L.currentTarget;if(L=L.listener,H!==b&&E.isPropagationStopped())break e;bx(E,L,te),b=H}else for(_=0;_<f.length;_++){if(L=f[_],H=L.instance,te=L.currentTarget,L=L.listener,H!==b&&E.isPropagationStopped())break e;bx(E,L,te),b=H}}}if(Dl)throw i=Vh,Dl=!1,Vh=null,i}function lt(i,s){var l=s[xp];l===void 0&&(l=s[xp]=new Set);var f=i+"__bubble";l.has(f)||(xx(s,i,2,!1),l.add(f))}function pp(i,s,l){var f=0;s&&(f|=4),xx(l,i,f,s)}var Jl="_reactListening"+Math.random().toString(36).slice(2);function za(i){if(!i[Jl]){i[Jl]=!0,r.forEach(function(l){l!=="selectionchange"&&(c9.has(l)||pp(l,!1,i),pp(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Jl]||(s[Jl]=!0,pp("selectionchange",!1,s))}}function xx(i,s,l,f){switch(VT(s)){case 1:var E=vM;break;case 4:E=SM;break;default:E=Xh}l=E.bind(null,s,l,i),E=void 0,!$h||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 mp(i,s,l,f,E){var b=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var _=f.tag;if(_===3||_===4){var L=f.stateNode.containerInfo;if(L===E||L.nodeType===8&&L.parentNode===E)break;if(_===4)for(_=f.return;_!==null;){var H=_.tag;if((H===3||H===4)&&(H=_.stateNode.containerInfo,H===E||H.nodeType===8&&H.parentNode===E))return;_=_.return}for(;L!==null;){if(_=Qi(L),_===null)return;if(H=_.tag,H===5||H===6){f=b=_;continue e}L=L.parentNode}}f=f.return}AT(function(){var te=b,fe=Hh(l),me=[];e:{var ue=Ex.get(i);if(ue!==void 0){var we=ep,Se=i;switch(i){case"keypress":if(Yl(l)===0)break e;case"keydown":case"keyup":we=HM;break;case"focusin":Se="focus",we=rp;break;case"focusout":Se="blur",we=rp;break;case"beforeblur":case"afterblur":we=rp;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":we=WT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":we=kM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":we=$M;break;case hx:case px:case mx:we=IM;break;case gx:we=qM;break;case"scroll":we=AM;break;case"wheel":we=WM;break;case"copy":case"cut":case"paste":we=PM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":we=KT}var ke=(s&4)!==0,vt=!ke&&i==="scroll",K=ke?ue!==null?ue+"Capture":null:ue;ke=[];for(var $=te,J;$!==null;){J=$;var ye=J.stateNode;if(J.tag===5&&ye!==null&&(J=ye,K!==null&&(ye=_a($,K),ye!=null&&ke.push(ja($,ye,J)))),vt)break;$=$.return}0<ke.length&&(ue=new we(ue,Se,null,l,fe),me.push({event:ue,listeners:ke}))}}if((s&7)===0){e:{if(ue=i==="mouseover"||i==="pointerover",we=i==="mouseout"||i==="pointerout",ue&&l!==Sn&&(Se=l.relatedTarget||l.fromElement)&&(Qi(Se)||Se[Dr]))break e;if((we||ue)&&(ue=fe.window===fe?fe:(ue=fe.ownerDocument)?ue.defaultView||ue.parentWindow:window,we?(Se=l.relatedTarget||l.toElement,we=te,Se=Se?Qi(Se):null,Se!==null&&(vt=Ki(Se),Se!==vt||Se.tag!==5&&Se.tag!==6)&&(Se=null)):(we=null,Se=te),we!==Se)){if(ke=WT,ye="onMouseLeave",K="onMouseEnter",$="mouse",(i==="pointerout"||i==="pointerover")&&(ke=KT,ye="onPointerLeave",K="onPointerEnter",$="pointer"),vt=we==null?ue:ss(we),J=Se==null?ue:ss(Se),ue=new ke(ye,$+"leave",we,l,fe),ue.target=vt,ue.relatedTarget=J,ye=null,Qi(fe)===te&&(ke=new ke(K,$+"enter",Se,l,fe),ke.target=J,ke.relatedTarget=vt,ye=ke),vt=ye,we&&Se)t:{for(ke=we,K=Se,$=0,J=ke;J;J=is(J))$++;for(J=0,ye=K;ye;ye=is(ye))J++;for(;0<$-J;)ke=is(ke),$--;for(;0<J-$;)K=is(K),J--;for(;$--;){if(ke===K||K!==null&&ke===K.alternate)break t;ke=is(ke),K=is(K)}ke=null}else ke=null;we!==null&&wx(me,ue,we,ke,!1),Se!==null&&vt!==null&&wx(me,vt,Se,ke,!0)}}e:{if(ue=te?ss(te):window,we=ue.nodeName&&ue.nodeName.toLowerCase(),we==="select"||we==="input"&&ue.type==="file")var Ne=e9;else if(tx(ue))if(rx)Ne=i9;else{Ne=n9;var De=t9}else(we=ue.nodeName)&&we.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(Ne=r9);if(Ne&&(Ne=Ne(i,te))){nx(me,Ne,l,fe);break e}De&&De(i,ue,te),i==="focusout"&&(De=ue._wrapperState)&&De.controlled&&ue.type==="number"&&Qo(ue,"number",ue.value)}switch(De=te?ss(te):window,i){case"focusin":(tx(De)||De.contentEditable==="true")&&(ns=De,lp=te,Ua=null);break;case"focusout":Ua=lp=ns=null;break;case"mousedown":cp=!0;break;case"contextmenu":case"mouseup":case"dragend":cp=!1,dx(me,l,fe);break;case"selectionchange":if(a9)break;case"keydown":case"keyup":dx(me,l,fe)}var Me;if(op)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 ts?ZT(i,l)&&(Ue="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ue="onCompositionStart");Ue&&(QT&&l.locale!=="ko"&&(ts||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&ts&&(Me=qT()):(ui=fe,Zh="value"in ui?ui.value:ui.textContent,ts=!0)),De=Zl(te,Ue),0<De.length&&(Ue=new GT(Ue,i,null,l,fe),me.push({event:Ue,listeners:De}),Me?Ue.data=Me:(Me=ex(l),Me!==null&&(Ue.data=Me)))),(Me=KM?QM(i,l):XM(i,l))&&(te=Zl(te,"onBeforeInput"),0<te.length&&(fe=new GT("onBeforeInput","beforeinput",null,l,fe),me.push({event:fe,listeners:te}),fe.data=Me))}Tx(me,s)})}function ja(i,s,l){return{instance:i,listener:s,currentTarget:l}}function Zl(i,s){for(var l=s+"Capture",f=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=_a(i,l),b!=null&&f.unshift(ja(i,b,E)),b=_a(i,s),b!=null&&f.push(ja(i,b,E))),i=i.return}return f}function is(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function wx(i,s,l,f,E){for(var b=s._reactName,_=[];l!==null&&l!==f;){var L=l,H=L.alternate,te=L.stateNode;if(H!==null&&H===f)break;L.tag===5&&te!==null&&(L=te,E?(H=_a(l,b),H!=null&&_.unshift(ja(l,H,L))):E||(H=_a(l,b),H!=null&&_.push(ja(l,H,L)))),l=l.return}_.length!==0&&i.push({event:s,listeners:_})}var d9=/\r\n?/g,f9=/\u0000|\uFFFD/g;function _x(i){return(typeof i=="string"?i:""+i).replace(d9,`
|
|
21
|
-
`).replace(f9,"")}function ec(i,s,l){if(s=_x(s),_x(i)!==s&&l)throw Error(n(425))}function tc(){}var gp=null,Ep=null;function yp(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 bp=typeof setTimeout=="function"?setTimeout:void 0,h9=typeof clearTimeout=="function"?clearTimeout:void 0,vx=typeof Promise=="function"?Promise:void 0,p9=typeof queueMicrotask=="function"?queueMicrotask:typeof vx!="undefined"?function(i){return vx.resolve(null).then(i).catch(m9)}:bp;function m9(i){setTimeout(function(){throw i})}function Tp(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),Ra(s);return}f--}else l!=="$"&&l!=="$?"&&l!=="$!"||f++;l=E}while(l);Ra(s)}function ci(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 Sx(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 os=Math.random().toString(36).slice(2),_r="__reactFiber$"+os,$a="__reactProps$"+os,Dr="__reactContainer$"+os,xp="__reactEvents$"+os,g9="__reactListeners$"+os,E9="__reactHandles$"+os;function Qi(i){var s=i[_r];if(s)return s;for(var l=i.parentNode;l;){if(s=l[Dr]||l[_r]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=Sx(i);i!==null;){if(l=i[_r])return l;i=Sx(i)}return s}i=l,l=i.parentNode}return null}function Va(i){return i=i[_r]||i[Dr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function ss(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function nc(i){return i[$a]||null}var wp=[],as=-1;function di(i){return{current:i}}function ct(i){0>as||(i.current=wp[as],wp[as]=null,as--)}function at(i,s){as++,wp[as]=i.current,i.current=s}var fi={},Xt=di(fi),mn=di(!1),Xi=fi;function us(i,s){var l=i.type.contextTypes;if(!l)return fi;var f=i.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in l)E[b]=s[b];return f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=E),E}function gn(i){return i=i.childContextTypes,i!=null}function rc(){ct(mn),ct(Xt)}function Ax(i,s,l){if(Xt.current!==fi)throw Error(n(168));at(Xt,s),at(mn,l)}function Cx(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 S({},l,f)}function ic(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||fi,Xi=Xt.current,at(Xt,i),at(mn,mn.current),!0}function kx(i,s,l){var f=i.stateNode;if(!f)throw Error(n(169));l?(i=Cx(i,s,Xi),f.__reactInternalMemoizedMergedChildContext=i,ct(mn),ct(Xt),at(Xt,i)):ct(mn),at(mn,l)}var Mr=null,oc=!1,_p=!1;function Nx(i){Mr===null?Mr=[i]:Mr.push(i)}function y9(i){oc=!0,Nx(i)}function hi(){if(!_p&&Mr!==null){_p=!0;var i=0,s=nt;try{var l=Mr;for(nt=1;i<l.length;i++){var f=l[i];do f=f(!0);while(f!==null)}Mr=null,oc=!1}catch(E){throw Mr!==null&&(Mr=Mr.slice(i+1)),IT(qh,hi),E}finally{nt=s,_p=!1}}return null}var ls=[],cs=0,sc=null,ac=0,Fn=[],Bn=0,Ji=null,Fr=1,Br="";function Zi(i,s){ls[cs++]=ac,ls[cs++]=sc,sc=i,ac=s}function Ox(i,s,l){Fn[Bn++]=Fr,Fn[Bn++]=Br,Fn[Bn++]=Ji,Ji=i;var f=Fr;i=Br;var E=32-Zn(f)-1;f&=~(1<<E),l+=1;var b=32-Zn(s)+E;if(30<b){var _=E-E%5;b=(f&(1<<_)-1).toString(32),f>>=_,E-=_,Fr=1<<32-Zn(s)+E|l<<E|f,Br=b+i}else Fr=1<<b|l<<E|f,Br=i}function vp(i){i.return!==null&&(Zi(i,1),Ox(i,1,0))}function Sp(i){for(;i===sc;)sc=ls[--cs],ls[cs]=null,ac=ls[--cs],ls[cs]=null;for(;i===Ji;)Ji=Fn[--Bn],Fn[Bn]=null,Br=Fn[--Bn],Fn[Bn]=null,Fr=Fn[--Bn],Fn[Bn]=null}var Cn=null,kn=null,mt=!1,tr=null;function Ix(i,s){var l=jn(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 Rx(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,Cn=i,kn=ci(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Cn=i,kn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=Ji!==null?{id:Fr,overflow:Br}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=jn(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Cn=i,kn=null,!0):!1;default:return!1}}function Ap(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Cp(i){if(mt){var s=kn;if(s){var l=s;if(!Rx(i,s)){if(Ap(i))throw Error(n(418));s=ci(l.nextSibling);var f=Cn;s&&Rx(i,s)?Ix(f,l):(i.flags=i.flags&-4097|2,mt=!1,Cn=i)}}else{if(Ap(i))throw Error(n(418));i.flags=i.flags&-4097|2,mt=!1,Cn=i}}}function Px(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Cn=i}function uc(i){if(i!==Cn)return!1;if(!mt)return Px(i),mt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!yp(i.type,i.memoizedProps)),s&&(s=kn)){if(Ap(i))throw Lx(),Error(n(418));for(;s;)Ix(i,s),s=ci(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){kn=ci(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}kn=null}}else kn=Cn?ci(i.stateNode.nextSibling):null;return!0}function Lx(){for(var i=kn;i;)i=ci(i.nextSibling)}function ds(){kn=Cn=null,mt=!1}function kp(i){tr===null?tr=[i]:tr.push(i)}var b9=U.ReactCurrentBatchConfig;function qa(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,b=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===b?s.ref:(s=function(_){var L=E.refs;_===null?delete L[b]:L[b]=_},s._stringRef=b,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function lc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function Dx(i){var s=i._init;return s(i._payload)}function Mx(i){function s(K,$){if(i){var J=K.deletions;J===null?(K.deletions=[$],K.flags|=16):J.push($)}}function l(K,$){if(!i)return null;for(;$!==null;)s(K,$),$=$.sibling;return null}function f(K,$){for(K=new Map;$!==null;)$.key!==null?K.set($.key,$):K.set($.index,$),$=$.sibling;return K}function E(K,$){return K=xi(K,$),K.index=0,K.sibling=null,K}function b(K,$,J){return K.index=J,i?(J=K.alternate,J!==null?(J=J.index,J<$?(K.flags|=2,$):J):(K.flags|=2,$)):(K.flags|=1048576,$)}function _(K){return i&&K.alternate===null&&(K.flags|=2),K}function L(K,$,J,ye){return $===null||$.tag!==6?($=bm(J,K.mode,ye),$.return=K,$):($=E($,J),$.return=K,$)}function H(K,$,J,ye){var Ne=J.type;return Ne===X?fe(K,$,J.props.children,ye,J.key):$!==null&&($.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ce&&Dx(Ne)===$.type)?(ye=E($,J.props),ye.ref=qa(K,$,J),ye.return=K,ye):(ye=Pc(J.type,J.key,J.props,null,K.mode,ye),ye.ref=qa(K,$,J),ye.return=K,ye)}function te(K,$,J,ye){return $===null||$.tag!==4||$.stateNode.containerInfo!==J.containerInfo||$.stateNode.implementation!==J.implementation?($=Tm(J,K.mode,ye),$.return=K,$):($=E($,J.children||[]),$.return=K,$)}function fe(K,$,J,ye,Ne){return $===null||$.tag!==7?($=ao(J,K.mode,ye,Ne),$.return=K,$):($=E($,J),$.return=K,$)}function me(K,$,J){if(typeof $=="string"&&$!==""||typeof $=="number")return $=bm(""+$,K.mode,J),$.return=K,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case Y:return J=Pc($.type,$.key,$.props,null,K.mode,J),J.ref=qa(K,null,$),J.return=K,J;case F:return $=Tm($,K.mode,J),$.return=K,$;case Ce:var ye=$._init;return me(K,ye($._payload),J)}if(ti($)||q($))return $=ao($,K.mode,J,null),$.return=K,$;lc(K,$)}return null}function ue(K,$,J,ye){var Ne=$!==null?$.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return Ne!==null?null:L(K,$,""+J,ye);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case Y:return J.key===Ne?H(K,$,J,ye):null;case F:return J.key===Ne?te(K,$,J,ye):null;case Ce:return Ne=J._init,ue(K,$,Ne(J._payload),ye)}if(ti(J)||q(J))return Ne!==null?null:fe(K,$,J,ye,null);lc(K,J)}return null}function we(K,$,J,ye,Ne){if(typeof ye=="string"&&ye!==""||typeof ye=="number")return K=K.get(J)||null,L($,K,""+ye,Ne);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case Y:return K=K.get(ye.key===null?J:ye.key)||null,H($,K,ye,Ne);case F:return K=K.get(ye.key===null?J:ye.key)||null,te($,K,ye,Ne);case Ce:var De=ye._init;return we(K,$,J,De(ye._payload),Ne)}if(ti(ye)||q(ye))return K=K.get(J)||null,fe($,K,ye,Ne,null);lc($,ye)}return null}function Se(K,$,J,ye){for(var Ne=null,De=null,Me=$,Ue=$=0,zt=null;Me!==null&&Ue<J.length;Ue++){Me.index>Ue?(zt=Me,Me=null):zt=Me.sibling;var et=ue(K,Me,J[Ue],ye);if(et===null){Me===null&&(Me=zt);break}i&&Me&&et.alternate===null&&s(K,Me),$=b(et,$,Ue),De===null?Ne=et:De.sibling=et,De=et,Me=zt}if(Ue===J.length)return l(K,Me),mt&&Zi(K,Ue),Ne;if(Me===null){for(;Ue<J.length;Ue++)Me=me(K,J[Ue],ye),Me!==null&&($=b(Me,$,Ue),De===null?Ne=Me:De.sibling=Me,De=Me);return mt&&Zi(K,Ue),Ne}for(Me=f(K,Me);Ue<J.length;Ue++)zt=we(Me,K,Ue,J[Ue],ye),zt!==null&&(i&&zt.alternate!==null&&Me.delete(zt.key===null?Ue:zt.key),$=b(zt,$,Ue),De===null?Ne=zt:De.sibling=zt,De=zt);return i&&Me.forEach(function(wi){return s(K,wi)}),mt&&Zi(K,Ue),Ne}function ke(K,$,J,ye){var Ne=q(J);if(typeof Ne!="function")throw Error(n(150));if(J=Ne.call(J),J==null)throw Error(n(151));for(var De=Ne=null,Me=$,Ue=$=0,zt=null,et=J.next();Me!==null&&!et.done;Ue++,et=J.next()){Me.index>Ue?(zt=Me,Me=null):zt=Me.sibling;var wi=ue(K,Me,et.value,ye);if(wi===null){Me===null&&(Me=zt);break}i&&Me&&wi.alternate===null&&s(K,Me),$=b(wi,$,Ue),De===null?Ne=wi:De.sibling=wi,De=wi,Me=zt}if(et.done)return l(K,Me),mt&&Zi(K,Ue),Ne;if(Me===null){for(;!et.done;Ue++,et=J.next())et=me(K,et.value,ye),et!==null&&($=b(et,$,Ue),De===null?Ne=et:De.sibling=et,De=et);return mt&&Zi(K,Ue),Ne}for(Me=f(K,Me);!et.done;Ue++,et=J.next())et=we(Me,K,Ue,et.value,ye),et!==null&&(i&&et.alternate!==null&&Me.delete(et.key===null?Ue:et.key),$=b(et,$,Ue),De===null?Ne=et:De.sibling=et,De=et);return i&&Me.forEach(function(J9){return s(K,J9)}),mt&&Zi(K,Ue),Ne}function vt(K,$,J,ye){if(typeof J=="object"&&J!==null&&J.type===X&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case Y:e:{for(var Ne=J.key,De=$;De!==null;){if(De.key===Ne){if(Ne=J.type,Ne===X){if(De.tag===7){l(K,De.sibling),$=E(De,J.props.children),$.return=K,K=$;break e}}else if(De.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ce&&Dx(Ne)===De.type){l(K,De.sibling),$=E(De,J.props),$.ref=qa(K,De,J),$.return=K,K=$;break e}l(K,De);break}else s(K,De);De=De.sibling}J.type===X?($=ao(J.props.children,K.mode,ye,J.key),$.return=K,K=$):(ye=Pc(J.type,J.key,J.props,null,K.mode,ye),ye.ref=qa(K,$,J),ye.return=K,K=ye)}return _(K);case F:e:{for(De=J.key;$!==null;){if($.key===De)if($.tag===4&&$.stateNode.containerInfo===J.containerInfo&&$.stateNode.implementation===J.implementation){l(K,$.sibling),$=E($,J.children||[]),$.return=K,K=$;break e}else{l(K,$);break}else s(K,$);$=$.sibling}$=Tm(J,K.mode,ye),$.return=K,K=$}return _(K);case Ce:return De=J._init,vt(K,$,De(J._payload),ye)}if(ti(J))return Se(K,$,J,ye);if(q(J))return ke(K,$,J,ye);lc(K,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,$!==null&&$.tag===6?(l(K,$.sibling),$=E($,J),$.return=K,K=$):(l(K,$),$=bm(J,K.mode,ye),$.return=K,K=$),_(K)):l(K,$)}return vt}var fs=Mx(!0),Fx=Mx(!1),cc=di(null),dc=null,hs=null,Np=null;function Op(){Np=hs=dc=null}function Ip(i){var s=cc.current;ct(cc),i._currentValue=s}function Rp(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 ps(i,s){dc=i,Np=hs=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(En=!0),i.firstContext=null)}function Un(i){var s=i._currentValue;if(Np!==i)if(i={context:i,memoizedValue:s,next:null},hs===null){if(dc===null)throw Error(n(308));hs=i,dc.dependencies={lanes:0,firstContext:i}}else hs=hs.next=i;return s}var eo=null;function Pp(i){eo===null?eo=[i]:eo.push(i)}function Bx(i,s,l,f){var E=s.interleaved;return E===null?(l.next=l,Pp(s)):(l.next=E.next,E.next=l),s.interleaved=l,Ur(i,f)}function Ur(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 pi=!1;function Lp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ux(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 Hr(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function mi(i,s,l){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(Je&2)!==0){var E=f.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),f.pending=s,Ur(i,l)}return E=f.interleaved,E===null?(s.next=s,Pp(f)):(s.next=E.next,E.next=s),f.interleaved=s,Ur(i,l)}function fc(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,Gh(i,l)}}function Hx(i,s){var l=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,l===f)){var E=null,b=null;if(l=l.firstBaseUpdate,l!==null){do{var _={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};b===null?E=b=_:b=b.next=_,l=l.next}while(l!==null);b===null?E=b=s:b=b.next=s}else E=b=s;l={baseState:f.baseState,firstBaseUpdate:E,lastBaseUpdate:b,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 hc(i,s,l,f){var E=i.updateQueue;pi=!1;var b=E.firstBaseUpdate,_=E.lastBaseUpdate,L=E.shared.pending;if(L!==null){E.shared.pending=null;var H=L,te=H.next;H.next=null,_===null?b=te:_.next=te,_=H;var fe=i.alternate;fe!==null&&(fe=fe.updateQueue,L=fe.lastBaseUpdate,L!==_&&(L===null?fe.firstBaseUpdate=te:L.next=te,fe.lastBaseUpdate=H))}if(b!==null){var me=E.baseState;_=0,fe=te=H=null,L=b;do{var ue=L.lane,we=L.eventTime;if((f&ue)===ue){fe!==null&&(fe=fe.next={eventTime:we,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var Se=i,ke=L;switch(ue=s,we=l,ke.tag){case 1:if(Se=ke.payload,typeof Se=="function"){me=Se.call(we,me,ue);break e}me=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=ke.payload,ue=typeof Se=="function"?Se.call(we,me,ue):Se,ue==null)break e;me=S({},me,ue);break e;case 2:pi=!0}}L.callback!==null&&L.lane!==0&&(i.flags|=64,ue=E.effects,ue===null?E.effects=[L]:ue.push(L))}else we={eventTime:we,lane:ue,tag:L.tag,payload:L.payload,callback:L.callback,next:null},fe===null?(te=fe=we,H=me):fe=fe.next=we,_|=ue;if(L=L.next,L===null){if(L=E.shared.pending,L===null)break;ue=L,L=ue.next,ue.next=null,E.lastBaseUpdate=ue,E.shared.pending=null}}while(!0);if(fe===null&&(H=me),E.baseState=H,E.firstBaseUpdate=te,E.lastBaseUpdate=fe,s=E.shared.interleaved,s!==null){E=s;do _|=E.lane,E=E.next;while(E!==s)}else b===null&&(E.shared.lanes=0);ro|=_,i.lanes=_,i.memoizedState=me}}function zx(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 Ya={},vr=di(Ya),Wa=di(Ya),Ga=di(Ya);function to(i){if(i===Ya)throw Error(n(174));return i}function Dp(i,s){switch(at(Ga,s),at(Wa,i),at(vr,Ya),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)}ct(vr),at(vr,s)}function ms(){ct(vr),ct(Wa),ct(Ga)}function jx(i){to(Ga.current);var s=to(vr.current),l=xe(s,i.type);s!==l&&(at(Wa,i),at(vr,l))}function Mp(i){Wa.current===i&&(ct(vr),ct(Wa))}var gt=di(0);function pc(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 Fp=[];function Bp(){for(var i=0;i<Fp.length;i++)Fp[i]._workInProgressVersionPrimary=null;Fp.length=0}var mc=U.ReactCurrentDispatcher,Up=U.ReactCurrentBatchConfig,no=0,Et=null,Rt=null,Ut=null,gc=!1,Ka=!1,Qa=0,T9=0;function Jt(){throw Error(n(321))}function Hp(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!er(i[l],s[l]))return!1;return!0}function zp(i,s,l,f,E,b){if(no=b,Et=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,mc.current=i===null||i.memoizedState===null?v9:S9,i=l(f,E),Ka){b=0;do{if(Ka=!1,Qa=0,25<=b)throw Error(n(301));b+=1,Ut=Rt=null,s.updateQueue=null,mc.current=A9,i=l(f,E)}while(Ka)}if(mc.current=bc,s=Rt!==null&&Rt.next!==null,no=0,Ut=Rt=Et=null,gc=!1,s)throw Error(n(300));return i}function jp(){var i=Qa!==0;return Qa=0,i}function Sr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?Et.memoizedState=Ut=i:Ut=Ut.next=i,Ut}function Hn(){if(Rt===null){var i=Et.alternate;i=i!==null?i.memoizedState:null}else i=Rt.next;var s=Ut===null?Et.memoizedState:Ut.next;if(s!==null)Ut=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},Ut===null?Et.memoizedState=Ut=i:Ut=Ut.next=i}return Ut}function Xa(i,s){return typeof s=="function"?s(i):s}function $p(i){var s=Hn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var f=Rt,E=f.baseQueue,b=l.pending;if(b!==null){if(E!==null){var _=E.next;E.next=b.next,b.next=_}f.baseQueue=E=b,l.pending=null}if(E!==null){b=E.next,f=f.baseState;var L=_=null,H=null,te=b;do{var fe=te.lane;if((no&fe)===fe)H!==null&&(H=H.next={lane:0,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),f=te.hasEagerState?te.eagerState:i(f,te.action);else{var me={lane:fe,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null};H===null?(L=H=me,_=f):H=H.next=me,Et.lanes|=fe,ro|=fe}te=te.next}while(te!==null&&te!==b);H===null?_=f:H.next=L,er(f,s.memoizedState)||(En=!0),s.memoizedState=f,s.baseState=_,s.baseQueue=H,l.lastRenderedState=f}if(i=l.interleaved,i!==null){E=i;do b=E.lane,Et.lanes|=b,ro|=b,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function Vp(i){var s=Hn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var f=l.dispatch,E=l.pending,b=s.memoizedState;if(E!==null){l.pending=null;var _=E=E.next;do b=i(b,_.action),_=_.next;while(_!==E);er(b,s.memoizedState)||(En=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),l.lastRenderedState=b}return[b,f]}function $x(){}function Vx(i,s){var l=Et,f=Hn(),E=s(),b=!er(f.memoizedState,E);if(b&&(f.memoizedState=E,En=!0),f=f.queue,qp(Wx.bind(null,l,f,i),[i]),f.getSnapshot!==s||b||Ut!==null&&Ut.memoizedState.tag&1){if(l.flags|=2048,Ja(9,Yx.bind(null,l,f,E,s),void 0,null),Ht===null)throw Error(n(349));(no&30)!==0||qx(l,s,E)}return E}function qx(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=Et.updateQueue,s===null?(s={lastEffect:null,stores:null},Et.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function Yx(i,s,l,f){s.value=l,s.getSnapshot=f,Gx(s)&&Kx(i)}function Wx(i,s,l){return l(function(){Gx(s)&&Kx(i)})}function Gx(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!er(i,l)}catch(f){return!0}}function Kx(i){var s=Ur(i,1);s!==null&&or(s,i,1,-1)}function Qx(i){var s=Sr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Xa,lastRenderedState:i},s.queue=i,i=i.dispatch=_9.bind(null,Et,i),[s.memoizedState,i]}function Ja(i,s,l,f){return i={tag:i,create:s,destroy:l,deps:f,next:null},s=Et.updateQueue,s===null?(s={lastEffect:null,stores:null},Et.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 Hn().memoizedState}function Ec(i,s,l,f){var E=Sr();Et.flags|=i,E.memoizedState=Ja(1|s,l,void 0,f===void 0?null:f)}function yc(i,s,l,f){var E=Hn();f=f===void 0?null:f;var b=void 0;if(Rt!==null){var _=Rt.memoizedState;if(b=_.destroy,f!==null&&Hp(f,_.deps)){E.memoizedState=Ja(s,l,b,f);return}}Et.flags|=i,E.memoizedState=Ja(1|s,l,b,f)}function Jx(i,s){return Ec(8390656,8,i,s)}function qp(i,s){return yc(2048,8,i,s)}function Zx(i,s){return yc(4,2,i,s)}function ew(i,s){return yc(4,4,i,s)}function tw(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 nw(i,s,l){return l=l!=null?l.concat([i]):null,yc(4,4,tw.bind(null,s,i),l)}function Yp(){}function rw(i,s){var l=Hn();s=s===void 0?null:s;var f=l.memoizedState;return f!==null&&s!==null&&Hp(s,f[1])?f[0]:(l.memoizedState=[i,s],i)}function iw(i,s){var l=Hn();s=s===void 0?null:s;var f=l.memoizedState;return f!==null&&s!==null&&Hp(s,f[1])?f[0]:(i=i(),l.memoizedState=[i,s],i)}function ow(i,s,l){return(no&21)===0?(i.baseState&&(i.baseState=!1,En=!0),i.memoizedState=l):(er(l,s)||(l=DT(),Et.lanes|=l,ro|=l,i.baseState=!0),s)}function x9(i,s){var l=nt;nt=l!==0&&4>l?l:4,i(!0);var f=Up.transition;Up.transition={};try{i(!1),s()}finally{nt=l,Up.transition=f}}function sw(){return Hn().memoizedState}function w9(i,s,l){var f=bi(i);if(l={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null},aw(i))uw(s,l);else if(l=Bx(i,s,l,f),l!==null){var E=on();or(l,i,f,E),lw(l,s,f)}}function _9(i,s,l){var f=bi(i),E={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null};if(aw(i))uw(s,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var _=s.lastRenderedState,L=b(_,l);if(E.hasEagerState=!0,E.eagerState=L,er(L,_)){var H=s.interleaved;H===null?(E.next=E,Pp(s)):(E.next=H.next,H.next=E),s.interleaved=E;return}}catch(te){}l=Bx(i,s,E,f),l!==null&&(E=on(),or(l,i,f,E),lw(l,s,f))}}function aw(i){var s=i.alternate;return i===Et||s!==null&&s===Et}function uw(i,s){Ka=gc=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function lw(i,s,l){if((l&4194240)!==0){var f=s.lanes;f&=i.pendingLanes,l|=f,s.lanes=l,Gh(i,l)}}var bc={readContext:Un,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useInsertionEffect:Jt,useLayoutEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useMutableSource:Jt,useSyncExternalStore:Jt,useId:Jt,unstable_isNewReconciler:!1},v9={readContext:Un,useCallback:function(i,s){return Sr().memoizedState=[i,s===void 0?null:s],i},useContext:Un,useEffect:Jx,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,Ec(4194308,4,tw.bind(null,s,i),l)},useLayoutEffect:function(i,s){return Ec(4194308,4,i,s)},useInsertionEffect:function(i,s){return Ec(4,2,i,s)},useMemo:function(i,s){var l=Sr();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var f=Sr();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=w9.bind(null,Et,i),[f.memoizedState,i]},useRef:function(i){var s=Sr();return i={current:i},s.memoizedState=i},useState:Qx,useDebugValue:Yp,useDeferredValue:function(i){return Sr().memoizedState=i},useTransition:function(){var i=Qx(!1),s=i[0];return i=x9.bind(null,i[1]),Sr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var f=Et,E=Sr();if(mt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),Ht===null)throw Error(n(349));(no&30)!==0||qx(f,s,l)}E.memoizedState=l;var b={value:l,getSnapshot:s};return E.queue=b,Jx(Wx.bind(null,f,b,i),[i]),f.flags|=2048,Ja(9,Yx.bind(null,f,b,l,s),void 0,null),l},useId:function(){var i=Sr(),s=Ht.identifierPrefix;if(mt){var l=Br,f=Fr;l=(f&~(1<<32-Zn(f)-1)).toString(32)+l,s=":"+s+"R"+l,l=Qa++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=T9++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},S9={readContext:Un,useCallback:rw,useContext:Un,useEffect:qp,useImperativeHandle:nw,useInsertionEffect:Zx,useLayoutEffect:ew,useMemo:iw,useReducer:$p,useRef:Xx,useState:function(){return $p(Xa)},useDebugValue:Yp,useDeferredValue:function(i){var s=Hn();return ow(s,Rt.memoizedState,i)},useTransition:function(){var i=$p(Xa)[0],s=Hn().memoizedState;return[i,s]},useMutableSource:$x,useSyncExternalStore:Vx,useId:sw,unstable_isNewReconciler:!1},A9={readContext:Un,useCallback:rw,useContext:Un,useEffect:qp,useImperativeHandle:nw,useInsertionEffect:Zx,useLayoutEffect:ew,useMemo:iw,useReducer:Vp,useRef:Xx,useState:function(){return Vp(Xa)},useDebugValue:Yp,useDeferredValue:function(i){var s=Hn();return Rt===null?s.memoizedState=i:ow(s,Rt.memoizedState,i)},useTransition:function(){var i=Vp(Xa)[0],s=Hn().memoizedState;return[i,s]},useMutableSource:$x,useSyncExternalStore:Vx,useId:sw,unstable_isNewReconciler:!1};function nr(i,s){if(i&&i.defaultProps){s=S({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function Wp(i,s,l,f){s=i.memoizedState,l=l(f,s),l=l==null?s:S({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Tc={isMounted:function(i){return(i=i._reactInternals)?Ki(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var f=on(),E=bi(i),b=Hr(f,E);b.payload=s,l!=null&&(b.callback=l),s=mi(i,b,E),s!==null&&(or(s,i,E,f),fc(s,i,E))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var f=on(),E=bi(i),b=Hr(f,E);b.tag=1,b.payload=s,l!=null&&(b.callback=l),s=mi(i,b,E),s!==null&&(or(s,i,E,f),fc(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=on(),f=bi(i),E=Hr(l,f);E.tag=2,s!=null&&(E.callback=s),s=mi(i,E,f),s!==null&&(or(s,i,f,l),fc(s,i,f))}};function cw(i,s,l,f,E,b,_){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,b,_):s.prototype&&s.prototype.isPureReactComponent?!Ba(l,f)||!Ba(E,b):!0}function dw(i,s,l){var f=!1,E=fi,b=s.contextType;return typeof b=="object"&&b!==null?b=Un(b):(E=gn(s)?Xi:Xt.current,f=s.contextTypes,b=(f=f!=null)?us(i,E):fi),s=new s(l,b),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Tc,i.stateNode=s,s._reactInternals=i,f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),s}function fw(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&&Tc.enqueueReplaceState(s,s.state,null)}function Gp(i,s,l,f){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},Lp(i);var b=s.contextType;typeof b=="object"&&b!==null?E.context=Un(b):(b=gn(s)?Xi:Xt.current,E.context=us(i,b)),E.state=i.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(Wp(i,s,b,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&&Tc.enqueueReplaceState(E,E.state,null),hc(i,l,E,f),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function gs(i,s){try{var l="",f=s;do l+=Oe(f),f=f.return;while(f);var E=l}catch(b){E=`
|
|
22
|
-
Error generating stack: `+
|
|
23
|
-
`+b.stack}return{value:i,source:s,stack:E,digest:null}}function Kp(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function Qp(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var C9=typeof WeakMap=="function"?WeakMap:Map;function hw(i,s,l){l=Hr(-1,l),l.tag=3,l.payload={element:null};var f=s.value;return l.callback=function(){Cc||(Cc=!0,dm=f),Qp(i,s)},l}function pw(i,s,l){l=Hr(-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(){Qp(i,s)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(l.callback=function(){Qp(i,s),typeof f!="function"&&(Ei===null?Ei=new Set([this]):Ei.add(this));var _=s.stack;this.componentDidCatch(s.value,{componentStack:_!==null?_:""})}),l}function mw(i,s,l){var f=i.pingCache;if(f===null){f=i.pingCache=new C9;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=z9.bind(null,i,s,l),s.then(i,i))}function gw(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 Ew(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=Hr(-1,1),s.tag=2,mi(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var k9=U.ReactCurrentOwner,En=!1;function rn(i,s,l,f){s.child=i===null?Fx(s,null,l,f):fs(s,i.child,l,f)}function yw(i,s,l,f,E){l=l.render;var b=s.ref;return ps(s,E),f=zp(i,s,l,f,b,E),l=jp(),i!==null&&!En?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,zr(i,s,E)):(mt&&l&&vp(s),s.flags|=1,rn(i,s,f,E),s.child)}function bw(i,s,l,f,E){if(i===null){var b=l.type;return typeof b=="function"&&!ym(b)&&b.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=b,Tw(i,s,b,f,E)):(i=Pc(l.type,null,f,s,s.mode,E),i.ref=s.ref,i.return=s,s.child=i)}if(b=i.child,(i.lanes&E)===0){var _=b.memoizedProps;if(l=l.compare,l=l!==null?l:Ba,l(_,f)&&i.ref===s.ref)return zr(i,s,E)}return s.flags|=1,i=xi(b,f),i.ref=s.ref,i.return=s,s.child=i}function Tw(i,s,l,f,E){if(i!==null){var b=i.memoizedProps;if(Ba(b,f)&&i.ref===s.ref)if(En=!1,s.pendingProps=f=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(En=!0);else return s.lanes=i.lanes,zr(i,s,E)}return Xp(i,s,l,f,E)}function xw(i,s,l){var f=s.pendingProps,E=f.children,b=i!==null?i.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},at(ys,Nn),Nn|=l;else{if((l&1073741824)===0)return i=b!==null?b.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,at(ys,Nn),Nn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=b!==null?b.baseLanes:l,at(ys,Nn),Nn|=f}else b!==null?(f=b.baseLanes|l,s.memoizedState=null):f=l,at(ys,Nn),Nn|=f;return rn(i,s,E,l),s.child}function ww(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function Xp(i,s,l,f,E){var b=gn(l)?Xi:Xt.current;return b=us(s,b),ps(s,E),l=zp(i,s,l,f,b,E),f=jp(),i!==null&&!En?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,zr(i,s,E)):(mt&&f&&vp(s),s.flags|=1,rn(i,s,l,E),s.child)}function _w(i,s,l,f,E){if(gn(l)){var b=!0;ic(s)}else b=!1;if(ps(s,E),s.stateNode===null)wc(i,s),dw(s,l,f),Gp(s,l,f,E),f=!0;else if(i===null){var _=s.stateNode,L=s.memoizedProps;_.props=L;var H=_.context,te=l.contextType;typeof te=="object"&&te!==null?te=Un(te):(te=gn(l)?Xi:Xt.current,te=us(s,te));var fe=l.getDerivedStateFromProps,me=typeof fe=="function"||typeof _.getSnapshotBeforeUpdate=="function";me||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(L!==f||H!==te)&&fw(s,_,f,te),pi=!1;var ue=s.memoizedState;_.state=ue,hc(s,f,_,E),H=s.memoizedState,L!==f||ue!==H||mn.current||pi?(typeof fe=="function"&&(Wp(s,l,fe,f),H=s.memoizedState),(L=pi||cw(s,l,L,f,ue,H,te))?(me||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(s.flags|=4194308)):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=H),_.props=f,_.state=H,_.context=te,f=L):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{_=s.stateNode,Ux(i,s),L=s.memoizedProps,te=s.type===s.elementType?L:nr(s.type,L),_.props=te,me=s.pendingProps,ue=_.context,H=l.contextType,typeof H=="object"&&H!==null?H=Un(H):(H=gn(l)?Xi:Xt.current,H=us(s,H));var we=l.getDerivedStateFromProps;(fe=typeof we=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(L!==me||ue!==H)&&fw(s,_,f,H),pi=!1,ue=s.memoizedState,_.state=ue,hc(s,f,_,E);var Se=s.memoizedState;L!==me||ue!==Se||mn.current||pi?(typeof we=="function"&&(Wp(s,l,we,f),Se=s.memoizedState),(te=pi||cw(s,l,te,f,ue,Se,H)||!1)?(fe||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(f,Se,H),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(f,Se,H)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=Se),_.props=f,_.state=Se,_.context=H,f=te):(typeof _.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),f=!1)}return Jp(i,s,l,f,b,E)}function Jp(i,s,l,f,E,b){ww(i,s);var _=(s.flags&128)!==0;if(!f&&!_)return E&&kx(s,l,!1),zr(i,s,b);f=s.stateNode,k9.current=s;var L=_&&typeof l.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,i!==null&&_?(s.child=fs(s,i.child,null,b),s.child=fs(s,null,L,b)):rn(i,s,L,b),s.memoizedState=f.state,E&&kx(s,l,!0),s.child}function vw(i){var s=i.stateNode;s.pendingContext?Ax(i,s.pendingContext,s.pendingContext!==s.context):s.context&&Ax(i,s.context,!1),Dp(i,s.containerInfo)}function Sw(i,s,l,f,E){return ds(),kp(E),s.flags|=256,rn(i,s,l,f),s.child}var Zp={dehydrated:null,treeContext:null,retryLane:0};function em(i){return{baseLanes:i,cachePool:null,transitions:null}}function Aw(i,s,l){var f=s.pendingProps,E=gt.current,b=!1,_=(s.flags&128)!==0,L;if((L=_)||(L=i!==null&&i.memoizedState===null?!1:(E&2)!==0),L?(b=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),at(gt,E&1),i===null)return Cp(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):(_=f.children,i=f.fallback,b?(f=s.mode,b=s.child,_={mode:"hidden",children:_},(f&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=_):b=Lc(_,f,0,null),i=ao(i,f,l,null),b.return=s,i.return=s,b.sibling=i,s.child=b,s.child.memoizedState=em(l),s.memoizedState=Zp,i):tm(s,_));if(E=i.memoizedState,E!==null&&(L=E.dehydrated,L!==null))return N9(i,s,_,f,L,E,l);if(b){b=f.fallback,_=s.mode,E=i.child,L=E.sibling;var H={mode:"hidden",children:f.children};return(_&1)===0&&s.child!==E?(f=s.child,f.childLanes=0,f.pendingProps=H,s.deletions=null):(f=xi(E,H),f.subtreeFlags=E.subtreeFlags&14680064),L!==null?b=xi(L,b):(b=ao(b,_,l,null),b.flags|=2),b.return=s,f.return=s,f.sibling=b,s.child=f,f=b,b=s.child,_=i.child.memoizedState,_=_===null?em(l):{baseLanes:_.baseLanes|l,cachePool:null,transitions:_.transitions},b.memoizedState=_,b.childLanes=i.childLanes&~l,s.memoizedState=Zp,f}return b=i.child,i=b.sibling,f=xi(b,{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 tm(i,s){return s=Lc({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function xc(i,s,l,f){return f!==null&&kp(f),fs(s,i.child,null,l),i=tm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function N9(i,s,l,f,E,b,_){if(l)return s.flags&256?(s.flags&=-257,f=Kp(Error(n(422))),xc(i,s,_,f)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(b=f.fallback,E=s.mode,f=Lc({mode:"visible",children:f.children},E,0,null),b=ao(b,E,_,null),b.flags|=2,f.return=s,b.return=s,f.sibling=b,s.child=f,(s.mode&1)!==0&&fs(s,i.child,null,_),s.child.memoizedState=em(_),s.memoizedState=Zp,b);if((s.mode&1)===0)return xc(i,s,_,null);if(E.data==="$!"){if(f=E.nextSibling&&E.nextSibling.dataset,f)var L=f.dgst;return f=L,b=Error(n(419)),f=Kp(b,f,void 0),xc(i,s,_,f)}if(L=(_&i.childLanes)!==0,En||L){if(f=Ht,f!==null){switch(_&-_){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|_))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,Ur(i,E),or(f,i,E,-1))}return Em(),f=Kp(Error(n(421))),xc(i,s,_,f)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=j9.bind(null,i),E._reactRetry=s,null):(i=b.treeContext,kn=ci(E.nextSibling),Cn=s,mt=!0,tr=null,i!==null&&(Fn[Bn++]=Fr,Fn[Bn++]=Br,Fn[Bn++]=Ji,Fr=i.id,Br=i.overflow,Ji=s),s=tm(s,f.children),s.flags|=4096,s)}function Cw(i,s,l){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),Rp(i.return,s,l)}function nm(i,s,l,f,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:l,tailMode:E}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=f,b.tail=l,b.tailMode=E)}function kw(i,s,l){var f=s.pendingProps,E=f.revealOrder,b=f.tail;if(rn(i,s,f.children,l),f=gt.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&&Cw(i,l,s);else if(i.tag===19)Cw(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(at(gt,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&&pc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=s.child,s.child=null):(E=l.sibling,l.sibling=null),nm(s,!1,E,l,b);break;case"backwards":for(l=null,E=s.child,s.child=null;E!==null;){if(i=E.alternate,i!==null&&pc(i)===null){s.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}nm(s,!0,l,null,b);break;case"together":nm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function wc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function zr(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),ro|=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=xi(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=xi(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function O9(i,s,l){switch(s.tag){case 3:vw(s),ds();break;case 5:jx(s);break;case 1:gn(s.type)&&ic(s);break;case 4:Dp(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,E=s.memoizedProps.value;at(cc,f._currentValue),f._currentValue=E;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(at(gt,gt.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?Aw(i,s,l):(at(gt,gt.current&1),i=zr(i,s,l),i!==null?i.sibling:null);at(gt,gt.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),at(gt,gt.current),f)break;return null;case 22:case 23:return s.lanes=0,xw(i,s,l)}return zr(i,s,l)}var Nw,rm,Ow,Iw;Nw=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}},rm=function(){},Ow=function(i,s,l,f){var E=i.memoizedProps;if(E!==f){i=s.stateNode,to(vr.current);var b=null;switch(l){case"input":E=Jn(i,E),f=Jn(i,f),b=[];break;case"select":E=S({},E,{value:void 0}),f=S({},f,{value:void 0}),b=[];break;case"textarea":E=wa(i,E),f=wa(i,f),b=[];break;default:typeof E.onClick!="function"&&typeof f.onClick=="function"&&(i.onclick=tc)}$t(l,f);var _;l=null;for(te in E)if(!f.hasOwnProperty(te)&&E.hasOwnProperty(te)&&E[te]!=null)if(te==="style"){var L=E[te];for(_ in L)L.hasOwnProperty(_)&&(l||(l={}),l[_]="")}else te!=="dangerouslySetInnerHTML"&&te!=="children"&&te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&te!=="autoFocus"&&(o.hasOwnProperty(te)?b||(b=[]):(b=b||[]).push(te,null));for(te in f){var H=f[te];if(L=E!=null?E[te]:void 0,f.hasOwnProperty(te)&&H!==L&&(H!=null||L!=null))if(te==="style")if(L){for(_ in L)!L.hasOwnProperty(_)||H&&H.hasOwnProperty(_)||(l||(l={}),l[_]="");for(_ in H)H.hasOwnProperty(_)&&L[_]!==H[_]&&(l||(l={}),l[_]=H[_])}else l||(b||(b=[]),b.push(te,l)),l=H;else te==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,L=L?L.__html:void 0,H!=null&&L!==H&&(b=b||[]).push(te,H)):te==="children"?typeof H!="string"&&typeof H!="number"||(b=b||[]).push(te,""+H):te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&(o.hasOwnProperty(te)?(H!=null&&te==="onScroll"&<("scroll",i),b||L===H||(b=[])):(b=b||[]).push(te,H))}l&&(b=b||[]).push("style",l);var te=b;(s.updateQueue=te)&&(s.flags|=4)}},Iw=function(i,s,l,f){l!==f&&(s.flags|=4)};function Za(i,s){if(!mt)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 Zt(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 I9(i,s,l){var f=s.pendingProps;switch(Sp(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(s),null;case 1:return gn(s.type)&&rc(),Zt(s),null;case 3:return f=s.stateNode,ms(),ct(mn),ct(Xt),Bp(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(uc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,tr!==null&&(pm(tr),tr=null))),rm(i,s),Zt(s),null;case 5:Mp(s);var E=to(Ga.current);if(l=s.type,i!==null&&s.stateNode!=null)Ow(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 Zt(s),null}if(i=to(vr.current),uc(s)){f=s.stateNode,l=s.type;var b=s.memoizedProps;switch(f[_r]=s,f[$a]=b,i=(s.mode&1)!==0,l){case"dialog":lt("cancel",f),lt("close",f);break;case"iframe":case"object":case"embed":lt("load",f);break;case"video":case"audio":for(E=0;E<Ha.length;E++)lt(Ha[E],f);break;case"source":lt("error",f);break;case"img":case"image":case"link":lt("error",f),lt("load",f);break;case"details":lt("toggle",f);break;case"input":Ta(f,b),lt("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!b.multiple},lt("invalid",f);break;case"textarea":Il(f,b),lt("invalid",f)}$t(l,b),E=null;for(var _ in b)if(b.hasOwnProperty(_)){var L=b[_];_==="children"?typeof L=="string"?f.textContent!==L&&(b.suppressHydrationWarning!==!0&&ec(f.textContent,L,i),E=["children",L]):typeof L=="number"&&f.textContent!==""+L&&(b.suppressHydrationWarning!==!0&&ec(f.textContent,L,i),E=["children",""+L]):o.hasOwnProperty(_)&&L!=null&&_==="onScroll"&<("scroll",f)}switch(l){case"input":pn(f),Ol(f,b,!0);break;case"textarea":pn(f),Pl(f);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(f.onclick=tc)}f=E,s.updateQueue=f,f!==null&&(s.flags|=4)}else{_=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=_.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=_.createElement(l,{is:f.is}):(i=_.createElement(l),l==="select"&&(_=i,f.multiple?_.multiple=!0:f.size&&(_.size=f.size))):i=_.createElementNS(i,l),i[_r]=s,i[$a]=f,Nw(i,s,!1,!1),s.stateNode=i;e:{switch(_=xr(l,f),l){case"dialog":lt("cancel",i),lt("close",i),E=f;break;case"iframe":case"object":case"embed":lt("load",i),E=f;break;case"video":case"audio":for(E=0;E<Ha.length;E++)lt(Ha[E],i);E=f;break;case"source":lt("error",i),E=f;break;case"img":case"image":case"link":lt("error",i),lt("load",i),E=f;break;case"details":lt("toggle",i),E=f;break;case"input":Ta(i,f),E=Jn(i,f),lt("invalid",i);break;case"option":E=f;break;case"select":i._wrapperState={wasMultiple:!!f.multiple},E=S({},f,{value:void 0}),lt("invalid",i);break;case"textarea":Il(i,f),E=wa(i,f),lt("invalid",i);break;default:E=f}$t(l,E),L=E;for(b in L)if(L.hasOwnProperty(b)){var H=L[b];b==="style"?ri(i,H):b==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&Ye(i,H)):b==="children"?typeof H=="string"?(l!=="textarea"||H!=="")&&Xe(i,H):typeof H=="number"&&Xe(i,""+H):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(o.hasOwnProperty(b)?H!=null&&b==="onScroll"&<("scroll",i):H!=null&&R(i,b,H,_))}switch(l){case"input":pn(i),Ol(i,f,!1);break;case"textarea":pn(i),Pl(i);break;case"option":f.value!=null&&i.setAttribute("value",""+ve(f.value));break;case"select":i.multiple=!!f.multiple,b=f.value,b!=null?ni(i,!!f.multiple,b,!1):f.defaultValue!=null&&ni(i,!!f.multiple,f.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=tc)}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 Zt(s),null;case 6:if(i&&s.stateNode!=null)Iw(i,s,i.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(l=to(Ga.current),to(vr.current),uc(s)){if(f=s.stateNode,l=s.memoizedProps,f[_r]=s,(b=f.nodeValue!==l)&&(i=Cn,i!==null))switch(i.tag){case 3:ec(f.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&ec(f.nodeValue,l,(i.mode&1)!==0)}b&&(s.flags|=4)}else f=(l.nodeType===9?l:l.ownerDocument).createTextNode(f),f[_r]=s,s.stateNode=f}return Zt(s),null;case 13:if(ct(gt),f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(mt&&kn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Lx(),ds(),s.flags|=98560,b=!1;else if(b=uc(s),f!==null&&f.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[_r]=s}else ds(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Zt(s),b=!1}else tr!==null&&(pm(tr),tr=null),b=!0;if(!b)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||(gt.current&1)!==0?Pt===0&&(Pt=3):Em())),s.updateQueue!==null&&(s.flags|=4),Zt(s),null);case 4:return ms(),rm(i,s),i===null&&za(s.stateNode.containerInfo),Zt(s),null;case 10:return Ip(s.type._context),Zt(s),null;case 17:return gn(s.type)&&rc(),Zt(s),null;case 19:if(ct(gt),b=s.memoizedState,b===null)return Zt(s),null;if(f=(s.flags&128)!==0,_=b.rendering,_===null)if(f)Za(b,!1);else{if(Pt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(_=pc(i),_!==null){for(s.flags|=128,Za(b,!1),f=_.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=l,l=s.child;l!==null;)b=l,i=f,b.flags&=14680066,_=b.alternate,_===null?(b.childLanes=0,b.lanes=i,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=_.childLanes,b.lanes=_.lanes,b.child=_.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=_.memoizedProps,b.memoizedState=_.memoizedState,b.updateQueue=_.updateQueue,b.type=_.type,i=_.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return at(gt,gt.current&1|2),s.child}i=i.sibling}b.tail!==null&&_t()>bs&&(s.flags|=128,f=!0,Za(b,!1),s.lanes=4194304)}else{if(!f)if(i=pc(_),i!==null){if(s.flags|=128,f=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),Za(b,!0),b.tail===null&&b.tailMode==="hidden"&&!_.alternate&&!mt)return Zt(s),null}else 2*_t()-b.renderingStartTime>bs&&l!==1073741824&&(s.flags|=128,f=!0,Za(b,!1),s.lanes=4194304);b.isBackwards?(_.sibling=s.child,s.child=_):(l=b.last,l!==null?l.sibling=_:s.child=_,b.last=_)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=_t(),s.sibling=null,l=gt.current,at(gt,f?l&1|2:l&1),s):(Zt(s),null);case 22:case 23:return gm(),f=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(Nn&1073741824)!==0&&(Zt(s),s.subtreeFlags&6&&(s.flags|=8192)):Zt(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function R9(i,s){switch(Sp(s),s.tag){case 1:return gn(s.type)&&rc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return ms(),ct(mn),ct(Xt),Bp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Mp(s),null;case 13:if(ct(gt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));ds()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return ct(gt),null;case 4:return ms(),null;case 10:return Ip(s.type._context),null;case 22:case 23:return gm(),null;case 24:return null;default:return null}}var _c=!1,en=!1,P9=typeof WeakSet=="function"?WeakSet:Set,_e=null;function Es(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(f){bt(i,s,f)}else l.current=null}function im(i,s,l){try{l()}catch(f){bt(i,s,f)}}var Rw=!1;function L9(i,s){if(gp=$l,i=cx(),up(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,b=f.focusNode;f=f.focusOffset;try{l.nodeType,b.nodeType}catch(ye){l=null;break e}var _=0,L=-1,H=-1,te=0,fe=0,me=i,ue=null;t:for(;;){for(var we;me!==l||E!==0&&me.nodeType!==3||(L=_+E),me!==b||f!==0&&me.nodeType!==3||(H=_+f),me.nodeType===3&&(_+=me.nodeValue.length),(we=me.firstChild)!==null;)ue=me,me=we;for(;;){if(me===i)break t;if(ue===l&&++te===E&&(L=_),ue===b&&++fe===f&&(H=_),(we=me.nextSibling)!==null)break;me=ue,ue=me.parentNode}me=we}l=L===-1||H===-1?null:{start:L,end:H}}else l=null}l=l||{start:0,end:0}}else l=null;for(Ep={focusedElem:i,selectionRange:l},$l=!1,_e=s;_e!==null;)if(s=_e,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,_e=i;else for(;_e!==null;){s=_e;try{var Se=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Se!==null){var ke=Se.memoizedProps,vt=Se.memoizedState,K=s.stateNode,$=K.getSnapshotBeforeUpdate(s.elementType===s.type?ke:nr(s.type,ke),vt);K.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var J=s.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ye){bt(s,s.return,ye)}if(i=s.sibling,i!==null){i.return=s.return,_e=i;break}_e=s.return}return Se=Rw,Rw=!1,Se}function eu(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 b=E.destroy;E.destroy=void 0,b!==void 0&&im(s,l,b)}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 om(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[_r],delete s[$a],delete s[xp],delete s[g9],delete s[E9])),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 Lw(i){return i.tag===5||i.tag===3||i.tag===4}function Dw(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Lw(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 sm(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=tc));else if(f!==4&&(i=i.child,i!==null))for(sm(i,s,l),i=i.sibling;i!==null;)sm(i,s,l),i=i.sibling}function am(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(am(i,s,l),i=i.sibling;i!==null;)am(i,s,l),i=i.sibling}var Vt=null,rr=!1;function gi(i,s,l){for(l=l.child;l!==null;)Mw(i,s,l),l=l.sibling}function Mw(i,s,l){if(wr&&typeof wr.onCommitFiberUnmount=="function")try{wr.onCommitFiberUnmount(Fl,l)}catch(L){}switch(l.tag){case 5:en||Es(l,s);case 6:var f=Vt,E=rr;Vt=null,gi(i,s,l),Vt=f,rr=E,Vt!==null&&(rr?(i=Vt,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):Vt.removeChild(l.stateNode));break;case 18:Vt!==null&&(rr?(i=Vt,l=l.stateNode,i.nodeType===8?Tp(i.parentNode,l):i.nodeType===1&&Tp(i,l),Ra(i)):Tp(Vt,l.stateNode));break;case 4:f=Vt,E=rr,Vt=l.stateNode.containerInfo,rr=!0,gi(i,s,l),Vt=f,rr=E;break;case 0:case 11:case 14:case 15:if(!en&&(f=l.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){E=f=f.next;do{var b=E,_=b.destroy;b=b.tag,_!==void 0&&((b&2)!==0||(b&4)!==0)&&im(l,s,_),E=E.next}while(E!==f)}gi(i,s,l);break;case 1:if(!en&&(Es(l,s),f=l.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=l.memoizedProps,f.state=l.memoizedState,f.componentWillUnmount()}catch(L){bt(l,s,L)}gi(i,s,l);break;case 21:gi(i,s,l);break;case 22:l.mode&1?(en=(f=en)||l.memoizedState!==null,gi(i,s,l),en=f):gi(i,s,l);break;default:gi(i,s,l)}}function Fw(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new P9),s.forEach(function(f){var E=$9.bind(null,i,f);l.has(f)||(l.add(f),f.then(E,E))})}}function ir(i,s){var l=s.deletions;if(l!==null)for(var f=0;f<l.length;f++){var E=l[f];try{var b=i,_=s,L=_;e:for(;L!==null;){switch(L.tag){case 5:Vt=L.stateNode,rr=!1;break e;case 3:Vt=L.stateNode.containerInfo,rr=!0;break e;case 4:Vt=L.stateNode.containerInfo,rr=!0;break e}L=L.return}if(Vt===null)throw Error(n(160));Mw(b,_,E),Vt=null,rr=!1;var H=E.alternate;H!==null&&(H.return=null),E.return=null}catch(te){bt(E,s,te)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Bw(s,i),s=s.sibling}function Bw(i,s){var l=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(ir(s,i),Ar(i),f&4){try{eu(3,i,i.return),vc(3,i)}catch(ke){bt(i,i.return,ke)}try{eu(5,i,i.return)}catch(ke){bt(i,i.return,ke)}}break;case 1:ir(s,i),Ar(i),f&512&&l!==null&&Es(l,l.return);break;case 5:if(ir(s,i),Ar(i),f&512&&l!==null&&Es(l,l.return),i.flags&32){var E=i.stateNode;try{Xe(E,"")}catch(ke){bt(i,i.return,ke)}}if(f&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,_=l!==null?l.memoizedProps:b,L=i.type,H=i.updateQueue;if(i.updateQueue=null,H!==null)try{L==="input"&&b.type==="radio"&&b.name!=null&&xa(E,b),xr(L,_);var te=xr(L,b);for(_=0;_<H.length;_+=2){var fe=H[_],me=H[_+1];fe==="style"?ri(E,me):fe==="dangerouslySetInnerHTML"?Ye(E,me):fe==="children"?Xe(E,me):R(E,fe,me,te)}switch(L){case"input":Ko(E,b);break;case"textarea":Rl(E,b);break;case"select":var ue=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var we=b.value;we!=null?ni(E,!!b.multiple,we,!1):ue!==!!b.multiple&&(b.defaultValue!=null?ni(E,!!b.multiple,b.defaultValue,!0):ni(E,!!b.multiple,b.multiple?[]:"",!1))}E[$a]=b}catch(ke){bt(i,i.return,ke)}}break;case 6:if(ir(s,i),Ar(i),f&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(ke){bt(i,i.return,ke)}}break;case 3:if(ir(s,i),Ar(i),f&4&&l!==null&&l.memoizedState.isDehydrated)try{Ra(s.containerInfo)}catch(ke){bt(i,i.return,ke)}break;case 4:ir(s,i),Ar(i);break;case 13:ir(s,i),Ar(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(cm=_t())),f&4&&Fw(i);break;case 22:if(fe=l!==null&&l.memoizedState!==null,i.mode&1?(en=(te=en)||fe,ir(s,i),en=te):ir(s,i),Ar(i),f&8192){if(te=i.memoizedState!==null,(i.stateNode.isHidden=te)&&!fe&&(i.mode&1)!==0)for(_e=i,fe=i.child;fe!==null;){for(me=_e=fe;_e!==null;){switch(ue=_e,we=ue.child,ue.tag){case 0:case 11:case 14:case 15:eu(4,ue,ue.return);break;case 1:Es(ue,ue.return);var Se=ue.stateNode;if(typeof Se.componentWillUnmount=="function"){f=ue,l=ue.return;try{s=f,Se.props=s.memoizedProps,Se.state=s.memoizedState,Se.componentWillUnmount()}catch(ke){bt(f,l,ke)}}break;case 5:Es(ue,ue.return);break;case 22:if(ue.memoizedState!==null){zw(me);continue}}we!==null?(we.return=ue,_e=we):zw(me)}fe=fe.sibling}e:for(fe=null,me=i;;){if(me.tag===5){if(fe===null){fe=me;try{E=me.stateNode,te?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(L=me.stateNode,H=me.memoizedProps.style,_=H!=null&&H.hasOwnProperty("display")?H.display:null,L.style.display=Mn("display",_))}catch(ke){bt(i,i.return,ke)}}}else if(me.tag===6){if(fe===null)try{me.stateNode.nodeValue=te?"":me.memoizedProps}catch(ke){bt(i,i.return,ke)}}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:ir(s,i),Ar(i),f&4&&Fw(i);break;case 21:break;default:ir(s,i),Ar(i)}}function Ar(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(Lw(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&&(Xe(E,""),f.flags&=-33);var b=Dw(i);am(i,b,E);break;case 3:case 4:var _=f.stateNode.containerInfo,L=Dw(i);sm(i,L,_);break;default:throw Error(n(161))}}catch(H){bt(i,i.return,H)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function D9(i,s,l){_e=i,Uw(i)}function Uw(i,s,l){for(var f=(i.mode&1)!==0;_e!==null;){var E=_e,b=E.child;if(E.tag===22&&f){var _=E.memoizedState!==null||_c;if(!_){var L=E.alternate,H=L!==null&&L.memoizedState!==null||en;L=_c;var te=en;if(_c=_,(en=H)&&!te)for(_e=E;_e!==null;)_=_e,H=_.child,_.tag===22&&_.memoizedState!==null?jw(E):H!==null?(H.return=_,_e=H):jw(E);for(;b!==null;)_e=b,Uw(b),b=b.sibling;_e=E,_c=L,en=te}Hw(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,_e=b):Hw(i)}}function Hw(i){for(;_e!==null;){var s=_e;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:en||vc(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!en)if(l===null)f.componentDidMount();else{var E=s.elementType===s.type?l.memoizedProps:nr(s.type,l.memoizedProps);f.componentDidUpdate(E,l.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&zx(s,b,f);break;case 3:var _=s.updateQueue;if(_!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}zx(s,_,l)}break;case 5:var L=s.stateNode;if(l===null&&s.flags&4){l=L;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 te=s.alternate;if(te!==null){var fe=te.memoizedState;if(fe!==null){var me=fe.dehydrated;me!==null&&Ra(me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}en||s.flags&512&&om(s)}catch(ue){bt(s,s.return,ue)}}if(s===i){_e=null;break}if(l=s.sibling,l!==null){l.return=s.return,_e=l;break}_e=s.return}}function zw(i){for(;_e!==null;){var s=_e;if(s===i){_e=null;break}var l=s.sibling;if(l!==null){l.return=s.return,_e=l;break}_e=s.return}}function jw(i){for(;_e!==null;){var s=_e;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{vc(4,s)}catch(H){bt(s,l,H)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var E=s.return;try{f.componentDidMount()}catch(H){bt(s,E,H)}}var b=s.return;try{om(s)}catch(H){bt(s,b,H)}break;case 5:var _=s.return;try{om(s)}catch(H){bt(s,_,H)}}}catch(H){bt(s,s.return,H)}if(s===i){_e=null;break}var L=s.sibling;if(L!==null){L.return=s.return,_e=L;break}_e=s.return}}var M9=Math.ceil,Sc=U.ReactCurrentDispatcher,um=U.ReactCurrentOwner,zn=U.ReactCurrentBatchConfig,Je=0,Ht=null,Nt=null,qt=0,Nn=0,ys=di(0),Pt=0,tu=null,ro=0,Ac=0,lm=0,nu=null,yn=null,cm=0,bs=1/0,jr=null,Cc=!1,dm=null,Ei=null,kc=!1,yi=null,Nc=0,ru=0,fm=null,Oc=-1,Ic=0;function on(){return(Je&6)!==0?_t():Oc!==-1?Oc:Oc=_t()}function bi(i){return(i.mode&1)===0?1:(Je&2)!==0&&qt!==0?qt&-qt:b9.transition!==null?(Ic===0&&(Ic=DT()),Ic):(i=nt,i!==0||(i=window.event,i=i===void 0?16:VT(i.type)),i)}function or(i,s,l,f){if(50<ru)throw ru=0,fm=null,Error(n(185));Ca(i,l,f),((Je&2)===0||i!==Ht)&&(i===Ht&&((Je&2)===0&&(Ac|=l),Pt===4&&Ti(i,qt)),bn(i,f),l===1&&Je===0&&(s.mode&1)===0&&(bs=_t()+500,oc&&hi()))}function bn(i,s){var l=i.callbackNode;bM(i,s);var f=Hl(i,i===Ht?qt:0);if(f===0)l!==null&&RT(l),i.callbackNode=null,i.callbackPriority=0;else if(s=f&-f,i.callbackPriority!==s){if(l!=null&&RT(l),s===1)i.tag===0?y9(Vw.bind(null,i)):Nx(Vw.bind(null,i)),p9(function(){(Je&6)===0&&hi()}),l=null;else{switch(MT(f)){case 1:l=qh;break;case 4:l=PT;break;case 16:l=Ml;break;case 536870912:l=LT;break;default:l=Ml}l=Jw(l,$w.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function $w(i,s){if(Oc=-1,Ic=0,(Je&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Ts()&&i.callbackNode!==l)return null;var f=Hl(i,i===Ht?qt:0);if(f===0)return null;if((f&30)!==0||(f&i.expiredLanes)!==0||s)s=Rc(i,f);else{s=f;var E=Je;Je|=2;var b=Yw();(Ht!==i||qt!==s)&&(jr=null,bs=_t()+500,oo(i,s));do try{U9();break}catch(L){qw(i,L)}while(!0);Op(),Sc.current=b,Je=E,Nt!==null?s=0:(Ht=null,qt=0,s=Pt)}if(s!==0){if(s===2&&(E=Yh(i),E!==0&&(f=E,s=hm(i,E))),s===1)throw l=tu,oo(i,0),Ti(i,f),bn(i,_t()),l;if(s===6)Ti(i,f);else{if(E=i.current.alternate,(f&30)===0&&!F9(E)&&(s=Rc(i,f),s===2&&(b=Yh(i),b!==0&&(f=b,s=hm(i,b))),s===1))throw l=tu,oo(i,0),Ti(i,f),bn(i,_t()),l;switch(i.finishedWork=E,i.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:so(i,yn,jr);break;case 3:if(Ti(i,f),(f&130023424)===f&&(s=cm+500-_t(),10<s)){if(Hl(i,0)!==0)break;if(E=i.suspendedLanes,(E&f)!==f){on(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=bp(so.bind(null,i,yn,jr),s);break}so(i,yn,jr);break;case 4:if(Ti(i,f),(f&4194240)===f)break;for(s=i.eventTimes,E=-1;0<f;){var _=31-Zn(f);b=1<<_,_=s[_],_>E&&(E=_),f&=~b}if(f=E,f=_t()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*M9(f/1960))-f,10<f){i.timeoutHandle=bp(so.bind(null,i,yn,jr),f);break}so(i,yn,jr);break;case 5:so(i,yn,jr);break;default:throw Error(n(329))}}}return bn(i,_t()),i.callbackNode===l?$w.bind(null,i):null}function hm(i,s){var l=nu;return i.current.memoizedState.isDehydrated&&(oo(i,s).flags|=256),i=Rc(i,s),i!==2&&(s=yn,yn=l,s!==null&&pm(s)),i}function pm(i){yn===null?yn=i:yn.push.apply(yn,i)}function F9(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],b=E.getSnapshot;E=E.value;try{if(!er(b(),E))return!1}catch(_){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 Ti(i,s){for(s&=~lm,s&=~Ac,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-Zn(s),f=1<<l;i[l]=-1,s&=~f}}function Vw(i){if((Je&6)!==0)throw Error(n(327));Ts();var s=Hl(i,0);if((s&1)===0)return bn(i,_t()),null;var l=Rc(i,s);if(i.tag!==0&&l===2){var f=Yh(i);f!==0&&(s=f,l=hm(i,f))}if(l===1)throw l=tu,oo(i,0),Ti(i,s),bn(i,_t()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,so(i,yn,jr),bn(i,_t()),null}function mm(i,s){var l=Je;Je|=1;try{return i(s)}finally{Je=l,Je===0&&(bs=_t()+500,oc&&hi())}}function io(i){yi!==null&&yi.tag===0&&(Je&6)===0&&Ts();var s=Je;Je|=1;var l=zn.transition,f=nt;try{if(zn.transition=null,nt=1,i)return i()}finally{nt=f,zn.transition=l,Je=s,(Je&6)===0&&hi()}}function gm(){Nn=ys.current,ct(ys)}function oo(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,h9(l)),Nt!==null)for(l=Nt.return;l!==null;){var f=l;switch(Sp(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&rc();break;case 3:ms(),ct(mn),ct(Xt),Bp();break;case 5:Mp(f);break;case 4:ms();break;case 13:ct(gt);break;case 19:ct(gt);break;case 10:Ip(f.type._context);break;case 22:case 23:gm()}l=l.return}if(Ht=i,Nt=i=xi(i.current,null),qt=Nn=s,Pt=0,tu=null,lm=Ac=ro=0,yn=nu=null,eo!==null){for(s=0;s<eo.length;s++)if(l=eo[s],f=l.interleaved,f!==null){l.interleaved=null;var E=f.next,b=l.pending;if(b!==null){var _=b.next;b.next=E,f.next=_}l.pending=f}eo=null}return i}function qw(i,s){do{var l=Nt;try{if(Op(),mc.current=bc,gc){for(var f=Et.memoizedState;f!==null;){var E=f.queue;E!==null&&(E.pending=null),f=f.next}gc=!1}if(no=0,Ut=Rt=Et=null,Ka=!1,Qa=0,um.current=null,l===null||l.return===null){Pt=1,tu=s,Nt=null;break}e:{var b=i,_=l.return,L=l,H=s;if(s=qt,L.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var te=H,fe=L,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 we=gw(_);if(we!==null){we.flags&=-257,Ew(we,_,L,b,s),we.mode&1&&mw(b,te,s),s=we,H=te;var Se=s.updateQueue;if(Se===null){var ke=new Set;ke.add(H),s.updateQueue=ke}else Se.add(H);break e}else{if((s&1)===0){mw(b,te,s),Em();break e}H=Error(n(426))}}else if(mt&&L.mode&1){var vt=gw(_);if(vt!==null){(vt.flags&65536)===0&&(vt.flags|=256),Ew(vt,_,L,b,s),kp(gs(H,L));break e}}b=H=gs(H,L),Pt!==4&&(Pt=2),nu===null?nu=[b]:nu.push(b),b=_;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var K=hw(b,H,s);Hx(b,K);break e;case 1:L=H;var $=b.type,J=b.stateNode;if((b.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(Ei===null||!Ei.has(J)))){b.flags|=65536,s&=-s,b.lanes|=s;var ye=pw(b,L,s);Hx(b,ye);break e}}b=b.return}while(b!==null)}Gw(l)}catch(Ne){s=Ne,Nt===l&&l!==null&&(Nt=l=l.return);continue}break}while(!0)}function Yw(){var i=Sc.current;return Sc.current=bc,i===null?bc:i}function Em(){(Pt===0||Pt===3||Pt===2)&&(Pt=4),Ht===null||(ro&268435455)===0&&(Ac&268435455)===0||Ti(Ht,qt)}function Rc(i,s){var l=Je;Je|=2;var f=Yw();(Ht!==i||qt!==s)&&(jr=null,oo(i,s));do try{B9();break}catch(E){qw(i,E)}while(!0);if(Op(),Je=l,Sc.current=f,Nt!==null)throw Error(n(261));return Ht=null,qt=0,Pt}function B9(){for(;Nt!==null;)Ww(Nt)}function U9(){for(;Nt!==null&&!cM();)Ww(Nt)}function Ww(i){var s=Xw(i.alternate,i,Nn);i.memoizedProps=i.pendingProps,s===null?Gw(i):Nt=s,um.current=null}function Gw(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=I9(l,s,Nn),l!==null){Nt=l;return}}else{if(l=R9(l,s),l!==null){l.flags&=32767,Nt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Pt=6,Nt=null;return}}if(s=s.sibling,s!==null){Nt=s;return}Nt=s=i}while(s!==null);Pt===0&&(Pt=5)}function so(i,s,l){var f=nt,E=zn.transition;try{zn.transition=null,nt=1,H9(i,s,l,f)}finally{zn.transition=E,nt=f}return null}function H9(i,s,l,f){do Ts();while(yi!==null);if((Je&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 b=l.lanes|l.childLanes;if(TM(i,b),i===Ht&&(Nt=Ht=null,qt=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||kc||(kc=!0,Jw(Ml,function(){return Ts(),null})),b=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||b){b=zn.transition,zn.transition=null;var _=nt;nt=1;var L=Je;Je|=4,um.current=null,L9(i,l),Bw(l,i),s9(Ep),$l=!!gp,Ep=gp=null,i.current=l,D9(l),dM(),Je=L,nt=_,zn.transition=b}else i.current=l;if(kc&&(kc=!1,yi=i,Nc=E),b=i.pendingLanes,b===0&&(Ei=null),pM(l.stateNode),bn(i,_t()),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(Cc)throw Cc=!1,i=dm,dm=null,i;return(Nc&1)!==0&&i.tag!==0&&Ts(),b=i.pendingLanes,(b&1)!==0?i===fm?ru++:(ru=0,fm=i):ru=0,hi(),null}function Ts(){if(yi!==null){var i=MT(Nc),s=zn.transition,l=nt;try{if(zn.transition=null,nt=16>i?16:i,yi===null)var f=!1;else{if(i=yi,yi=null,Nc=0,(Je&6)!==0)throw Error(n(331));var E=Je;for(Je|=4,_e=i.current;_e!==null;){var b=_e,_=b.child;if((_e.flags&16)!==0){var L=b.deletions;if(L!==null){for(var H=0;H<L.length;H++){var te=L[H];for(_e=te;_e!==null;){var fe=_e;switch(fe.tag){case 0:case 11:case 15:eu(8,fe,b)}var me=fe.child;if(me!==null)me.return=fe,_e=me;else for(;_e!==null;){fe=_e;var ue=fe.sibling,we=fe.return;if(Pw(fe),fe===te){_e=null;break}if(ue!==null){ue.return=we,_e=ue;break}_e=we}}}var Se=b.alternate;if(Se!==null){var ke=Se.child;if(ke!==null){Se.child=null;do{var vt=ke.sibling;ke.sibling=null,ke=vt}while(ke!==null)}}_e=b}}if((b.subtreeFlags&2064)!==0&&_!==null)_.return=b,_e=_;else e:for(;_e!==null;){if(b=_e,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:eu(9,b,b.return)}var K=b.sibling;if(K!==null){K.return=b.return,_e=K;break e}_e=b.return}}var $=i.current;for(_e=$;_e!==null;){_=_e;var J=_.child;if((_.subtreeFlags&2064)!==0&&J!==null)J.return=_,_e=J;else e:for(_=$;_e!==null;){if(L=_e,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:vc(9,L)}}catch(Ne){bt(L,L.return,Ne)}if(L===_){_e=null;break e}var ye=L.sibling;if(ye!==null){ye.return=L.return,_e=ye;break e}_e=L.return}}if(Je=E,hi(),wr&&typeof wr.onPostCommitFiberRoot=="function")try{wr.onPostCommitFiberRoot(Fl,i)}catch(Ne){}f=!0}return f}finally{nt=l,zn.transition=s}}return!1}function Kw(i,s,l){s=gs(l,s),s=hw(i,s,1),i=mi(i,s,1),s=on(),i!==null&&(Ca(i,1,s),bn(i,s))}function bt(i,s,l){if(i.tag===3)Kw(i,i,l);else for(;s!==null;){if(s.tag===3){Kw(s,i,l);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Ei===null||!Ei.has(f))){i=gs(l,i),i=pw(s,i,1),s=mi(s,i,1),i=on(),s!==null&&(Ca(s,1,i),bn(s,i));break}}s=s.return}}function z9(i,s,l){var f=i.pingCache;f!==null&&f.delete(s),s=on(),i.pingedLanes|=i.suspendedLanes&l,Ht===i&&(qt&l)===l&&(Pt===4||Pt===3&&(qt&130023424)===qt&&500>_t()-cm?oo(i,0):lm|=l),bn(i,s)}function Qw(i,s){s===0&&((i.mode&1)===0?s=1:(s=Ul,Ul<<=1,(Ul&130023424)===0&&(Ul=4194304)));var l=on();i=Ur(i,s),i!==null&&(Ca(i,s,l),bn(i,l))}function j9(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),Qw(i,l)}function $9(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),Qw(i,l)}var Xw;Xw=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||mn.current)En=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return En=!1,O9(i,s,l);En=(i.flags&131072)!==0}else En=!1,mt&&(s.flags&1048576)!==0&&Ox(s,ac,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;wc(i,s),i=s.pendingProps;var E=us(s,Xt.current);ps(s,l),E=zp(null,s,f,i,E,l);var b=jp();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,gn(f)?(b=!0,ic(s)):b=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Lp(s),E.updater=Tc,s.stateNode=E,E._reactInternals=s,Gp(s,f,i,l),s=Jp(null,s,f,!0,b,l)):(s.tag=0,mt&&b&&vp(s),rn(null,s,E,l),s=s.child),s;case 16:f=s.elementType;e:{switch(wc(i,s),i=s.pendingProps,E=f._init,f=E(f._payload),s.type=f,E=s.tag=q9(f),i=nr(f,i),E){case 0:s=Xp(null,s,f,i,l);break e;case 1:s=_w(null,s,f,i,l);break e;case 11:s=yw(null,s,f,i,l);break e;case 14:s=bw(null,s,f,nr(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:nr(f,E),Xp(i,s,f,E,l);case 1:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:nr(f,E),_w(i,s,f,E,l);case 3:e:{if(vw(s),i===null)throw Error(n(387));f=s.pendingProps,b=s.memoizedState,E=b.element,Ux(i,s),hc(s,f,null,l);var _=s.memoizedState;if(f=_.element,b.isDehydrated)if(b={element:f,isDehydrated:!1,cache:_.cache,pendingSuspenseBoundaries:_.pendingSuspenseBoundaries,transitions:_.transitions},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){E=gs(Error(n(423)),s),s=Sw(i,s,f,l,E);break e}else if(f!==E){E=gs(Error(n(424)),s),s=Sw(i,s,f,l,E);break e}else for(kn=ci(s.stateNode.containerInfo.firstChild),Cn=s,mt=!0,tr=null,l=Fx(s,null,f,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ds(),f===E){s=zr(i,s,l);break e}rn(i,s,f,l)}s=s.child}return s;case 5:return jx(s),i===null&&Cp(s),f=s.type,E=s.pendingProps,b=i!==null?i.memoizedProps:null,_=E.children,yp(f,E)?_=null:b!==null&&yp(f,b)&&(s.flags|=32),ww(i,s),rn(i,s,_,l),s.child;case 6:return i===null&&Cp(s),null;case 13:return Aw(i,s,l);case 4:return Dp(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=fs(s,null,f,l):rn(i,s,f,l),s.child;case 11:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:nr(f,E),yw(i,s,f,E,l);case 7:return rn(i,s,s.pendingProps,l),s.child;case 8:return rn(i,s,s.pendingProps.children,l),s.child;case 12:return rn(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(f=s.type._context,E=s.pendingProps,b=s.memoizedProps,_=E.value,at(cc,f._currentValue),f._currentValue=_,b!==null)if(er(b.value,_)){if(b.children===E.children&&!mn.current){s=zr(i,s,l);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var L=b.dependencies;if(L!==null){_=b.child;for(var H=L.firstContext;H!==null;){if(H.context===f){if(b.tag===1){H=Hr(-1,l&-l),H.tag=2;var te=b.updateQueue;if(te!==null){te=te.shared;var fe=te.pending;fe===null?H.next=H:(H.next=fe.next,fe.next=H),te.pending=H}}b.lanes|=l,H=b.alternate,H!==null&&(H.lanes|=l),Rp(b.return,l,s),L.lanes|=l;break}H=H.next}}else if(b.tag===10)_=b.type===s.type?null:b.child;else if(b.tag===18){if(_=b.return,_===null)throw Error(n(341));_.lanes|=l,L=_.alternate,L!==null&&(L.lanes|=l),Rp(_,l,s),_=b.sibling}else _=b.child;if(_!==null)_.return=b;else for(_=b;_!==null;){if(_===s){_=null;break}if(b=_.sibling,b!==null){b.return=_.return,_=b;break}_=_.return}b=_}rn(i,s,E.children,l),s=s.child}return s;case 9:return E=s.type,f=s.pendingProps.children,ps(s,l),E=Un(E),f=f(E),s.flags|=1,rn(i,s,f,l),s.child;case 14:return f=s.type,E=nr(f,s.pendingProps),E=nr(f.type,E),bw(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:nr(f,E),wc(i,s),s.tag=1,gn(f)?(i=!0,ic(s)):i=!1,ps(s,l),dw(s,f,E),Gp(s,f,E,l),Jp(null,s,f,!0,i,l);case 19:return kw(i,s,l);case 22:return xw(i,s,l)}throw Error(n(156,s.tag))};function Jw(i,s){return IT(i,s)}function V9(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 jn(i,s,l,f){return new V9(i,s,l,f)}function ym(i){return i=i.prototype,!(!i||!i.isReactComponent)}function q9(i){if(typeof i=="function")return ym(i)?1:0;if(i!=null){if(i=i.$$typeof,i===he)return 11;if(i===Te)return 14}return 2}function xi(i,s){var l=i.alternate;return l===null?(l=jn(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 Pc(i,s,l,f,E,b){var _=2;if(f=i,typeof i=="function")ym(i)&&(_=1);else if(typeof i=="string")_=5;else e:switch(i){case X:return ao(l.children,E,b,s);case ce:_=8,E|=8;break;case de:return i=jn(12,l,s,E|2),i.elementType=de,i.lanes=b,i;case ae:return i=jn(13,l,s,E),i.elementType=ae,i.lanes=b,i;case se:return i=jn(19,l,s,E),i.elementType=se,i.lanes=b,i;case ee:return Lc(l,E,b,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case z:_=10;break e;case oe:_=9;break e;case he:_=11;break e;case Te:_=14;break e;case Ce:_=16,f=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=jn(_,l,s,E),s.elementType=i,s.type=f,s.lanes=b,s}function ao(i,s,l,f){return i=jn(7,i,f,s),i.lanes=l,i}function Lc(i,s,l,f){return i=jn(22,i,f,s),i.elementType=ee,i.lanes=l,i.stateNode={isHidden:!1},i}function bm(i,s,l){return i=jn(6,i,null,s),i.lanes=l,i}function Tm(i,s,l){return s=jn(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function Y9(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=Wh(0),this.expirationTimes=Wh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wh(0),this.identifierPrefix=f,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function xm(i,s,l,f,E,b,_,L,H){return i=new Y9(i,s,l,L,H),s===1?(s=1,b===!0&&(s|=8)):s=0,b=jn(3,null,null,s),i.current=b,b.stateNode=i,b.memoizedState={element:f,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Lp(b),i}function W9(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 Zw(i){if(!i)return fi;i=i._reactInternals;e:{if(Ki(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(gn(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(gn(l))return Cx(i,l,s)}return s}function e2(i,s,l,f,E,b,_,L,H){return i=xm(l,f,!0,i,E,b,_,L,H),i.context=Zw(null),l=i.current,f=on(),E=bi(l),b=Hr(f,E),b.callback=s!=null?s:null,mi(l,b,E),i.current.lanes=E,Ca(i,E,f),bn(i,f),i}function Dc(i,s,l,f){var E=s.current,b=on(),_=bi(E);return l=Zw(l),s.context===null?s.context=l:s.pendingContext=l,s=Hr(b,_),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=mi(E,s,_),i!==null&&(or(i,E,_,b),fc(i,E,_)),_}function Mc(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function t2(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function wm(i,s){t2(i,s),(i=i.alternate)&&t2(i,s)}function G9(){return null}var n2=typeof reportError=="function"?reportError:function(i){console.error(i)};function _m(i){this._internalRoot=i}Fc.prototype.render=_m.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Dc(i,s,null,null)},Fc.prototype.unmount=_m.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;io(function(){Dc(null,i,null,null)}),s[Dr]=null}};function Fc(i){this._internalRoot=i}Fc.prototype.unstable_scheduleHydration=function(i){if(i){var s=UT();i={blockedOn:null,target:i,priority:s};for(var l=0;l<ai.length&&s!==0&&s<ai[l].priority;l++);ai.splice(l,0,i),l===0&&jT(i)}};function vm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Bc(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function r2(){}function K9(i,s,l,f,E){if(E){if(typeof f=="function"){var b=f;f=function(){var te=Mc(_);b.call(te)}}var _=e2(s,f,i,0,null,!1,!1,"",r2);return i._reactRootContainer=_,i[Dr]=_.current,za(i.nodeType===8?i.parentNode:i),io(),_}for(;E=i.lastChild;)i.removeChild(E);if(typeof f=="function"){var L=f;f=function(){var te=Mc(H);L.call(te)}}var H=xm(i,0,!1,null,null,!1,!1,"",r2);return i._reactRootContainer=H,i[Dr]=H.current,za(i.nodeType===8?i.parentNode:i),io(function(){Dc(s,H,l,f)}),H}function Uc(i,s,l,f,E){var b=l._reactRootContainer;if(b){var _=b;if(typeof E=="function"){var L=E;E=function(){var H=Mc(_);L.call(H)}}Dc(s,_,i,E)}else _=K9(l,s,i,E,f);return Mc(_)}FT=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=Aa(s.pendingLanes);l!==0&&(Gh(s,l|1),bn(s,_t()),(Je&6)===0&&(bs=_t()+500,hi()))}break;case 13:io(function(){var f=Ur(i,1);if(f!==null){var E=on();or(f,i,1,E)}}),wm(i,1)}},Kh=function(i){if(i.tag===13){var s=Ur(i,134217728);if(s!==null){var l=on();or(s,i,134217728,l)}wm(i,134217728)}},BT=function(i){if(i.tag===13){var s=bi(i),l=Ur(i,s);if(l!==null){var f=on();or(l,i,s,f)}wm(i,s)}},UT=function(){return nt},HT=function(i,s){var l=nt;try{return nt=i,s()}finally{nt=l}},zh=function(i,s,l){switch(s){case"input":if(Ko(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=nc(f);if(!E)throw Error(n(90));Wi(f),Ko(f,E)}}}break;case"textarea":Rl(i,l);break;case"select":s=l.value,s!=null&&ni(i,!!l.multiple,s,!1)}},vT=mm,ST=io;var Q9={usingClientEntryPoint:!1,Events:[Va,ss,nc,wT,_T,mm]},iu={findFiberByHostInstance:Qi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},X9={bundleType:iu.bundleType,version:iu.version,rendererPackageName:iu.rendererPackageName,rendererConfig:iu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=NT(i),i===null?null:i.stateNode},findFiberByHostInstance:iu.findFiberByHostInstance||G9,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 Hc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hc.isDisabled&&Hc.supportsFiber)try{Fl=Hc.inject(X9),wr=Hc}catch(i){}}return ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Q9,ln.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vm(s))throw Error(n(200));return W9(i,s,null,l)},ln.createRoot=function(i,s){if(!vm(i))throw Error(n(299));var l=!1,f="",E=n2;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=xm(i,1,!1,null,null,l,!1,f,E),i[Dr]=s.current,za(i.nodeType===8?i.parentNode:i),new _m(s)},ln.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=NT(s),i=i===null?null:i.stateNode,i},ln.flushSync=function(i){return io(i)},ln.hydrate=function(i,s,l){if(!Bc(s))throw Error(n(200));return Uc(null,i,s,!0,l)},ln.hydrateRoot=function(i,s,l){if(!vm(i))throw Error(n(405));var f=l!=null&&l.hydratedSources||null,E=!1,b="",_=n2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(b=l.identifierPrefix),l.onRecoverableError!==void 0&&(_=l.onRecoverableError)),s=e2(s,null,i,1,l!=null?l:null,E,!1,b,_),i[Dr]=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 Fc(s)},ln.render=function(i,s,l){if(!Bc(s))throw Error(n(200));return Uc(null,i,s,!1,l)},ln.unmountComponentAtNode=function(i){if(!Bc(i))throw Error(n(40));return i._reactRootContainer?(io(function(){Uc(null,null,i,!1,function(){i._reactRootContainer=null,i[Dr]=null})}),!0):!1},ln.unstable_batchedUpdates=mm,ln.unstable_renderSubtreeIntoContainer=function(i,s,l,f){if(!Bc(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Uc(i,s,l,!1,f)},ln.version="18.3.1-next-f1338f8080-20240426",ln}var V0;function q0(){if(V0)return Cd.exports;V0=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(),Cd.exports=MS(),Cd.exports}var Ps=q0();function Y0(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=Y0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function j(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Y0(e))&&(r&&(r+=" "),r+=t);return r}var W0={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},G0=_i.createContext&&_i.createContext(W0),FS=["attr","size","title"];function BS(e,t){if(e==null)return{};var n=US(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 US(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 Nu(){return Nu=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},Nu.apply(this,arguments)}function K0(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 Ou(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?K0(Object(n),!0).forEach(function(r){HS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function HS(e,t,n){return t=zS(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zS(e){var t=jS(e,"string");return typeof t=="symbol"?t:t+""}function jS(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 Q0(e){return e&&e.map((t,n)=>_i.createElement(t.tag,Ou({key:n},t.attr),Q0(t.child)))}function ft(e){return t=>_i.createElement($S,Nu({attr:Ou({},e.attr)},t),Q0(e.child))}function $S(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=BS(e,FS),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),_i.createElement("svg",Nu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Ou(Ou({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&_i.createElement("title",null,a),e.children)};return G0!==void 0?_i.createElement(G0.Consumer,null,n=>t(n)):t(W0)}function VS(e){return ft({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 qS(e){return ft({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 YS(e){return ft({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"},child:[]}]})(e)}const lr=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:x.jsx("button",{className:j(e,`${D}-icon-button`),type:r,"aria-label":o,title:a,onClick:c,disabled:u,children:t?x.jsx("img",{className:j(`${D}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),WS="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",GS=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=At(),o=r==="messaging",a=o?"Open Commerce Client":"Open Copilot",u=o?x.jsx(YS,{className:j(t,`${D}-minimized-icon`)}):x.jsx("img",{src:(n==null?void 0:n.logoUrl)||WS,alt:"Copilot",className:j(t,`${D}-minimized-icon-img`)});return x.jsx(lr,{className:j(t,`${D}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},KS=()=>{const{globalClassName:e,themeVariables:t}=At(),n=()=>{Cu(!1),ki(!0)};return Ps.createPortal(x.jsx("div",{className:j(e,`${D}-minimized-container`),style:t,children:x.jsx(GS,{onClick:n})}),document.body)};function QS(e){return ft({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 Yn(){const e=Z.useContext(I0);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const XS=e=>({[`${Cr}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Cr}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem"});function JS(e){return ft({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 X0(e){return ft({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 ZS(e){return ft({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 J0(e){return ft({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 eA(e){return ft({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 tA(e){return ft({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 nA(e){return ft({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 rA(e){return ft({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 iA(e){return ft({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 oA(e){return ft({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 sA(e){return ft({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 Z0(e){return ft({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 Iu=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>x.jsx("button",{className:j(`${D}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),aA=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?x.jsx("img",{className:j(`${D}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):x.jsx(J0,{size:"16px"})},uA=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return x.jsx(lr,{className:j(e,n,`cim-${r}-component`,`${D}-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(J0,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return x.jsxs(Iu,{className:j(e,n,`cim-${r}-component`,`${D}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&x.jsx(aA,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function kF(){}function NF(){}function eg(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 tg(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const lA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dA={};function ng(e,t){return(dA.jsx?cA:lA).test(e)}const fA=/[ \t\n\f\r]/g;function hA(e){return typeof e=="object"?e.type==="text"?rg(e.value):!1:rg(e)}function rg(e){return e.replace(fA,"")===""}let Ls=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Ls.prototype.normal={},Ls.prototype.property={},Ls.prototype.space=void 0;function ig(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Ls(n,r,t)}function Ds(e){return e.toLowerCase()}let cn=class{constructor(t,n){this.attribute=n,this.property=t}};cn.prototype.attribute="",cn.prototype.booleanish=!1,cn.prototype.boolean=!1,cn.prototype.commaOrSpaceSeparated=!1,cn.prototype.commaSeparated=!1,cn.prototype.defined=!1,cn.prototype.mustUseProperty=!1,cn.prototype.number=!1,cn.prototype.overloadedBoolean=!1,cn.prototype.property="",cn.prototype.spaceSeparated=!1,cn.prototype.space=void 0;let pA=0;const je=Oi(),Ct=Oi(),Od=Oi(),ge=Oi(),ot=Oi(),go=Oi(),Tn=Oi();function Oi(){return ou(2,++pA)}const Id=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Ct,commaOrSpaceSeparated:Tn,commaSeparated:go,number:ge,overloadedBoolean:Od,spaceSeparated:ot},Symbol.toStringTag,{value:"Module"})),Rd=Object.keys(Id);let Pd=class extends cn{constructor(t,n,r,o){let a=-1;if(super(t,n),og(this,"space",o),typeof r=="number")for(;++a<Rd.length;){const u=Rd[a];og(this,Rd[a],(r&Id[u])===Id[u])}}};Pd.prototype.defined=!0;function og(e,t,n){n&&(e[t]=n)}function Eo(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Pd(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Ds(r)]=r,n[Ds(a.attribute)]=r}return new Ls(t,n,e.space)}const sg=Eo({properties:{ariaActiveDescendant:null,ariaAtomic:Ct,ariaAutoComplete:null,ariaBusy:Ct,ariaChecked:Ct,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:ot,ariaCurrent:null,ariaDescribedBy:ot,ariaDetails:null,ariaDisabled:Ct,ariaDropEffect:ot,ariaErrorMessage:null,ariaExpanded:Ct,ariaFlowTo:ot,ariaGrabbed:Ct,ariaHasPopup:null,ariaHidden:Ct,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ot,ariaLevel:ge,ariaLive:null,ariaModal:Ct,ariaMultiLine:Ct,ariaMultiSelectable:Ct,ariaOrientation:null,ariaOwns:ot,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:Ct,ariaReadOnly:Ct,ariaRelevant:null,ariaRequired:Ct,ariaRoleDescription:ot,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 ag(e,t){return t in e?e[t]:t}function ug(e,t){return ag(e,t.toLowerCase())}const mA=Eo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:go,acceptCharset:ot,accessKey:ot,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:ot,autoFocus:je,autoPlay:je,blocking:ot,capture:null,charSet:null,checked:je,cite:null,className:ot,cols:ge,colSpan:null,content:null,contentEditable:Ct,controls:je,controlsList:ot,coords:ge|go,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:Od,draggable:Ct,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:ot,height:ge,hidden:Od,high:ge,href:null,hrefLang:null,htmlFor:ot,httpEquiv:ot,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:ot,itemRef:ot,itemScope:je,itemType:ot,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,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:ge,pattern:null,ping:ot,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:ot,required:je,reversed:je,rows:ge,rowSpan:ge,sandbox:ot,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,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:je,useMap:null,value:Ct,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ot,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:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:je,noHref:je,noShade:je,noWrap:je,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:je,disableRemotePlayback:je,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:ug}),gA=Eo({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:Tn,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:ot,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:je,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:go,g2:go,glyphName:go,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:Tn,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:ot,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Tn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Tn,rev:Tn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Tn,requiredFeatures:Tn,requiredFonts:Tn,requiredFormats:Tn,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:Tn,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:Tn,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:Tn,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:ag}),lg=Eo({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()}}),cg=Eo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ug}),dg=Eo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),EA={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"},yA=/[A-Z]/g,fg=/-[a-z]/g,bA=/^data[-\w.:]+$/i;function Ld(e,t){const n=Ds(t);let r=t,o=cn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&bA.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(fg,xA);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!fg.test(a)){let u=a.replace(yA,TA);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Pd}return new o(r,t)}function TA(e){return"-"+e.toLowerCase()}function xA(e){return e.charAt(1).toUpperCase()}const Ru=ig([sg,mA,lg,cg,dg],"html"),yo=ig([sg,gA,lg,cg,dg],"svg");function hg(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function pg(e){return e.join(" ").trim()}var bo={},Dd,mg;function wA(){if(mg)return Dd;mg=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="",T="comment",y="declaration";Dd=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 R(ae){var se=ae.match(t);se&&(C+=se.length);var Te=ae.lastIndexOf(d);k=~Te?ae.length-Te:k+ae.length}function U(){var ae={line:C,column:k};return function(se){return se.position=new Y(ae),ce(),se}}function Y(ae){this.start=ae,this.end={line:C,column:k},this.source=A.source}Y.prototype.content=v;function F(ae){var se=new Error(A.source+":"+C+":"+k+": "+ae);if(se.reason=ae,se.filename=A.source,se.line=C,se.column=k,se.source=v,!A.silent)throw se}function X(ae){var se=ae.exec(v);if(se){var Te=se[0];return R(Te),v=v.slice(Te.length),se}}function ce(){X(n)}function de(ae){var se;for(ae=ae||[];se=z();)se!==!1&&ae.push(se);return ae}function z(){var ae=U();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 Te=v.slice(2,se-2);return k+=2,R(Te),v=v.slice(se),k+=2,ae({type:T,comment:Te})}}function oe(){var ae=U(),se=X(r);if(se){if(z(),!X(o))return F("property missing ':'");var Te=X(a),Ce=ae({type:y,property:w(se[0].replace(e,g)),value:Te?w(Te[0].replace(e,g)):g});return X(u),Ce}}function he(){var ae=[];de(ae);for(var se;se=oe();)se!==!1&&(ae.push(se),de(ae));return ae}return ce(),he()};function w(v){return v?v.replace(c,g):g}return Dd}var gg;function _A(){if(gg)return bo;gg=1;var e=bo&&bo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(bo,"__esModule",{value:!0}),bo.default=n;var t=e(wA());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 bo}var Ms={},Eg;function vA(){if(Eg)return Ms;Eg=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.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 Ms.camelCase=d,Ms}var Fs,yg;function SA(){if(yg)return Fs;yg=1;var e=Fs&&Fs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(_A()),n=vA();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,Fs=r,Fs}var AA=SA();const CA=We(AA),Pu=bg("end"),cr=bg("start");function bg(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 Tg(e){const t=cr(e),n=Pu(e);if(t&&n)return{start:t,end:n}}function Bs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?xg(e.position):"start"in e||"end"in e?xg(e):"line"in e||"column"in e?Md(e):""}function Md(e){return wg(e&&e.line)+":"+wg(e&&e.column)}function xg(e){return Md(e&&e.start)+"-"+Md(e&&e.end)}function wg(e){return e&&typeof e=="number"?e:1}class Wt 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=Bs(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}}Wt.prototype.file="",Wt.prototype.name="",Wt.prototype.reason="",Wt.prototype.message="",Wt.prototype.stack="",Wt.prototype.column=void 0,Wt.prototype.line=void 0,Wt.prototype.ancestors=void 0,Wt.prototype.cause=void 0,Wt.prototype.fatal=void 0,Wt.prototype.place=void 0,Wt.prototype.ruleId=void 0,Wt.prototype.source=void 0;const Fd={}.hasOwnProperty,kA=new Map,NA=/[A-Z]/g,OA=new Set(["table","tbody","thead","tfoot","tr"]),IA=new Set(["td","th"]),_g="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function RA(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=HA(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=UA(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"?yo:Ru,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=vg(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function vg(e,t,n){if(t.type==="element")return PA(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return LA(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return MA(e,t,n);if(t.type==="mdxjsEsm")return DA(e,t);if(t.type==="root")return FA(e,t,n);if(t.type==="text")return BA(e,t)}function PA(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=yo,e.schema=o),e.ancestors.push(t);const a=Ag(e,t.tagName,!1),u=zA(e,t);let c=Ud(e,t);return OA.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!hA(d):!0})),Sg(e,u,a,t),Bd(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function LA(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)}Us(e,t.position)}function DA(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Us(e,t.position)}function MA(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=yo,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:Ag(e,t.name,!0),u=jA(e,t),c=Ud(e,t);return Sg(e,u,a,t),Bd(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function FA(e,t,n){const r={};return Bd(r,Ud(e,t)),e.create(t,e.Fragment,r,n)}function BA(e,t){return t.value}function Sg(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Bd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function UA(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 HA(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=cr(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 zA(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Fd.call(t.properties,o)){const a=$A(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&IA.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 jA(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 Us(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 Us(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Ud(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:kA;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=vg(e,a,u);c!==void 0&&n.push(c)}return n}function $A(e,t,n){const r=Ld(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?tg(n):pg(n)),r.property==="style"){let o=typeof n=="object"?n:VA(e,String(n));return e.stylePropertyNameCase==="css"&&(o=qA(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?EA[r.property]||r.property:r.attribute,n]}}function VA(e,t){try{return CA(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new Wt("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=_g+"#cannot-parse-style-attribute",o}}function Ag(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=ng(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=ng(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Fd.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Us(e)}function Us(e,t){const n=new Wt("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=_g+"#cannot-handle-mdx-estrees-without-createevaluater",n}function qA(e){const t={};let n;for(n in e)Fd.call(e,n)&&(t[YA(n)]=e[n]);return t}function YA(e){let t=e.replace(NA,WA);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function WA(e){return"-"+e.toLowerCase()}const Hd={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"]},GA={};function zd(e,t){const n=GA,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Cg(e,r,o)}function Cg(e,t,n){if(KA(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 kg(e.children,t,n)}return Array.isArray(e)?kg(e,t,n):""}function kg(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Cg(e[o],t,n);return r.join("")}function KA(e){return!!(e&&typeof e=="object")}const Ng=document.createElement("i");function jd(e){const t="&"+e+";";Ng.innerHTML=t;const n=Ng.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function xn(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 Rn(e,t){return e.length>0?(xn(e,e.length,0,t),e):t}const Og={}.hasOwnProperty;function Ig(e){const t={};let n=-1;for(;++n<e.length;)QA(t,e[n]);return t}function QA(e,t){let n;for(n in t){const o=(Og.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){Og.call(o,u)||(o[u]=[]);const c=a[u];XA(o[u],Array.isArray(c)?c:c?[c]:[])}}}function XA(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);xn(e,0,0,r)}function Rg(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 Wn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const nn=Yr(/[A-Za-z]/),Gt=Yr(/[\dA-Za-z]/),JA=Yr(/[#-'*+\--9=?A-Z^-~]/);function Lu(e){return e!==null&&(e<32||e===127)}const $d=Yr(/\d/),ZA=Yr(/[\dA-Fa-f]/),eC=Yr(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function it(e){return e!==null&&(e<0||e===32)}function Ge(e){return e===-2||e===-1||e===32}const Du=Yr(new RegExp("\\p{P}|\\p{S}","u")),Ii=Yr(/\s/);function Yr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function To(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&Gt(e.charCodeAt(n+1))&&Gt(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 Ge(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ge(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const tC={tokenize:nC};function nC(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 rC={tokenize:iC},Pg={tokenize:oC};function iC(e){const t=this,n=[];let r=0,o,a,u;return c;function c(R){if(r<n.length){const U=n[r];return t.containerState=U[1],e.attempt(U[0].continuation,d,h)(R)}return h(R)}function d(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&k();const U=t.events.length;let Y=U,F;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){F=t.events[Y][1].end;break}C(r);let X=U;for(;X<t.events.length;)t.events[X][1].end=B({},F),X++;return xn(t.events,Y+1,0,t.events.slice(U)),t.events.length=X,h(R)}return c(R)}function h(R){if(r===n.length){if(!o)return T(R);if(o.currentConstruct&&o.currentConstruct.concrete)return w(R);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Pg,p,g)(R)}function p(R){return o&&k(),C(r),T(R)}function g(R){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,w(R)}function T(R){return t.containerState={},e.attempt(Pg,y,w)(R)}function y(R){return r++,n.push([t.currentConstruct,t.containerState]),T(R)}function w(R){if(R===null){o&&k(),C(0),e.consume(R);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),v(R)}function v(R){if(R===null){A(e.exit("chunkFlow"),!0),C(0),e.consume(R);return}return Le(R)?(e.consume(R),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(R),v)}function A(R,U){const Y=t.sliceStream(R);if(U&&Y.push(null),R.previous=a,a&&(a.next=R),a=R,o.defineSkip(R.start),o.write(Y),t.parser.lazy[R.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 X=t.events.length;let ce=X,de,z;for(;ce--;)if(t.events[ce][0]==="exit"&&t.events[ce][1].type==="chunkFlow"){if(de){z=t.events[ce][1].end;break}de=!0}for(C(r),F=X;F<t.events.length;)t.events[F][1].end=B({},z),F++;xn(t.events,ce+1,0,t.events.slice(X)),t.events.length=F}}function C(R){let U=n.length;for(;U-- >R;){const Y=n[U];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=R}function k(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function oC(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 xo(e){if(e===null||it(e)||Ii(e))return 1;if(Du(e))return 2}function Mu(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 Vd={name:"attention",resolveAll:sC,tokenize:aC};function sC(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),T=B({},e[n][1].start);Lg(g,-d),Lg(T,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:T},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=Rn(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Rn(h,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),h=Rn(h,Mu(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Rn(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=Rn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,xn(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 aC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=xo(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=xo(d),g=!p||p===2&&o||n.includes(d),T=!o||o===2&&p||n.includes(r);return h._open=!!(a===42?g:g&&(o||!T)),h._close=!!(a===42?T:T&&(p||!g)),t(d)}}function Lg(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const uC={name:"autolink",tokenize:lC};function lC(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 nn(y)?(e.consume(y),u):y===64?n(y):h(y)}function u(y){return y===43||y===45||y===46||Gt(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||Gt(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||Lu(y)?n(y):(e.consume(y),d)}function h(y){return y===64?(e.consume(y),p):JA(y)?(e.consume(y),h):n(y)}function p(y){return Gt(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):T(y)}function T(y){if((y===45||Gt(y))&&r++<63){const w=y===45?T:g;return e.consume(y),w}return n(y)}}const Hs={partial:!0,tokenize:cC};function cC(e,t,n){return r;function r(a){return Ge(a)?Qe(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Le(a)?t(a):n(a)}}const Dg={continuation:{tokenize:fC},exit:hC,name:"blockQuote",tokenize:dC};function dC(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 Ge(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function fC(e,t,n){const r=this;return o;function o(u){return Ge(u)?Qe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(Dg,t,n)(u)}}function hC(e){e.exit("blockQuote")}const Mg={name:"characterEscape",tokenize:pC};function pC(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 eC(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Fg={name:"characterReference",tokenize:mC};function mC(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=Gt,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=ZA,p):(e.enter("characterReferenceValue"),a=7,u=$d,p(g))}function p(g){if(g===59&&o){const T=e.exit("characterReferenceValue");return u===Gt&&!jd(r.sliceSerialize(T))?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 Bg={partial:!0,tokenize:EC},Ug={concrete:!0,name:"codeFenced",tokenize:gC};function gC(e,t,n){const r=this,o={partial:!0,tokenize:Y};let a=0,u=0,c;return d;function d(F){return h(F)}function h(F){const X=r.events[r.events.length-1];return a=X&&X[1].type==="linePrefix"?X[2].sliceSerialize(X[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"),Ge(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(Bg,v,U)(F)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(F))}function T(F){return F===null||Le(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(F)):Ge(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Qe(e,y,"whitespace")(F)):F===96&&F===c?n(F):(e.consume(F),T)}function y(F){return F===null||Le(F)?g(F):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(F))}function w(F){return F===null||Le(F)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(F)):F===96&&F===c?n(F):(e.consume(F),w)}function v(F){return e.attempt(o,U,A)(F)}function A(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),C}function C(F){return a>0&&Ge(F)?Qe(e,k,"linePrefix",a+1)(F):k(F)}function k(F){return F===null||Le(F)?e.check(Bg,v,U)(F):(e.enter("codeFlowValue"),R(F))}function R(F){return F===null||Le(F)?(e.exit("codeFlowValue"),k(F)):(e.consume(F),R)}function U(F){return e.exit("codeFenced"),t(F)}function Y(F,X,ce){let de=0;return z;function z(Te){return F.enter("lineEnding"),F.consume(Te),F.exit("lineEnding"),oe}function oe(Te){return F.enter("codeFencedFence"),Ge(Te)?Qe(F,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Te):he(Te)}function he(Te){return Te===c?(F.enter("codeFencedFenceSequence"),ae(Te)):ce(Te)}function ae(Te){return Te===c?(de++,F.consume(Te),ae):de>=u?(F.exit("codeFencedFenceSequence"),Ge(Te)?Qe(F,se,"whitespace")(Te):se(Te)):ce(Te)}function se(Te){return Te===null||Le(Te)?(F.exit("codeFencedFence"),X(Te)):ce(Te)}}}function EC(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 qd={name:"codeIndented",tokenize:bC},yC={partial:!0,tokenize:TC};function bC(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(yC,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 TC(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 xC={name:"codeText",previous:_C,resolve:wC,tokenize:vC};function wC(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 _C(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function vC(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 SC{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&&zs(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),zs(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),zs(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);zs(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);zs(this.left,n.reverse())}}}function zs(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 Hg(e){const t={};let n=-1,r,o,a,u,c,d,h;const p=new SC(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,AC(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 xn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function AC(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,T=-1,y=n,w=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;++T<c.length;)c[T][0]==="exit"&&c[T-1][0]==="enter"&&c[T][1].type===c[T-1][1].type&&c[T][1].start.line!==c[T][1].end.line&&(v=T+1,A.push(v),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):A.pop(),T=A.length;T--;){const C=c.slice(A[T],A[T+1]),k=a.pop();d.push([k,k+C.length-1]),e.splice(k,2,C)}for(d.reverse(),T=-1;++T<d.length;)h[w+d[T][0]]=w+d[T][1],w+=d[T][1]-d[T][0]-1;return h}const CC={resolve:NC,tokenize:OC},kC={partial:!0,tokenize:IC};function NC(e){return Hg(e),e}function OC(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(kC,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 IC(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 zg(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),T):C===null||C===32||C===41||Lu(C)?n(C):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),v(C))}function T(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),T(C)):C===null||C===60||Le(C)?n(C):(e.consume(C),C===92?w:y)}function w(C){return C===60||C===62||C===92?(e.consume(C),y):y(C)}function v(C){return!p&&(C===null||C===41||it(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||Lu(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 jg(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=!Ge(y)),y===92?T:g)}function T(y){return y===91||y===92||y===93?(e.consume(y),c++,g):g(y)}}function $g(e,t,n,r,o,a){let u;return c;function c(T){return T===34||T===39||T===40?(e.enter(r),e.enter(o),e.consume(T),e.exit(o),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):(e.enter(a),h(T))}function h(T){return T===u?(e.exit(a),d(u)):T===null?n(T):Le(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Qe(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||Le(T)?(e.exit("chunkString"),h(T)):(e.consume(T),T===92?g:p)}function g(T){return T===u||T===92?(e.consume(T),p):p(T)}}function js(e,t){let n;return r;function r(o){return Le(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ge(o)?Qe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const RC={name:"definition",tokenize:LC},PC={partial:!0,tokenize:DC};function LC(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return jg.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return o=Wn(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 it(y)?js(e,h)(y):h(y)}function h(y){return zg(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(PC,g,g)(y)}function g(y){return Ge(y)?Qe(e,T,"whitespace")(y):T(y)}function T(y){return y===null||Le(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function DC(e,t,n){return r;function r(c){return it(c)?js(e,o)(c):n(c)}function o(c){return $g(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ge(c)?Qe(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Le(c)?t(c):n(c)}}const MC={name:"hardBreakEscape",tokenize:FC};function FC(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 BC={name:"headingAtx",resolve:UC,tokenize:HC};function UC(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"},xn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function HC(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||it(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)):Ge(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||it(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const zC=["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"],Vg=["pre","script","style","textarea"],jC={concrete:!0,name:"htmlFlow",resolveTo:qC,tokenize:YC},$C={partial:!0,tokenize:GC},VC={partial:!0,tokenize:WC};function qC(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 YC(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),T):O===47?(e.consume(O),a=!0,v):O===63?(e.consume(O),o=3,r.interrupt?t:S):nn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function T(O){return O===45?(e.consume(O),o=2,y):O===91?(e.consume(O),o=5,c=0,w):nn(O)?(e.consume(O),o=4,r.interrupt?t:S):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:S):n(O)}function w(O){const be="CDATA[";return O===be.charCodeAt(c++)?(e.consume(O),c===be.length?r.interrupt?t:he:w):n(O)}function v(O){return nn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function A(O){if(O===null||O===47||O===62||it(O)){const be=O===47,Oe=u.toLowerCase();return!be&&!a&&Vg.includes(Oe)?(o=1,r.interrupt?t(O):he(O)):zC.includes(u.toLowerCase())?(o=6,be?(e.consume(O),C):r.interrupt?t(O):he(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?k(O):R(O))}return O===45||Gt(O)?(e.consume(O),u+=String.fromCharCode(O),A):n(O)}function C(O){return O===62?(e.consume(O),r.interrupt?t:he):n(O)}function k(O){return Ge(O)?(e.consume(O),k):z(O)}function R(O){return O===47?(e.consume(O),z):O===58||O===95||nn(O)?(e.consume(O),U):Ge(O)?(e.consume(O),R):z(O)}function U(O){return O===45||O===46||O===58||O===95||Gt(O)?(e.consume(O),U):Y(O)}function Y(O){return O===61?(e.consume(O),F):Ge(O)?(e.consume(O),Y):R(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,X):Ge(O)?(e.consume(O),F):ce(O)}function X(O){return O===d?(e.consume(O),d=null,de):O===null||Le(O)?n(O):(e.consume(O),X)}function ce(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||it(O)?Y(O):(e.consume(O),ce)}function de(O){return O===47||O===62||Ge(O)?R(O):n(O)}function z(O){return O===62?(e.consume(O),oe):n(O)}function oe(O){return O===null||Le(O)?he(O):Ge(O)?(e.consume(O),oe):n(O)}function he(O){return O===45&&o===2?(e.consume(O),Ce):O===60&&o===1?(e.consume(O),ee):O===62&&o===4?(e.consume(O),I):O===63&&o===3?(e.consume(O),S):O===93&&o===5?(e.consume(O),q):Le(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check($C,W,ae)(O)):O===null||Le(O)?(e.exit("htmlFlowData"),ae(O)):(e.consume(O),he)}function ae(O){return e.check(VC,se,W)(O)}function se(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),Te}function Te(O){return O===null||Le(O)?ae(O):(e.enter("htmlFlowData"),he(O))}function Ce(O){return O===45?(e.consume(O),S):he(O)}function ee(O){return O===47?(e.consume(O),u="",V):he(O)}function V(O){if(O===62){const be=u.toLowerCase();return Vg.includes(be)?(e.consume(O),I):he(O)}return nn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),V):he(O)}function q(O){return O===93?(e.consume(O),S):he(O)}function S(O){return O===62?(e.consume(O),I):O===45&&o===2?(e.consume(O),S):he(O)}function I(O){return O===null||Le(O)?(e.exit("htmlFlowData"),W(O)):(e.consume(O),I)}function W(O){return e.exit("htmlFlow"),t(O)}}function WC(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 GC(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Hs,t,n)}}const KC={name:"htmlText",tokenize:QC};function QC(e,t,n){const r=this;let o,a,u;return c;function c(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),d}function d(S){return S===33?(e.consume(S),h):S===47?(e.consume(S),Y):S===63?(e.consume(S),R):nn(S)?(e.consume(S),ce):n(S)}function h(S){return S===45?(e.consume(S),p):S===91?(e.consume(S),a=0,w):nn(S)?(e.consume(S),k):n(S)}function p(S){return S===45?(e.consume(S),y):n(S)}function g(S){return S===null?n(S):S===45?(e.consume(S),T):Le(S)?(u=g,ee(S)):(e.consume(S),g)}function T(S){return S===45?(e.consume(S),y):g(S)}function y(S){return S===62?Ce(S):S===45?T(S):g(S)}function w(S){const I="CDATA[";return S===I.charCodeAt(a++)?(e.consume(S),a===I.length?v:w):n(S)}function v(S){return S===null?n(S):S===93?(e.consume(S),A):Le(S)?(u=v,ee(S)):(e.consume(S),v)}function A(S){return S===93?(e.consume(S),C):v(S)}function C(S){return S===62?Ce(S):S===93?(e.consume(S),C):v(S)}function k(S){return S===null||S===62?Ce(S):Le(S)?(u=k,ee(S)):(e.consume(S),k)}function R(S){return S===null?n(S):S===63?(e.consume(S),U):Le(S)?(u=R,ee(S)):(e.consume(S),R)}function U(S){return S===62?Ce(S):R(S)}function Y(S){return nn(S)?(e.consume(S),F):n(S)}function F(S){return S===45||Gt(S)?(e.consume(S),F):X(S)}function X(S){return Le(S)?(u=X,ee(S)):Ge(S)?(e.consume(S),X):Ce(S)}function ce(S){return S===45||Gt(S)?(e.consume(S),ce):S===47||S===62||it(S)?de(S):n(S)}function de(S){return S===47?(e.consume(S),Ce):S===58||S===95||nn(S)?(e.consume(S),z):Le(S)?(u=de,ee(S)):Ge(S)?(e.consume(S),de):Ce(S)}function z(S){return S===45||S===46||S===58||S===95||Gt(S)?(e.consume(S),z):oe(S)}function oe(S){return S===61?(e.consume(S),he):Le(S)?(u=oe,ee(S)):Ge(S)?(e.consume(S),oe):de(S)}function he(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),o=S,ae):Le(S)?(u=he,ee(S)):Ge(S)?(e.consume(S),he):(e.consume(S),se)}function ae(S){return S===o?(e.consume(S),o=void 0,Te):S===null?n(S):Le(S)?(u=ae,ee(S)):(e.consume(S),ae)}function se(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||it(S)?de(S):(e.consume(S),se)}function Te(S){return S===47||S===62||it(S)?de(S):n(S)}function Ce(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function ee(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),V}function V(S){return Ge(S)?Qe(e,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):q(S)}function q(S){return e.enter("htmlTextData"),u(S)}}const Yd={name:"labelEnd",resolveAll:ek,resolveTo:tk,tokenize:nk},XC={tokenize:rk},JC={tokenize:ik},ZC={tokenize:ok};function ek(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&&xn(e,0,e.length,n),e}function tk(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=Rn(c,e.slice(a+1,a+r+3)),c=Rn(c,[["enter",p,t]]),c=Rn(c,Mu(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=Rn(c,[["exit",p,t],e[u-2],e[u-1],["exit",h,t]]),c=Rn(c,e.slice(u+1)),c=Rn(c,[["exit",d,t]]),xn(e,a,e.length,c),e}function nk(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(T){return a?a._inactive?g(T):(u=r.parser.defined.includes(Wn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(T),e.exit("labelMarker"),e.exit("labelEnd"),d):n(T)}function d(T){return T===40?e.attempt(XC,p,u?p:g)(T):T===91?e.attempt(JC,p,u?h:g)(T):u?p(T):g(T)}function h(T){return e.attempt(ZC,p,g)(T)}function p(T){return t(T)}function g(T){return a._balanced=!0,n(T)}}function rk(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 it(g)?js(e,a)(g):a(g)}function a(g){return g===41?p(g):zg(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function u(g){return it(g)?js(e,d)(g):p(g)}function c(g){return n(g)}function d(g){return g===34||g===39||g===40?$g(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):p(g)}function h(g){return it(g)?js(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 ik(e,t,n){const r=this;return o;function o(c){return jg.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(Wn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function ok(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 sk={name:"labelStartImage",resolveAll:Yd.resolveAll,tokenize:ak};function ak(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 uk={name:"labelStartLink",resolveAll:Yd.resolveAll,tokenize:lk};function lk(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 Wd={name:"lineEnding",tokenize:ck};function ck(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Qe(e,t,"linePrefix")}}const Fu={name:"thematicBreak",tokenize:dk};function dk(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"),Ge(h)?Qe(e,c,"whitespace")(h):c(h))}}const dn={continuation:{tokenize:mk},exit:Ek,name:"list",tokenize:pk},fk={partial:!0,tokenize:yk},hk={partial:!0,tokenize:gk};function pk(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 w=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:$d(y)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Fu,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 $d(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(Hs,r.interrupt?n:p,e.attempt(fk,T,g))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function g(y){return Ge(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),T):n(y)}function T(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function mk(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Hs,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||!Ge(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(hk,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Qe(e,e.attempt(dn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function gk(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 Ek(e){e.exit(this.containerState.type)}function yk(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!Ge(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const qg={name:"setextUnderline",resolveTo:bk,tokenize:Tk};function bk(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 Tk(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"),Ge(h)?Qe(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Le(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const xk={tokenize:wk};function wk(e){const t=this,n=e.attempt(Hs,r,e.attempt(this.parser.constructs.flowInitial,o,Qe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(CC,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 _k={resolveAll:Wg()},vk=Yg("string"),Sk=Yg("text");function Yg(e){return{resolveAll:Wg(e==="text"?Ak: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 T=-1;if(g)for(;++T<g.length;){const y=g[T];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function Wg(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 Ak(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 Ck=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:RC},disable:{null:[]},document:{42:dn,43:dn,45:dn,48:dn,49:dn,50:dn,51:dn,52:dn,53:dn,54:dn,55:dn,56:dn,57:dn,62:Dg},flow:{35:BC,42:Fu,45:[qg,Fu],60:jC,61:qg,95:Fu,96:Ug,126:Ug},flowInitial:{[-2]:qd,[-1]:qd,32:qd},insideSpan:{null:[Vd,_k]},string:{38:Fg,92:Mg},text:{[-5]:Wd,[-4]:Wd,[-3]:Wd,33:sk,38:Fg,42:Vd,60:[uC,KC],91:uk,92:[MC,Mg],93:Yd,95:Vd,96:xC}},Symbol.toStringTag,{value:"Module"}));function kk(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:X(Y),check:X(F),consume:k,enter:R,exit:U,interrupt:X(F,{interrupt:!0})},h={code:null,containerState:{},defineSkip:v,events:[],now:w,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:g};let p=t.tokenize.call(h,d);return t.resolveAll&&a.push(t),h;function g(oe){return u=Rn(u,oe),A(),u[u.length-1]!==null?[]:(ce(t,0),h.events=Mu(a,h.events,h),h.events)}function T(oe,he){return Ok(y(oe),he)}function y(oe){return Nk(u,oe)}function w(){const{_bufferIndex:oe,_index:he,line:ae,column:se,offset:Te}=r;return{_bufferIndex:oe,_index:he,line:ae,column:se,offset:Te}}function v(oe){o[oe.line]=oe.column,z()}function A(){let oe;for(;r._index<u.length;){const he=u[r._index];if(typeof he=="string")for(oe=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===oe&&r._bufferIndex<he.length;)C(he.charCodeAt(r._bufferIndex));else C(he)}}function C(oe){p=p(oe)}function k(oe){Le(oe)?(r.line++,r.column=1,r.offset+=oe===-3?2:1,z()):oe!==-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=oe}function R(oe,he){const ae=he||{};return ae.type=oe,ae.start=w(),h.events.push(["enter",ae,h]),c.push(ae),ae}function U(oe){const he=c.pop();return he.end=w(),h.events.push(["exit",he,h]),he}function Y(oe,he){ce(oe,he.from)}function F(oe,he){he.restore()}function X(oe,he){return ae;function ae(se,Te,Ce){let ee,V,q,S;return Array.isArray(se)?W(se):"tokenize"in se?W([se]):I(se);function I(Re){return He;function He(ve){const qe=ve!==null&&Re[ve],ut=ve!==null&&Re.null,pn=[...Array.isArray(qe)?qe:qe?[qe]:[],...Array.isArray(ut)?ut:ut?[ut]:[]];return W(pn)(ve)}}function W(Re){return ee=Re,V=0,Re.length===0?Ce:O(Re[V])}function O(Re){return He;function He(ve){return S=de(),q=Re,Re.partial||(h.currentConstruct=Re),Re.name&&h.parser.constructs.disable.null.includes(Re.name)?Oe():Re.tokenize.call(he?Object.assign(Object.create(h),he):h,d,be,Oe)(ve)}}function be(Re){return oe(q,S),Te}function Oe(Re){return S.restore(),++V<ee.length?O(ee[V]):Ce}}}function ce(oe,he){oe.resolveAll&&!a.includes(oe)&&a.push(oe),oe.resolve&&xn(h.events,he,h.events.length-he,oe.resolve(h.events.slice(he),h)),oe.resolveTo&&(h.events=oe.resolveTo(h.events,h))}function de(){const oe=w(),he=h.previous,ae=h.currentConstruct,se=h.events.length,Te=Array.from(c);return{from:se,restore:Ce};function Ce(){r=oe,h.previous=he,h.currentConstruct=ae,h.events.length=se,c=Te,z()}}function z(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function Nk(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 Ok(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=`
|
|
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&&(X.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&&X.merge(a.common,a[n.method]);a&&X.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(S){if(typeof S.runWhen=="function"&&S.runWhen(n)===!1)return;d=d&&S.synchronous;const A=n.transitional||Id;A&&A.legacyInterceptorReqResOrdering?c.unshift(S.fulfilled,S.rejected):c.push(S.fulfilled,S.rejected)});const h=[];this.interceptors.response.forEach(function(S){h.push(S.fulfilled,S.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++],S=c[g++];try{y=x(y)}catch(A){S.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)}};X.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}))}}),X.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 zv=class o2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(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 zs(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 o2(function(o){t=o}),cancel:t}}};function jv(e){return function(n){return e.apply(null,n)}}function $v(e){return X.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 X.extend(n,Ii.prototype,t,{allOwnKeys:!0}),X.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return ag(Pi(e,o))},n}const wt=ag(Hs);wt.Axios=Ii,wt.CanceledError=zs,wt.CancelToken=zv,wt.isCancel=Y0,wt.VERSION=Md,wt.toFormData=Pu,wt.AxiosError=Ce,wt.Cancel=wt.CanceledError,wt.all=function(t){return Promise.all(t)},wt.spread=jv,wt.isAxiosError=$v,wt.mergeConfig=Pi,wt.AxiosHeaders=nn,wt.formToJSON=e=>q0(X.isHTMLForm(e)?new FormData(e):e),wt.getAdapter=ig.getAdapter,wt.HttpStatusCode=Ud,wt.default=wt;const{Axios:jB,AxiosError:$B,CanceledError:VB,isCancel:qB,CancelToken:YB,VERSION:WB,all:GB,Cancel:XB,isAxiosError:KB,spread:QB,toFormData:JB,AxiosHeaders:ZB,HttpStatusCode:e7,formToJSON:t7,getAdapter:n7,mergeConfig:r7,create:i7}=wt;class Vv{constructor(t,n,r,o=!1,a,u){$e(this,"CIMULATE_API_HEADER","x-cimulate-api-key");$e(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");$e(this,"CIMULATE_SEARCH_API_PATH","api/v1");$e(this,"baseApiUrl");$e(this,"headers",{});$e(this,"fetchConfig",()=>Ve(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}}));$e(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 qv{constructor(t,n,r,o=!1,a,u){$e(this,"apiService");$e(this,"config",null);$e(this,"getConfig",()=>Ve(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}}));$e(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));$e(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));$e(this,"getDescription",t=>this.getProductFieldValue(t,"description"));$e(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));$e(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));$e(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));$e(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));$e(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));$e(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});$e(this,"getProductField",t=>this.config?this.config[t]:"");$e(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new Vv(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 Yv{constructor(t=!1){$e(this,"isDevelopment");$e(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 Wv={copilot:"Your Search Assistant",messaging:"Commerce Client"},ug=V.createContext(null),Gv=({mode:e,logoUrl:t,headerText:n="Your Search Assistant",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:S="start",autoScroll:A=!0,componentConfig:C,conversationHistory:k,resetConversationMessage:I="",apiKey:j,apiToken:Y,baseUrl:F,customerId:te,tenantId:ce,theme:pe,isDevelopment:U,__features:re,routingAttributes:ae,children:de})=>{const se=e==="messaging",be=V.useMemo(()=>{const G=ae==null?void 0:ae.isCartMgmtSupported;return G===!0||G==="true"},[ae]),we=V.useMemo(()=>se?{config:null}:new qv(F,j,Y,U,te,ce),[se,F,j,Y,U,te,ce]),Z=V.useMemo(()=>new Yv(U),[U]);V.useEffect(()=>{se||!we||we.config||we.getConfig()},[we,se]);const q=V.useMemo(()=>sS(pe),[pe]),W=V.useMemo(()=>{const G=(y==null?void 0:y.placeholder)||g,O=(y==null?void 0:y.buttonLabel)||b;let ye="icon";return y!=null&&y.buttonType?ye=y.buttonType:b&&(ye="text"),oe(B({},y||{}),{placeholder:G,buttonLabel:O,buttonType:ye})},[y,g,b]),v=V.useMemo(()=>oe(B({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:n||Wv[e!=null?e:"copilot"]}),[r,t,n,e]),P=V.useMemo(()=>({configModule:we,mode:e!=null?e:"copilot",headerConfig:v,entryMessage:a,globalClassName:o,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:h,baseCatalogParams:p,themeVariables:q,logger:Z,searchConfig:W,suggestionButtonConfig:x,messageAlignment:S,autoScroll:A,enableMinimize:!!(C!=null&&C.enableMinimize),resetConversationMessage:I,conversationHistory:{sinceHours:typeof(k==null?void 0:k.sinceHours)=="number"?k.sinceHours:1,limit:k==null?void 0:k.limit},features:re,isCartMgmtSupported:be}),[we,e,v,a,o,h,p,c,d,u,W,x,S,A,C,I,Z,q,k,re,be]);return _.jsx(ug.Provider,{value:P,children:de})},st=()=>{const e=V.useContext(ug);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},Xv=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart"],Mu=-1;function Kv(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 Xv.includes(t.type)?t:null}catch(t){}return{type:"markdown",index:Mu,data:{content:e}}}function Qv(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 Jv(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=Kv(t.token);return n?oe(B({},e),{streamingBlocks:Qv(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({},lg),{connectionStatus:e.connectionStatus,loading:!0});default:return e}}const cg=V.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:()=>{}});function Hd(e,t){return`cim_af_conv_${e}_${t}`}function zd(e,t){return Date.now()-e>t}function Zv(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 js(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 eA(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 tA(e,t){try{const n=jd(e,t);sessionStorage.removeItem(n)}catch(n){}}function nA(e,t){return`cim_af_conv_${e}_${t}`}function rA(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=nA(e,t);return new BroadcastChannel(n)}catch(n){return null}}function iA(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 oA(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 sA(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function aA(e){if(e)try{e.close()}catch(t){}}function uA(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function lA(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 cA(e){if(e.entryType!=="Message")return null;const n=lA(e.entryPayload).abstractMessage;if(!n)return null;const r=fg(n,"staticContent","text")||fg(n,"content","text")||"";if(!r)return null;const o=uA(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 dA(e){const t=[];for(const n of e){const r=cA(n);r&&t.push(r)}return t}const hg="onCimulateWidgetReady",fA=5e3;function $s(e={}){const{routingAttributes:t,timeoutMs:n=fA}=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 hA(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:o}=e,a=V.useRef(null),u=V.useRef(null),c=V.useRef(null),d=o.sinceHours*60*60*1e3,h=V.useCallback(()=>(c.current||(c.current=iA(a.current)),c.current),[]);V.useEffect(()=>{const A=rA(t,n);a.current=A,c.current=null;const C=oA(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(),aA(A),a.current=null}},[t,n,d]);const p=V.useCallback(A=>Ve(null,null,function*(){let C=Zv(t,n,d);if(!C){const k=yield h();k&&!zd(k.storedAt,d)&&(C=k)}if(!C){const k=yield A.createConversation(yield $s({routingAttributes:r}));return js(t,n,k),u.current=k,{conversationId:k,restoredMessages:[],resumed:!1}}try{const k=Date.now()-d,j=(yield A.listConversations({conversationId:C.conversationId,startTimestamp:k})).conversations.find(F=>F.conversationId===C.conversationId&&!F.isConversationClosed);if(!j){Fu(t,n);const F=yield A.createConversation(yield $s({routingAttributes:r}));return js(t,n,F),u.current=F,{conversationId:F,restoredMessages:[],resumed:!1}}A.resumeConversation(j.conversationId),u.current=j.conversationId,js(t,n,j.conversationId);let Y=[];try{const F=yield A.listConversationEntries(j.conversationId,{limit:o.limit,startTimestamp:k,direction:"FromStart"});Y=dA(F.conversationEntries)}catch(F){}return{conversationId:j.conversationId,restoredMessages:Y,resumed:!0}}catch(k){Fu(t,n);const I=yield A.createConversation(yield $s({routingAttributes:r}));return js(t,n,I),u.current=I,{conversationId:I,restoredMessages:[],resumed:!1}}}),[t,n,r,o,d,h]),g=V.useCallback(A=>{js(t,n,A),u.current=A},[t,n]),b=V.useCallback(()=>{Fu(t,n),tA(t,n),sA(a.current),u.current=null},[t,n]),y=V.useCallback(()=>{const A=dg(t,n,d);return A?{continuationToken:A.accessToken,lastEventId:A.lastEventId}:null},[t,n,d]),x=V.useCallback(()=>Ve(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]),S=V.useCallback(A=>Ve(null,null,function*(){try{const{accessToken:C,lastEventId:k}=yield A.generateContinuationToken();eA(t,n,C,k)}catch(C){}}),[t,n]);return{initializeConversation:p,persistConversationId:g,clearPersistedConversation:b,getStoredConnectOptions:y,getPeerConnectOptions:x,persistContinuationToken:S}}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 pA(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}=pA(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 mA="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 gA(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}=st(),[b,y]=V.useReducer(Jv,lg),x=V.useRef(b);x.current=b;const S=hA({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:g}),A=V.useRef(null),C=V.useRef(c),k=V.useRef(d),I=V.useRef(u),j=V.useRef(!1),Y=V.useRef(!1),F=V.useRef(0),te=V.useRef(null);C.current=c,k.current=d,I.current=u,V.useEffect(()=>{const Z=new oS({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 P;const v={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:v.id,tokensBeforeFlush:F.current,streamedFinalOnly:F.current===0}),F.current=0,y({type:"FLUSH_STREAMING",message:v}),(P=C.current)==null||P.call(C,v)}),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 v;if(y({type:"SET_ROUTING_RESULT",result:W}),!W.isSuccessful){const P=`Routing failed: ${W.failureType||"unknown"}`;y({type:"SET_ERROR",error:pg({code:"ROUTING_FAILED"})}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(v=k.current)==null||v.call(k,P)}}),Z.on("participant_changed",W=>{if(W.participant.name==="Automated Process")return;const v={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:v})}),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}),S.clearPersistedConversation()}),Z.on("error",W=>{var v;if(p==null||p.log("🦜 MessagingProvider ERROR event received",{event:W}),W.code==="SESSION_EXPIRED"){Y.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"}),y({type:"SET_LOADING",isLoading:!1});return}y({type:"SET_ERROR",error:pg(W)}),W.recoverable||y({type:"SET_CONNECTION_STATUS",status:"error"}),(v=k.current)==null||v.call(k,W.message)}),y({type:"SET_CONNECTION_STATUS",status:"connecting"});const q=()=>Ve(null,null,function*(){let W=S.getStoredConnectOptions(),v=!1;W||(W=yield S.getPeerConnectOptions(),v=!!W);try{yield Z.connect(W!=null?W:void 0)}catch(G){if(W)p==null||p.log("Continuation token failed, falling back to fresh connect"),v||S.clearPersistedConversation(),yield Z.connect();else throw G}yield S.persistContinuationToken(Z);const P=yield S.initializeConversation(Z);y({type:"SET_CONVERSATION_ID",id:P.conversationId}),P.resumed&&P.restoredMessages.length>0&&y({type:"LOAD_HISTORY",messages:P.restoredMessages})});return te.current=q,q().catch(W=>{var v;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:wo(W)}),(v=k.current)==null||v.call(k,W.message)}),()=>{Z.disconnect(),Z.off(),A.current=null,te.current=null}},[e,t,n,o]),V.useEffect(()=>{const Z=()=>{document.visibilityState==="visible"&&A.current&&!Y.current&&A.current.reconnect()};return document.addEventListener("visibilitychange",Z),()=>{document.removeEventListener("visibilitychange",Z)}},[]);const ce=V.useCallback(Z=>Ve(null,null,function*(){var W;const q=A.current;if(!(!q||j.current)){j.current=!0,Y.current=!1,y({type:"SET_SESSION_EXPIRED",expired:!1}),y({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:mA,timestamp:new Date().toISOString()}}),S.clearPersistedConversation(),y({type:"SET_CONNECTION_STATUS",status:"connecting"});try{q.disconnect(),yield q.connect(),yield S.persistContinuationToken(q);const v=yield q.createConversation(yield $s({routingAttributes:r}));y({type:"SET_CONVERSATION_ID",id:v}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),S.persistConversationId(v),Z&&(y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),yield q.sendMessage(Z))}catch(v){const P=v instanceof Error?v.message:String(v);y({type:"SET_ERROR",error:wo(v)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(W=k.current)==null||W.call(k,P)}finally{j.current=!1}}}),[r,S]),pe=V.useRef(ce);pe.current=ce;const U=V.useCallback((Z,q)=>{const W=A.current;if(!W)return;const v={id:crypto.randomUUID(),role:"user",content:q!=null?q:Z,timestamp:new Date().toISOString()};if(y({type:"CLEAR_SEND_ERROR"}),y({type:"ADD_MESSAGE",message:v}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),Y.current){pe.current(Z);return}W.sendMessage(Z).catch(P=>{var G;if(mg(P)){pe.current(Z);return}y({type:"SET_SEND_ERROR",error:{text:Z,displayContent:q,message:wo(P)}}),(G=k.current)==null||G.call(k,P.message)})},[]),re=V.useCallback(Z=>{Z.trim()&&U(Z)},[U]),ae=V.useCallback(Z=>{if(!A.current)return;const{prompt:q,display:W}=gA(Z);U(q,W)},[U]),de=V.useCallback(()=>{const Z=A.current,q=x.current.sendError;if(!(!Z||!q)){if(y({type:"CLEAR_SEND_ERROR"}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),Y.current){pe.current(q.text);return}Z.sendMessage(q.text).catch(W=>{var v;if(mg(W)){pe.current(q.text);return}y({type:"SET_SEND_ERROR",error:oe(B({},q),{message:wo(W)})}),(v=k.current)==null||v.call(k,W.message)})}},[]),se=V.useCallback(()=>{const Z=A.current,q=te.current;!Z||!q||(Y.current=!1,Z.disconnect(),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),q().catch(W=>{var v;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:wo(W)}),(v=k.current)==null||v.call(k,W.message)}))},[]),be=V.useCallback(()=>{const Z=A.current;Z&&(Y.current=!1,S.clearPersistedConversation(),y({type:"RESET"}),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),Z.endConversation().then(()=>(Z.disconnect(),Z.connect())).then(()=>Ve(null,null,function*(){return yield S.persistContinuationToken(Z),Z.createConversation(yield $s({routingAttributes:r}))})).then(q=>{y({type:"SET_CONVERSATION_ID",id:q}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),S.persistConversationId(q)}).catch(q=>{var W;y({type:"SET_ERROR",error:wo(q)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(W=k.current)==null||W.call(k,q.message)}))},[r,S]),we=V.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:re,addToCart:ae,resetConversation:be,retryLastMessage:de,retryConnection:se}),[b,re,ae,be,de,se]);return _.jsx(cg.Provider,{value:we,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 EA=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)===EA}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 yA(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=TA),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>qd(r,!0))),e}function TA(){Qn(2)}function ju(e){return Object.isFrozen(e)}var bA={};function Mi(e){const t=bA[e];return t||Qn(0,e),t}var Vs;function _g(){return Vs}function _A(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(xA),e.drafts_=null}function Wd(e){e===Vs&&(Vs=e.parent_)}function wg(e){return Vs=_A(Vs,e)}function xA(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 wA(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=qs);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 SA(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(yA(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)}},qs={};Bu(Gd,(e,t)=>{qs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),qs.deleteProperty=function(e,t){return qs.set.call(this,e,t,void 0)},qs.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 SA(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 vA=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=AA(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):wA(e,t);return(t?t.scope_:_g()).drafts_.push(n),n}function AA(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 vA,CA=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 kA(e,t,n){var r=V.useMemo(function(){return CA(e)},[e]);return V.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=V.createContext(null),Og=V.createContext(null),NA=({children:e,dispatch:t})=>{const n=V.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_INITIALIZED,payload:x})},[t]),r=V.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_OPEN,payload:x})},[t]),o=V.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_INLINE,payload:x})},[t]),a=V.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:x})},[t]),u=V.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:x})},[t]),c=V.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:x})},[t]),d=V.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:x})},[t]),h=V.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_PARAMS,payload:x})},[t]),p=V.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:x})},[t]),g=V.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:x})},[t]),b=V.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:x})},[t]),y=V.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})},OA=(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}},PA=({promptsConfig:e,children:t})=>{const[n,r]=kA(OA,B(B({},kg),e||{}));return _.jsx(Ng.Provider,{value:n,children:_.jsx(NA,{dispatch:r,children:t})})};function IA(){var e=V.useRef(!0);return e.current?(e.current=!1,!0):e.current}function RA(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function LA(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){V.useEffect(e,[])},DA=function(e){var t=V.useRef(e);t.current=e,qu(function(){return function(){return t.current()}})},MA=function(e){var t=V.useRef(0),n=V.useState(e),r=n[0],o=n[1],a=V.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return DA(function(){cancelAnimationFrame(t.current)}),[r,a]},FA=function(e,t){return e===t};function BA(e,t){t===void 0&&(t=FA);var n=V.useRef(),r=V.useRef(e),o=IA();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var UA=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=MA({width:Zd?window.innerWidth:r,height:Zd?window.innerHeight:a}),d=c[0],h=c[1];return V.useEffect(function(){if(Zd){var p=function(){var g=window.innerWidth,b=window.innerHeight;h({width:g,height:b}),u&&u(g,b)};return RA(window,"resize",p),function(){LA(window,"resize",p)}}},[]),d};const Pg="cimulate",ef=`${Pg}:ui-state-update`,tf=`${Pg}:prompts-state-update`,HA=e=>{window.addEventListener(ef,e)},zA=e=>{window.removeEventListener(ef,e)},jA=(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},Ir=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},$A=e=>{const t=tt.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;tt.dialogProxy.isFullHeight=n};class VA{constructor(){$e(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}});$e(this,"connectedProxy");$e(this,"modeProxy");$e(this,"entryTypeProxy");$e(this,"statusProxy");$e(this,"dialogProxy");$e(this,"modalProxy",{isFullscreen:!1});$e(this,"_fullGet",(t,n)=>Reflect.get(t,n));$e(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return jA(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 VA,Rg=V.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}),qA=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=V.useState(e!=null?e:tt.entryTypeProxy.entryType),[u,c]=V.useState(tt.modeProxy.mode),[d,h]=V.useState({type:n||tt.statusProxy.type,isOpen:tt.statusProxy.isOpen,isMinimized:tt.statusProxy.isMinimized}),[p,g]=V.useState(tt.dialogProxy.position),[b,y]=V.useState(tt.dialogProxy.isFullHeight),[x,S]=V.useState(tt.dialogProxy.width),[A,C]=V.useState(tt.modalProxy.isFullscreen),k=BA(d.type);V.useEffect(()=>{const j=Y=>{const{property:F,value:te}=Y.detail||{};if(!(!F||te===void 0)){if(F==="mode"){c(te);return}if(F==="entryType"){a(te);return}if(F==="isMinimized"){h(ce=>oe(B({},ce),{isMinimized:te}));return}if(F==="isOpen"){h(ce=>oe(B({},ce),{isOpen:te}));return}if(F==="type"){h(ce=>oe(B({},ce),{type:te}));return}if(F==="position"){g(te);return}if(F==="isFullHeight"){y(te);return}if(F==="width"){S(te);return}if(F==="isFullscreen"){C(te);return}}};return HA(j),()=>{zA(j)}},[]),qu(()=>{e&&Ig(e)}),qu(()=>{const j=n||(t==null?void 0:t.type);j&&Wu(j),t&&"isOpen"in t&&Ir(!!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&&$A(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&S(t.options.dialogWidth),"isModalFullscreen"in t.options&&nf(!!t.options.isModalFullscreen)});const I=V.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:S,disclaimerMarkdown:A,clientContext:C,searchPlaceholder:k,searchButtonLabel:I,searchConfig:j,suggestionButtonConfig:Y,messageAlignment:F,autoScroll:te,promptsConfig:ce,resetConversationMessage:pe,conversationHistory:U,messagingConfig:re,__features:ae,children:de})=>_.jsx(Gv,{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:j,suggestionButtonConfig:Y,messageAlignment:F,autoScroll:te,componentConfig:b,clientContext:C,disclaimerMarkdown:A,disclaimerText:S,resetConversationMessage:pe,conversationHistory:U,isDevelopment:p,__features:ae,routingAttributes:re==null?void 0:re.routingAttributes,children:_.jsx(qA,{entryType:y,componentConfig:b,componentType:g,children:_.jsx(PA,{promptsConfig:ce,children:_.jsx(gg,{scrt2Url:(re==null?void 0:re.scrt2Url)||"",orgId:(re==null?void 0:re.orgId)||"",esDeveloperName:(re==null?void 0:re.esDeveloperName)||"",routingAttributes:(re==null?void 0:re.routingAttributes)||{},capabilitiesVersion:re==null?void 0:re.capabilitiesVersion,enableLogging:p,children:de})})})}),Fi=()=>{const e=V.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 YA(){return Dg||(Dg=1,(function(e){function t(q,W){var v=q.length;q.push(W);e:for(;0<v;){var P=v-1>>>1,G=q[P];if(0<o(G,W))q[P]=W,q[v]=G,v=P;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var W=q[0],v=q.pop();if(v!==W){q[0]=v;e:for(var P=0,G=q.length,O=G>>>1;P<O;){var ye=2*(P+1)-1,Oe=q[ye],Ie=ye+1,He=q[Ie];if(0>o(Oe,v))Ie<G&&0>o(He,Oe)?(q[P]=He,q[Ie]=v,P=Ie):(q[P]=Oe,q[ye]=v,P=ye);else if(Ie<G&&0>o(He,v))q[P]=He,q[Ie]=v,P=Ie;else break e}}return W}function o(q,W){var v=q.sortIndex-W.sortIndex;return v!==0?v:q.id-W.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,S=!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(q){for(var W=n(h);W!==null;){if(W.callback===null)r(h);else if(W.startTime<=q)r(h),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(h)}}function j(q){if(S=!1,I(q),!x)if(n(d)!==null)x=!0,we(Y);else{var W=n(h);W!==null&&Z(j,W.startTime-q)}}function Y(q,W){x=!1,S&&(S=!1,C(ce),ce=-1),y=!0;var v=b;try{for(I(W),g=n(d);g!==null&&(!(g.expirationTime>W)||q&&!re());){var P=g.callback;if(typeof P=="function"){g.callback=null,b=g.priorityLevel;var G=P(g.expirationTime<=W);W=e.unstable_now(),typeof G=="function"?g.callback=G:g===n(d)&&r(d),I(W)}else r(d);g=n(d)}if(g!==null)var O=!0;else{var ye=n(h);ye!==null&&Z(j,ye.startTime-W),O=!1}return O}finally{g=null,b=v,y=!1}}var F=!1,te=null,ce=-1,pe=5,U=-1;function re(){return!(e.unstable_now()-U<pe)}function ae(){if(te!==null){var q=e.unstable_now();U=q;var W=!0;try{W=te(!0,q)}finally{W?de():(F=!1,te=null)}}else F=!1}var de;if(typeof k=="function")de=function(){k(ae)};else if(typeof MessageChannel!="undefined"){var se=new MessageChannel,be=se.port2;se.port1.onmessage=ae,de=function(){be.postMessage(null)}}else de=function(){A(ae,0)};function we(q){te=q,F||(F=!0,de())}function Z(q,W){ce=A(function(){q(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,we(Y))},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):pe=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(q){switch(b){case 1:case 2:case 3:var W=3;break;default:W=b}var v=b;b=W;try{return q()}finally{b=v}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(q,W){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var v=b;b=q;try{return W()}finally{b=v}},e.unstable_scheduleCallback=function(q,W,v){var P=e.unstable_now();switch(typeof v=="object"&&v!==null?(v=v.delay,v=typeof v=="number"&&0<v?P+v:P):v=P,q){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=v+G,q={id:p++,callback:W,priorityLevel:q,startTime:v,expirationTime:G,sortIndex:-1},v>P?(q.sortIndex=v,t(h,q),n(d)===null&&q===n(h)&&(S?(C(ce),ce=-1):S=!0,Z(j,v-P))):(q.sortIndex=G,t(d,q),x||y||(x=!0,we(Y))),q},e.unstable_shouldYield=re,e.unstable_wrapCallback=function(q){var W=b;return function(){var v=b;b=W;try{return q.apply(this,arguments)}finally{b=v}}}})(af)),af}var Mg;function WA(){return Mg||(Mg=1,sf.exports=YA()),sf.exports}var Fg;function GA(){if(Fg)return cn;Fg=1;var e=yo(),t=WA();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 S(i,s,l,f,E,T,w){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=w}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[i]=new S(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];A[s]=new S(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[i]=new S(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){A[i]=new S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new S(i,5,!1,i.toLowerCase(),null,!1,!1)});var 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 S(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 S(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 S(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function 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 j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),F=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),ce=Symbol.for("react.strict_mode"),pe=Symbol.for("react.profiler"),U=Symbol.for("react.provider"),re=Symbol.for("react.context"),ae=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),se=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),we=Symbol.for("react.lazy"),Z=Symbol.for("react.offscreen"),q=Symbol.iterator;function W(i){return i===null||typeof i!="object"?null:(i=q&&i[q]||i["@@iterator"],typeof i=="function"?i:null)}var v=Object.assign,P;function G(i){if(P===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);P=s&&s[1]||""}return`
|
|
17
|
+
`+P+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(ee){var f=ee}Reflect.construct(i,[],s)}else{try{s.call()}catch(ee){f=ee}i.call(s.prototype)}else{try{throw Error()}catch(ee){f=ee}i()}}catch(ee){if(ee&&f&&typeof ee.stack=="string"){for(var E=ee.stack.split(`
|
|
18
|
+
`),T=f.stack.split(`
|
|
19
|
+
`),w=E.length-1,D=T.length-1;1<=w&&0<=D&&E[w]!==T[D];)D--;for(;1<=w&&0<=D;w--,D--)if(E[w]!==T[D]){if(w!==1||D!==1)do if(w--,D--,0>D||E[w]!==T[D]){var H=`
|
|
20
|
+
`+E[w].replace(" at new "," at ");return i.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",i.displayName)),H}while(1<=w&&0<=D);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?G(i):""}function Oe(i){switch(i.tag){case 5:return G(i.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("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 te:return"Fragment";case F:return"Portal";case pe:return"Profiler";case ce:return"StrictMode";case de:return"Suspense";case se:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case re: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 we: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 ve(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(w){f=""+w,T.call(this,w)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return f},setValue:function(w){f=""+w},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 v({},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=ve(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 ss(i,s){Ra(i,s);var l=ve(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")?as(i,s.type,l):s.hasOwnProperty("defaultValue")&&as(i,s.type,ve(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 as(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=""+ve(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 v({},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:ve(l)}}function Jl(i,s){var l=ve(s.value),f=ve(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 _e(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},Ur=["Webkit","ms","Moz","O"];Object.keys($t).forEach(function(i){Ur.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=v({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,us=null,ls=null;function y_(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 T_(i){us?ls?ls.push(i):ls=[i]:us=i}function b_(){if(us){var i=us,s=ls;if(ls=us=null,y_(i),s)for(i=0;i<s.length;i++)y_(s[i])}}function __(i,s){return i(s)}function x_(){}var _p=!1;function w_(i,s,l){if(_p)return i(s,l);_p=!0;try{return __(i,s,l)}finally{_p=!1,(us!==null||ls!==null)&&(x_(),b_())}}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 F9(i,s,l,f,E,T,w,D,H){var ee=Array.prototype.slice.call(arguments,3);try{s.apply(l,ee)}catch(fe){this.onError(fe)}}var Fa=!1,ec=null,tc=!1,wp=null,B9={onError:function(i){Fa=!0,ec=i}};function U9(i,s,l,f,E,T,w,D,H){Fa=!1,ec=null,F9.apply(B9,arguments)}function H9(i,s,l,f,E,T,w,D,H){if(U9.apply(this,arguments),Fa){if(Fa){var ee=ec;Fa=!1,ec=null}else throw Error(n(198));tc||(tc=!0,wp=ee)}}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 S_(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 v_(i){if(ro(i)!==i)throw Error(n(188))}function z9(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 v_(E),i;if(T===f)return v_(E),s;T=T.sibling}throw Error(n(188))}if(l.return!==f.return)l=E,f=T;else{for(var w=!1,D=E.child;D;){if(D===l){w=!0,l=E,f=T;break}if(D===f){w=!0,f=E,l=T;break}D=D.sibling}if(!w){for(D=T.child;D;){if(D===l){w=!0,l=T,f=E;break}if(D===f){w=!0,f=T,l=E;break}D=D.sibling}if(!w)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 A_(i){return i=z9(i),i!==null?C_(i):null}function C_(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=C_(i);if(s!==null)return s;i=i.sibling}return null}var k_=t.unstable_scheduleCallback,N_=t.unstable_cancelCallback,j9=t.unstable_shouldYield,$9=t.unstable_requestPaint,vt=t.unstable_now,V9=t.unstable_getCurrentPriorityLevel,Sp=t.unstable_ImmediatePriority,O_=t.unstable_UserBlockingPriority,nc=t.unstable_NormalPriority,q9=t.unstable_LowPriority,P_=t.unstable_IdlePriority,rc=null,Cr=null;function Y9(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:X9,W9=Math.log,G9=Math.LN2;function X9(i){return i>>>=0,i===0?32:31-(W9(i)/G9|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,w=l&268435455;if(w!==0){var D=w&~E;D!==0?f=Ba(D):(T&=w,T!==0&&(f=Ba(T)))}else w=l&~E,w!==0?f=Ba(w):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 K9(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 Q9(i,s){for(var l=i.suspendedLanes,f=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var w=31-or(T),D=1<<w,H=E[w];H===-1?((D&l)===0||(D&f)!==0)&&(E[w]=K9(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 I_(){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 J9(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 R_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var L_,kp,D_,M_,F_,Np=!1,ac=[],ci=null,di=null,fi=null,Ha=new Map,za=new Map,hi=[],Z9="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 B_(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 eF(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 U_(i){var s=io(i.target);if(s!==null){var l=ro(s);if(l!==null){if(s=l.tag,s===13){if(s=S_(l),s!==null){i.blockedOn=s,F_(i.priority,function(){D_(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 H_(i,s,l){uc(i)&&l.delete(s)}function tF(){Np=!1,ci!==null&&uc(ci)&&(ci=null),di!==null&&uc(di)&&(di=null),fi!==null&&uc(fi)&&(fi=null),Ha.forEach(H_),za.forEach(H_)}function $a(i,s){i.blockedOn===s&&(i.blockedOn=null,Np||(Np=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,tF)))}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);)U_(l),l.blockedOn===null&&hi.shift()}var cs=j.ReactCurrentBatchConfig,lc=!0;function nF(i,s,l,f){var E=nt,T=cs.transition;cs.transition=null;try{nt=1,Op(i,s,l,f)}finally{nt=E,cs.transition=T}}function rF(i,s,l,f){var E=nt,T=cs.transition;cs.transition=null;try{nt=4,Op(i,s,l,f)}finally{nt=E,cs.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),B_(i,f);else if(eF(E,i,s,l,f))f.stopPropagation();else if(B_(i,f),s&4&&-1<Z9.indexOf(i)){for(;E!==null;){var T=nu(E);if(T!==null&&L_(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=S_(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 z_(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(V9()){case Sp:return 1;case O_:return 4;case nc:case q9:return 16;case P_:return 536870912;default:return 16}default:return 16}}var pi=null,Ip=null,dc=null;function j_(){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 w=l-i;for(f=1;f<=w&&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 $_(){return!1}function On(i){function s(l,f,E,T,w){this._reactName=l,this._targetInst=E,this.type=f,this.nativeEvent=T,this.target=w,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:$_,this.isPropagationStopped=$_,this}return v(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 ds={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rp=On(ds),qa=v({},ds,{view:0,detail:0}),iF=On(qa),Lp,Dp,Ya,pc=v({},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}}),V_=On(pc),oF=v({},pc,{dataTransfer:0}),sF=On(oF),aF=v({},qa,{relatedTarget:0}),Mp=On(aF),uF=v({},ds,{animationName:0,elapsedTime:0,pseudoElement:0}),lF=On(uF),cF=v({},ds,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),dF=On(cF),fF=v({},ds,{data:0}),q_=On(fF),hF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pF={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"},mF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gF(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=mF[i])?!!s[i]:!1}function Fp(){return gF}var EF=v({},qa,{key:function(i){if(i.key){var s=hF[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"?pF[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}}),yF=On(EF),TF=v({},pc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Y_=On(TF),bF=v({},qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fp}),_F=On(bF),xF=v({},ds,{propertyName:0,elapsedTime:0,pseudoElement:0}),wF=On(xF),SF=v({},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}),vF=On(SF),AF=[9,13,27,32],Bp=c&&"CompositionEvent"in window,Wa=null;c&&"documentMode"in document&&(Wa=document.documentMode);var CF=c&&"TextEvent"in window&&!Wa,W_=c&&(!Bp||Wa&&8<Wa&&11>=Wa),G_=" ",X_=!1;function K_(i,s){switch(i){case"keyup":return AF.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Q_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var fs=!1;function kF(i,s){switch(i){case"compositionend":return Q_(s);case"keypress":return s.which!==32?null:(X_=!0,G_);case"textInput":return i=s.data,i===G_&&X_?null:i;default:return null}}function NF(i,s){if(fs)return i==="compositionend"||!Bp&&K_(i,s)?(i=j_(),dc=Ip=pi=null,fs=!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 W_&&s.locale!=="ko"?null:s.data;default:return null}}var OF={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 J_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!OF[i.type]:s==="textarea"}function Z_(i,s,l,f){T_(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 PF(i){Ex(i,0)}function mc(i){var s=Es(i);if(to(s))return i}function IF(i,s){if(i==="change")return s}var ex=!1;if(c){var Up;if(c){var Hp="oninput"in document;if(!Hp){var tx=document.createElement("div");tx.setAttribute("oninput","return;"),Hp=typeof tx.oninput=="function"}Up=Hp}else Up=!1;ex=Up&&(!document.documentMode||9<document.documentMode)}function nx(){Ga&&(Ga.detachEvent("onpropertychange",rx),Xa=Ga=null)}function rx(i){if(i.propertyName==="value"&&mc(Xa)){var s=[];Z_(s,Xa,i,Tp(i)),w_(PF,s)}}function RF(i,s,l){i==="focusin"?(nx(),Ga=s,Xa=l,Ga.attachEvent("onpropertychange",rx)):i==="focusout"&&nx()}function LF(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return mc(Xa)}function DF(i,s){if(i==="click")return mc(s)}function MF(i,s){if(i==="input"||i==="change")return mc(s)}function FF(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var sr=typeof Object.is=="function"?Object.is:FF;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 ix(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function ox(i,s){var l=ix(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=ix(l)}}function sx(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?sx(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function ax(){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 BF(i){var s=ax(),l=i.focusedElem,f=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&sx(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=ox(l,T);var w=ox(l,f);E&&w&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==w.node||i.focusOffset!==w.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),T>f?(i.addRange(s),i.extend(w.node,w.offset)):(s.setEnd(w.node,w.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 UF=c&&"documentMode"in document&&11>=document.documentMode,hs=null,jp=null,Qa=null,$p=!1;function ux(i,s,l){var f=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;$p||hs==null||hs!==si(f)||(f=hs,"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=hs)))}function gc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var ps={animationend:gc("Animation","AnimationEnd"),animationiteration:gc("Animation","AnimationIteration"),animationstart:gc("Animation","AnimationStart"),transitionend:gc("Transition","TransitionEnd")},Vp={},lx={};c&&(lx=document.createElement("div").style,"AnimationEvent"in window||(delete ps.animationend.animation,delete ps.animationiteration.animation,delete ps.animationstart.animation),"TransitionEvent"in window||delete ps.transitionend.transition);function Ec(i){if(Vp[i])return Vp[i];if(!ps[i])return i;var s=ps[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in lx)return Vp[i]=s[l];return i}var cx=Ec("animationend"),dx=Ec("animationiteration"),fx=Ec("animationstart"),hx=Ec("transitionend"),px=new Map,mx="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){px.set(i,s),a(s,[i])}for(var qp=0;qp<mx.length;qp++){var Yp=mx[qp],HF=Yp.toLowerCase(),zF=Yp[0].toUpperCase()+Yp.slice(1);mi(HF,"on"+zF)}mi(cx,"onAnimationEnd"),mi(dx,"onAnimationIteration"),mi(fx,"onAnimationStart"),mi("dblclick","onDoubleClick"),mi("focusin","onFocus"),mi("focusout","onBlur"),mi(hx,"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(" "),jF=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ja));function gx(i,s,l){var f=i.type||"unknown-event";i.currentTarget=l,H9(f,s,void 0,i),i.currentTarget=null}function Ex(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 w=f.length-1;0<=w;w--){var D=f[w],H=D.instance,ee=D.currentTarget;if(D=D.listener,H!==T&&E.isPropagationStopped())break e;gx(E,D,ee),T=H}else for(w=0;w<f.length;w++){if(D=f[w],H=D.instance,ee=D.currentTarget,D=D.listener,H!==T&&E.isPropagationStopped())break e;gx(E,D,ee),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)||(yx(s,i,2,!1),l.add(f))}function Wp(i,s,l){var f=0;s&&(f|=4),yx(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"&&(jF.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 yx(i,s,l,f){switch(z_(s)){case 1:var E=nF;break;case 4:E=rF;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 w=f.tag;if(w===3||w===4){var D=f.stateNode.containerInfo;if(D===E||D.nodeType===8&&D.parentNode===E)break;if(w===4)for(w=f.return;w!==null;){var H=w.tag;if((H===3||H===4)&&(H=w.stateNode.containerInfo,H===E||H.nodeType===8&&H.parentNode===E))return;w=w.return}for(;D!==null;){if(w=io(D),w===null)return;if(H=w.tag,H===5||H===6){f=T=w;continue e}D=D.parentNode}}f=f.return}w_(function(){var ee=T,fe=Tp(l),me=[];e:{var ue=px.get(i);if(ue!==void 0){var xe=Rp,Ae=i;switch(i){case"keypress":if(fc(l)===0)break e;case"keydown":case"keyup":xe=yF;break;case"focusin":Ae="focus",xe=Mp;break;case"focusout":Ae="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=V_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=sF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=_F;break;case cx:case dx:case fx:xe=lF;break;case hx:xe=wF;break;case"scroll":xe=iF;break;case"wheel":xe=vF;break;case"copy":case"cut":case"paste":xe=dF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=Y_}var ke=(s&4)!==0,At=!ke&&i==="scroll",K=ke?ue!==null?ue+"Capture":null:ue;ke=[];for(var $=ee,J;$!==null;){J=$;var Te=J.stateNode;if(J.tag===5&&Te!==null&&(J=Te,K!==null&&(Te=Da($,K),Te!=null&&ke.push(eu($,Te,J)))),At)break;$=$.return}0<ke.length&&(ue=new xe(ue,Ae,null,l,fe),me.push({event:ue,listeners:ke}))}}if((s&7)===0){e:{if(ue=i==="mouseover"||i==="pointerover",xe=i==="mouseout"||i==="pointerout",ue&&l!==Nn&&(Ae=l.relatedTarget||l.fromElement)&&(io(Ae)||Ae[Hr]))break e;if((xe||ue)&&(ue=fe.window===fe?fe:(ue=fe.ownerDocument)?ue.defaultView||ue.parentWindow:window,xe?(Ae=l.relatedTarget||l.toElement,xe=ee,Ae=Ae?io(Ae):null,Ae!==null&&(At=ro(Ae),Ae!==At||Ae.tag!==5&&Ae.tag!==6)&&(Ae=null)):(xe=null,Ae=ee),xe!==Ae)){if(ke=V_,Te="onMouseLeave",K="onMouseEnter",$="mouse",(i==="pointerout"||i==="pointerover")&&(ke=Y_,Te="onPointerLeave",K="onPointerEnter",$="pointer"),At=xe==null?ue:Es(xe),J=Ae==null?ue:Es(Ae),ue=new ke(Te,$+"leave",xe,l,fe),ue.target=At,ue.relatedTarget=J,Te=null,io(fe)===ee&&(ke=new ke(K,$+"enter",Ae,l,fe),ke.target=J,ke.relatedTarget=At,Te=ke),At=Te,xe&&Ae)t:{for(ke=xe,K=Ae,$=0,J=ke;J;J=ms(J))$++;for(J=0,Te=K;Te;Te=ms(Te))J++;for(;0<$-J;)ke=ms(ke),$--;for(;0<J-$;)K=ms(K),J--;for(;$--;){if(ke===K||K!==null&&ke===K.alternate)break t;ke=ms(ke),K=ms(K)}ke=null}else ke=null;xe!==null&&Tx(me,ue,xe,ke,!1),Ae!==null&&At!==null&&Tx(me,At,Ae,ke,!0)}}e:{if(ue=ee?Es(ee):window,xe=ue.nodeName&&ue.nodeName.toLowerCase(),xe==="select"||xe==="input"&&ue.type==="file")var Ne=IF;else if(J_(ue))if(ex)Ne=MF;else{Ne=LF;var De=RF}else(xe=ue.nodeName)&&xe.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(Ne=DF);if(Ne&&(Ne=Ne(i,ee))){Z_(me,Ne,l,fe);break e}De&&De(i,ue,ee),i==="focusout"&&(De=ue._wrapperState)&&De.controlled&&ue.type==="number"&&as(ue,"number",ue.value)}switch(De=ee?Es(ee):window,i){case"focusin":(J_(De)||De.contentEditable==="true")&&(hs=De,jp=ee,Qa=null);break;case"focusout":Qa=jp=hs=null;break;case"mousedown":$p=!0;break;case"contextmenu":case"mouseup":case"dragend":$p=!1,ux(me,l,fe);break;case"selectionchange":if(UF)break;case"keydown":case"keyup":ux(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 fs?K_(i,l)&&(Ue="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ue="onCompositionStart");Ue&&(W_&&l.locale!=="ko"&&(fs||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&fs&&(Me=j_()):(pi=fe,Ip="value"in pi?pi.value:pi.textContent,fs=!0)),De=Tc(ee,Ue),0<De.length&&(Ue=new q_(Ue,i,null,l,fe),me.push({event:Ue,listeners:De}),Me?Ue.data=Me:(Me=Q_(l),Me!==null&&(Ue.data=Me)))),(Me=CF?kF(i,l):NF(i,l))&&(ee=Tc(ee,"onBeforeInput"),0<ee.length&&(fe=new q_("onBeforeInput","beforeinput",null,l,fe),me.push({event:fe,listeners:ee}),fe.data=Me))}Ex(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 ms(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function Tx(i,s,l,f,E){for(var T=s._reactName,w=[];l!==null&&l!==f;){var D=l,H=D.alternate,ee=D.stateNode;if(H!==null&&H===f)break;D.tag===5&&ee!==null&&(D=ee,E?(H=Da(l,T),H!=null&&w.unshift(eu(l,H,D))):E||(H=Da(l,T),H!=null&&w.push(eu(l,H,D)))),l=l.return}w.length!==0&&i.push({event:s,listeners:w})}var $F=/\r\n?/g,VF=/\u0000|\uFFFD/g;function bx(i){return(typeof i=="string"?i:""+i).replace($F,`
|
|
21
|
+
`).replace(VF,"")}function bc(i,s,l){if(s=bx(s),bx(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,qF=typeof clearTimeout=="function"?clearTimeout:void 0,_x=typeof Promise=="function"?Promise:void 0,YF=typeof queueMicrotask=="function"?queueMicrotask:typeof _x!="undefined"?function(i){return _x.resolve(null).then(i).catch(WF)}:Jp;function WF(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 xx(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 gs=Math.random().toString(36).slice(2),kr="__reactFiber$"+gs,tu="__reactProps$"+gs,Hr="__reactContainer$"+gs,em="__reactEvents$"+gs,GF="__reactListeners$"+gs,XF="__reactHandles$"+gs;function io(i){var s=i[kr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[Hr]||l[kr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=xx(i);i!==null;){if(l=i[kr])return l;i=xx(i)}return s}i=l,l=i.parentNode}return null}function nu(i){return i=i[kr]||i[Hr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Es(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function xc(i){return i[tu]||null}var tm=[],ys=-1;function Ei(i){return{current:i}}function ht(i){0>ys||(i.current=tm[ys],tm[ys]=null,ys--)}function ct(i,s){ys++,tm[ys]=i.current,i.current=s}var yi={},Jt=Ei(yi),gn=Ei(!1),oo=yi;function Ts(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 wx(i,s,l){if(Jt.current!==yi)throw Error(n(168));ct(Jt,s),ct(gn,l)}function Sx(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 v({},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 vx(i,s,l){var f=i.stateNode;if(!f)throw Error(n(169));l?(i=Sx(i,s,oo),f.__reactInternalMemoizedMergedChildContext=i,ht(gn),ht(Jt),ct(Jt,i)):ht(gn),ct(gn,l)}var zr=null,vc=!1,nm=!1;function Ax(i){zr===null?zr=[i]:zr.push(i)}function KF(i){vc=!0,Ax(i)}function Ti(){if(!nm&&zr!==null){nm=!0;var i=0,s=nt;try{var l=zr;for(nt=1;i<l.length;i++){var f=l[i];do f=f(!0);while(f!==null)}zr=null,vc=!1}catch(E){throw zr!==null&&(zr=zr.slice(i+1)),k_(Sp,Ti),E}finally{nt=s,nm=!1}}return null}var bs=[],_s=0,Ac=null,Cc=0,jn=[],$n=0,so=null,jr=1,$r="";function ao(i,s){bs[_s++]=Cc,bs[_s++]=Ac,Ac=i,Cc=s}function Cx(i,s,l){jn[$n++]=jr,jn[$n++]=$r,jn[$n++]=so,so=i;var f=jr;i=$r;var E=32-or(f)-1;f&=~(1<<E),l+=1;var T=32-or(s)+E;if(30<T){var w=E-E%5;T=(f&(1<<w)-1).toString(32),f>>=w,E-=w,jr=1<<32-or(s)+E|l<<E|f,$r=T+i}else jr=1<<T|l<<E|f,$r=i}function rm(i){i.return!==null&&(ao(i,1),Cx(i,1,0))}function im(i){for(;i===Ac;)Ac=bs[--_s],bs[_s]=null,Cc=bs[--_s],bs[_s]=null;for(;i===so;)so=jn[--$n],jn[$n]=null,$r=jn[--$n],jn[$n]=null,jr=jn[--$n],jn[$n]=null}var Pn=null,In=null,Et=!1,ar=null;function kx(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 Nx(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:jr,overflow:$r}: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(!Nx(i,s)){if(om(i))throw Error(n(418));s=gi(l.nextSibling);var f=Pn;s&&Nx(i,s)?kx(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 Ox(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 Ox(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 Px(),Error(n(418));for(;s;)kx(i,s),s=gi(s.nextSibling)}if(Ox(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 Px(){for(var i=In;i;)i=gi(i.nextSibling)}function xs(){In=Pn=null,Et=!1}function am(i){ar===null?ar=[i]:ar.push(i)}var QF=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(w){var D=E.refs;w===null?delete D[T]:D[T]=w},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 Ix(i){var s=i._init;return s(i._payload)}function Rx(i){function s(K,$){if(i){var J=K.deletions;J===null?(K.deletions=[$],K.flags|=16):J.push($)}}function l(K,$){if(!i)return null;for(;$!==null;)s(K,$),$=$.sibling;return null}function f(K,$){for(K=new Map;$!==null;)$.key!==null?K.set($.key,$):K.set($.index,$),$=$.sibling;return K}function E(K,$){return K=Ci(K,$),K.index=0,K.sibling=null,K}function T(K,$,J){return K.index=J,i?(J=K.alternate,J!==null?(J=J.index,J<$?(K.flags|=2,$):J):(K.flags|=2,$)):(K.flags|=1048576,$)}function w(K){return i&&K.alternate===null&&(K.flags|=2),K}function D(K,$,J,Te){return $===null||$.tag!==6?($=Jm(J,K.mode,Te),$.return=K,$):($=E($,J),$.return=K,$)}function H(K,$,J,Te){var Ne=J.type;return Ne===te?fe(K,$,J.props.children,Te,J.key):$!==null&&($.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===we&&Ix(Ne)===$.type)?(Te=E($,J.props),Te.ref=ru(K,$,J),Te.return=K,Te):(Te=Zc(J.type,J.key,J.props,null,K.mode,Te),Te.ref=ru(K,$,J),Te.return=K,Te)}function ee(K,$,J,Te){return $===null||$.tag!==4||$.stateNode.containerInfo!==J.containerInfo||$.stateNode.implementation!==J.implementation?($=Zm(J,K.mode,Te),$.return=K,$):($=E($,J.children||[]),$.return=K,$)}function fe(K,$,J,Te,Ne){return $===null||$.tag!==7?($=go(J,K.mode,Te,Ne),$.return=K,$):($=E($,J),$.return=K,$)}function me(K,$,J){if(typeof $=="string"&&$!==""||typeof $=="number")return $=Jm(""+$,K.mode,J),$.return=K,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case Y:return J=Zc($.type,$.key,$.props,null,K.mode,J),J.ref=ru(K,null,$),J.return=K,J;case F:return $=Zm($,K.mode,J),$.return=K,$;case we:var Te=$._init;return me(K,Te($._payload),J)}if(ai($)||W($))return $=go($,K.mode,J,null),$.return=K,$;Nc(K,$)}return null}function ue(K,$,J,Te){var Ne=$!==null?$.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return Ne!==null?null:D(K,$,""+J,Te);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case Y:return J.key===Ne?H(K,$,J,Te):null;case F:return J.key===Ne?ee(K,$,J,Te):null;case we:return Ne=J._init,ue(K,$,Ne(J._payload),Te)}if(ai(J)||W(J))return Ne!==null?null:fe(K,$,J,Te,null);Nc(K,J)}return null}function xe(K,$,J,Te,Ne){if(typeof Te=="string"&&Te!==""||typeof Te=="number")return K=K.get(J)||null,D($,K,""+Te,Ne);if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case Y:return K=K.get(Te.key===null?J:Te.key)||null,H($,K,Te,Ne);case F:return K=K.get(Te.key===null?J:Te.key)||null,ee($,K,Te,Ne);case we:var De=Te._init;return xe(K,$,J,De(Te._payload),Ne)}if(ai(Te)||W(Te))return K=K.get(J)||null,fe($,K,Te,Ne,null);Nc($,Te)}return null}function Ae(K,$,J,Te){for(var Ne=null,De=null,Me=$,Ue=$=0,jt=null;Me!==null&&Ue<J.length;Ue++){Me.index>Ue?(jt=Me,Me=null):jt=Me.sibling;var et=ue(K,Me,J[Ue],Te);if(et===null){Me===null&&(Me=jt);break}i&&Me&&et.alternate===null&&s(K,Me),$=T(et,$,Ue),De===null?Ne=et:De.sibling=et,De=et,Me=jt}if(Ue===J.length)return l(K,Me),Et&&ao(K,Ue),Ne;if(Me===null){for(;Ue<J.length;Ue++)Me=me(K,J[Ue],Te),Me!==null&&($=T(Me,$,Ue),De===null?Ne=Me:De.sibling=Me,De=Me);return Et&&ao(K,Ue),Ne}for(Me=f(K,Me);Ue<J.length;Ue++)jt=xe(Me,K,Ue,J[Ue],Te),jt!==null&&(i&&jt.alternate!==null&&Me.delete(jt.key===null?Ue:jt.key),$=T(jt,$,Ue),De===null?Ne=jt:De.sibling=jt,De=jt);return i&&Me.forEach(function(ki){return s(K,ki)}),Et&&ao(K,Ue),Ne}function ke(K,$,J,Te){var Ne=W(J);if(typeof Ne!="function")throw Error(n(150));if(J=Ne.call(J),J==null)throw Error(n(151));for(var De=Ne=null,Me=$,Ue=$=0,jt=null,et=J.next();Me!==null&&!et.done;Ue++,et=J.next()){Me.index>Ue?(jt=Me,Me=null):jt=Me.sibling;var ki=ue(K,Me,et.value,Te);if(ki===null){Me===null&&(Me=jt);break}i&&Me&&ki.alternate===null&&s(K,Me),$=T(ki,$,Ue),De===null?Ne=ki:De.sibling=ki,De=ki,Me=jt}if(et.done)return l(K,Me),Et&&ao(K,Ue),Ne;if(Me===null){for(;!et.done;Ue++,et=J.next())et=me(K,et.value,Te),et!==null&&($=T(et,$,Ue),De===null?Ne=et:De.sibling=et,De=et);return Et&&ao(K,Ue),Ne}for(Me=f(K,Me);!et.done;Ue++,et=J.next())et=xe(Me,K,Ue,et.value,Te),et!==null&&(i&&et.alternate!==null&&Me.delete(et.key===null?Ue:et.key),$=T(et,$,Ue),De===null?Ne=et:De.sibling=et,De=et);return i&&Me.forEach(function(OB){return s(K,OB)}),Et&&ao(K,Ue),Ne}function At(K,$,J,Te){if(typeof J=="object"&&J!==null&&J.type===te&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case Y:e:{for(var Ne=J.key,De=$;De!==null;){if(De.key===Ne){if(Ne=J.type,Ne===te){if(De.tag===7){l(K,De.sibling),$=E(De,J.props.children),$.return=K,K=$;break e}}else if(De.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===we&&Ix(Ne)===De.type){l(K,De.sibling),$=E(De,J.props),$.ref=ru(K,De,J),$.return=K,K=$;break e}l(K,De);break}else s(K,De);De=De.sibling}J.type===te?($=go(J.props.children,K.mode,Te,J.key),$.return=K,K=$):(Te=Zc(J.type,J.key,J.props,null,K.mode,Te),Te.ref=ru(K,$,J),Te.return=K,K=Te)}return w(K);case F:e:{for(De=J.key;$!==null;){if($.key===De)if($.tag===4&&$.stateNode.containerInfo===J.containerInfo&&$.stateNode.implementation===J.implementation){l(K,$.sibling),$=E($,J.children||[]),$.return=K,K=$;break e}else{l(K,$);break}else s(K,$);$=$.sibling}$=Zm(J,K.mode,Te),$.return=K,K=$}return w(K);case we:return De=J._init,At(K,$,De(J._payload),Te)}if(ai(J))return Ae(K,$,J,Te);if(W(J))return ke(K,$,J,Te);Nc(K,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,$!==null&&$.tag===6?(l(K,$.sibling),$=E($,J),$.return=K,K=$):(l(K,$),$=Jm(J,K.mode,Te),$.return=K,K=$),w(K)):l(K,$)}return At}var ws=Rx(!0),Lx=Rx(!1),Oc=Ei(null),Pc=null,Ss=null,um=null;function lm(){um=Ss=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 vs(i,s){Pc=i,um=Ss=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},Ss===null){if(Pc===null)throw Error(n(308));Ss=i,Pc.dependencies={lanes:0,firstContext:i}}else Ss=Ss.next=i;return s}var uo=null;function fm(i){uo===null?uo=[i]:uo.push(i)}function Dx(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,Vr(i,f)}function Vr(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 Mx(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 qr(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,Vr(i,l)}return E=f.interleaved,E===null?(s.next=s,fm(f)):(s.next=E.next,E.next=s),f.interleaved=s,Vr(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 Fx(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 w={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};T===null?E=T=w:T=T.next=w,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,w=E.lastBaseUpdate,D=E.shared.pending;if(D!==null){E.shared.pending=null;var H=D,ee=H.next;H.next=null,w===null?T=ee:w.next=ee,w=H;var fe=i.alternate;fe!==null&&(fe=fe.updateQueue,D=fe.lastBaseUpdate,D!==w&&(D===null?fe.firstBaseUpdate=ee:D.next=ee,fe.lastBaseUpdate=H))}if(T!==null){var me=E.baseState;w=0,fe=ee=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 Ae=i,ke=D;switch(ue=s,xe=l,ke.tag){case 1:if(Ae=ke.payload,typeof Ae=="function"){me=Ae.call(xe,me,ue);break e}me=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=ke.payload,ue=typeof Ae=="function"?Ae.call(xe,me,ue):Ae,ue==null)break e;me=v({},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?(ee=fe=xe,H=me):fe=fe.next=xe,w|=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=ee,E.lastBaseUpdate=fe,s=E.shared.interleaved,s!==null){E=s;do w|=E.lane,E=E.next;while(E!==s)}else T===null&&(E.shared.lanes=0);fo|=w,i.lanes=w,i.memoizedState=me}}function Bx(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 As(){ht(Nr),ht(ou),ht(su)}function Ux(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=j.ReactCurrentDispatcher,ym=j.ReactCurrentBatchConfig,co=0,Tt=null,Rt=null,Ht=null,Mc=!1,au=!1,uu=0,JF=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?nB:rB,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=iB,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 w=E.next;E.next=T.next,T.next=w}f.baseQueue=E=T,l.pending=null}if(E!==null){T=E.next,f=f.baseState;var D=w=null,H=null,ee=T;do{var fe=ee.lane;if((co&fe)===fe)H!==null&&(H=H.next={lane:0,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),f=ee.hasEagerState?ee.eagerState:i(f,ee.action);else{var me={lane:fe,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null};H===null?(D=H=me,w=f):H=H.next=me,Tt.lanes|=fe,fo|=fe}ee=ee.next}while(ee!==null&&ee!==T);H===null?w=f:H.next=D,sr(f,s.memoizedState)||(yn=!0),s.memoizedState=f,s.baseState=w,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 w=E=E.next;do T=i(T,w.action),w=w.next;while(w!==E);sr(T,s.memoizedState)||(yn=!0),s.memoizedState=T,s.baseQueue===null&&(s.baseState=T),l.lastRenderedState=T}return[T,f]}function Hx(){}function zx(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(Vx.bind(null,l,f,i),[i]),f.getSnapshot!==s||T||Ht!==null&&Ht.memoizedState.tag&1){if(l.flags|=2048,cu(9,$x.bind(null,l,f,E,s),void 0,null),zt===null)throw Error(n(349));(co&30)!==0||jx(l,s,E)}return E}function jx(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 $x(i,s,l,f){s.value=l,s.getSnapshot=f,qx(s)&&Yx(i)}function Vx(i,s,l){return l(function(){qx(s)&&Yx(i)})}function qx(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!sr(i,l)}catch(f){return!0}}function Yx(i){var s=Vr(i,1);s!==null&&dr(s,i,1,-1)}function Wx(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=tB.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 Gx(){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 w=Rt.memoizedState;if(T=w.destroy,f!==null&&Tm(f,w.deps)){E.memoizedState=cu(s,l,T,f);return}}Tt.flags|=i,E.memoizedState=cu(1|s,l,T,f)}function Xx(i,s){return Fc(8390656,8,i,s)}function Sm(i,s){return Bc(2048,8,i,s)}function Kx(i,s){return Bc(4,2,i,s)}function Qx(i,s){return Bc(4,4,i,s)}function Jx(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 Zx(i,s,l){return l=l!=null?l.concat([i]):null,Bc(4,4,Jx.bind(null,s,i),l)}function vm(){}function ew(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 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]:(i=i(),l.memoizedState=[i,s],i)}function nw(i,s,l){return(co&21)===0?(i.baseState&&(i.baseState=!1,yn=!0),i.memoizedState=l):(sr(l,s)||(l=I_(),Tt.lanes|=l,fo|=l,i.baseState=!0),s)}function ZF(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 rw(){return qn().memoizedState}function eB(i,s,l){var f=vi(i);if(l={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null},iw(i))ow(s,l);else if(l=Dx(i,s,l,f),l!==null){var E=sn();dr(l,i,f,E),sw(l,s,f)}}function tB(i,s,l){var f=vi(i),E={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null};if(iw(i))ow(s,E);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=s.lastRenderedReducer,T!==null))try{var w=s.lastRenderedState,D=T(w,l);if(E.hasEagerState=!0,E.eagerState=D,sr(D,w)){var H=s.interleaved;H===null?(E.next=E,fm(s)):(E.next=H.next,H.next=E),s.interleaved=E;return}}catch(ee){}l=Dx(i,s,E,f),l!==null&&(E=sn(),dr(l,i,f,E),sw(l,s,f))}}function iw(i){var s=i.alternate;return i===Tt||s!==null&&s===Tt}function ow(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 sw(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},nB={readContext:Vn,useCallback:function(i,s){return Or().memoizedState=[i,s===void 0?null:s],i},useContext:Vn,useEffect:Xx,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,Fc(4194308,4,Jx.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=eB.bind(null,Tt,i),[f.memoizedState,i]},useRef:function(i){var s=Or();return i={current:i},s.memoizedState=i},useState:Wx,useDebugValue:vm,useDeferredValue:function(i){return Or().memoizedState=i},useTransition:function(){var i=Wx(!1),s=i[0];return i=ZF.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||jx(f,s,l)}E.memoizedState=l;var T={value:l,getSnapshot:s};return E.queue=T,Xx(Vx.bind(null,f,T,i),[i]),f.flags|=2048,cu(9,$x.bind(null,f,T,l,s),void 0,null),l},useId:function(){var i=Or(),s=zt.identifierPrefix;if(Et){var l=$r,f=jr;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=JF++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},rB={readContext:Vn,useCallback:ew,useContext:Vn,useEffect:Sm,useImperativeHandle:Zx,useInsertionEffect:Kx,useLayoutEffect:Qx,useMemo:tw,useReducer:xm,useRef:Gx,useState:function(){return xm(lu)},useDebugValue:vm,useDeferredValue:function(i){var s=qn();return nw(s,Rt.memoizedState,i)},useTransition:function(){var i=xm(lu)[0],s=qn().memoizedState;return[i,s]},useMutableSource:Hx,useSyncExternalStore:zx,useId:rw,unstable_isNewReconciler:!1},iB={readContext:Vn,useCallback:ew,useContext:Vn,useEffect:Sm,useImperativeHandle:Zx,useInsertionEffect:Kx,useLayoutEffect:Qx,useMemo:tw,useReducer:wm,useRef:Gx,useState:function(){return wm(lu)},useDebugValue:vm,useDeferredValue:function(i){var s=qn();return Rt===null?s.memoizedState=i:nw(s,Rt.memoizedState,i)},useTransition:function(){var i=wm(lu)[0],s=qn().memoizedState;return[i,s]},useMutableSource:Hx,useSyncExternalStore:zx,useId:rw,unstable_isNewReconciler:!1};function ur(i,s){if(i&&i.defaultProps){s=v({},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:v({},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=qr(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=qr(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=qr(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 aw(i,s,l,f,E,T,w){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,T,w):s.prototype&&s.prototype.isPureReactComponent?!Ka(l,f)||!Ka(E,T):!0}function uw(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)?Ts(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 lw(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=Ts(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 Cs(i,s){try{var l="",f=s;do l+=Oe(f),f=f.return;while(f);var E=l}catch(T){E=`
|
|
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 oB=typeof WeakMap=="function"?WeakMap:Map;function cw(i,s,l){l=qr(-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 dw(i,s,l){l=qr(-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 w=s.stack;this.componentDidCatch(s.value,{componentStack:w!==null?w:""})}),l}function fw(i,s,l){var f=i.pingCache;if(f===null){f=i.pingCache=new oB;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=TB.bind(null,i,s,l),s.then(i,i))}function hw(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 pw(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=qr(-1,1),s.tag=2,_i(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var sB=j.ReactCurrentOwner,yn=!1;function on(i,s,l,f){s.child=i===null?Lx(s,null,l,f):ws(s,i.child,l,f)}function mw(i,s,l,f,E){l=l.render;var T=s.ref;return vs(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,Yr(i,s,E)):(Et&&l&&rm(s),s.flags|=1,on(i,s,f,E),s.child)}function gw(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,Ew(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 w=T.memoizedProps;if(l=l.compare,l=l!==null?l:Ka,l(w,f)&&i.ref===s.ref)return Yr(i,s,E)}return s.flags|=1,i=Ci(T,f),i.ref=s.ref,i.return=s,s.child=i}function Ew(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,Yr(i,s,E)}return Om(i,s,l,f,E)}function yw(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(Ns,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(Ns,Rn),Rn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=T!==null?T.baseLanes:l,ct(Ns,Rn),Rn|=f}else T!==null?(f=T.baseLanes|l,s.memoizedState=null):f=l,ct(Ns,Rn),Rn|=f;return on(i,s,E,l),s.child}function Tw(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=Ts(s,T),vs(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,Yr(i,s,E)):(Et&&f&&rm(s),s.flags|=1,on(i,s,l,E),s.child)}function bw(i,s,l,f,E){if(En(l)){var T=!0;Sc(s)}else T=!1;if(vs(s,E),s.stateNode===null)jc(i,s),uw(s,l,f),Cm(s,l,f,E),f=!0;else if(i===null){var w=s.stateNode,D=s.memoizedProps;w.props=D;var H=w.context,ee=l.contextType;typeof ee=="object"&&ee!==null?ee=Vn(ee):(ee=En(l)?oo:Jt.current,ee=Ts(s,ee));var fe=l.getDerivedStateFromProps,me=typeof fe=="function"||typeof w.getSnapshotBeforeUpdate=="function";me||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(D!==f||H!==ee)&&lw(s,w,f,ee),bi=!1;var ue=s.memoizedState;w.state=ue,Rc(s,f,w,E),H=s.memoizedState,D!==f||ue!==H||gn.current||bi?(typeof fe=="function"&&(Am(s,l,fe,f),H=s.memoizedState),(D=bi||aw(s,l,D,f,ue,H,ee))?(me||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(s.flags|=4194308)):(typeof w.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=H),w.props=f,w.state=H,w.context=ee,f=D):(typeof w.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{w=s.stateNode,Mx(i,s),D=s.memoizedProps,ee=s.type===s.elementType?D:ur(s.type,D),w.props=ee,me=s.pendingProps,ue=w.context,H=l.contextType,typeof H=="object"&&H!==null?H=Vn(H):(H=En(l)?oo:Jt.current,H=Ts(s,H));var xe=l.getDerivedStateFromProps;(fe=typeof xe=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(D!==me||ue!==H)&&lw(s,w,f,H),bi=!1,ue=s.memoizedState,w.state=ue,Rc(s,f,w,E);var Ae=s.memoizedState;D!==me||ue!==Ae||gn.current||bi?(typeof xe=="function"&&(Am(s,l,xe,f),Ae=s.memoizedState),(ee=bi||aw(s,l,ee,f,ue,Ae,H)||!1)?(fe||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(f,Ae,H),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(f,Ae,H)),typeof w.componentDidUpdate=="function"&&(s.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof w.componentDidUpdate!="function"||D===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=Ae),w.props=f,w.state=Ae,w.context=H,f=ee):(typeof w.componentDidUpdate!="function"||D===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof w.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){Tw(i,s);var w=(s.flags&128)!==0;if(!f&&!w)return E&&vx(s,l,!1),Yr(i,s,T);f=s.stateNode,sB.current=s;var D=w&&typeof l.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,i!==null&&w?(s.child=ws(s,i.child,null,T),s.child=ws(s,null,D,T)):on(i,s,D,T),s.memoizedState=f.state,E&&vx(s,l,!0),s.child}function _w(i){var s=i.stateNode;s.pendingContext?wx(i,s.pendingContext,s.pendingContext!==s.context):s.context&&wx(i,s.context,!1),pm(i,s.containerInfo)}function xw(i,s,l,f,E){return xs(),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 ww(i,s,l){var f=s.pendingProps,E=yt.current,T=!1,w=(s.flags&128)!==0,D;if((D=w)||(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):(w=f.children,i=f.fallback,T?(f=s.mode,T=s.child,w={mode:"hidden",children:w},(f&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=w):T=ed(w,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,w));if(E=i.memoizedState,E!==null&&(D=E.dehydrated,D!==null))return aB(i,s,w,f,D,E,l);if(T){T=f.fallback,w=s.mode,E=i.child,D=E.sibling;var H={mode:"hidden",children:f.children};return(w&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,w,l,null),T.flags|=2),T.return=s,f.return=s,f.sibling=T,s.child=f,f=T,T=s.child,w=i.child.memoizedState,w=w===null?Rm(l):{baseLanes:w.baseLanes|l,cachePool:null,transitions:w.transitions},T.memoizedState=w,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),ws(s,i.child,null,l),i=Lm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function aB(i,s,l,f,E,T,w){if(l)return s.flags&256?(s.flags&=-257,f=km(Error(n(422))),zc(i,s,w,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,w,null),T.flags|=2,f.return=s,T.return=s,f.sibling=T,s.child=f,(s.mode&1)!==0&&ws(s,i.child,null,w),s.child.memoizedState=Rm(w),s.memoizedState=Im,T);if((s.mode&1)===0)return zc(i,s,w,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,w,f)}if(D=(w&i.childLanes)!==0,yn||D){if(f=zt,f!==null){switch(w&-w){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(f.suspendedLanes|w))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,Vr(i,E),dr(f,i,E,-1))}return Km(),f=km(Error(n(421))),zc(i,s,w,f)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=bB.bind(null,i),E._reactRetry=s,null):(i=T.treeContext,In=gi(E.nextSibling),Pn=s,Et=!0,ar=null,i!==null&&(jn[$n++]=jr,jn[$n++]=$r,jn[$n++]=so,jr=i.id,$r=i.overflow,so=s),s=Lm(s,f.children),s.flags|=4096,s)}function Sw(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 vw(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&&Sw(i,l,s);else if(i.tag===19)Sw(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 Yr(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 uB(i,s,l){switch(s.tag){case 3:_w(s),xs();break;case 5:Ux(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?ww(i,s,l):(ct(yt,yt.current&1),i=Yr(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 vw(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,yw(i,s,l)}return Yr(i,s,l)}var Aw,Mm,Cw,kw;Aw=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(){},Cw=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=v({},E,{value:void 0}),f=v({},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 w;l=null;for(ee in E)if(!f.hasOwnProperty(ee)&&E.hasOwnProperty(ee)&&E[ee]!=null)if(ee==="style"){var D=E[ee];for(w in D)D.hasOwnProperty(w)&&(l||(l={}),l[w]="")}else ee!=="dangerouslySetInnerHTML"&&ee!=="children"&&ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&ee!=="autoFocus"&&(o.hasOwnProperty(ee)?T||(T=[]):(T=T||[]).push(ee,null));for(ee in f){var H=f[ee];if(D=E!=null?E[ee]:void 0,f.hasOwnProperty(ee)&&H!==D&&(H!=null||D!=null))if(ee==="style")if(D){for(w in D)!D.hasOwnProperty(w)||H&&H.hasOwnProperty(w)||(l||(l={}),l[w]="");for(w in H)H.hasOwnProperty(w)&&D[w]!==H[w]&&(l||(l={}),l[w]=H[w])}else l||(T||(T=[]),T.push(ee,l)),l=H;else ee==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,D=D?D.__html:void 0,H!=null&&D!==H&&(T=T||[]).push(ee,H)):ee==="children"?typeof H!="string"&&typeof H!="number"||(T=T||[]).push(ee,""+H):ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&(o.hasOwnProperty(ee)?(H!=null&&ee==="onScroll"&&ft("scroll",i),T||D===H||(T=[])):(T=T||[]).push(ee,H))}l&&(T=T||[]).push("style",l);var ee=T;(s.updateQueue=ee)&&(s.flags|=4)}},kw=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 lB(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,As(),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)Cw(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 w in T)if(T.hasOwnProperty(w)){var D=T[w];w==="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(w)&&D!=null&&w==="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{w=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=w.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=w.createElement(l,{is:f.is}):(i=w.createElement(l),l==="select"&&(w=i,f.multiple?w.multiple=!0:f.size&&(w.size=f.size))):i=w.createElementNS(i,l),i[kr]=s,i[tu]=f,Aw(i,s,!1,!1),s.stateNode=i;e:{switch(w=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=v({},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,w))}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",""+ve(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)kw(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)Px(),xs(),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 xs(),(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 As(),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,w=T.rendering,w===null)if(f)du(T,!1);else{if(Lt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(w=Lc(i),w!==null){for(s.flags|=128,du(T,!1),f=w.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,w=T.alternate,w===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=w.childLanes,T.lanes=w.lanes,T.child=w.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=w.memoizedProps,T.memoizedState=w.memoizedState,T.updateQueue=w.updateQueue,T.type=w.type,i=w.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()>Os&&(s.flags|=128,f=!0,du(T,!1),s.lanes=4194304)}else{if(!f)if(i=Lc(w),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"&&!w.alternate&&!Et)return en(s),null}else 2*vt()-T.renderingStartTime>Os&&l!==1073741824&&(s.flags|=128,f=!0,du(T,!1),s.lanes=4194304);T.isBackwards?(w.sibling=s.child,s.child=w):(l=T.last,l!==null?l.sibling=w:s.child=w,T.last=w)}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 cB(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 As(),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));xs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return ht(yt),null;case 4:return As(),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,dB=typeof WeakSet=="function"?WeakSet:Set,Se=null;function ks(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 Nw=!1;function fB(i,s){if(Xp=lc,i=ax(),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 w=0,D=-1,H=-1,ee=0,fe=0,me=i,ue=null;t:for(;;){for(var xe;me!==l||E!==0&&me.nodeType!==3||(D=w+E),me!==T||f!==0&&me.nodeType!==3||(H=w+f),me.nodeType===3&&(w+=me.nodeValue.length),(xe=me.firstChild)!==null;)ue=me,me=xe;for(;;){if(me===i)break t;if(ue===l&&++ee===E&&(D=w),ue===T&&++fe===f&&(H=w),(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,Se=s;Se!==null;)if(s=Se,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Se=i;else for(;Se!==null;){s=Se;try{var Ae=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ae!==null){var ke=Ae.memoizedProps,At=Ae.memoizedState,K=s.stateNode,$=K.getSnapshotBeforeUpdate(s.elementType===s.type?ke:ur(s.type,ke),At);K.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var J=s.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.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,Se=i;break}Se=s.return}return Ae=Nw,Nw=!1,Ae}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 Ow(i){var s=i.alternate;s!==null&&(i.alternate=null,Ow(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[GF],delete s[XF])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function Pw(i){return i.tag===5||i.tag===3||i.tag===4}function Iw(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Pw(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function 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;)Rw(i,s,l),l=l.sibling}function Rw(i,s,l){if(Cr&&typeof Cr.onCommitFiberUnmount=="function")try{Cr.onCommitFiberUnmount(rc,l)}catch(D){}switch(l.tag){case 5:tn||ks(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,w=T.destroy;T=T.tag,w!==void 0&&((T&2)!==0||(T&4)!==0)&&Fm(l,s,w),E=E.next}while(E!==f)}xi(i,s,l);break;case 1:if(!tn&&(ks(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 Lw(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new dB),s.forEach(function(f){var E=_B.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,w=s,D=w;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));Rw(T,w,E),qt=null,lr=!1;var H=E.alternate;H!==null&&(H.return=null),E.return=null}catch(ee){_t(E,s,ee)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Dw(s,i),s=s.sibling}function Dw(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(ke){_t(i,i.return,ke)}try{fu(5,i,i.return)}catch(ke){_t(i,i.return,ke)}}break;case 1:cr(s,i),Pr(i),f&512&&l!==null&&ks(l,l.return);break;case 5:if(cr(s,i),Pr(i),f&512&&l!==null&&ks(l,l.return),i.flags&32){var E=i.stateNode;try{Je(E,"")}catch(ke){_t(i,i.return,ke)}}if(f&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,w=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,w);var ee=Ar(D,T);for(w=0;w<H.length;w+=2){var fe=H[w],me=H[w+1];fe==="style"?li(E,me):fe==="dangerouslySetInnerHTML"?We(E,me):fe==="children"?Je(E,me):I(E,fe,me,ee)}switch(D){case"input":ss(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(ke){_t(i,i.return,ke)}}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(ke){_t(i,i.return,ke)}}break;case 3:if(cr(s,i),Pr(i),f&4&&l!==null&&l.memoizedState.isDehydrated)try{Va(s.containerInfo)}catch(ke){_t(i,i.return,ke)}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&&Lw(i);break;case 22:if(fe=l!==null&&l.memoizedState!==null,i.mode&1?(tn=(ee=tn)||fe,cr(s,i),tn=ee):cr(s,i),Pr(i),f&8192){if(ee=i.memoizedState!==null,(i.stateNode.isHidden=ee)&&!fe&&(i.mode&1)!==0)for(Se=i,fe=i.child;fe!==null;){for(me=Se=fe;Se!==null;){switch(ue=Se,xe=ue.child,ue.tag){case 0:case 11:case 14:case 15:fu(4,ue,ue.return);break;case 1:ks(ue,ue.return);var Ae=ue.stateNode;if(typeof Ae.componentWillUnmount=="function"){f=ue,l=ue.return;try{s=f,Ae.props=s.memoizedProps,Ae.state=s.memoizedState,Ae.componentWillUnmount()}catch(ke){_t(f,l,ke)}}break;case 5:ks(ue,ue.return);break;case 22:if(ue.memoizedState!==null){Bw(me);continue}}xe!==null?(xe.return=ue,Se=xe):Bw(me)}fe=fe.sibling}e:for(fe=null,me=i;;){if(me.tag===5){if(fe===null){fe=me;try{E=me.stateNode,ee?(T=E.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(D=me.stateNode,H=me.memoizedProps.style,w=H!=null&&H.hasOwnProperty("display")?H.display:null,D.style.display=zn("display",w))}catch(ke){_t(i,i.return,ke)}}}else if(me.tag===6){if(fe===null)try{me.stateNode.nodeValue=ee?"":me.memoizedProps}catch(ke){_t(i,i.return,ke)}}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&&Lw(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(Pw(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=Iw(i);Hm(i,T,E);break;case 3:case 4:var w=f.stateNode.containerInfo,D=Iw(i);Um(i,D,w);break;default:throw Error(n(161))}}catch(H){_t(i,i.return,H)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function hB(i,s,l){Se=i,Mw(i)}function Mw(i,s,l){for(var f=(i.mode&1)!==0;Se!==null;){var E=Se,T=E.child;if(E.tag===22&&f){var w=E.memoizedState!==null||$c;if(!w){var D=E.alternate,H=D!==null&&D.memoizedState!==null||tn;D=$c;var ee=tn;if($c=w,(tn=H)&&!ee)for(Se=E;Se!==null;)w=Se,H=w.child,w.tag===22&&w.memoizedState!==null?Uw(E):H!==null?(H.return=w,Se=H):Uw(E);for(;T!==null;)Se=T,Mw(T),T=T.sibling;Se=E,$c=D,tn=ee}Fw(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,Se=T):Fw(i)}}function Fw(i){for(;Se!==null;){var s=Se;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&&Bx(s,T,f);break;case 3:var w=s.updateQueue;if(w!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}Bx(s,w,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 ee=s.alternate;if(ee!==null){var fe=ee.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){Se=null;break}if(l=s.sibling,l!==null){l.return=s.return,Se=l;break}Se=s.return}}function Bw(i){for(;Se!==null;){var s=Se;if(s===i){Se=null;break}var l=s.sibling;if(l!==null){l.return=s.return,Se=l;break}Se=s.return}}function Uw(i){for(;Se!==null;){var s=Se;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 w=s.return;try{Bm(s)}catch(H){_t(s,w,H)}}}catch(H){_t(s,s.return,H)}if(s===i){Se=null;break}var D=s.sibling;if(D!==null){D.return=s.return,Se=D;break}Se=s.return}}var pB=Math.ceil,qc=j.ReactCurrentDispatcher,zm=j.ReactCurrentOwner,Yn=j.ReactCurrentBatchConfig,Ze=0,zt=null,Ot=null,Yt=0,Rn=0,Ns=Ei(0),Lt=0,hu=null,fo=0,Yc=0,jm=0,pu=null,Tn=null,$m=0,Os=1/0,Wr=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:QF.transition!==null?(Qc===0&&(Qc=I_()),Qc):(i=nt,i!==0||(i=window.event,i=i===void 0?16:z_(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&&(Os=vt()+500,vc&&Ti()))}function bn(i,s){var l=i.callbackNode;Q9(i,s);var f=sc(i,i===zt?Yt:0);if(f===0)l!==null&&N_(l),i.callbackNode=null,i.callbackPriority=0;else if(s=f&-f,i.callbackPriority!==s){if(l!=null&&N_(l),s===1)i.tag===0?KF(zw.bind(null,i)):Ax(zw.bind(null,i)),YF(function(){(Ze&6)===0&&Ti()}),l=null;else{switch(R_(f)){case 1:l=Sp;break;case 4:l=O_;break;case 16:l=nc;break;case 536870912:l=P_;break;default:l=nc}l=Xw(l,Hw.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function Hw(i,s){if(Kc=-1,Qc=0,(Ze&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Ps()&&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=$w();(zt!==i||Yt!==s)&&(Wr=null,Os=vt()+500,po(i,s));do try{EB();break}catch(D){jw(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&&!mB(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,Wr);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,Wr),s);break}mo(i,Tn,Wr);break;case 4:if(Ai(i,f),(f&4194240)===f)break;for(s=i.eventTimes,E=-1;0<f;){var w=31-or(f);T=1<<w,w=s[w],w>E&&(E=w),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*pB(f/1960))-f,10<f){i.timeoutHandle=Jp(mo.bind(null,i,Tn,Wr),f);break}mo(i,Tn,Wr);break;case 5:mo(i,Tn,Wr);break;default:throw Error(n(329))}}}return bn(i,vt()),i.callbackNode===l?Hw.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 mB(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(w){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 zw(i){if((Ze&6)!==0)throw Error(n(327));Ps();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,Wr),bn(i,vt()),null}function Gm(i,s){var l=Ze;Ze|=1;try{return i(s)}finally{Ze=l,Ze===0&&(Os=vt()+500,vc&&Ti())}}function ho(i){Si!==null&&Si.tag===0&&(Ze&6)===0&&Ps();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=Ns.current,ht(Ns)}function po(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,qF(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:As(),ht(gn),ht(Jt),Em();break;case 5:mm(f);break;case 4:As();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 w=T.next;T.next=E,f.next=w}l.pending=f}uo=null}return i}function jw(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,w=l.return,D=l,H=s;if(s=Yt,D.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var ee=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=hw(w);if(xe!==null){xe.flags&=-257,pw(xe,w,D,T,s),xe.mode&1&&fw(T,ee,s),s=xe,H=ee;var Ae=s.updateQueue;if(Ae===null){var ke=new Set;ke.add(H),s.updateQueue=ke}else Ae.add(H);break e}else{if((s&1)===0){fw(T,ee,s),Km();break e}H=Error(n(426))}}else if(Et&&D.mode&1){var At=hw(w);if(At!==null){(At.flags&65536)===0&&(At.flags|=256),pw(At,w,D,T,s),am(Cs(H,D));break e}}T=H=Cs(H,D),Lt!==4&&(Lt=2),pu===null?pu=[T]:pu.push(T),T=w;do{switch(T.tag){case 3:T.flags|=65536,s&=-s,T.lanes|=s;var K=cw(T,H,s);Fx(T,K);break e;case 1:D=H;var $=T.type,J=T.stateNode;if((T.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(wi===null||!wi.has(J)))){T.flags|=65536,s&=-s,T.lanes|=s;var Te=dw(T,D,s);Fx(T,Te);break e}}T=T.return}while(T!==null)}qw(l)}catch(Ne){s=Ne,Ot===l&&l!==null&&(Ot=l=l.return);continue}break}while(!0)}function $w(){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=$w();(zt!==i||Yt!==s)&&(Wr=null,po(i,s));do try{gB();break}catch(E){jw(i,E)}while(!0);if(lm(),Ze=l,qc.current=f,Ot!==null)throw Error(n(261));return zt=null,Yt=0,Lt}function gB(){for(;Ot!==null;)Vw(Ot)}function EB(){for(;Ot!==null&&!j9();)Vw(Ot)}function Vw(i){var s=Gw(i.alternate,i,Rn);i.memoizedProps=i.pendingProps,s===null?qw(i):Ot=s,zm.current=null}function qw(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=lB(l,s,Rn),l!==null){Ot=l;return}}else{if(l=cB(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,yB(i,s,l,f)}finally{Yn.transition=E,nt=f}return null}function yB(i,s,l,f){do Ps();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(J9(i,T),i===zt&&(Ot=zt=null,Yt=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Gc||(Gc=!0,Xw(nc,function(){return Ps(),null})),T=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||T){T=Yn.transition,Yn.transition=null;var w=nt;nt=1;var D=Ze;Ze|=4,zm.current=null,fB(i,l),Dw(l,i),BF(Kp),lc=!!Xp,Kp=Xp=null,i.current=l,hB(l),$9(),Ze=D,nt=w,Yn.transition=T}else i.current=l;if(Gc&&(Gc=!1,Si=i,Xc=E),T=i.pendingLanes,T===0&&(wi=null),Y9(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&&Ps(),T=i.pendingLanes,(T&1)!==0?i===qm?mu++:(mu=0,qm=i):mu=0,Ti(),null}function Ps(){if(Si!==null){var i=R_(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,Se=i.current;Se!==null;){var T=Se,w=T.child;if((Se.flags&16)!==0){var D=T.deletions;if(D!==null){for(var H=0;H<D.length;H++){var ee=D[H];for(Se=ee;Se!==null;){var fe=Se;switch(fe.tag){case 0:case 11:case 15:fu(8,fe,T)}var me=fe.child;if(me!==null)me.return=fe,Se=me;else for(;Se!==null;){fe=Se;var ue=fe.sibling,xe=fe.return;if(Ow(fe),fe===ee){Se=null;break}if(ue!==null){ue.return=xe,Se=ue;break}Se=xe}}}var Ae=T.alternate;if(Ae!==null){var ke=Ae.child;if(ke!==null){Ae.child=null;do{var At=ke.sibling;ke.sibling=null,ke=At}while(ke!==null)}}Se=T}}if((T.subtreeFlags&2064)!==0&&w!==null)w.return=T,Se=w;else e:for(;Se!==null;){if(T=Se,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:fu(9,T,T.return)}var K=T.sibling;if(K!==null){K.return=T.return,Se=K;break e}Se=T.return}}var $=i.current;for(Se=$;Se!==null;){w=Se;var J=w.child;if((w.subtreeFlags&2064)!==0&&J!==null)J.return=w,Se=J;else e:for(w=$;Se!==null;){if(D=Se,(D.flags&2048)!==0)try{switch(D.tag){case 0:case 11:case 15:Vc(9,D)}}catch(Ne){_t(D,D.return,Ne)}if(D===w){Se=null;break e}var Te=D.sibling;if(Te!==null){Te.return=D.return,Se=Te;break e}Se=D.return}}if(Ze=E,Ti(),Cr&&typeof Cr.onPostCommitFiberRoot=="function")try{Cr.onPostCommitFiberRoot(rc,i)}catch(Ne){}f=!0}return f}finally{nt=l,Yn.transition=s}}return!1}function Yw(i,s,l){s=Cs(l,s),s=cw(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)Yw(i,i,l);else for(;s!==null;){if(s.tag===3){Yw(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=dw(s,i,1),s=_i(s,i,1),i=sn(),s!==null&&(Ua(s,1,i),bn(s,i));break}}s=s.return}}function TB(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 Ww(i,s){s===0&&((i.mode&1)===0?s=1:(s=oc,oc<<=1,(oc&130023424)===0&&(oc=4194304)));var l=sn();i=Vr(i,s),i!==null&&(Ua(i,s,l),bn(i,l))}function bB(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),Ww(i,l)}function _B(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),Ww(i,l)}var Gw;Gw=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,uB(i,s,l);yn=(i.flags&131072)!==0}else yn=!1,Et&&(s.flags&1048576)!==0&&Cx(s,Cc,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;jc(i,s),i=s.pendingProps;var E=Ts(s,Jt.current);vs(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=wB(f),i=ur(f,i),E){case 0:s=Om(null,s,f,i,l);break e;case 1:s=bw(null,s,f,i,l);break e;case 11:s=mw(null,s,f,i,l);break e;case 14:s=gw(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),bw(i,s,f,E,l);case 3:e:{if(_w(s),i===null)throw Error(n(387));f=s.pendingProps,T=s.memoizedState,E=T.element,Mx(i,s),Rc(s,f,null,l);var w=s.memoizedState;if(f=w.element,T.isDehydrated)if(T={element:f,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},s.updateQueue.baseState=T,s.memoizedState=T,s.flags&256){E=Cs(Error(n(423)),s),s=xw(i,s,f,l,E);break e}else if(f!==E){E=Cs(Error(n(424)),s),s=xw(i,s,f,l,E);break e}else for(In=gi(s.stateNode.containerInfo.firstChild),Pn=s,Et=!0,ar=null,l=Lx(s,null,f,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(xs(),f===E){s=Yr(i,s,l);break e}on(i,s,f,l)}s=s.child}return s;case 5:return Ux(s),i===null&&sm(s),f=s.type,E=s.pendingProps,T=i!==null?i.memoizedProps:null,w=E.children,Qp(f,E)?w=null:T!==null&&Qp(f,T)&&(s.flags|=32),Tw(i,s),on(i,s,w,l),s.child;case 6:return i===null&&sm(s),null;case 13:return ww(i,s,l);case 4:return pm(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=ws(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),mw(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,w=E.value,ct(Oc,f._currentValue),f._currentValue=w,T!==null)if(sr(T.value,w)){if(T.children===E.children&&!gn.current){s=Yr(i,s,l);break e}}else for(T=s.child,T!==null&&(T.return=s);T!==null;){var D=T.dependencies;if(D!==null){w=T.child;for(var H=D.firstContext;H!==null;){if(H.context===f){if(T.tag===1){H=qr(-1,l&-l),H.tag=2;var ee=T.updateQueue;if(ee!==null){ee=ee.shared;var fe=ee.pending;fe===null?H.next=H:(H.next=fe.next,fe.next=H),ee.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)w=T.type===s.type?null:T.child;else if(T.tag===18){if(w=T.return,w===null)throw Error(n(341));w.lanes|=l,D=w.alternate,D!==null&&(D.lanes|=l),dm(w,l,s),w=T.sibling}else w=T.child;if(w!==null)w.return=T;else for(w=T;w!==null;){if(w===s){w=null;break}if(T=w.sibling,T!==null){T.return=w.return,w=T;break}w=w.return}T=w}on(i,s,E.children,l),s=s.child}return s;case 9:return E=s.type,f=s.pendingProps.children,vs(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),gw(i,s,f,E,l);case 15:return Ew(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,vs(s,l),uw(s,f,E),Cm(s,f,E,l),Pm(null,s,f,!0,i,l);case 19:return vw(i,s,l);case 22:return yw(i,s,l)}throw Error(n(156,s.tag))};function Xw(i,s){return k_(i,s)}function xB(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 xB(i,s,l,f)}function Qm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function wB(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 w=2;if(f=i,typeof i=="function")Qm(i)&&(w=1);else if(typeof i=="string")w=5;else e:switch(i){case te:return go(l.children,E,T,s);case ce:w=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 se:return i=Wn(19,l,s,E),i.elementType=se,i.lanes=T,i;case Z:return ed(l,E,T,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case U:w=10;break e;case re:w=9;break e;case ae:w=11;break e;case be:w=14;break e;case we:w=16,f=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=Wn(w,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=Z,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 SB(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,w,D,H){return i=new SB(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 vB(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 Kw(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 Sx(i,l,s)}return s}function Qw(i,s,l,f,E,T,w,D,H){return i=e0(l,f,!0,i,E,T,w,D,H),i.context=Kw(null),l=i.current,f=sn(),E=vi(l),T=qr(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(),w=vi(E);return l=Kw(l),s.context===null?s.context=l:s.pendingContext=l,s=qr(T,w),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=_i(E,s,w),i!==null&&(dr(i,E,w,T),Ic(i,E,w)),w}function nd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function Jw(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){Jw(i,s),(i=i.alternate)&&Jw(i,s)}function AB(){return null}var Zw=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[Hr]=null}};function rd(i){this._internalRoot=i}rd.prototype.unstable_scheduleHydration=function(i){if(i){var s=M_();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&&U_(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 e2(){}function CB(i,s,l,f,E){if(E){if(typeof f=="function"){var T=f;f=function(){var ee=nd(w);T.call(ee)}}var w=Qw(s,f,i,0,null,!1,!1,"",e2);return i._reactRootContainer=w,i[Hr]=w.current,Za(i.nodeType===8?i.parentNode:i),ho(),w}for(;E=i.lastChild;)i.removeChild(E);if(typeof f=="function"){var D=f;f=function(){var ee=nd(H);D.call(ee)}}var H=e0(i,0,!1,null,null,!1,!1,"",e2);return i._reactRootContainer=H,i[Hr]=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 w=T;if(typeof E=="function"){var D=E;E=function(){var H=nd(w);D.call(H)}}td(s,w,i,E)}else w=CB(l,s,i,E,f);return nd(w)}L_=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&&(Os=vt()+500,Ti()))}break;case 13:ho(function(){var f=Vr(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=Vr(i,134217728);if(s!==null){var l=sn();dr(s,i,134217728,l)}t0(i,134217728)}},D_=function(i){if(i.tag===13){var s=vi(i),l=Vr(i,s);if(l!==null){var f=sn();dr(l,i,s,f)}t0(i,s)}},M_=function(){return nt},F_=function(i,s){var l=nt;try{return nt=i,s()}finally{nt=l}},bp=function(i,s,l){switch(s){case"input":if(ss(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),ss(f,E)}}}break;case"textarea":Jl(i,l);break;case"select":s=l.value,s!=null&&ui(i,!!l.multiple,s,!1)}},__=Gm,x_=ho;var kB={usingClientEntryPoint:!1,Events:[nu,Es,xc,T_,b_,Gm]},gu={findFiberByHostInstance:io,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},NB={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=A_(i),i===null?null:i.stateNode},findFiberByHostInstance:gu.findFiberByHostInstance||AB,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(NB),Cr=sd}catch(i){}}return cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kB,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 vB(i,s,null,l)},cn.createRoot=function(i,s){if(!r0(i))throw Error(n(299));var l=!1,f="",E=Zw;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[Hr]=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=A_(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="",w=Zw;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(T=l.identifierPrefix),l.onRecoverableError!==void 0&&(w=l.onRecoverableError)),s=Qw(s,null,i,1,l!=null?l:null,E,!1,T,w),i[Hr]=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[Hr]=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=GA(),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),XA=["attr","size","title"];function KA(e,t){if(e==null)return{};var n=QA(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 QA(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){JA(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 JA(e,t,n){return t=ZA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZA(e){var t=eC(e,"string");return typeof t=="symbol"?t:t+""}function eC(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function 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(tC,Gu({attr:Xu({},e.attr)},t),Vg(e.child))}function tC(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=KA(e,XA),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 nC(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 rC(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 iC(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}),oC="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",sC=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=st(),o=r==="messaging",a=o?"Open Commerce Client":"Open Copilot",u=o?_.jsx(iC,{className:z(t,`${L}-minimized-icon`)}):_.jsx("img",{src:(n==null?void 0:n.logoUrl)||oC,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})},aC=()=>{const{globalClassName:e,themeVariables:t}=st(),n=()=>{Yu(!1),Ir(!0)};return Ao.createPortal(_.jsx("div",{className:z(e,`${L}-minimized-container`),style:t,children:_.jsx(sC,{onClick:n})}),document.body)};function uC(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=V.useContext(cg);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const lC=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 cC(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 dC(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 fC(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 hC(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 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 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},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:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},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:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"},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:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"},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:"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}),TC=({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"})},bC=({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(TC,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function o7(){}function s7(){}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 _C=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wC={};function Xg(e,t){return(wC.jsx?xC:_C).test(e)}const SC=/[ \t\n\f\r]/g;function vC(e){return typeof e=="object"?e.type==="text"?Kg(e.value):!1:Kg(e)}function Kg(e){return e.replace(SC,"")===""}let Ys=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Ys.prototype.normal={},Ys.prototype.property={},Ys.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 Ys(n,r,t)}function Ws(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 AC=0;const je=Bi(),kt=Bi(),lf=Bi(),ge=Bi(),ut=Bi(),Co=Bi(),Sn=Bi();function Bi(){return Eu(2,++AC)}const cf=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,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[Ws(r)]=r,n[Ws(a.attribute)]=r}return new Ys(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 CC=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:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:ut,autoFocus:je,autoPlay:je,blocking:ut,capture:null,charSet:null,checked:je,cite:null,className:ut,cols:ge,colSpan:null,content:null,contentEditable:kt,controls:je,controlsList:ut,coords:ge|Co,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:lf,draggable:kt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,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:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:ut,itemRef:ut,itemScope:je,itemType:ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,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:ge,pattern:null,ping:ut,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:ut,required:je,reversed:je,rows:ge,rowSpan:ge,sandbox:ut,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,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:je,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:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:je,noHref:je,noShade:je,noWrap:je,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:je,disableRemotePlayback:je,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:t1}),kC=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:je,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()}}),NC={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"},OC=/[A-Z]/g,o1=/-[a-z]/g,PC=/^data[-\w.:]+$/i;function hf(e,t){const n=Ws(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"&&PC.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(o1,RC);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!o1.test(a)){let u=a.replace(OC,IC);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=ff}return new o(r,t)}function IC(e){return"-"+e.toLowerCase()}function RC(e){return e.charAt(1).toUpperCase()}const Qu=Qg([Zg,CC,n1,r1,i1],"html"),No=Qg([Zg,kC,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 LC(){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(S,A){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];A=A||{};var C=1,k=1;function I(de){var se=de.match(t);se&&(C+=se.length);var be=de.lastIndexOf(d);k=~be?de.length-be:k+de.length}function j(){var de={line:C,column:k};return function(se){return se.position=new Y(de),ce(),se}}function Y(de){this.start=de,this.end={line:C,column:k},this.source=A.source}Y.prototype.content=S;function F(de){var se=new Error(A.source+":"+C+":"+k+": "+de);if(se.reason=de,se.filename=A.source,se.line=C,se.column=k,se.source=S,!A.silent)throw se}function te(de){var se=de.exec(S);if(se){var be=se[0];return I(be),S=S.slice(be.length),se}}function ce(){te(n)}function pe(de){var se;for(de=de||[];se=U();)se!==!1&&de.push(se);return de}function U(){var de=j();if(!(h!=S.charAt(0)||p!=S.charAt(1))){for(var se=2;g!=S.charAt(se)&&(p!=S.charAt(se)||h!=S.charAt(se+1));)++se;if(se+=2,g===S.charAt(se-1))return F("End of comment missing");var be=S.slice(2,se-2);return k+=2,I(be),S=S.slice(se),k+=2,de({type:b,comment:be})}}function re(){var de=j(),se=te(r);if(se){if(U(),!te(o))return F("property missing ':'");var be=te(a),we=de({type:y,property:x(se[0].replace(e,g)),value:be?x(be[0].replace(e,g)):g});return te(u),we}}function ae(){var de=[];pe(de);for(var se;se=re();)se!==!1&&(de.push(se),pe(de));return de}return ce(),ae()};function x(S){return S?S.replace(c,g):g}return pf}var l1;function DC(){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(LC());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 Gs={},c1;function MC(){if(c1)return Gs;c1=1,Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.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 Gs.camelCase=d,Gs}var Xs,d1;function FC(){if(d1)return Xs;d1=1;var e=Xs&&Xs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(DC()),n=MC();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,Xs=r,Xs}var BC=FC();const UC=Ge(BC),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 Ks(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=Ks(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,HC=new Map,zC=/[A-Z]/g,jC=new Set(["table","tbody","thead","tfoot","tr"]),$C=new Set(["td","th"]),g1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function VC(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=JC(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=QC(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 qC(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return YC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return GC(e,t,n);if(t.type==="mdxjsEsm")return WC(e,t);if(t.type==="root")return XC(e,t,n);if(t.type==="text")return KC(e,t)}function qC(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=ZC(e,t);let c=yf(e,t);return jC.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!vC(d):!0})),y1(e,u,a,t),Ef(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function YC(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)}Qs(e,t.position)}function WC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Qs(e,t.position)}function GC(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=ek(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 XC(e,t,n){const r={};return Ef(r,yf(e,t)),e.create(t,e.Fragment,r,n)}function KC(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 QC(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 JC(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 ZC(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&gf.call(t.properties,o)){const a=tk(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&$C.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 ek(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 Qs(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 Qs(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:HC;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 tk(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:nk(e,String(n));return e.stylePropertyNameCase==="css"&&(o=rk(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?NC[r.property]||r.property:r.attribute,n]}}function nk(e,t){try{return UC(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);Qs(e)}function Qs(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 rk(e){const t={};let n;for(n in e)gf.call(e,n)&&(t[ik(n)]=e[n]);return t}function ik(e){let t=e.replace(zC,ok);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ok(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"]},sk={};function bf(e,t){const n=sk,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(ak(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 ak(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;)uk(t,e[n]);return t}function uk(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];lk(o[u],Array.isArray(c)?c:c?[c]:[])}}}function lk(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]/),ck=Qr(/[#-'*+\--9=?A-Z^-~]/);function Zu(e){return e!==null&&(e<32||e===127)}const xf=Qr(/\d/),dk=Qr(/[\dA-Fa-f]/),fk=Qr(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function ot(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 hk={tokenize:pk};function pk(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 mk={tokenize:gk},A1={tokenize:Ek};function gk(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&&k();const j=t.events.length;let Y=j,F;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){F=t.events[Y][1].end;break}C(r);let te=j;for(;te<t.events.length;)t.events[te][1].end=B({},F),te++;return vn(t.events,Y+1,0,t.events.slice(j)),t.events.length=te,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}),S(I)}function S(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),S)}function A(I,j){const Y=t.sliceStream(I);if(j&&Y.push(null),I.previous=a,a&&(a.next=I),a=I,o.defineSkip(I.start),o.write(Y),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 te=t.events.length;let ce=te,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=te;F<t.events.length;)t.events[F][1].end=B({},U),F++;vn(t.events,ce+1,0,t.events.slice(te)),t.events.length=F}}function C(I){let j=n.length;for(;j-- >I;){const Y=n[j];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=I}function k(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function Ek(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||ot(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:yk,tokenize:Tk};function yk(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 Tk(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 bk={name:"autolink",tokenize:_k};function _k(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):ck(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 Js={partial:!0,tokenize:xk};function xk(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:Sk},exit:vk,name:"blockQuote",tokenize:wk};function wk(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 Sk(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 vk(e){e.exit("blockQuote")}const N1={name:"characterEscape",tokenize:Ak};function Ak(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 fk(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const O1={name:"characterReference",tokenize:Ck};function Ck(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=dk,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:Nk},I1={concrete:!0,name:"codeFenced",tokenize:kk};function kk(e,t,n){const r=this,o={partial:!0,tokenize:Y};let a=0,u=0,c;return d;function d(F){return h(F)}function h(F){const te=r.events[r.events.length-1];return a=te&&te[1].type==="linePrefix"?te[2].sliceSerialize(te[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,S,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"}),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 S(F){return e.attempt(o,j,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,S,j)(F):(e.enter("codeFlowValue"),I(F))}function I(F){return F===null||Le(F)?(e.exit("codeFlowValue"),k(F)):(e.consume(F),I)}function j(F){return e.exit("codeFenced"),t(F)}function Y(F,te,ce){let pe=0;return U;function U(be){return F.enter("lineEnding"),F.consume(be),F.exit("lineEnding"),re}function re(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,se,"whitespace")(be):se(be)):ce(be)}function se(be){return be===null||Le(be)?(F.exit("codeFencedFence"),te(be)):ce(be)}}}function Nk(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:Pk},Ok={partial:!0,tokenize:Ik};function Pk(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(Ok,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 Ik(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 Rk={name:"codeText",previous:Dk,resolve:Lk,tokenize:Mk};function Lk(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 Dk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Mk(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 Fk{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&&Zs(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),Zs(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Zs(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);Zs(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Zs(this.left,n.reverse())}}}function Zs(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 Fk(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,Bk(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 Bk(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,S=0;const A=[S];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&&(S=b+1,A.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):A.pop(),b=A.length;b--;){const 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 Uk={resolve:zk,tokenize:jk},Hk={partial:!0,tokenize:$k};function zk(e){return R1(e),e}function jk(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(Hk,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 $k(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"}),S(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 S(C){return!p&&(C===null||C===41||ot(C))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(C)):p<h&&C===40?(e.consume(C),p++,S):C===41?(e.consume(C),p--,S):C===null||C===32||C===40||Zu(C)?n(C):(e.consume(C),C===92?A:S)}function A(C){return C===40||C===41||C===92?(e.consume(C),S):S(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 ea(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 Vk={name:"definition",tokenize:Yk},qk={partial:!0,tokenize:Wk};function Yk(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 ot(y)?ea(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(qk,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 Wk(e,t,n){return r;function r(c){return ot(c)?ea(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 Gk={name:"hardBreakEscape",tokenize:Xk};function Xk(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 Kk={name:"headingAtx",resolve:Qk,tokenize:Jk};function Qk(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 Jk(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||ot(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||ot(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const Zk=["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"],eN={concrete:!0,name:"htmlFlow",resolveTo:rN,tokenize:iN},tN={partial:!0,tokenize:sN},nN={partial:!0,tokenize:oN};function rN(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 iN(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,S):O===63?(e.consume(O),o=3,r.interrupt?t:v):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:v):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:v):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 S(O){return rn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function A(O){if(O===null||O===47||O===62||ot(O)){const ye=O===47,Oe=u.toLowerCase();return!ye&&!a&&F1.includes(Oe)?(o=1,r.interrupt?t(O):ae(O)):Zk.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),j):Xe(O)?(e.consume(O),I):U(O)}function j(O){return O===45||O===46||O===58||O===95||Xt(O)?(e.consume(O),j):Y(O)}function Y(O){return O===61?(e.consume(O),F):Xe(O)?(e.consume(O),Y):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,te):Xe(O)?(e.consume(O),F):ce(O)}function te(O){return O===d?(e.consume(O),d=null,pe):O===null||Le(O)?n(O):(e.consume(O),te)}function ce(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||ot(O)?Y(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),re):n(O)}function re(O){return O===null||Le(O)?ae(O):Xe(O)?(e.consume(O),re):n(O)}function ae(O){return O===45&&o===2?(e.consume(O),we):O===60&&o===1?(e.consume(O),Z):O===62&&o===4?(e.consume(O),P):O===63&&o===3?(e.consume(O),v):O===93&&o===5?(e.consume(O),W):Le(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(tN,G,de)(O)):O===null||Le(O)?(e.exit("htmlFlowData"),de(O)):(e.consume(O),ae)}function de(O){return e.check(nN,se,G)(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"),ae(O))}function we(O){return O===45?(e.consume(O),v):ae(O)}function Z(O){return O===47?(e.consume(O),u="",q):ae(O)}function q(O){if(O===62){const ye=u.toLowerCase();return F1.includes(ye)?(e.consume(O),P):ae(O)}return rn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),q):ae(O)}function W(O){return O===93?(e.consume(O),v):ae(O)}function v(O){return O===62?(e.consume(O),P):O===45&&o===2?(e.consume(O),v):ae(O)}function P(O){return O===null||Le(O)?(e.exit("htmlFlowData"),G(O)):(e.consume(O),P)}function G(O){return e.exit("htmlFlow"),t(O)}}function oN(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 sN(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Js,t,n)}}const aN={name:"htmlText",tokenize:uN};function uN(e,t,n){const r=this;let o,a,u;return c;function c(v){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(v),d}function d(v){return v===33?(e.consume(v),h):v===47?(e.consume(v),Y):v===63?(e.consume(v),I):rn(v)?(e.consume(v),ce):n(v)}function h(v){return v===45?(e.consume(v),p):v===91?(e.consume(v),a=0,x):rn(v)?(e.consume(v),k):n(v)}function p(v){return v===45?(e.consume(v),y):n(v)}function g(v){return v===null?n(v):v===45?(e.consume(v),b):Le(v)?(u=g,Z(v)):(e.consume(v),g)}function b(v){return v===45?(e.consume(v),y):g(v)}function y(v){return v===62?we(v):v===45?b(v):g(v)}function x(v){const P="CDATA[";return v===P.charCodeAt(a++)?(e.consume(v),a===P.length?S:x):n(v)}function S(v){return v===null?n(v):v===93?(e.consume(v),A):Le(v)?(u=S,Z(v)):(e.consume(v),S)}function A(v){return v===93?(e.consume(v),C):S(v)}function C(v){return v===62?we(v):v===93?(e.consume(v),C):S(v)}function k(v){return v===null||v===62?we(v):Le(v)?(u=k,Z(v)):(e.consume(v),k)}function I(v){return v===null?n(v):v===63?(e.consume(v),j):Le(v)?(u=I,Z(v)):(e.consume(v),I)}function j(v){return v===62?we(v):I(v)}function Y(v){return rn(v)?(e.consume(v),F):n(v)}function F(v){return v===45||Xt(v)?(e.consume(v),F):te(v)}function te(v){return Le(v)?(u=te,Z(v)):Xe(v)?(e.consume(v),te):we(v)}function ce(v){return v===45||Xt(v)?(e.consume(v),ce):v===47||v===62||ot(v)?pe(v):n(v)}function pe(v){return v===47?(e.consume(v),we):v===58||v===95||rn(v)?(e.consume(v),U):Le(v)?(u=pe,Z(v)):Xe(v)?(e.consume(v),pe):we(v)}function U(v){return v===45||v===46||v===58||v===95||Xt(v)?(e.consume(v),U):re(v)}function re(v){return v===61?(e.consume(v),ae):Le(v)?(u=re,Z(v)):Xe(v)?(e.consume(v),re):pe(v)}function ae(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),o=v,de):Le(v)?(u=ae,Z(v)):Xe(v)?(e.consume(v),ae):(e.consume(v),se)}function de(v){return v===o?(e.consume(v),o=void 0,be):v===null?n(v):Le(v)?(u=de,Z(v)):(e.consume(v),de)}function se(v){return v===null||v===34||v===39||v===60||v===61||v===96?n(v):v===47||v===62||ot(v)?pe(v):(e.consume(v),se)}function be(v){return v===47||v===62||ot(v)?pe(v):n(v)}function we(v){return v===62?(e.consume(v),e.exit("htmlTextData"),e.exit("htmlText"),t):n(v)}function Z(v){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),q}function q(v){return Xe(v)?Qe(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):W(v)}function W(v){return e.enter("htmlTextData"),u(v)}}const vf={name:"labelEnd",resolveAll:fN,resolveTo:hN,tokenize:pN},lN={tokenize:mN},cN={tokenize:gN},dN={tokenize:EN};function fN(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 hN(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 pN(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(lN,p,u?p:g)(b):b===91?e.attempt(cN,p,u?h:g)(b):u?p(b):g(b)}function h(b){return e.attempt(dN,p,g)(b)}function p(b){return t(b)}function g(b){return a._balanced=!0,n(b)}}function mN(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 ot(g)?ea(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 ot(g)?ea(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 ot(g)?ea(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 gN(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 EN(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 yN={name:"labelStartImage",resolveAll:vf.resolveAll,tokenize:TN};function TN(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 bN={name:"labelStartLink",resolveAll:vf.resolveAll,tokenize:_N};function _N(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:xN};function xN(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:wN};function wN(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:CN},exit:NN,name:"list",tokenize:AN},SN={partial:!0,tokenize:ON},vN={partial:!0,tokenize:kN};function AN(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(Js,r.interrupt?n:p,e.attempt(SN,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 CN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Js,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(vN,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 kN(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 NN(e){e.exit(this.containerState.type)}function ON(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:PN,tokenize:IN};function PN(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 IN(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 RN={tokenize:LN};function LN(e){const t=this,n=e.attempt(Js,r,e.attempt(this.parser.constructs.flowInitial,o,Qe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Uk,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 DN={resolveAll:H1()},MN=U1("string"),FN=U1("text");function U1(e){return{resolveAll:H1(e==="text"?BN: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 BN(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 UN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Vk},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:Kk,42:nl,45:[B1,nl],60:eN,61:B1,95:nl,96:I1,126:I1},flowInitial:{[-2]:Sf,[-1]:Sf,32:Sf},insideSpan:{null:[wf,DN]},string:{38:O1,92:N1},text:{[-5]:Af,[-4]:Af,[-3]:Af,33:yN,38:O1,42:wf,60:[bk,aN],91:bN,92:[Gk,N1],93:vf,95:wf,96:Rk}},Symbol.toStringTag,{value:"Module"}));function HN(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:te(Y),check:te(F),consume:k,enter:I,exit:j,interrupt:te(F,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,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(re){return u=Fn(u,re),A(),u[u.length-1]!==null?[]:(ce(t,0),h.events=tl(a,h.events,h),h.events)}function b(re,ae){return jN(y(re),ae)}function y(re){return zN(u,re)}function x(){const{_bufferIndex:re,_index:ae,line:de,column:se,offset:be}=r;return{_bufferIndex:re,_index:ae,line:de,column:se,offset:be}}function S(re){o[re.line]=re.column,U()}function A(){let re;for(;r._index<u.length;){const ae=u[r._index];if(typeof ae=="string")for(re=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===re&&r._bufferIndex<ae.length;)C(ae.charCodeAt(r._bufferIndex));else C(ae)}}function C(re){p=p(re)}function k(re){Le(re)?(r.line++,r.column=1,r.offset+=re===-3?2:1,U()):re!==-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=re}function I(re,ae){const de=ae||{};return de.type=re,de.start=x(),h.events.push(["enter",de,h]),c.push(de),de}function j(re){const ae=c.pop();return ae.end=x(),h.events.push(["exit",ae,h]),ae}function Y(re,ae){ce(re,ae.from)}function F(re,ae){ae.restore()}function te(re,ae){return de;function de(se,be,we){let Z,q,W,v;return Array.isArray(se)?G(se):"tokenize"in se?G([se]):P(se);function P(Ie){return He;function He(ve){const Ye=ve!==null&&Ie[ve],dt=ve!==null&&Ie.null,mn=[...Array.isArray(Ye)?Ye:Ye?[Ye]:[],...Array.isArray(dt)?dt:dt?[dt]:[]];return G(mn)(ve)}}function G(Ie){return Z=Ie,q=0,Ie.length===0?we:O(Ie[q])}function O(Ie){return He;function He(ve){return v=pe(),W=Ie,Ie.partial||(h.currentConstruct=Ie),Ie.name&&h.parser.constructs.disable.null.includes(Ie.name)?Oe():Ie.tokenize.call(ae?Object.assign(Object.create(h),ae):h,d,ye,Oe)(ve)}}function ye(Ie){return re(W,v),be}function Oe(Ie){return v.restore(),++q<Z.length?O(Z[q]):we}}}function ce(re,ae){re.resolveAll&&!a.includes(re)&&a.push(re),re.resolve&&vn(h.events,ae,h.events.length-ae,re.resolve(h.events.slice(ae),h)),re.resolveTo&&(h.events=re.resolveTo(h.events,h))}function pe(){const re=x(),ae=h.previous,de=h.currentConstruct,se=h.events.length,be=Array.from(c);return{from:se,restore:we};function we(){r=re,h.previous=ae,h.currentConstruct=de,h.events.length=se,c=be,U()}}function U(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function zN(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 jN(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 Ik(e){const r={constructs:Ig([Ck,...(e||{}).extensions||[]]),content:o(tC),defined:[],document:o(rC),flow:o(xk),lazy:{},string:o(vk),text:o(Sk)};return r;function o(a){return u;function u(c){return kk(r,a,c)}}}function Rk(e){for(;!Hg(e););return e}const Gg=/[\0\t\n\r]/g;function Pk(){let e=1,t="",n=!0,r;return o;function o(a,u,c){const d=[];let h,p,g,T,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(Gg.lastIndex=g,h=Gg.exec(a),T=h&&h.index!==void 0?h.index:a.length,y=a.charCodeAt(T),!h){t=a.slice(g);break}if(y===10&&g===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),g<T&&(d.push(a.slice(g,T)),e+=T-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=T+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const Lk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Dk(e){return e.replace(Lk,Mk)}function Mk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return Rg(n.slice(a?2:1),a?16:10)}return jd(n)||e}const Kg={}.hasOwnProperty;function Fk(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Bk(n)(Rk(Ik(n).document().write(Pk()(e,t,!0))))}function Bk(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Qo),autolinkProtocol:de,autolinkEmail:de,atxHeading:a(Ta),blockQuote:a(ut),characterEscape:de,characterReference:de,codeFenced:a(pn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(pn,u),codeText:a(Wi,u),codeTextData:de,data:de,codeFlowValue:de,definition:a(ei),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Jn),hardBreakEscape:a(xa),hardBreakTrailing:a(xa),htmlFlow:a(Ko,u),htmlFlowData:de,htmlText:a(Ko,u),htmlTextData:de,image:a(Ol),label:u,link:a(Qo),listItem:a(ni),listItemValue:T,listOrdered:a(ti,g),listUnordered:a(ti),paragraph:a(wa),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Ta),strong:a(Il),thematicBreak:a(Pl)},exit:{atxHeading:d(),atxHeadingSequence:Y,autolink:d(),autolinkEmail:qe,autolinkProtocol:ve,blockQuote:d(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:Oe,characterReferenceMarkerNumeric:Oe,characterReferenceValue:Re,characterReference:He,codeFenced:d(A),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:w,codeFlowValue:z,codeIndented:d(C),codeText:d(Te),codeTextData:z,data:z,definition:d(),definitionDestinationString:U,definitionLabelString:k,definitionTitleString:R,emphasis:d(),hardBreakEscape:d(he),hardBreakTrailing:d(he),htmlFlow:d(ae),htmlFlowData:z,htmlText:d(se),htmlTextData:z,image:d(ee),label:q,labelText:V,lineEnding:oe,link:d(Ce),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:be,resourceDestinationString:S,resourceTitleString:I,resource:W,setextHeading:d(ce),setextHeadingLineSequence:X,setextHeadingText:F,strong:d(),thematicBreak:d()}};Qg(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(re){let xe={type:"root",children:[]};const Be={stack:[xe],tokenStack:[],config:t,enter:c,exit:h,buffer:u,resume:p,data:n},Ye=[];let Xe=-1;for(;++Xe<re.length;)if(re[Xe][1].type==="listOrdered"||re[Xe][1].type==="listUnordered")if(re[Xe][0]==="enter")Ye.push(Xe);else{const jt=Ye.pop();Xe=o(re,jt,Xe)}for(Xe=-1;++Xe<re.length;){const jt=t[re[Xe][0]];Kg.call(jt,re[Xe][1].type)&&jt[re[Xe][1].type].call(Object.assign({sliceSerialize:re[Xe][2].sliceSerialize},Be),re[Xe][1])}if(Be.tokenStack.length>0){const jt=Be.tokenStack[Be.tokenStack.length-1];(jt[1]||Xg).call(Be,void 0,jt[0])}for(xe.position={start:Wr(re.length>0?re[0][1].start:{line:1,column:1,offset:0}),end:Wr(re.length>0?re[re.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<t.transforms.length;)xe=t.transforms[Xe](xe)||xe;return xe}function o(re,xe,Be){let Ye=xe-1,Xe=-1,jt=!1,Lr,Mn,ri,Gi;for(;++Ye<=Be;){const $t=re[Ye];switch($t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{$t[0]==="enter"?Xe++:Xe--,Gi=void 0;break}case"lineEndingBlank":{$t[0]==="enter"&&(Lr&&!Gi&&!Xe&&!ri&&(ri=Ye),Gi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Gi=void 0}if(!Xe&&$t[0]==="enter"&&$t[1].type==="listItemPrefix"||Xe===-1&&$t[0]==="exit"&&($t[1].type==="listUnordered"||$t[1].type==="listOrdered")){if(Lr){let xr=Ye;for(Mn=void 0;xr--;){const Sn=re[xr];if(Sn[1].type==="lineEnding"||Sn[1].type==="lineEndingBlank"){if(Sn[0]==="exit")continue;Mn&&(re[Mn][1].type="lineEndingBlank",jt=!0),Sn[1].type="lineEnding",Mn=xr}else if(!(Sn[1].type==="linePrefix"||Sn[1].type==="blockQuotePrefix"||Sn[1].type==="blockQuotePrefixWhitespace"||Sn[1].type==="blockQuoteMarker"||Sn[1].type==="listItemIndent"))break}ri&&(!Mn||ri<Mn)&&(Lr._spread=!0),Lr.end=Object.assign({},Mn?re[Mn][1].start:$t[1].end),re.splice(Mn||Ye,0,["exit",Lr,$t[2]]),Ye++,Be++}if($t[1].type==="listItemPrefix"){const xr={type:"listItem",_spread:!1,start:Object.assign({},$t[1].start),end:void 0};Lr=xr,re.splice(Ye,0,["enter",xr,$t[2]]),Ye++,Be++,ri=void 0,Gi=!0}}}return re[xe][1]._spread=jt,Be}function a(re,xe){return Be;function Be(Ye){c.call(this,re(Ye),Ye),xe&&xe.call(this,Ye)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(re,xe,Be){this.stack[this.stack.length-1].children.push(re),this.stack.push(re),this.tokenStack.push([xe,Be||void 0]),re.position={start:Wr(xe.start),end:void 0}}function d(re){return xe;function xe(Be){re&&re.call(this,Be),h.call(this,Be)}}function h(re,xe){const Be=this.stack.pop(),Ye=this.tokenStack.pop();if(Ye)Ye[0].type!==re.type&&(xe?xe.call(this,re,Ye[0]):(Ye[1]||Xg).call(this,re,Ye[0]));else throw new Error("Cannot close `"+re.type+"` ("+Bs({start:re.start,end:re.end})+"): it’s not open");Be.position.end=Wr(re.end)}function p(){return zd(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function T(re){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(re),10),this.data.expectingFirstListItemValue=void 0}}function y(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=re}function w(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=re}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.value=re.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.value=re.replace(/(\r?\n|\r)$/g,"")}function k(re){const xe=this.resume(),Be=this.stack[this.stack.length-1];Be.label=xe,Be.identifier=Wn(this.sliceSerialize(re)).toLowerCase()}function R(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.title=re}function U(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.url=re}function Y(re){const xe=this.stack[this.stack.length-1];if(!xe.depth){const Be=this.sliceSerialize(re).length;xe.depth=Be}}function F(){this.data.setextHeadingSlurpLineEnding=!0}function X(re){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(re).codePointAt(0)===61?1:2}function ce(){this.data.setextHeadingSlurpLineEnding=void 0}function de(re){const Be=this.stack[this.stack.length-1].children;let Ye=Be[Be.length-1];(!Ye||Ye.type!=="text")&&(Ye=Rl(),Ye.position={start:Wr(re.start),end:void 0},Be.push(Ye)),this.stack.push(Ye)}function z(re){const xe=this.stack.pop();xe.value+=this.sliceSerialize(re),xe.position.end=Wr(re.end)}function oe(re){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Be=xe.children[xe.children.length-1];Be.position.end=Wr(re.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(xe.type)&&(de.call(this,re),z.call(this,re))}function he(){this.data.atHardBreak=!0}function ae(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.value=re}function se(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.value=re}function Te(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.value=re}function Ce(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=xe,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function ee(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=xe,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function V(re){const xe=this.sliceSerialize(re),Be=this.stack[this.stack.length-2];Be.label=Dk(xe),Be.identifier=Wn(xe).toLowerCase()}function q(){const re=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 Ye=re.children;Be.children=Ye}else Be.alt=xe}function S(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.url=re}function I(){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.title=re}function W(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function be(re){const xe=this.resume(),Be=this.stack[this.stack.length-1];Be.label=xe,Be.identifier=Wn(this.sliceSerialize(re)).toLowerCase(),this.data.referenceType="full"}function Oe(re){this.data.characterReferenceType=re.type}function Re(re){const xe=this.sliceSerialize(re),Be=this.data.characterReferenceType;let Ye;Be?(Ye=Rg(xe,Be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ye=jd(xe);const Xe=this.stack[this.stack.length-1];Xe.value+=Ye}function He(re){const xe=this.stack.pop();xe.position.end=Wr(re.end)}function ve(re){z.call(this,re);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(re)}function qe(re){z.call(this,re);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(re)}function ut(){return{type:"blockquote",children:[]}}function pn(){return{type:"code",lang:null,meta:null,value:""}}function Wi(){return{type:"inlineCode",value:""}}function ei(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Jn(){return{type:"emphasis",children:[]}}function Ta(){return{type:"heading",depth:0,children:[]}}function xa(){return{type:"break"}}function Ko(){return{type:"html",value:""}}function Ol(){return{type:"image",title:null,url:"",alt:null}}function Qo(){return{type:"link",title:null,url:"",children:[]}}function ti(re){return{type:"list",ordered:re.type==="listOrdered",start:null,spread:re._spread,children:[]}}function ni(re){return{type:"listItem",spread:re._spread,checked:null,children:[]}}function wa(){return{type:"paragraph",children:[]}}function Il(){return{type:"strong",children:[]}}function Rl(){return{type:"text",value:""}}function Pl(){return{type:"thematicBreak"}}}function Wr(e){return{line:e.line,column:e.column,offset:e.offset}}function Qg(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Qg(e,r):Uk(e,r)}}function Uk(e,t){let n;for(n in t)if(Kg.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 Xg(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Bs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Bs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Bs({start:t.start,end:t.end})+") is still open")}function Hk(e){const t=this;t.parser=n;function n(r){return Fk(r,ie(B(B({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function zk(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 jk(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 $N(e){const r={constructs:S1([UN,...(e||{}).extensions||[]]),content:o(hk),defined:[],document:o(mk),flow:o(RN),lazy:{},string:o(MN),text:o(FN)};return r;function o(a){return u;function u(c){return HN(r,a,c)}}}function VN(e){for(;!R1(e););return e}const z1=/[\0\t\n\r]/g;function qN(){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 YN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function WN(e){return e.replace(YN,GN)}function GN(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 XN(e,t,n){return typeof t!="string"&&(n=t,t=void 0),KN(n)(VN($N(n).document().write(qN()(e,t,!0))))}function KN(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(as),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(ss,u),htmlFlowData:pe,htmlText:a(ss,u),htmlTextData:pe,image:a(Kl),label:u,link:a(as),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:Y,autolink:d(),autolinkEmail:Ye,autolinkProtocol:ve,blockQuote:d(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:Oe,characterReferenceMarkerNumeric:Oe,characterReferenceValue:Ie,characterReference:He,codeFenced:d(A),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:U,codeIndented:d(C),codeText:d(be),codeTextData:U,data:U,definition:d(),definitionDestinationString:j,definitionLabelString:k,definitionTitleString:I,emphasis:d(),hardBreakEscape:d(ae),hardBreakTrailing:d(ae),htmlFlow:d(de),htmlFlowData:U,htmlText:d(se),htmlTextData:U,image:d(Z),label:W,labelText:q,lineEnding:re,link:d(we),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ye,resourceDestinationString:v,resourceTitleString:P,resource:G,setextHeading:d(ce),setextHeadingLineSequence:te,setextHeadingText:F,strong:d(),thematicBreak:d()}};$1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ie){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<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]];j1.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]||V1).call(Be,void 0,$t[0])}for(_e.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;)_e=t.transforms[Je](_e)||_e;return _e}function o(ie,_e,Be){let We=_e-1,Je=-1,$t=!1,Ur,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"&&(Ur&&!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(Ur){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)&&(Ur._spread=!0),Ur.end=Object.assign({},zn?ie[zn][1].start:Vt[1].end),ie.splice(zn||We,0,["exit",Ur,Vt[2]]),We++,Be++}if(Vt[1].type==="listItemPrefix"){const Ar={type:"listItem",_spread:!1,start:Object.assign({},Vt[1].start),end:void 0};Ur=Ar,ie.splice(We,0,["enter",Ar,Vt[2]]),We++,Be++,li=void 0,no=!0}}}return ie[_e][1]._spread=$t,Be}function a(ie,_e){return Be;function Be(We){c.call(this,ie(We),We),_e&&_e.call(this,We)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(ie,_e,Be){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([_e,Be||void 0]),ie.position={start:Jr(_e.start),end:void 0}}function d(ie){return _e;function _e(Be){ie&&ie.call(this,Be),h.call(this,Be)}}function h(ie,_e){const Be=this.stack.pop(),We=this.tokenStack.pop();if(We)We[0].type!==ie.type&&(_e?_e.call(this,ie,We[0]):(We[1]||V1).call(this,ie,We[0]));else throw new Error("Cannot close `"+ie.type+"` ("+Ks({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 _e=this.stack[this.stack.length-2];_e.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ie=this.resume(),_e=this.stack[this.stack.length-1];_e.lang=ie}function x(){const ie=this.resume(),_e=this.stack[this.stack.length-1];_e.meta=ie}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const ie=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const ie=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ie.replace(/(\r?\n|\r)$/g,"")}function k(ie){const _e=this.resume(),Be=this.stack[this.stack.length-1];Be.label=_e,Be.identifier=Zn(this.sliceSerialize(ie)).toLowerCase()}function I(){const ie=this.resume(),_e=this.stack[this.stack.length-1];_e.title=ie}function j(){const ie=this.resume(),_e=this.stack[this.stack.length-1];_e.url=ie}function Y(ie){const _e=this.stack[this.stack.length-1];if(!_e.depth){const Be=this.sliceSerialize(ie).length;_e.depth=Be}}function F(){this.data.setextHeadingSlurpLineEnding=!0}function te(ie){const _e=this.stack[this.stack.length-1];_e.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function ce(){this.data.setextHeadingSlurpLineEnding=void 0}function pe(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 U(ie){const _e=this.stack.pop();_e.value+=this.sliceSerialize(ie),_e.position.end=Jr(ie.end)}function re(ie){const _e=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Be=_e.children[_e.children.length-1];Be.position.end=Jr(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_e.type)&&(pe.call(this,ie),U.call(this,ie))}function ae(){this.data.atHardBreak=!0}function de(){const ie=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ie}function se(){const ie=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ie}function be(){const ie=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ie}function we(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=_e,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function Z(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=_e,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function q(ie){const _e=this.sliceSerialize(ie),Be=this.stack[this.stack.length-2];Be.label=WN(_e),Be.identifier=Zn(_e).toLowerCase()}function W(){const ie=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=ie.children;Be.children=We}else Be.alt=_e}function v(){const ie=this.resume(),_e=this.stack[this.stack.length-1];_e.url=ie}function P(){const ie=this.resume(),_e=this.stack[this.stack.length-1];_e.title=ie}function G(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function ye(ie){const _e=this.resume(),Be=this.stack[this.stack.length-1];Be.label=_e,Be.identifier=Zn(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function Oe(ie){this.data.characterReferenceType=ie.type}function Ie(ie){const _e=this.sliceSerialize(ie),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(ie){const _e=this.stack.pop();_e.position.end=Jr(ie.end)}function ve(ie){U.call(this,ie);const _e=this.stack[this.stack.length-1];_e.url=this.sliceSerialize(ie)}function Ye(ie){U.call(this,ie);const _e=this.stack[this.stack.length-1];_e.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 ss(){return{type:"html",value:""}}function Kl(){return{type:"image",title:null,url:"",alt:null}}function as(){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 $1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?$1(e,r):QN(e,r)}}function QN(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+"` ("+Ks({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ks({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ks({start:t.start,end:t.end})+") is still open")}function JN(e){const t=this;t.parser=n;function n(r){return XN(r,oe(B(B({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function ZN(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 e3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
27
|
+
`}]}function t3(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 n3(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function r3(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function i3(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 o3(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 s3(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function q1(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 a3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return q1(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 u3(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 l3(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 c3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return q1(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 d3(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 f3(e,t,n){const r=e.all(t),o=n?h3(n):Y1(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 h3(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=Y1(n[r])}return t}function Y1(e){const t=e.spread;return t==null?e.children.length>1:t}function p3(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 m3(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function g3(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function E3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function y3(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 T3(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 x={type:"element",tagName:a,properties:b,children:[]};g&&(x.children=e.all(g),e.patch(g,x),x=e.applyData(g,x)),h.push(x)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function b3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const W1=9,G1=32;function _3(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(X1(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(X1(t.slice(o),o>0,!1)),a.join("")}function X1(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===W1||a===G1;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===W1||a===G1;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function x3(e,t){const n={type:"text",value:_3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function w3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const S3={blockquote:ZN,break:e3,code:t3,delete:n3,emphasis:r3,footnoteReference:i3,heading:o3,html:s3,imageReference:a3,image:u3,inlineCode:l3,linkReference:c3,link:d3,listItem:f3,list:p3,paragraph:m3,root:g3,strong:E3,table:y3,tableCell:b3,tableRow:T3,text:x3,thematicBreak:w3,toml:rl,yaml:rl,definition:rl,footnoteDefinition:rl};function rl(){}const K1=-1,il=0,ta=1,ol=2,Cf=3,kf=4,Nf=5,Of=6,Q1=7,J1=8,Z1=typeof self=="object"?self:globalThis,v3=(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 K1:return n(u,o);case ta:{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 Cf:return n(new Date(u),o);case kf:{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 Q1:{const{name:c,message:d}=u;return n(new Z1[c](d),o)}case J1: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 Z1[a](u),o)};return r},eE=e=>v3(new Map,e)(0),Ro="",{toString:A3}={},{keys:C3}=Object,na=e=>{const t=typeof e;if(t!=="object"||!e)return[il,t];const n=A3.call(e).slice(8,-1);switch(n){case"Array":return[ta,Ro];case"Object":return[ol,Ro];case"Date":return[Cf,Ro];case"RegExp":return[kf,Ro];case"Map":return[Nf,Ro];case"Set":return[Of,Ro];case"DataView":return[ta,n]}return n.includes("Array")?[ta,n]:n.includes("Error")?[Q1,n]:[ol,n]},sl=([e,t])=>e===il&&(t==="function"||t==="symbol"),k3=(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]=na(u);switch(c){case il:{let p=u;switch(d){case"bigint":c=J1,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([K1],u)}return o([c,p],u)}case ta:{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 C3(u))(e||!sl(na(u[b])))&&p.push([a(b),a(u[b])]);return g}case Cf:return o([c,u.toISOString()],u);case kf:{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(na(b))||sl(na(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(na(b)))&&p.push(a(b));return g}}const{message:h}=u;return o([c,{name:d,message:h}],u)};return a},tE=(e,{json:t,lossy:n}={})=>{const r=[];return k3(!(t||n),!!t,new Map,r)(e),r},Hi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?eE(tE(e,t)):structuredClone(e):(e,t)=>eE(tE(e,t));function N3(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 O3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function P3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||N3,r=e.options.footnoteBackLabel||O3,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 x=[],S=e.footnoteCounts.get(g);for(;S!==void 0&&++y<=S;){x.length>0&&x.push({type:"text",value:" "});let k=typeof n=="string"?n:n(d,y);typeof k=="string"&&(k={type:"text",value:k}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const k=A.children[A.children.length-1];k&&k.type==="text"?k.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...x)}else p.push(...x);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(p,!0)};e.patch(h,C),c.push(C)}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
|
|
32
|
+
`}]}}const al=(function(e){if(e==null)return D3;if(typeof e=="function")return ul(e);if(typeof e=="object")return Array.isArray(e)?I3(e):R3(e);if(typeof e=="string")return L3(e);throw new Error("Expected function, string, or object as test")});function I3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=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 R3(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 L3(e){return ul(t);function t(n){return n&&n.type===e}}function ul(e){return t;function t(n,r,o){return!!(M3(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function D3(){return!0}function M3(e){return e!==null&&typeof e=="object"&&"type"in e}function g7(e){return e}const nE=[],F3=!0,Pf=!1,B3="skip";function rE(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=nE,x,S,A;if((!t||a(d,h,p[p.length-1]||void 0))&&(y=U3(n(d,p)),y[0]===Pf))return y;if("children"in d&&d.children){const C=d;if(C.children&&y[0]!==B3)for(S=(r?C.children.length:-1)+u,A=p.concat(C);S>-1&&S<C.children.length;){const k=C.children[S];if(x=c(k,S,A)(),x[0]===Pf)return x;S=typeof x[1]=="number"?x[1]:S+u}}return y}}}function U3(e){return Array.isArray(e)?e:typeof e=="number"?[F3,e]:e==null?nE:[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),rE(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,H3={};function z3(e,t){const n=t||H3,r=new Map,o=new Map,a=new Map,u=B(B({},S3),n.handlers),c={all:h,applyData:$3,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:j3,wrap:q3};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 S=p,{children:A}=S,C=an(S,["children"]),k=Hi(C);return k.children=c.all(p),k}return Hi(p)}return(c.options.unknownHandler||V3)(c,p,g)}function h(p){const g=[];if("children"in p){const b=p.children;let y=-1;for(;++y<b.length;){const x=c.one(b[y],p);if(x){if(y&&b[y-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=iE(x.value)),!Array.isArray(x)&&x.type==="element")){const S=x.children[0];S&&S.type==="text"&&(S.value=iE(S.value))}Array.isArray(x)?g.push(...x):g.push(x)}}}return g}}function j3(e,t){e.position&&(t.position=h1(e))}function $3(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 V3(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 q3(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 L3(e,t){return e&&"run"in e?function(n,r){return $e(this,null,function*(){const o=f1(n,B({file:r},t));yield e.run(o,r)})}:function(n,r){return f1(n,B({file:r},e||t))}}function h1(e){if(e)throw e}var ef,p1;function D3(){if(p1)return ef;p1=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 T;for(T in h);return typeof T=="undefined"||e.call(h,T)},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 ef=function d(){var h,p,g,T,y,w,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),T=c(h,p),v!==T&&(k&&T&&(a(T)||(y=o(T)))?(y?(y=!1,w=g&&o(g)?g:[]):w=g&&a(g)?g:{},u(v,{name:p,newValue:d(k,w,T)})):typeof T!="undefined"&&u(v,{name:p,newValue:T}));return v},ef}var M3=D3();const tf=We(M3);function nf(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 F3(){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?B3(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 B3(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 dr={basename:U3,dirname:H3,extname:z3,join:j3,sep:"/"};function U3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');qs(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 H3(e){if(qs(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 z3(e){qs(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 j3(...e){let t=-1,n;for(;++t<e.length;)qs(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":$3(n)}function $3(e){qs(e);const t=e.codePointAt(0)===47;let n=V3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function V3(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 qs(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const q3={cwd:Y3};function Y3(){return"/"}function rf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function W3(e){if(typeof e=="string")e=new URL(e);else if(!rf(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 G3(e)}function G3(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 of=["history","path","basename","stem","extname","dirname"];class m1{constructor(t){let n;t?rf(t)?n={path:t}:typeof t=="string"||K3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":q3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<of.length;){const a=of[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)of.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?dr.basename(this.path):void 0}set basename(t){af(t,"basename"),sf(t,"basename"),this.path=dr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?dr.dirname(this.path):void 0}set dirname(t){g1(this.basename,"dirname"),this.path=dr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?dr.extname(this.path):void 0}set extname(t){if(sf(t,"extname"),g1(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=dr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){rf(t)&&(t=W3(t)),af(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?dr.basename(this.path,this.extname):void 0}set stem(t){af(t,"stem"),sf(t,"stem"),this.path=dr.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 Wt(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 sf(e,t){if(e&&e.includes(dr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+dr.sep+"`")}function af(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function g1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function K3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Q3=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),X3={}.hasOwnProperty;class uf extends Q3{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=F3()}copy(){const t=new uf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(tf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(df("data",this.frozen),this.namespace[t]=n,this):X3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(df("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=qu(t),r=this.parser||this.Parser;return lf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),lf("process",this.parser||this.Parser),cf("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=qu(t),d=r.parse(c);r.run(d,c,function(p,g,T){if(p||!g||!T)return h(p);const y=g,w=r.stringify(y,T);eN(w)?T.value=w:T.result=w,h(p,T)});function h(p,g){p||!g?u(p):a?a(g):n(void 0,g)}}}processSync(t){let n=!1,r;return this.freeze(),lf("processSync",this.parser||this.Parser),cf("processSync",this.compiler||this.Compiler),this.process(t,o),y1("processSync","process",n),r;function o(a,u){n=!0,h1(a),r=u}}run(t,n,r){E1(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=qu(n);o.run(t,d,h);function h(p,g,T){const y=g||t;p?c(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),y1("runSync","run",r),o;function a(u,c){h1(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=qu(n),o=this.compiler||this.Compiler;return cf("stringify",o),E1(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(df("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=tf(!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,T=-1;for(;++g<r.length;)if(r[g][0]===h){T=g;break}if(T===-1)r.push([h,...p]);else if(p.length>0){let[y,...w]=p;const v=r[T][1];nf(v)&&nf(y)&&(y=tf(!0,v,y)),r[T]=[h,y,...w]}}}}const J3=new uf().freeze();function lf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function cf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function df(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 E1(e){if(!nf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function y1(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function qu(e){return Z3(e)?e:new m1(e)}function Z3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function eN(e){return typeof e=="string"||tN(e)}function tN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const nN="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",b1=[],T1={allowDangerousHtml:!0},rN=/^(https?|ircs?|mailto|xmpp)$/i,iN=[{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 x1(e){const t=oN(e),n=sN(e);return aN(t.runSync(t.parse(n),n),e)}function oN(e){const t=e.rehypePlugins||b1,n=e.remarkPlugins||b1,r=e.remarkRehypeOptions?B(B({},e.remarkRehypeOptions),T1):T1;return J3().use(Hk).use(n).use(L3,r).use(t)}function sN(e){const t=e.children||"",n=new m1;return typeof t=="string"&&(n.value=t),n}function aN(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||uN;for(const p of iN)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+nN+p.id,void 0);return Vu(e,h),RA(e,{Fragment:x.Fragment,components:o,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function h(p,g,T){if(p.type==="raw"&&T&&typeof g=="number")return u?T.children.splice(g,1):T.children[g]={type:"text",value:p.value},g;if(p.type==="element"){let y;for(y in Hd)if(Object.hasOwn(Hd,y)&&Object.hasOwn(p.properties,y)){const w=p.properties[y],v=Hd[y];(v===null||v.includes(p.tagName))&&(p.properties[y]=d(String(w||""),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,T)),y&&T&&typeof g=="number")return c&&p.children?T.children.splice(g,1,...p.children):T.children.splice(g,1),g}}}function uN(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||rN.test(e.slice(0,t))?e:""}const w1=/[#.]/g;function lN(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){w1.lastIndex=o;const c=w1.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 _1(e,t,n){const r=n?hN(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=lN(a,t);const h=d.tagName.toLowerCase(),p=r?r.get(h):void 0;if(d.tagName=p||h,cN(u))c.unshift(u);else for(const[g,T]of Object.entries(u))dN(e,d.properties,g,T)}for(const h of c)ff(d.children,h);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function cN(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 dN(e,t,n,r){const o=Ld(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=hg(r):o.commaSeparated?a=eg(r):o.commaOrSpaceSeparated?a=hg(eg(r).join(" ")):a=v1(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?fN(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(v1(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function ff(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)ff(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?ff(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function v1(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Ds(n)===Ds(t)))return!0}return n}function fN(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function hN(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const pN=["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"],mN=_1(Ru,"div"),gN=_1(yo,"g",pN);function EN(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=S1(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=S1(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 S1(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 Pi={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/"},A1={}.hasOwnProperty,yN=Object.prototype;function bN(e,t){const n=t||{};return hf({file:n.file||void 0,location:!1,schema:n.space==="svg"?yo:Ru,verbose:n.verbose||!1},e)}function hf(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Yu(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:C1(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=EN(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"},Yu(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Yu(e,r,n),n}default:return n=TN(e,t),n}}function C1(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=hf(e,t[n]);r.push(o)}return r}function TN(e,t){const n=e.schema;e.schema=t.namespaceURI===Pi.svg?yo:Ru;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;A1.call(yN,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?gN:mN)(t.tagName,o,C1(e,t.childNodes));if(Yu(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,h=d&&d.startTag&&_o(d.startTag),p=d&&d.endTag&&_o(d.endTag),g=hf(e,c.content);h&&p&&e.file&&(g.position={start:h.end,end:p.start}),u.content=g}return e.schema=n,u}function Yu(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=xN(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function xN(e,t,n){const r=_o(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)A1.call(n.attrs,u)&&(a[Ld(e.schema,u).property]=_o(n.attrs[u]));n.startTag;const c=_o(n.startTag),d=n.endTag?_o(n.endTag):void 0,h={opening:c};d&&(h.closing=d),h.properties=a,t.data={position:h}}}return r}function _o(e){const t=k1({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=k1({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function k1(e){return e.line&&e.column?e:void 0}class Ys{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ys.prototype.property={},Ys.prototype.normal={},Ys.prototype.space=null;function N1(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 Ys(n,r,t)}function pf(e){return e.toLowerCase()}class Pn{constructor(t,n){this.property=t,this.attribute=n}}Pn.prototype.space=null,Pn.prototype.boolean=!1,Pn.prototype.booleanish=!1,Pn.prototype.overloadedBoolean=!1,Pn.prototype.number=!1,Pn.prototype.commaSeparated=!1,Pn.prototype.spaceSeparated=!1,Pn.prototype.commaOrSpaceSeparated=!1,Pn.prototype.mustUseProperty=!1,Pn.prototype.defined=!1;let wN=0;const ze=Li(),kt=Li(),O1=Li(),Ee=Li(),st=Li(),vo=Li(),wn=Li();function Li(){return ou(2,++wN)}const mf=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:kt,commaOrSpaceSeparated:wn,commaSeparated:vo,number:Ee,overloadedBoolean:O1,spaceSeparated:st},Symbol.toStringTag,{value:"Module"})),gf=Object.keys(mf);class Ef extends Pn{constructor(t,n,r,o){let a=-1;if(super(t,n),I1(this,"space",o),typeof r=="number")for(;++a<gf.length;){const u=gf[a];I1(this,gf[a],(r&mf[u])===mf[u])}}}Ef.prototype.defined=!0;function I1(e,t,n){n&&(e[t]=n)}const _N={}.hasOwnProperty;function So(e){const t={},n={};let r;for(r in e.properties)if(_N.call(e.properties,r)){const o=e.properties[r],a=new Ef(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[pf(r)]=r,n[pf(a.attribute)]=r}return new Ys(t,n,e.space)}const R1=So({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}}),P1=So({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function L1(e,t){return t in e?e[t]:t}function D1(e,t){return L1(e,t.toLowerCase())}const M1=So({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:D1,properties:{xmlns:null,xmlnsXLink:null}}),F1=So({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:kt,ariaAutoComplete:null,ariaBusy:kt,ariaChecked:kt,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:st,ariaCurrent:null,ariaDescribedBy:st,ariaDetails:null,ariaDisabled:kt,ariaDropEffect:st,ariaErrorMessage:null,ariaExpanded:kt,ariaFlowTo:st,ariaGrabbed:kt,ariaHasPopup:null,ariaHidden:kt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:st,ariaLevel:Ee,ariaLive:null,ariaModal:kt,ariaMultiLine:kt,ariaMultiSelectable:kt,ariaOrientation:null,ariaOwns:st,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:kt,ariaReadOnly:kt,ariaRelevant:null,ariaRequired:kt,ariaRoleDescription:st,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:kt,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null}}),vN=So({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:D1,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:vo,acceptCharset:st,accessKey:st,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:st,autoFocus:ze,autoPlay:ze,blocking:st,capture:null,charSet:null,checked:ze,cite:null,className:st,cols:Ee,colSpan:null,content:null,contentEditable:kt,controls:ze,controlsList:st,coords:Ee|vo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:O1,draggable:kt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:st,height:Ee,hidden:ze,high:Ee,href:null,hrefLang:null,htmlFor:st,httpEquiv:st,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:st,itemRef:st,itemScope:ze,itemType:st,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ze,optimum:Ee,pattern:null,ping:st,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:st,required:ze,reversed:ze,rows:Ee,rowSpan:Ee,sandbox:st,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:kt,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:ze,useMap:null,value:kt,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:st,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:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:kt,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:ze,disableRemotePlayback:ze,prefix:null,property:null,results:Ee,security:null,unselectable:null}}),SN=So({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:L1,properties:{about:wn,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:st,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:ze,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:vo,g2:vo,glyphName:vo,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:wn,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:st,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:wn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:wn,rev:wn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:wn,requiredFeatures:wn,requiredFonts:wn,requiredFormats:wn,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:wn,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:wn,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:wn,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}}),AN=/^data[-\w.:]+$/i,B1=/-[a-z]/g,CN=/[A-Z]/g;function kN(e,t){const n=pf(t);let r=t,o=Pn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&AN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(B1,ON);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!B1.test(a)){let u=a.replace(CN,NN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Ef}return new o(r,t)}function NN(e){return"-"+e.toLowerCase()}function ON(e){return e.charAt(1).toUpperCase()}const IN=N1([P1,R1,M1,F1,vN],"html"),U1=N1([P1,R1,M1,F1,SN],"svg"),H1={}.hasOwnProperty;function z1(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&H1.call(o,e)){const d=String(o[e]);u=H1.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 RN={},PN={}.hasOwnProperty,j1=z1("type",{handlers:{root:DN,element:HN,text:BN,comment:UN,doctype:FN}});function LN(e,t){const r=(t||RN).space;return j1(e,r==="svg"?U1:IN)}function DN(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=yf(e.children,n,t),Ao(e,n),n}function MN(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=yf(e.children,n,t),Ao(e,n),n}function FN(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ao(e,t),t}function BN(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ao(e,t),t}function UN(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ao(e,t),t}function HN(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=U1);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&PN.call(e.properties,a)){const d=zN(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Pi[u],childNodes:[],parentNode:null};return c.childNodes=yf(e.children,c,r),Ao(e,c),e.tagName==="template"&&e.content&&(c.content=MN(e.content,r)),c}function zN(e,t,n){const r=kN(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?tg(n):pg(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=Pi[r.space]}return o}function yf(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=j1(e[r],n);a.parentNode=t,o.push(a)}return o}function Ao(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 jN=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],$N=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]),ht="�";var N;(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"})(N||(N={}));const fn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function $1(e){return e>=55296&&e<=57343}function VN(e){return e>=56320&&e<=57343}function qN(e,t){return(e-55296)*1024+9216+t}function V1(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function q1(e){return e>=64976&&e<=65007||$N.has(e)}var ne;(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"})(ne||(ne={}));const YN=65536;class WN{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=YN,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(VN(n))return this.pos++,this._addGap(),qN(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,N.EOF;return this._err(ne.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,N.EOF;const r=this.html.charCodeAt(n);return r===N.CARRIAGE_RETURN?N.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,N.EOF;let t=this.html.charCodeAt(this.pos);return t===N.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,N.LINE_FEED):t===N.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,$1(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===N.LINE_FEED||t===N.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){V1(t)?this._err(ne.controlCharacterInInputStream):q1(t)&&this._err(ne.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ve;(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"})(Ve||(Ve={}));function Y1(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 GN=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))),KN=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 QN(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=KN.get(e))!==null&&t!==void 0?t:e}var Dt;(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"})(Dt||(Dt={}));const XN=32;var Gr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Gr||(Gr={}));function bf(e){return e>=Dt.ZERO&&e<=Dt.NINE}function JN(e){return e>=Dt.UPPER_A&&e<=Dt.UPPER_F||e>=Dt.LOWER_A&&e<=Dt.LOWER_F}function ZN(e){return e>=Dt.UPPER_A&&e<=Dt.UPPER_Z||e>=Dt.LOWER_A&&e<=Dt.LOWER_Z||bf(e)}function eO(e){return e===Dt.EQUALS||ZN(e)}var Mt;(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"})(Mt||(Mt={}));var kr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(kr||(kr={}));class tO{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Mt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=kr.Strict}startEntity(t){this.decodeMode=t,this.state=Mt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Mt.EntityStart:return t.charCodeAt(n)===Dt.NUM?(this.state=Mt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Mt.NamedEntity,this.stateNamedEntity(t,n));case Mt.NumericStart:return this.stateNumericStart(t,n);case Mt.NumericDecimal:return this.stateNumericDecimal(t,n);case Mt.NumericHex:return this.stateNumericHex(t,n);case Mt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|XN)===Dt.LOWER_X?(this.state=Mt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Mt.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(bf(o)||JN(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(bf(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===Dt.SEMI)this.consumed+=1;else if(this.decodeMode===kr.Strict)return 0;return this.emitCodePoint(QN(this.result),this.consumed),this.errors&&(t!==Dt.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&Gr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=nO(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===kr.Attribute&&(a===0||eO(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Gr.VALUE_LENGTH)>>14,a!==0){if(u===Dt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==kr.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]&Gr.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]&~Gr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Mt.NamedEntity:return this.result!==0&&(this.decodeMode!==kr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Mt.NumericDecimal:return this.emitNumericEntity(0,2);case Mt.NumericHex:return this.emitNumericEntity(0,3);case Mt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Mt.EntityStart:return 0}}}function nO(e,t,n,r){const o=(t&Gr.BRANCH_LENGTH)>>7,a=t&Gr.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 Di;(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"})(Di||(Di={}));var Ln;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ln||(Ln={}));var Q;(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"})(Q||(Q={}));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 rO=new Map([[Q.A,m.A],[Q.ADDRESS,m.ADDRESS],[Q.ANNOTATION_XML,m.ANNOTATION_XML],[Q.APPLET,m.APPLET],[Q.AREA,m.AREA],[Q.ARTICLE,m.ARTICLE],[Q.ASIDE,m.ASIDE],[Q.B,m.B],[Q.BASE,m.BASE],[Q.BASEFONT,m.BASEFONT],[Q.BGSOUND,m.BGSOUND],[Q.BIG,m.BIG],[Q.BLOCKQUOTE,m.BLOCKQUOTE],[Q.BODY,m.BODY],[Q.BR,m.BR],[Q.BUTTON,m.BUTTON],[Q.CAPTION,m.CAPTION],[Q.CENTER,m.CENTER],[Q.CODE,m.CODE],[Q.COL,m.COL],[Q.COLGROUP,m.COLGROUP],[Q.DD,m.DD],[Q.DESC,m.DESC],[Q.DETAILS,m.DETAILS],[Q.DIALOG,m.DIALOG],[Q.DIR,m.DIR],[Q.DIV,m.DIV],[Q.DL,m.DL],[Q.DT,m.DT],[Q.EM,m.EM],[Q.EMBED,m.EMBED],[Q.FIELDSET,m.FIELDSET],[Q.FIGCAPTION,m.FIGCAPTION],[Q.FIGURE,m.FIGURE],[Q.FONT,m.FONT],[Q.FOOTER,m.FOOTER],[Q.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[Q.FORM,m.FORM],[Q.FRAME,m.FRAME],[Q.FRAMESET,m.FRAMESET],[Q.H1,m.H1],[Q.H2,m.H2],[Q.H3,m.H3],[Q.H4,m.H4],[Q.H5,m.H5],[Q.H6,m.H6],[Q.HEAD,m.HEAD],[Q.HEADER,m.HEADER],[Q.HGROUP,m.HGROUP],[Q.HR,m.HR],[Q.HTML,m.HTML],[Q.I,m.I],[Q.IMG,m.IMG],[Q.IMAGE,m.IMAGE],[Q.INPUT,m.INPUT],[Q.IFRAME,m.IFRAME],[Q.KEYGEN,m.KEYGEN],[Q.LABEL,m.LABEL],[Q.LI,m.LI],[Q.LINK,m.LINK],[Q.LISTING,m.LISTING],[Q.MAIN,m.MAIN],[Q.MALIGNMARK,m.MALIGNMARK],[Q.MARQUEE,m.MARQUEE],[Q.MATH,m.MATH],[Q.MENU,m.MENU],[Q.META,m.META],[Q.MGLYPH,m.MGLYPH],[Q.MI,m.MI],[Q.MO,m.MO],[Q.MN,m.MN],[Q.MS,m.MS],[Q.MTEXT,m.MTEXT],[Q.NAV,m.NAV],[Q.NOBR,m.NOBR],[Q.NOFRAMES,m.NOFRAMES],[Q.NOEMBED,m.NOEMBED],[Q.NOSCRIPT,m.NOSCRIPT],[Q.OBJECT,m.OBJECT],[Q.OL,m.OL],[Q.OPTGROUP,m.OPTGROUP],[Q.OPTION,m.OPTION],[Q.P,m.P],[Q.PARAM,m.PARAM],[Q.PLAINTEXT,m.PLAINTEXT],[Q.PRE,m.PRE],[Q.RB,m.RB],[Q.RP,m.RP],[Q.RT,m.RT],[Q.RTC,m.RTC],[Q.RUBY,m.RUBY],[Q.S,m.S],[Q.SCRIPT,m.SCRIPT],[Q.SEARCH,m.SEARCH],[Q.SECTION,m.SECTION],[Q.SELECT,m.SELECT],[Q.SOURCE,m.SOURCE],[Q.SMALL,m.SMALL],[Q.SPAN,m.SPAN],[Q.STRIKE,m.STRIKE],[Q.STRONG,m.STRONG],[Q.STYLE,m.STYLE],[Q.SUB,m.SUB],[Q.SUMMARY,m.SUMMARY],[Q.SUP,m.SUP],[Q.TABLE,m.TABLE],[Q.TBODY,m.TBODY],[Q.TEMPLATE,m.TEMPLATE],[Q.TEXTAREA,m.TEXTAREA],[Q.TFOOT,m.TFOOT],[Q.TD,m.TD],[Q.TH,m.TH],[Q.THEAD,m.THEAD],[Q.TITLE,m.TITLE],[Q.TR,m.TR],[Q.TRACK,m.TRACK],[Q.TT,m.TT],[Q.U,m.U],[Q.UL,m.UL],[Q.SVG,m.SVG],[Q.VAR,m.VAR],[Q.WBR,m.WBR],[Q.XMP,m.XMP]]);function Co(e){var t;return(t=rO.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const pe=m,iO={[le.HTML]:new Set([pe.ADDRESS,pe.APPLET,pe.AREA,pe.ARTICLE,pe.ASIDE,pe.BASE,pe.BASEFONT,pe.BGSOUND,pe.BLOCKQUOTE,pe.BODY,pe.BR,pe.BUTTON,pe.CAPTION,pe.CENTER,pe.COL,pe.COLGROUP,pe.DD,pe.DETAILS,pe.DIR,pe.DIV,pe.DL,pe.DT,pe.EMBED,pe.FIELDSET,pe.FIGCAPTION,pe.FIGURE,pe.FOOTER,pe.FORM,pe.FRAME,pe.FRAMESET,pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6,pe.HEAD,pe.HEADER,pe.HGROUP,pe.HR,pe.HTML,pe.IFRAME,pe.IMG,pe.INPUT,pe.LI,pe.LINK,pe.LISTING,pe.MAIN,pe.MARQUEE,pe.MENU,pe.META,pe.NAV,pe.NOEMBED,pe.NOFRAMES,pe.NOSCRIPT,pe.OBJECT,pe.OL,pe.P,pe.PARAM,pe.PLAINTEXT,pe.PRE,pe.SCRIPT,pe.SECTION,pe.SELECT,pe.SOURCE,pe.STYLE,pe.SUMMARY,pe.TABLE,pe.TBODY,pe.TD,pe.TEMPLATE,pe.TEXTAREA,pe.TFOOT,pe.TH,pe.THEAD,pe.TITLE,pe.TR,pe.TRACK,pe.UL,pe.WBR,pe.XMP]),[le.MATHML]:new Set([pe.MI,pe.MO,pe.MN,pe.MS,pe.MTEXT,pe.ANNOTATION_XML]),[le.SVG]:new Set([pe.TITLE,pe.FOREIGN_OBJECT,pe.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.XMLNS]:new Set},Tf=new Set([pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6]);Q.STYLE,Q.SCRIPT,Q.XMP,Q.IFRAME,Q.NOEMBED,Q.NOFRAMES,Q.PLAINTEXT;var P;(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"})(P||(P={}));const wt={DATA:P.DATA,RCDATA:P.RCDATA,RAWTEXT:P.RAWTEXT,SCRIPT_DATA:P.SCRIPT_DATA,PLAINTEXT:P.PLAINTEXT,CDATA_SECTION:P.CDATA_SECTION};function oO(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function Ws(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function sO(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function Kr(e){return sO(e)||Ws(e)}function W1(e){return Kr(e)||oO(e)}function Wu(e){return e+32}function G1(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function K1(e){return G1(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function aO(e){return e===N.NULL?ne.nullCharacterReference:e>1114111?ne.characterReferenceOutsideUnicodeRange:$1(e)?ne.surrogateCharacterReference:q1(e)?ne.noncharacterCharacterReference:V1(e)||e===N.CARRIAGE_RETURN?ne.controlCharacterReference:null}class uO{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=P.DATA,this.returnState=P.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new WN(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new tO(GN,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ne.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ne.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=aO(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:Ve.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ve.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ve.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ve.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(Y1(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(ne.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=Co(t.tagName),t.type===Ve.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ne.endTagWithAttributes),t.selfClosing&&this._err(ne.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 Ve.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ve.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ve.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:Ve.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=G1(t)?Ve.WHITESPACE_CHARACTER:t===N.NULL?Ve.NULL_CHARACTER:Ve.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ve.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=P.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?kr.Attribute:kr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===P.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===P.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===P.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case P.DATA:{this._stateData(t);break}case P.RCDATA:{this._stateRcdata(t);break}case P.RAWTEXT:{this._stateRawtext(t);break}case P.SCRIPT_DATA:{this._stateScriptData(t);break}case P.PLAINTEXT:{this._statePlaintext(t);break}case P.TAG_OPEN:{this._stateTagOpen(t);break}case P.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case P.TAG_NAME:{this._stateTagName(t);break}case P.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case P.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case P.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case P.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case P.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case P.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case P.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case P.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case P.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case P.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case P.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case P.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case P.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case P.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case P.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case P.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case P.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case P.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case P.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case P.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case P.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case P.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case P.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case P.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case P.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case P.BOGUS_COMMENT:{this._stateBogusComment(t);break}case P.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case P.COMMENT_START:{this._stateCommentStart(t);break}case P.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case P.COMMENT:{this._stateComment(t);break}case P.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case P.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case P.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case P.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case P.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case P.COMMENT_END:{this._stateCommentEnd(t);break}case P.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case P.DOCTYPE:{this._stateDoctype(t);break}case P.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case P.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case P.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case P.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case P.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case P.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case P.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case P.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case P.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case P.CDATA_SECTION:{this._stateCdataSection(t);break}case P.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case P.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case P.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case P.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=P.TAG_OPEN;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitCodePoint(t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case N.AMPERSAND:{this._startCharacterReference();break}case N.LESS_THAN_SIGN:{this.state=P.RCDATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ht);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case N.LESS_THAN_SIGN:{this.state=P.RAWTEXT_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ht);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ht);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ht);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Kr(t))this._createStartTagToken(),this.state=P.TAG_NAME,this._stateTagName(t);else switch(t){case N.EXCLAMATION_MARK:{this.state=P.MARKUP_DECLARATION_OPEN;break}case N.SOLIDUS:{this.state=P.END_TAG_OPEN;break}case N.QUESTION_MARK:{this._err(ne.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=P.BOGUS_COMMENT,this._stateBogusComment(t);break}case N.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=P.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Kr(t))this._createEndTagToken(),this.state=P.TAG_NAME,this._stateTagName(t);else switch(t){case N.GREATER_THAN_SIGN:{this._err(ne.missingEndTagName),this.state=P.DATA;break}case N.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=P.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=P.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this.state=P.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.tagName+=ht;break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ws(t)?Wu(t):t)}}_stateRcdataLessThanSign(t){t===N.SOLIDUS?this.state=P.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=P.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Kr(t)?(this.state=P.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=P.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=P.BEFORE_ATTRIBUTE_NAME,!1;case N.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=P.SELF_CLOSING_START_TAG,!1;case N.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=P.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===N.SOLIDUS?this.state=P.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=P.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Kr(t)?(this.state=P.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=P.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case N.SOLIDUS:{this.state=P.SCRIPT_DATA_END_TAG_OPEN;break}case N.EXCLAMATION_MARK:{this.state=P.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=P.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Kr(t)?(this.state=P.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===N.HYPHEN_MINUS?(this.state=P.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===N.HYPHEN_MINUS?(this.state=P.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ht);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_ESCAPED,this._emitChars(ht);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.GREATER_THAN_SIGN:{this.state=P.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_ESCAPED,this._emitChars(ht);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===N.SOLIDUS?this.state=P.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Kr(t)?(this._emitChars("<"),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Kr(t)?(this.state=P.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(fn.SCRIPT,!1)&&K1(this.preprocessor.peek(fn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<fn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(ht);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ht);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.GREATER_THAN_SIGN:{this.state=P.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ht);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===N.SOLIDUS?(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(fn.SCRIPT,!1)&&K1(this.preprocessor.peek(fn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<fn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=P.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this.state=P.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._err(ne.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=P.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=P.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this._leaveAttrName(),this.state=P.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._leaveAttrName(),this.state=P.BEFORE_ATTRIBUTE_VALUE;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:{this._err(ne.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.name+=ht;break}default:this.currentAttr.name+=String.fromCodePoint(Ws(t)?Wu(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=P.SELF_CLOSING_START_TAG;break}case N.EQUALS_SIGN:{this.state=P.BEFORE_ATTRIBUTE_VALUE;break}case N.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=P.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{this.state=P.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this.state=P.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingAttributeValue),this.state=P.DATA,this.emitCurrentTagToken();break}default:this.state=P.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case N.QUOTATION_MARK:{this.state=P.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=ht;break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case N.APOSTROPHE:{this.state=P.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=ht;break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=P.BEFORE_ATTRIBUTE_NAME;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=P.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=ht;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:case N.EQUALS_SIGN:case N.GRAVE_ACCENT:{this._err(ne.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=P.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this._leaveAttrValue(),this.state=P.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=P.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBetweenAttributes),this.state=P.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case N.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=P.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.unexpectedSolidusInTag),this.state=P.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentComment(n);break}case N.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=ht;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(fn.DASH_DASH,!0)?(this._createCommentToken(fn.DASH_DASH.length+1),this.state=P.COMMENT_START):this._consumeSequenceIfMatch(fn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(fn.DOCTYPE.length+1),this.state=P.DOCTYPE):this._consumeSequenceIfMatch(fn.CDATA_START,!0)?this.inForeignNode?this.state=P.CDATA_SECTION:(this._err(ne.cdataInHtmlContent),this._createCommentToken(fn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=P.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ne.incorrectlyOpenedComment),this._createCommentToken(2),this.state=P.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case N.HYPHEN_MINUS:{this.state=P.COMMENT_START_DASH;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=P.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=P.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=P.COMMENT_END;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=P.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=P.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=P.COMMENT_END_DASH;break}case N.LESS_THAN_SIGN:{n.data+="<",this.state=P.COMMENT_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=ht;break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case N.EXCLAMATION_MARK:{n.data+="!",this.state=P.COMMENT_LESS_THAN_SIGN_BANG;break}case N.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=P.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===N.HYPHEN_MINUS?this.state=P.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=P.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===N.HYPHEN_MINUS?this.state=P.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=P.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==N.GREATER_THAN_SIGN&&t!==N.EOF&&this._err(ne.nestedComment),this.state=P.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=P.COMMENT_END;break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=P.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentComment(n);break}case N.EXCLAMATION_MARK:{this.state=P.COMMENT_END_BANG;break}case N.HYPHEN_MINUS:{n.data+="-";break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=P.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{n.data+="--!",this.state=P.COMMENT_END_DASH;break}case N.GREATER_THAN_SIGN:{this._err(ne.incorrectlyClosedComment),this.state=P.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=P.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=P.BEFORE_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=P.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case N.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBeforeDoctypeName),this.state=P.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ws(t))this._createDoctypeToken(String.fromCharCode(Wu(t))),this.state=P.DOCTYPE_NAME;else switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.NULL:{this._err(ne.unexpectedNullCharacter),this._createDoctypeToken(ht),this.state=P.DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case N.EOF:{this._err(ne.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=P.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=P.AFTER_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentDoctype(n);break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.name+=ht;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ws(t)?Wu(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(fn.PUBLIC,!1)?this.state=P.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(fn.SYSTEM,!1)?this.state=P.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ne.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=P.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=ht;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case N.EOF:{this._err(ne.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 N.APOSTROPHE:{this.state=P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=ht;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case N.EOF:{this._err(ne.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=P.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case N.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentDoctype(n);break}case N.QUOTATION_MARK:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=P.DATA;break}case N.QUOTATION_MARK:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=P.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=ht;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case N.EOF:{this._err(ne.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 N.APOSTROPHE:{this.state=P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=ht;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case N.EOF:{this._err(ne.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=P.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=P.DATA;break}case N.NULL:{this._err(ne.unexpectedNullCharacter);break}case N.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case N.RIGHT_SQUARE_BRACKET:{this.state=P.CDATA_SECTION_BRACKET;break}case N.EOF:{this._err(ne.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===N.RIGHT_SQUARE_BRACKET?this.state=P.CDATA_SECTION_END:(this._emitChars("]"),this.state=P.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case N.GREATER_THAN_SIGN:{this.state=P.DATA;break}case N.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=P.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(N.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&W1(this.preprocessor.peek(1))?P.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){W1(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(ne.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Q1=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),X1=new Set([...Q1,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),Gu=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),lO=new Set([...Gu,m.OL,m.UL]),cO=new Set([...Gu,m.BUTTON]),J1=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),Z1=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),dO=new Set([m.TR,m.TEMPLATE,m.HTML]),fO=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),hO=new Set([m.TABLE,m.TEMPLATE,m.HTML]),pO=new Set([m.TD,m.TH]);class mO{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(Tf,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(pO,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(hO,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(fO,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(dO,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(Z1.has(o))return!1;break}case le.MATHML:{if(J1.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Gu)}hasInListItemScope(t){return this.hasInDynamicScope(t,lO)}hasInButtonScope(t){return this.hasInDynamicScope(t,cO)}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(Tf.has(n))return!0;if(Gu.has(n))return!1;break}case le.SVG:{if(Z1.has(n))return!1;break}case le.MATHML:{if(J1.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&&Q1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&X1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&X1.has(this.currentTagId);)this.pop()}}const xf=3;var fr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(fr||(fr={}));const eE={type:fr.Marker};class gO{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===fr.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<xf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<xf)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>=xf&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(eE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:fr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:fr.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(eE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===fr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===fr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===fr.Element&&n.element===t)}}const Qr={createDocument(){return{nodeName:"#document",mode:Ln.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};Qr.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(Qr.isTextNode(n)){n.value+=t;return}}Qr.appendChild(e,Qr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Qr.isTextNode(r)?r.value+=t:Qr.insertBefore(e,Qr.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)}},tE="html",EO="about:legacy-compat",yO="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",nE=["+//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//"],bO=[...nE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],TO=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),rE=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],xO=[...rE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function iE(e,t){return t.some(n=>e.startsWith(n))}function wO(e){return e.name===tE&&e.publicId===null&&(e.systemId===null||e.systemId===EO)}function _O(e){if(e.name!==tE)return Ln.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===yO)return Ln.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),TO.has(n))return Ln.QUIRKS;let r=t===null?bO:nE;if(iE(n,r))return Ln.QUIRKS;if(r=t===null?rE:xO,iE(n,r))return Ln.LIMITED_QUIRKS}return Ln.NO_QUIRKS}const oE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},vO="definitionurl",SO="definitionURL",AO=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])),CO=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}]]),kO=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])),NO=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 OO(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===Di.COLOR||r===Di.SIZE||r===Di.FACE)||NO.has(t)}function sE(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===vO){e.attrs[t].name=SO;break}}function aE(e){for(let t=0;t<e.attrs.length;t++){const n=AO.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function wf(e){for(let t=0;t<e.attrs.length;t++){const n=CO.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 IO(e){const t=kO.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Co(e.tagName))}function RO(e,t){return t===le.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function PO(e,t,n){if(t===le.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Di.ENCODING){const o=n[r].value.toLowerCase();return o===oE.TEXT_HTML||o===oE.APPLICATION_XML}}return t===le.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function LO(e,t,n,r){return(!r||r===le.HTML)&&PO(e,t,n)||(!r||r===le.MATHML)&&RO(e,t)}const DO="hidden",MO=8,FO=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 BO={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},uE=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),lE={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Qr,onParseError:null};class cE{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({},lE),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 uO(this.options,this),this.activeFormattingElements=new gO(this.treeAdapter),this.fragmentContextID=r?Co(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new mO(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({},lE),n);t!=null||(t=r.treeAdapter.createElement(Q.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:BO,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=wt.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)===Q.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=wt.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=wt.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=wt.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=wt.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(Q.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===Ve.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)===Q.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 Ve.CHARACTER:{this.onCharacter(t);break}case Ve.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ve.COMMENT:{this.onComment(t);break}case Ve.DOCTYPE:{this.onDoctype(t);break}case Ve.START_TAG:{this._processStartTag(t);break}case Ve.END_TAG:{this.onEndTag(t);break}case Ve.EOF:{this.onEof(t);break}case Ve.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return LO(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===fr.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 uE.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 iO[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){pR(this,t);return}switch(this.insertionMode){case M.INITIAL:{Gs(this,t);break}case M.BEFORE_HTML:{Ks(this,t);break}case M.BEFORE_HEAD:{Qs(this,t);break}case M.IN_HEAD:{Xs(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Js(this,t);break}case M.AFTER_HEAD:{Zs(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{fE(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:{Af(this,t);break}case M.IN_TABLE_TEXT:{TE(this,t);break}case M.IN_COLUMN_GROUP:{Xu(this,t);break}case M.AFTER_BODY:{el(this,t);break}case M.AFTER_AFTER_BODY:{tl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){hR(this,t);return}switch(this.insertionMode){case M.INITIAL:{Gs(this,t);break}case M.BEFORE_HTML:{Ks(this,t);break}case M.BEFORE_HEAD:{Qs(this,t);break}case M.IN_HEAD:{Xs(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Js(this,t);break}case M.AFTER_HEAD:{Zs(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Af(this,t);break}case M.IN_COLUMN_GROUP:{Xu(this,t);break}case M.AFTER_BODY:{el(this,t);break}case M.AFTER_AFTER_BODY:{tl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){vf(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:{vf(this,t);break}case M.IN_TABLE_TEXT:{na(this,t);break}case M.AFTER_BODY:{qO(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{YO(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{WO(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,ne.misplacedDoctype);break}case M.IN_TABLE_TEXT:{na(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ne.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?mR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Gs(this,t);break}case M.BEFORE_HTML:{GO(this,t);break}case M.BEFORE_HEAD:{QO(this,t);break}case M.IN_HEAD:{Gn(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ZO(this,t);break}case M.AFTER_HEAD:{tI(this,t);break}case M.IN_BODY:{Kt(this,t);break}case M.IN_TABLE:{ko(this,t);break}case M.IN_TABLE_TEXT:{na(this,t);break}case M.IN_CAPTION:{XI(this,t);break}case M.IN_COLUMN_GROUP:{Cf(this,t);break}case M.IN_TABLE_BODY:{Ju(this,t);break}case M.IN_ROW:{Zu(this,t);break}case M.IN_CELL:{eR(this,t);break}case M.IN_SELECT:{_E(this,t);break}case M.IN_SELECT_IN_TABLE:{nR(this,t);break}case M.IN_TEMPLATE:{iR(this,t);break}case M.AFTER_BODY:{sR(this,t);break}case M.IN_FRAMESET:{aR(this,t);break}case M.AFTER_FRAMESET:{lR(this,t);break}case M.AFTER_AFTER_BODY:{dR(this,t);break}case M.AFTER_AFTER_FRAMESET:{fR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?gR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Gs(this,t);break}case M.BEFORE_HTML:{KO(this,t);break}case M.BEFORE_HEAD:{XO(this,t);break}case M.IN_HEAD:{JO(this,t);break}case M.IN_HEAD_NO_SCRIPT:{eI(this,t);break}case M.AFTER_HEAD:{nI(this,t);break}case M.IN_BODY:{Qu(this,t);break}case M.TEXT:{zI(this,t);break}case M.IN_TABLE:{ea(this,t);break}case M.IN_TABLE_TEXT:{na(this,t);break}case M.IN_CAPTION:{JI(this,t);break}case M.IN_COLUMN_GROUP:{ZI(this,t);break}case M.IN_TABLE_BODY:{kf(this,t);break}case M.IN_ROW:{wE(this,t);break}case M.IN_CELL:{tR(this,t);break}case M.IN_SELECT:{vE(this,t);break}case M.IN_SELECT_IN_TABLE:{rR(this,t);break}case M.IN_TEMPLATE:{oR(this,t);break}case M.AFTER_BODY:{AE(this,t);break}case M.IN_FRAMESET:{uR(this,t);break}case M.AFTER_FRAMESET:{cR(this,t);break}case M.AFTER_AFTER_BODY:{tl(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Gs(this,t);break}case M.BEFORE_HTML:{Ks(this,t);break}case M.BEFORE_HEAD:{Qs(this,t);break}case M.IN_HEAD:{Xs(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Js(this,t);break}case M.AFTER_HEAD:{Zs(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:{yE(this,t);break}case M.TEXT:{jI(this,t);break}case M.IN_TABLE_TEXT:{na(this,t);break}case M.IN_TEMPLATE:{SE(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:{Sf(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===N.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:{dE(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Af(this,t);break}case M.IN_TABLE_TEXT:{bE(this,t);break}}}}function UO(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):EE(e,t),n}function HO(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 zO(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>=FO;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=jO(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function jO(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 $O(e,t,n){const r=e.treeAdapter.getTagName(t),o=Co(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 VO(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 _f(e,t){for(let n=0;n<MO;n++){const r=UO(e,t);if(!r)break;const o=HO(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=zO(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&$O(e,u,a),VO(e,o,r)}}function vf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function qO(e,t){e._appendCommentNode(t,e.openElements.items[0])}function YO(e,t){e._appendCommentNode(t,e.document)}function Sf(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 WO(e,t){e._setDocumentType(t);const n=t.forceQuirks?Ln.QUIRKS:_O(t);wO(t)||e._err(t,ne.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Gs(e,t){e._err(t,ne.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ln.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function GO(e,t){t.tagID===m.HTML?(e._insertElement(t,le.HTML),e.insertionMode=M.BEFORE_HEAD):Ks(e,t)}function KO(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&Ks(e,t)}function Ks(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function QO(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:Qs(e,t)}}function XO(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?Qs(e,t):e._err(t,ne.endTagWithoutMatchingOpenElement)}function Qs(e,t){e._insertFakeElement(Q.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function Gn(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,wt.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,wt.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,wt.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,wt.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,ne.misplacedStartTagForHeadElement);break}default:Xs(e,t)}}function JO(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:{Xs(e,t);break}case m.TEMPLATE:{Mi(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Mi(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,ne.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ne.endTagWithoutMatchingOpenElement)}function Xs(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function ZO(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:{Gn(e,t);break}case m.NOSCRIPT:{e._err(t,ne.nestedNoscriptInHead);break}default:Js(e,t)}}function eI(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case m.BR:{Js(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Js(e,t){const n=t.type===Ve.EOF?ne.openElementsLeftAfterEof:ne.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function tI(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,ne.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),Gn(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:Zs(e,t)}}function nI(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{Zs(e,t);break}case m.TEMPLATE:{Mi(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Zs(e,t){e._insertFakeElement(Q.BODY,m.BODY),e.insertionMode=M.IN_BODY,Ku(e,t)}function Ku(e,t){switch(t.type){case Ve.CHARACTER:{fE(e,t);break}case Ve.WHITESPACE_CHARACTER:{dE(e,t);break}case Ve.COMMENT:{vf(e,t);break}case Ve.START_TAG:{Kt(e,t);break}case Ve.END_TAG:{Qu(e,t);break}case Ve.EOF:{yE(e,t);break}}}function dE(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function fE(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function rI(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function iI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function oI(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 sI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function aI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Tf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,le.HTML)}function uI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function lI(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 cI(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 dI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=wt.PLAINTEXT}function fI(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 hI(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Q.A);n&&(_f(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 pI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mI(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(_f(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function gI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function EI(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ln.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function hE(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function pE(e){const t=Y1(e,Di.TYPE);return t!=null&&t.toLowerCase()===DO}function yI(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),pE(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function bI(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function TI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function xI(e,t){t.tagName=Q.IMG,t.tagID=m.IMG,hE(e,t)}function wI(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=wt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function _I(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,wt.RAWTEXT)}function vI(e,t){e.framesetOk=!1,e._switchToTextParsing(t,wt.RAWTEXT)}function mE(e,t){e._switchToTextParsing(t,wt.RAWTEXT)}function SI(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 AI(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function CI(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function kI(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,le.HTML)}function NI(e,t){e._reconstructActiveFormattingElements(),sE(t),wf(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function OI(e,t){e._reconstructActiveFormattingElements(),aE(t),wf(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function gE(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:{pI(e,t);break}case m.A:{hI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{aI(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:{sI(e,t);break}case m.LI:case m.DD:case m.DT:{cI(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{hE(e,t);break}case m.HR:{TI(e,t);break}case m.RB:case m.RTC:{CI(e,t);break}case m.RT:case m.RP:{kI(e,t);break}case m.PRE:case m.LISTING:{uI(e,t);break}case m.XMP:{_I(e,t);break}case m.SVG:{OI(e,t);break}case m.HTML:{rI(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:{Gn(e,t);break}case m.BODY:{iI(e,t);break}case m.FORM:{lI(e,t);break}case m.NOBR:{mI(e,t);break}case m.MATH:{NI(e,t);break}case m.TABLE:{EI(e,t);break}case m.INPUT:{yI(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{bI(e,t);break}case m.IMAGE:{xI(e,t);break}case m.BUTTON:{fI(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{gI(e,t);break}case m.IFRAME:{vI(e,t);break}case m.SELECT:{SI(e,t);break}case m.OPTION:case m.OPTGROUP:{AI(e,t);break}case m.NOEMBED:case m.NOFRAMES:{mE(e,t);break}case m.FRAMESET:{oI(e,t);break}case m.TEXTAREA:{wI(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?mE(e,t):gE(e,t);break}case m.PLAINTEXT:{dI(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:gE(e,t)}}function II(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 RI(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=M.AFTER_BODY,AE(e,t))}function PI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function LI(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 DI(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(Q.P,m.P),e._closePElement()}function MI(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function FI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function BI(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function UI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function HI(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Q.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function EE(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 Qu(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:{_f(e,t);break}case m.P:{DI(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:{PI(e,t);break}case m.LI:{MI(e);break}case m.DD:case m.DT:{FI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{BI(e);break}case m.BR:{HI(e);break}case m.BODY:{II(e,t);break}case m.HTML:{RI(e,t);break}case m.FORM:{LI(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{UI(e,t);break}case m.TEMPLATE:{Mi(e,t);break}default:EE(e,t)}}function yE(e,t){e.tmplInsertionModeStack.length>0?SE(e,t):Sf(e,t)}function zI(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 jI(e,t){e._err(t,ne.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Af(e,t){if(e.openElements.currentTagId!==void 0&&uE.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 Ve.CHARACTER:{TE(e,t);break}case Ve.WHITESPACE_CHARACTER:{bE(e,t);break}}else ta(e,t)}function $I(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CAPTION}function VI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function qI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.COLGROUP,m.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,Cf(e,t)}function YI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_TABLE_BODY}function WI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.TBODY,m.TBODY),e.insertionMode=M.IN_TABLE_BODY,Ju(e,t)}function GI(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function KI(e,t){pE(t)?e._appendElement(t,le.HTML):ta(e,t),t.ackSelfClosing=!0}function QI(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ko(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{WI(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{Gn(e,t);break}case m.COL:{qI(e,t);break}case m.FORM:{QI(e,t);break}case m.TABLE:{GI(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{YI(e,t);break}case m.INPUT:{KI(e,t);break}case m.CAPTION:{$I(e,t);break}case m.COLGROUP:{VI(e,t);break}default:ta(e,t)}}function ea(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{Mi(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:ta(e,t)}}function ta(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ku(e,t),e.fosterParentingEnabled=n}function bE(e,t){e.pendingCharacterTokens.push(t)}function TE(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function na(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ta(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const xE=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function XI(e,t){const n=t.tagID;xE.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,ko(e,t)):Kt(e,t)}function JI(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&&ea(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:Qu(e,t)}}function Cf(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:{Gn(e,t);break}default:Xu(e,t)}}function ZI(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:{Mi(e,t);break}case m.COL:break;default:Xu(e,t)}}function Xu(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function Ju(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(Q.TR,m.TR),e.insertionMode=M.IN_ROW,Zu(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,ko(e,t));break}default:ko(e,t)}}function kf(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,ea(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:ea(e,t)}}function Zu(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,Ju(e,t));break}default:ko(e,t)}}function wE(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,kf(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,kf(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:ea(e,t)}}function eR(e,t){const n=t.tagID;xE.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),Zu(e,t)):Kt(e,t)}function tR(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(),wE(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:Qu(e,t)}}function _E(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:{Gn(e,t);break}}}function vE(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:{Mi(e,t);break}}}function nR(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)):_E(e,t)}function rR(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)):vE(e,t)}function iR(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:{Gn(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,ko(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,Cf(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,Ju(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,Zu(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,Kt(e,t)}}function oR(e,t){t.tagID===m.TEMPLATE&&Mi(e,t)}function SE(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Sf(e,t)}function sR(e,t){t.tagID===m.HTML?Kt(e,t):el(e,t)}function AE(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 el(e,t)}function el(e,t){e.insertionMode=M.IN_BODY,Ku(e,t)}function aR(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:{Gn(e,t);break}}}function uR(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 lR(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.NOFRAMES:{Gn(e,t);break}}}function cR(e,t){t.tagID===m.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function dR(e,t){t.tagID===m.HTML?Kt(e,t):tl(e,t)}function tl(e,t){e.insertionMode=M.IN_BODY,Ku(e,t)}function fR(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.NOFRAMES:{Gn(e,t);break}}}function hR(e,t){t.chars=ht,e._insertCharacters(t)}function pR(e,t){e._insertCharacters(t),e.framesetOk=!1}function CE(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 mR(e,t){if(OO(t))CE(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?sE(t):r===le.SVG&&(IO(t),aE(t)),wf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function gR(e,t){if(t.tagID===m.P||t.tagID===m.BR){CE(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}}}Q.AREA,Q.BASE,Q.BASEFONT,Q.BGSOUND,Q.BR,Q.COL,Q.EMBED,Q.FRAME,Q.HR,Q.IMG,Q.INPUT,Q.KEYGEN,Q.LINK,Q.META,Q.PARAM,Q.SOURCE,Q.TRACK,Q.WBR;const ER=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,yR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),kE={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function NE(e,t){const n=kR(e),r=z1("type",{handlers:{root:bR,element:TR,text:xR,comment:IE,doctype:wR,raw:vR},unknown:SR}),o={parser:n?new cE(kE):cE.getFragmentParser(void 0,kE),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),No(o,cr());const a=n?o.parser.document:o.parser.getFragment(),u=bN(a,{file:o.options.file});return o.stitches&&Vu(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 OE(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function bR(e,t){OE(e.children,t)}function TR(e,t){AR(e,t),OE(e.children,t),CR(e,t)}function xR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ve.CHARACTER,chars:e.value,location:ra(e)};No(t,cr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function wR(e,t){const n={type:Ve.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ra(e)};No(t,cr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function _R(e,t){t.stitches=!0;const n=NR(e);if("children"in e&&"children"in n){const r=NE({type:"root",children:e.children},t.options);n.children=r.children}IE({type:"comment",value:{stitch:n}},t)}function IE(e,t){const n=e.value,r={type:Ve.COMMENT,data:n,location:ra(e)};No(t,cr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function vR(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,RE(t,cr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(ER,"<$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 SR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))_R(n,t);else{let r="";throw yR.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 No(e,t){RE(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=wt.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 RE(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 AR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===wt.PLAINTEXT)return;No(t,cr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Pi.html;o===Pi.html&&n==="svg"&&(o=Pi.svg);const a=LN(ie(B({},e),{children:[]}),{space:o===Pi.svg?"svg":"html"}),u={type:Ve.START_TAG,tagName:n,tagID:Co(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ra(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function CR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&jN.includes(n)||t.parser.tokenizer.state===wt.PLAINTEXT)return;No(t,Pu(e));const r={type:Ve.END_TAG,tagName:n,tagID:Co(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ra(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===wt.RCDATA||t.parser.tokenizer.state===wt.RAWTEXT||t.parser.tokenizer.state===wt.SCRIPT_DATA)&&(t.parser.tokenizer.state=wt.DATA)}function kR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ra(e){const t=cr(e)||{line:void 0,column:void 0,offset:void 0},n=Pu(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 NR(e){return"children"in e?Ri(ie(B({},e),{children:[]})):Ri(e)}function PE(e){return function(t,n){return NE(t,ie(B({},e),{file:n}))}}const Fi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],LE={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Fi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Fi],h2:[["className","sr-only"]],img:[...Fi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Fi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Fi],table:[...Fi],ul:[...Fi,["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"]},Xr={}.hasOwnProperty;function OR(e,t){let n={type:"root",children:[]};const r={schema:t?B(B({},LE),t):LE,stack:[]},o=DE(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function DE(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return IR(e,n);case"doctype":return RR(e,n);case"element":return PR(e,n);case"root":return LR(e,n);case"text":return DR(e,n)}}}function IR(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 ia(a,t),a}}function RR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ia(n,t),n}}function PR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=ME(e,t.children),o=MR(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&&Xr.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 ia(u,t),u}function LR(e,t){const r={type:"root",children:ME(e,t.children)};return ia(r,t),r}function DR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return ia(r,t),r}function ME(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=DE(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function MR(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Xr.call(r,n)?r[n]:void 0,u=r&&Xr.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let h;for(h in c)if(Xr.call(c,h)){const p=c[h];let g=FE(e,UE(a,h),h,p);g==null&&(g=FE(e,UE(u,h),h,p)),g!=null&&(d[h]=g)}if(o&&Xr.call(o,n)){const p=o[n];for(h in p)Xr.call(p,h)&&!Xr.call(d,h)&&(d[h]=p[h])}return d}function FE(e,t,n,r){return t?Array.isArray(r)?FR(e,t,n,r):BE(e,t,n,r):void 0}function FR(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=BE(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function BE(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&BR(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 BR(e,t,n){const r=e.schema.protocols&&Xr.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 ia(e,t){const n=Tg(t);t.data&&(e.data=Ri(t.data)),n&&(e.position=n)}function UE(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 UR(e){return function(t){return OR(t,e)}}const HE=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return x.jsx("a",ie(B(B({className:j(e,`${D}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},HR=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=At();return!e&&!t?null:x.jsx("div",{className:j(n,`${D}-disclaimer`),children:t?x.jsx(x1,{rehypePlugins:[PE,UR],components:{ul:({children:r})=>x.jsx("ul",{className:j(n,`${D}-ul`),children:r}),ol:({children:r})=>x.jsx("ol",{className:j(n,`${D}-ol`),children:r}),li:({children:r})=>x.jsx("li",{className:j(n,`${D}-li`),children:r}),a:({href:r,title:o,children:a})=>x.jsx(HE,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>x.jsx("img",{className:j(n,`${D}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>x.jsx("p",{className:j(n,`${D}-disclaimer-text`),children:r}),span:({children:r})=>x.jsx("span",{className:j(n,`${D}-disclaimer-text-span`),children:r})},children:t}):x.jsx("p",{className:j(n,`${D}-disclaimer-text`),children:e})})},Nf=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:o,sessionExpired:a}=Yn(),{globalClassName:u,searchConfig:c}=At(),d=Z.useRef(null),h=t||!o&&!a,p=T=>{var w;T.preventDefault();const y=(((w=d.current)==null?void 0:w.value)||"").trim();y&&(d.current.value="",r(y))},g=()=>{r("Can you connect me to a human?")};return x.jsxs("div",{className:j(u,e,`cim-${n}-component`,`${D}-search-bar-wrapper`),children:[x.jsxs("form",{className:j(u,e,`cim-${n}-component`,`${D}-search-bar`),name:`${D}-search-form`,onSubmit:p,children:[x.jsx("input",{className:j(u,e,`cim-${n}-component`,`${D}-search-input`),type:"text",ref:d,placeholder:(c==null?void 0:c.placeholder)||"Ask us anything",name:`${D}-user-input`,disabled:h}),x.jsx(uA,{className:e,globalClassName:u,searchConfig:c,componentType:n,isLoading:h}),x.jsx(lr,{className:j(u,`${D}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:h,onClick:g,icon:x.jsx(QS,{})})]}),x.jsx(HR,{})]})};function zR(e){return ft({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 zE=Z.createContext({isOpen:!1}),Of=Z.createContext(null),jE=Z.createContext(null),oa=()=>{var n,r;const e=Z.useContext(Of),t=Z.useContext(jE);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},$E=({onClearChat:e,componentType:t})=>{const n=oa(),r=()=>{e(),n()};return x.jsxs("button",{className:j(`${D}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[x.jsx(zR,{}),"Clear chat"]})};function jR(e){return e==null?[]:Array.isArray(e)?e:[e]}var $R=(e,...t)=>e.concat(t),VR=(e,...t)=>e.filter(n=>!t.includes(n)),qR=e=>Array.from(new Set(e));function VE(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 YR(e,t,n={}){const{step:r=1,loop:o=!0}=n;return VE(e,t,{step:-r,loop:o})}var WR=e=>Array.isArray(e),qE=e=>e!=null&&typeof e=="object",GR=e=>qE(e)&&!WR(e),nl=e=>typeof e=="string",Oo=e=>typeof e=="function",KR=e=>e==null,QR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),XR=e=>Object.prototype.toString.call(e),YE=Function.prototype.toString,JR=YE.call(Object),ZR=e=>{if(!qE(e)||XR(e)!="[object Object]"||nP(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=QR(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&YE.call(n)==JR},eP=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,tP=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,nP=e=>eP(e)||tP(e),rP=e=>e(),iP=()=>{},If=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function oP(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:sP,max:aP}=Math,uP=e=>Number.isNaN(e),lP=e=>uP(e)?0:e,WE=(e,t,n)=>sP(aP(lP(e),t),n);function Rf(e){if(!ZR(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]=Rf(o))}return n}function Pf(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function cP(e,t){if(e==null)throw new Error(t())}function dP(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 fP=Object.defineProperty,hP=(e,t,n)=>t in e?fP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lf=(e,t,n)=>hP(e,typeof t!="symbol"?t+"":t,n),GE=()=>{},rl=e=>typeof e=="object"&&e!==null,Io=e=>e?"":void 0,KE=e=>e?"true":void 0,pP=1,mP=9,gP=11,Ft=e=>rl(e)&&e.nodeType===pP&&typeof e.nodeName=="string",il=e=>rl(e)&&e.nodeType===mP,EP=e=>rl(e)&&e===e.window,QE=e=>Ft(e)?e.localName||"":"#document";function yP(e){return["html","body","#document"].includes(QE(e))}var bP=e=>rl(e)&&e.nodeType!==void 0,Bi=e=>bP(e)&&e.nodeType===gP&&"host"in e,TP=e=>Ft(e)&&e.localName==="input",xP=e=>Ft(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function sa(e){if(!e)return!1;const t=e.getRootNode();return Lo(t)===e}var wP=/(textarea|select)/;function _P(e){if(e==null||!Ft(e))return!1;try{return TP(e)&&e.selectionStart!=null||wP.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Ro(e,t){var r;if(!e||!t||!Ft(e)||!Ft(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Bi(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function hr(e){var t;return il(e)?e:EP(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function vP(e){return hr(e).documentElement}function Po(e){var t,n,r;return Bi(e)?Po(e.host):il(e)?(t=e.defaultView)!=null?t:window:Ft(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Lo(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 SP(e){if(QE(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bi(e)&&e.host||vP(e);return Bi(t)?t.host:t}function Df(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),il(t)||Bi(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Mf=new WeakMap;function Do(e){return Mf.has(e)||Mf.set(e,Po(e).getComputedStyle(e)),Mf.get(e)}var Ff=new Set(["menu","listbox","dialog","grid","tree","region"]),AP=e=>Ff.has(e),XE=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function JE(e,t){const n=new Set,r=Df(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=XE(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"),T=p.getAttribute("aria-modal")==="true";if(g&&AP(g)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function ZE(e,t){const n=Df(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=XE(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"),T=p.getAttribute("aria-modal")==="true";g&&Ff.has(g)&&!T&&(t(p),o(p))}}}};o(e)}function CP(e){const t=new Set;return ZE(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function kP(e){const t=e.getAttribute("role");return!!(t&&Ff.has(t))}function NP(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function OP(e){var t;return NP(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function IP(e){if(!e.id)return!1;const t=Df(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&kP(e))}var Bf=()=>typeof document!="undefined";function RP(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Uf=e=>Bf()&&e.test(RP()),PP=e=>Bf()&&e.test(navigator.vendor),ey=()=>Bf()&&!!navigator.maxTouchPoints,LP=()=>Uf(/^iPhone/i),DP=()=>Uf(/^iPad/i)||Hf()&&navigator.maxTouchPoints>1,ol=()=>LP()||DP(),MP=()=>Hf()||ol(),Hf=()=>Uf(/^Mac/i),FP=()=>MP()&&PP(/apple/i);function BP(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 Kn(e){var n;const t=BP(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var ty=e=>e.button===0,UP=e=>e.button===2||Hf()&&e.ctrlKey&&e.button===0,HP=e=>"touches"in e&&e.touches.length>0,zP={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},ny={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function jP(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=zP[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in ny&&(o=ny[o]),o}function ry(e,t="client"){const n=HP(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Bt=(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)}},iy=e=>Ft(e)&&e.tagName==="IFRAME",$P=/^(audio|video|details)$/;function oy(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var VP=e=>!Number.isNaN(oy(e)),qP=e=>oy(e)<0;function YP(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 sy(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=YP(d,t);if(h){const p=Array.from(h.querySelectorAll(sl)).filter(n),g=u.get(d);if(g!==void 0){const T=g+1;r.splice(T,0,...p),p.forEach((y,w)=>{u.set(y,T+w)});for(let y=T+p.length;y<r.length;y++)u.set(r[y],y)}else{const T=r.length;r.push(...p),p.forEach((y,w)=>{u.set(y,T+w)})}o.push(...p)}}return r}var sl="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",ay=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(sl));(n==!0||n=="if-empty"&&o.length===0)&&Ft(e)&&pr(e)&&o.unshift(e);const u=[];for(const c of o)if(pr(c)){if(iy(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...ay(d,{getShadowRoot:r}));continue}u.push(c)}return r?sy(u,r,pr):u};function pr(e){return!Ft(e)||e.closest("[inert]")?!1:e.matches(sl)&&xP(e)}function Mo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(sl));n&&Ui(e)&&o.unshift(e);const a=[];for(const u of o)if(Ui(u)){if(iy(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Mo(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=sy(a,r,Ui);return!u.length&&n?o:u}return!a.length&&n?o:a}function Ui(e){return Ft(e)&&e.tabIndex>0?!0:pr(e)&&!qP(e)}function WP(e,t={}){const n=Mo(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function GP(e,t={}){const{current:n,getShadowRoot:r}=t,o=Mo(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Lo(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function aa(e){return e.tabIndex<0&&($P.test(e.localName)||_P(e))&&!VP(e)?0:e.tabIndex}function uy(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=Mo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var KP=class l2{constructor(){Lf(this,"id",null),Lf(this,"fn_cleanup"),Lf(this,"cleanup",()=>{this.cancel()})}static create(){return new l2}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function Ot(e){const t=KP.create();return t.request(e),t.cleanup}function ly(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 zf(e){const t=SP(e);return yP(t)?hr(t).body:Ft(t)&&JP(t)?t:zf(t)}var QP=/auto|scroll|overlay|hidden|clip/,XP=new Set(["inline","contents"]);function JP(e){const t=Po(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return QP.test(n+o+r)&&!XP.has(a)}var Fo="default",jf="",al=new WeakMap;function ZP(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return ol()?(Fo==="default"&&(jf=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Fo="disabled"):t&&(al.set(t,t.style.userSelect),t.style.userSelect="none"),()=>e6({target:t,doc:r})}function e6(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(ol()){if(Fo!=="disabled")return;Fo="restoring",setTimeout(()=>{ly(()=>{Fo==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=jf||""),jf="",Fo="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 t6(e={}){const u=e,{defer:t,target:n}=u,r=sn(u,["defer","target"]),o=t?Ot:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(ZP(ie(B({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function n6(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=ry(c),h=Math.sqrt(ou(d.x,2)+ou(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=ry(c);r({point:d,event:c})},u=[Bt(e,"pointermove",o,!1),Bt(e,"pointerup",a,!1),Bt(e,"pointercancel",a,!1),Bt(e,"contextmenu",a,!1),t6({doc:e})];return()=>{u.forEach(c=>c())}}function r6(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,T]=WP(e,{includeContainer:!0,getShadowRoot:a}),y=GP(c,{current:n,getShadowRoot:a}),w=!g&&!T;h.shiftKey&&sa(y)?(o==null||o(),p=T):h.shiftKey&&(sa(g)||w)?p=n:!h.shiftKey&&sa(n)?(o==null||o(),p=g):!h.shiftKey&&(sa(T)||w)&&(p=y),p&&(h.preventDefault(),typeof r=="function"?r(p):p.focus())}return Bt(u,"keydown",d,!0)}function i6(e,t){const c=t,{defer:n,triggerElement:r}=c,o=sn(c,["defer","triggerElement"]),a=n?Ot:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof r=="function"?r():r;u.push(r6(d,B({triggerElement:h},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function o6(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function ul(e,t){if(!e)return GE;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 s6(e,t,n){if(!e)return GE;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 a6(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 u6(e,t){const{timeout:n,rootNode:r}=t,o=Po(r),a=hr(r),u=new o.AbortController;return a6(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 l6=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),c6=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,cy=e=>{const t={};let n;for(;n=c6.exec(e);)t[n[1]]=n[2];return t},d6=(e,t)=>{if(nl(e)){if(nl(t))return`${e};${t}`;e=cy(e)}else nl(t)&&(t=cy(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]=If(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=l6(t[o],n[o]);continue}if(o==="style"){t[o]=d6(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 HF(e){return e}var Bo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Bo||{}),$f="__init__";function f6(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>hr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Lo(t()),a=u=>t().getElementById(u);return ie(B({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:sa,getById:a})}function h6(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Uo=()=>e=>Array.from(new Set(e)),dy=typeof globalThis.document!="undefined"?Z.useLayoutEffect:Z.useEffect;function ll(e){var g,T;const t=(g=e().value)!=null?g:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=Z.useState(t),[o,a]=Z.useState(r),u=e().value!==void 0,c=Z.useRef(o);c.current=u?e().value:o;const d=Z.useRef(c.current);dy(()=>{d.current=c.current},[o,e().value]);const h=y=>{var A,C;const w=d.current,v=Oo(y)?y(w):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:w}),u||a(v),n(v,w)||(C=(A=e()).onChange)==null||C.call(A,v,w)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Ps.flushSync:rP)(()=>h(y))},invoke(y,w){var v,A;(A=(v=e()).onChange)==null||A.call(v,y,w)},hash(y){var w,v,A;return(A=(v=(w=e()).hash)==null?void 0:v.call(w,y))!=null?A:String(y)}}}ll.cleanup=e=>{Z.useEffect(()=>e,[])},ll.ref=e=>{const t=Z.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function p6(e){const t=Z.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var m6=(e,t)=>{const n=Z.useRef(!1),r=Z.useRef(!1);Z.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),Z.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function cl(e,t={}){var oe,he,ae,se,Te,Ce;const n=Z.useMemo(()=>{const{id:ee,ids:V,getRootNode:q}=t;return f6({id:ee,ids:V,getRootNode:q})},[t]),r=(...ee)=>{e.debug&&console.log(...ee)},o=(he=(oe=e.props)==null?void 0:oe.call(e,{props:Rf(t),scope:n}))!=null?he:t,a=g6(o),u=(ae=e.context)==null?void 0:ae.call(e,{prop:a,bindable:ll,scope:n,flush:hy,getContext(){return d},getComputed(){return Y},getRefs(){return v},getEvent(){return y()}}),c=fy(u),d={get(ee){var V;return(V=c.current)==null?void 0:V[ee].ref.current},set(ee,V){var q;(q=c.current)==null||q[ee].set(V)},initial(ee){var V;return(V=c.current)==null?void 0:V[ee].initial},hash(ee){var q,S;const V=(q=c.current)==null?void 0:q[ee].get();return(S=c.current)==null?void 0:S[ee].hash(V)}},h=Z.useRef(new Map),p=Z.useRef(null),g=Z.useRef(null),T=Z.useRef({type:""}),y=()=>ie(B({},T.current),{current(){return T.current},previous(){return g.current}}),w=()=>ie(B({},F),{matches(...ee){return ee.includes(F.ref.current)},hasTag(ee){var V,q;return!!((q=(V=e.states[F.ref.current])==null?void 0:V.tags)!=null&&q.includes(ee))}}),v=p6((Te=(se=e.refs)==null?void 0:se.call(e,{prop:a,context:d}))!=null?Te:{}),A=()=>({state:w(),context:d,event:y(),prop:a,send:z,action:C,guard:k,track:m6,refs:v,computed:Y,flush:hy,scope:n,choose:U}),C=ee=>{const V=Oo(ee)?ee(A()):ee;if(!V)return;const q=V.map(S=>{var W,O;const I=(O=(W=e.implementations)==null?void 0:W.actions)==null?void 0:O[S];return I||Pf(`[zag-js] No implementation found for action "${JSON.stringify(S)}"`),I});for(const S of q)S==null||S(A())},k=ee=>{var V,q;return Oo(ee)?ee(A()):(q=(V=e.implementations)==null?void 0:V.guards)==null?void 0:q[ee](A())},R=ee=>{const V=Oo(ee)?ee(A()):ee;if(!V)return;const q=V.map(I=>{var O,be;const W=(be=(O=e.implementations)==null?void 0:O.effects)==null?void 0:be[I];return W||Pf(`[zag-js] No implementation found for effect "${JSON.stringify(I)}"`),W}),S=[];for(const I of q){const W=I==null?void 0:I(A());W&&S.push(W)}return()=>S.forEach(I=>I==null?void 0:I())},U=ee=>jR(ee).find(V=>{let q=!V.guard;return nl(V.guard)?q=!!k(V.guard):Oo(V.guard)&&(q=V.guard(A())),q}),Y=ee=>{cP(e.computed,()=>"[zag-js] No computed object found on machine");const V=e.computed[ee];return V({context:d,event:y(),prop:a,refs:v,scope:n,computed:Y})},F=ll(()=>({defaultValue:e.initialState({prop:a}),onChange(ee,V){var S,I,W,O;if(V){const be=h.current.get(V);be==null||be(),h.current.delete(V)}V&&C((S=e.states[V])==null?void 0:S.exit),C((I=p.current)==null?void 0:I.actions);const q=R((W=e.states[ee])==null?void 0:W.effects);if(q&&h.current.set(ee,q),V===$f){C(e.entry);const be=R(e.effects);be&&h.current.set($f,be)}C((O=e.states[ee])==null?void 0:O.entry)}})),X=Z.useRef(void 0),ce=Z.useRef(Bo.NotStarted);dy(()=>{queueMicrotask(()=>{var I;const q=ce.current===Bo.Started;ce.current=Bo.Started,r(q?"rehydrating...":"initializing...");const S=(I=X.current)!=null?I:F.initial;F.invoke(S,q?F.get():$f)});const ee=h.current,V=F.ref.current;return()=>{r("unmounting..."),X.current=V,ce.current=Bo.Stopped,ee.forEach(q=>q==null?void 0:q()),h.current=new Map,p.current=null,queueMicrotask(()=>{C(e.exit)})}},[]);const de=()=>"ref"in F?F.ref.current:F.get(),z=ee=>{queueMicrotask(()=>{var O,be,Oe,Re,He;if(ce.current!==Bo.Started)return;g.current=T.current,T.current=ee;let V=de();const q=(Oe=(O=e.states[V].on)==null?void 0:O[ee.type])!=null?Oe:(be=e.on)==null?void 0:be[ee.type],S=U(q);if(!S)return;p.current=S;const I=(Re=S.target)!=null?Re:V;r("transition",ee.type,S.target||V,`(${S.actions})`);const W=I!==V;W?Ps.flushSync(()=>F.set(I)):S.reenter&&!W?F.invoke(V,V):C((He=S.actions)!=null?He:[])})};return(Ce=e.watch)==null||Ce.call(e,A()),{state:w(),send:z,context:d,prop:a,scope:n,refs:v,computed:Y,event:y(),getStatus:()=>ce.current}}function fy(e){const t=Z.useRef(e);return t.current=e,t}function g6(e){const t=fy(e);return function(r){return t.current[r]}}function hy(e){queueMicrotask(()=>{Ps.flushSync(()=>e())})}var Vf=h6(e=>e);function dl(...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 E6(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 qf=e=>{const t=Z.memo(Z.forwardRef((n,r)=>{const h=n,{asChild:o,children:a}=h,u=sn(h,["asChild","children"]);if(!o)return Z.createElement(e,ie(B({},u),{ref:r}),a);if(!Z.isValidElement(a))return null;const c=Z.Children.only(a),d=E6(c);return Z.cloneElement(c,ie(B({},It(u,c.props)),{ref:r?dl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Qt=(()=>{const e=new Map;return new Proxy(qf,{apply(t,n,r){return qf(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,qf(r)),e.get(r)}})})();function y6(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Hi(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=Z.createContext(u);c.displayName=t;function d(){var p;const h=Z.useContext(c);if(!h&&n){const g=new Error(a!=null?a:y6(r,o));throw g.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,g,d),g}return h}return[c.Provider,d,c]}const[b6,Yf]=Hi({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[py,ua]=Hi({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),my=Z.forwardRef((e,t)=>{const n=Yf(),r=ua(),o=It(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Qt.div,ie(B({},o),{ref:dl(r.ref,t)}))});my.displayName="PopoverContent";const gy=Z.forwardRef((e,t)=>{const n=Yf(),r=ua(),o=It(n.getPositionerProps(),e);return r.unmounted?null:x.jsx(Qt.div,ie(B({},o),{ref:t}))});gy.displayName="PopoverPositioner";const la=()=>(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)]),Ey=e=>la()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function T6(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 x6={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",Do(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"});Ot(()=>{var c,d;const u=fl(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})=>{Ot(()=>{e.set("prevAnimationName",fl(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,T;((T=(g=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:g[0])!=null?T:d.target)===o&&e.set("prevAnimationName",fl(t.get("styles")))},u=d=>{const h=fl(t.get("styles"));Kn(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=ul(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),ly(()=>c())}}}}};function fl(e){return(e==null?void 0:e.animationName)||"none"}Uo()(["onExitComplete","present","immediate"]);function w6(e,t={}){const{sync:n=!1}=t,r=_6(e);return Z.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 _6(e){const t=Z.useRef(e);return t.current=e,t}const Wf=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=sn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=Z.useRef(!1),c=ie(B({},a),{present:r,onExitComplete:w6(e.onExitComplete)}),d=cl(x6,c),h=T6(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 zi=(e,t=[])=>({parts:(...n)=>{if(v6(t))return zi(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>zi(e,[...t,...n]),omit:(...n)=>zi(e,t.filter(r=>!n.includes(r))),rename:n=>zi(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Ho(e)}"][data-part="${Ho(r)}"]`,`& [data-scope="${Ho(e)}"][data-part="${Ho(r)}"]`].join(", "),attrs:{"data-scope":Ho(e),"data-part":Ho(r)}}}),{})}),Ho=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),v6=e=>e.length===0;const S6=["top","right","bottom","left"],Jr=Math.min,_n=Math.max,hl=Math.round,pl=Math.floor,mr=e=>({x:e,y:e}),A6={left:"right",right:"left",bottom:"top",top:"bottom"},C6={start:"end",end:"start"};function Gf(e,t,n){return _n(e,Jr(t,n))}function Nr(e,t){return typeof e=="function"?e(t):e}function Or(e){return e.split("-")[0]}function zo(e){return e.split("-")[1]}function Kf(e){return e==="x"?"y":"x"}function Qf(e){return e==="y"?"height":"width"}const k6=new Set(["top","bottom"]);function gr(e){return k6.has(Or(e))?"y":"x"}function Xf(e){return Kf(gr(e))}function N6(e,t,n){n===void 0&&(n=!1);const r=zo(e),o=Xf(e),a=Qf(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=ml(u)),[u,ml(u)]}function O6(e){const t=ml(e);return[Jf(e),t,Jf(t)]}function Jf(e){return e.replace(/start|end/g,t=>C6[t])}const yy=["left","right"],by=["right","left"],I6=["top","bottom"],R6=["bottom","top"];function P6(e,t,n){switch(e){case"top":case"bottom":return n?t?by:yy:t?yy:by;case"left":case"right":return t?I6:R6;default:return[]}}function L6(e,t,n,r){const o=zo(e);let a=P6(Or(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Jf)))),a}function ml(e){return e.replace(/left|right|bottom|top/g,t=>A6[t])}function D6(e){return B({top:0,right:0,bottom:0,left:0},e)}function Ty(e){return typeof e!="number"?D6(e):{top:e,right:e,bottom:e,left:e}}function gl(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 xy(e,t,n){let{reference:r,floating:o}=e;const a=gr(t),u=Xf(t),c=Qf(u),d=Or(t),h=a==="y",p=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,T=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]-=T*(n&&h?-1:1);break;case"end":y[u]+=T*(n&&h?-1:1);break}return y}const M6=(e,t,n)=>$e(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}=xy(h,r,d),T=r,y={},w=0;for(let v=0;v<c.length;v++){const{name:A,fn:C}=c[v],{x:k,y:R,data:U,reset:Y}=yield C({x:p,y:g,initialPlacement:r,placement:T,strategy:o,middlewareData:y,rects:h,platform:u,elements:{reference:e,floating:t}});p=k!=null?k:p,g=R!=null?R:g,y=ie(B({},y),{[A]:B(B({},y[A]),U)}),Y&&w<=50&&(w++,typeof Y=="object"&&(Y.placement&&(T=Y.placement),Y.rects&&(h=Y.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):Y.rects),{x:p,y:g}=xy(h,T,d)),v=-1)}return{x:p,y:g,placement:T,strategy:o,middlewareData:y}});function ca(e,t){return $e(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:T=!1,padding:y=0}=Nr(t,e),w=Ty(y),A=c[T?g==="floating"?"reference":"floating":g],C=gl(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,R=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),U=(yield a.isElement==null?void 0:a.isElement(R))?(yield a.getScale==null?void 0:a.getScale(R))||{x:1,y:1}:{x:1,y:1},Y=gl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:k,offsetParent:R,strategy:d}):k);return{top:(C.top-Y.top+w.top)/U.y,bottom:(Y.bottom-C.bottom+w.bottom)/U.y,left:(C.left-Y.left+w.left)/U.x,right:(Y.right-C.right+w.right)/U.x}})}const F6=e=>({name:"arrow",options:e,fn(n){return $e(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:h}=n,{element:p,padding:g=0}=Nr(e,n)||{};if(p==null)return{};const T=Ty(g),y={x:r,y:o},w=Xf(a),v=Qf(w),A=yield c.getDimensions(p),C=w==="y",k=C?"top":"left",R=C?"bottom":"right",U=C?"clientHeight":"clientWidth",Y=u.reference[v]+u.reference[w]-y[w]-u.floating[v],F=y[w]-u.reference[w],X=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ce=X?X[U]:0;(!ce||!(yield c.isElement==null?void 0:c.isElement(X)))&&(ce=d.floating[U]||u.floating[v]);const de=Y/2-F/2,z=ce/2-A[v]/2-1,oe=Jr(T[k],z),he=Jr(T[R],z),ae=oe,se=ce-A[v]-he,Te=ce/2-A[v]/2+de,Ce=Gf(ae,Te,se),ee=!h.arrow&&zo(a)!=null&&Te!==Ce&&u.reference[v]/2-(Te<ae?oe:he)-A[v]/2<0,V=ee?Te<ae?Te-ae:Te-se:0;return{[w]:y[w]+V,data:B({[w]:Ce,centerOffset:Te-Ce-V},ee&&{alignmentOffset:V}),reset:ee}})}}),B6=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return $e(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:h,elements:p}=n,Te=Nr(e,n),{mainAxis:g=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:A=!0}=Te,C=sn(Te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const k=Or(a),R=gr(d),U=Or(d)===d,Y=yield h.isRTL==null?void 0:h.isRTL(p.floating),F=y||(U||!A?[ml(d)]:O6(d)),X=v!=="none";!y&&X&&F.push(...L6(d,A,v,Y));const ce=[d,...F],de=yield ca(n,C),z=[];let oe=((o=u.flip)==null?void 0:o.overflows)||[];if(g&&z.push(de[k]),T){const Ce=N6(a,c,Y);z.push(de[Ce[0]],de[Ce[1]])}if(oe=[...oe,{placement:a,overflows:z}],!z.every(Ce=>Ce<=0)){var he,ae;const Ce=(((he=u.flip)==null?void 0:he.index)||0)+1,ee=ce[Ce];if(ee&&(!(T==="alignment"?R!==gr(ee):!1)||oe.every(S=>gr(S.placement)===R?S.overflows[0]>0:!0)))return{data:{index:Ce,overflows:oe},reset:{placement:ee}};let V=(ae=oe.filter(q=>q.overflows[0]<=0).sort((q,S)=>q.overflows[1]-S.overflows[1])[0])==null?void 0:ae.placement;if(!V)switch(w){case"bestFit":{var se;const q=(se=oe.filter(S=>{if(X){const I=gr(S.placement);return I===R||I==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(I=>I>0).reduce((I,W)=>I+W,0)]).sort((S,I)=>S[1]-I[1])[0])==null?void 0:se[0];q&&(V=q);break}case"initialPlacement":V=d;break}if(a!==V)return{reset:{placement:V}}}return{}})}}};function wy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _y(e){return S6.some(t=>e[t]>=0)}const U6=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return $e(this,null,function*(){const{rects:r}=n,u=Nr(e,n),{strategy:o="referenceHidden"}=u,a=sn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield ca(n,ie(B({},a),{elementContext:"reference"})),d=wy(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:_y(d)}}}case"escaped":{const c=yield ca(n,ie(B({},a),{altBoundary:!0})),d=wy(c,r.floating);return{data:{escapedOffsets:d,escaped:_y(d)}}}default:return{}}})}}},vy=new Set(["left","top"]);function H6(e,t){return $e(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Or(n),c=zo(n),d=gr(n)==="y",h=vy.has(u)?-1:1,p=a&&d?-1:1,g=Nr(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:w}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&typeof w=="number"&&(y=c==="end"?w*-1:w),d?{x:y*p,y:T*h}:{x:T*h,y:y*p}})}const z6=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return $e(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,h=yield H6(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})}})}}},j6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return $e(this,null,function*(){const{x:r,y:o,placement:a}=n,C=Nr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:k=>{let{x:R,y:U}=k;return{x:R,y:U}}}}=C,h=sn(C,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},g=yield ca(n,h),T=gr(Or(a)),y=Kf(T);let w=p[y],v=p[T];if(u){const k=y==="y"?"top":"left",R=y==="y"?"bottom":"right",U=w+g[k],Y=w-g[R];w=Gf(U,w,Y)}if(c){const k=T==="y"?"top":"left",R=T==="y"?"bottom":"right",U=v+g[k],Y=v-g[R];v=Gf(U,v,Y)}const A=d.fn(ie(B({},n),{[y]:w,[T]:v}));return ie(B({},A),{data:{x:A.x-r,y:A.y-o,enabled:{[y]:u,[T]:c}}})})}}},$6=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}=Nr(e,t),p={x:n,y:r},g=gr(o),T=Kf(g);let y=p[T],w=p[g];const v=Nr(c,t),A=typeof v=="number"?{mainAxis:v,crossAxis:0}:B({mainAxis:0,crossAxis:0},v);if(d){const R=T==="y"?"height":"width",U=a.reference[T]-a.floating[R]+A.mainAxis,Y=a.reference[T]+a.reference[R]-A.mainAxis;y<U?y=U:y>Y&&(y=Y)}if(h){var C,k;const R=T==="y"?"width":"height",U=vy.has(Or(o)),Y=a.reference[g]-a.floating[R]+(U&&((C=u.offset)==null?void 0:C[g])||0)+(U?0:A.crossAxis),F=a.reference[g]+a.reference[R]+(U?0:((k=u.offset)==null?void 0:k[g])||0)-(U?A.crossAxis:0);w<Y?w=Y:w>F&&(w=F)}return{[T]:y,[g]:w}}}},V6=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return $e(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,oe=Nr(e,n),{apply:h=()=>{}}=oe,p=sn(oe,["apply"]),g=yield ca(n,p),T=Or(a),y=zo(a),w=gr(a)==="y",{width:v,height:A}=u.floating;let C,k;T==="top"||T==="bottom"?(C=T,k=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(k=T,C=y==="end"?"top":"bottom");const R=A-g.top-g.bottom,U=v-g.left-g.right,Y=Jr(A-g[C],R),F=Jr(v-g[k],U),X=!n.middlewareData.shift;let ce=Y,de=F;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(de=U),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ce=R),X&&!y){const he=_n(g.left,0),ae=_n(g.right,0),se=_n(g.top,0),Te=_n(g.bottom,0);w?de=v-2*(he!==0||ae!==0?he+ae:_n(g.left,g.right)):ce=A-2*(se!==0||Te!==0?se+Te:_n(g.top,g.bottom))}yield h(ie(B({},n),{availableWidth:de,availableHeight:ce}));const z=yield c.getDimensions(d.floating);return v!==z.width||A!==z.height?{reset:{rects:!0}}:{}})}}};function El(){return typeof window!="undefined"}function jo(e){return Sy(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Er(e){var t;return(t=(Sy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Sy(e){return El()?e instanceof Node||e instanceof vn(e).Node:!1}function Qn(e){return El()?e instanceof Element||e instanceof vn(e).Element:!1}function yr(e){return El()?e instanceof HTMLElement||e instanceof vn(e).HTMLElement:!1}function Ay(e){return!El()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}const q6=new Set(["inline","contents"]);function da(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Xn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!q6.has(o)}const Y6=new Set(["table","td","th"]);function W6(e){return Y6.has(jo(e))}const G6=[":popover-open",":modal"];function yl(e){return G6.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const K6=["transform","translate","scale","rotate","perspective"],Q6=["transform","translate","scale","rotate","perspective","filter"],X6=["paint","layout","strict","content"];function Zf(e){const t=eh(),n=Qn(e)?Xn(e):e;return K6.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)||Q6.some(r=>(n.willChange||"").includes(r))||X6.some(r=>(n.contain||"").includes(r))}function J6(e){let t=Zr(e);for(;yr(t)&&!$o(t);){if(Zf(t))return t;if(yl(t))return null;t=Zr(t)}return null}function eh(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Z6=new Set(["html","body","#document"]);function $o(e){return Z6.has(jo(e))}function Xn(e){return vn(e).getComputedStyle(e)}function bl(e){return Qn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zr(e){if(jo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ay(e)&&e.host||Er(e);return Ay(t)?t.host:t}function Cy(e){const t=Zr(e);return $o(t)?e.ownerDocument?e.ownerDocument.body:e.body:yr(t)&&da(t)?t:Cy(t)}function fa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Cy(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=vn(o);if(a){const c=th(u);return t.concat(u,u.visualViewport||[],da(o)?o:[],c&&n?fa(c):[])}return t.concat(o,fa(o,[],n))}function th(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ky(e){const t=Xn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=yr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=hl(n)!==a||hl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function nh(e){return Qn(e)?e:e.contextElement}function Vo(e){const t=nh(e);if(!yr(t))return mr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=ky(t);let u=(a?hl(n.width):n.width)/r,c=(a?hl(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const e4=mr(0);function Ny(e){const t=vn(e);return!eh()||!t.visualViewport?e4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function t4(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==vn(e)?!1:t}function ji(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=nh(e);let u=mr(1);t&&(r?Qn(r)&&(u=Vo(r)):u=Vo(e));const c=t4(a,n,r)?Ny(a):mr(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 T=vn(a),y=r&&Qn(r)?vn(r):r;let w=T,v=th(w);for(;v&&r&&y!==w;){const A=Vo(v),C=v.getBoundingClientRect(),k=Xn(v),R=C.left+(v.clientLeft+parseFloat(k.paddingLeft))*A.x,U=C.top+(v.clientTop+parseFloat(k.paddingTop))*A.y;d*=A.x,h*=A.y,p*=A.x,g*=A.y,d+=R,h+=U,w=vn(v),v=th(w)}}return gl({width:p,height:g,x:d,y:h})}function Tl(e,t){const n=bl(e).scrollLeft;return t?t.left+n:ji(Er(e)).left+n}function Oy(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Tl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function n4(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Er(r),c=t?yl(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},h=mr(1);const p=mr(0),g=yr(r);if((g||!g&&!a)&&((jo(r)!=="body"||da(u))&&(d=bl(r)),yr(r))){const y=ji(r);h=Vo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!g&&!a?Oy(u,d):mr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+p.x+T.x,y:n.y*h.y-d.scrollTop*h.y+p.y+T.y}}function r4(e){return Array.from(e.getClientRects())}function i4(e){const t=Er(e),n=bl(e),r=e.ownerDocument.body,o=_n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=_n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Tl(e);const c=-n.scrollTop;return Xn(r).direction==="rtl"&&(u+=_n(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const Iy=25;function o4(e,t){const n=vn(e),r=Er(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=eh();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const h=Tl(r);if(h<=0){const p=r.ownerDocument,g=p.body,T=getComputedStyle(g),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,w=Math.abs(r.clientWidth-g.clientWidth-y);w<=Iy&&(a-=w)}else h<=Iy&&(a+=h);return{width:a,height:u,x:c,y:d}}const s4=new Set(["absolute","fixed"]);function a4(e,t){const n=ji(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=yr(e)?Vo(e):mr(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 Ry(e,t,n){let r;if(t==="viewport")r=o4(e,n);else if(t==="document")r=i4(Er(e));else if(Qn(t))r=a4(t,n);else{const o=Ny(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return gl(r)}function Py(e,t){const n=Zr(e);return n===t||!Qn(n)||$o(n)?!1:Xn(n).position==="fixed"||Py(n,t)}function u4(e,t){const n=t.get(e);if(n)return n;let r=fa(e,[],!1).filter(c=>Qn(c)&&jo(c)!=="body"),o=null;const a=Xn(e).position==="fixed";let u=a?Zr(e):e;for(;Qn(u)&&!$o(u);){const c=Xn(u),d=Zf(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&s4.has(o.position)||da(u)&&!d&&Py(e,u))?r=r.filter(p=>p!==u):o=c,u=Zr(u)}return t.set(e,r),r}function l4(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?yl(t)?[]:u4(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((h,p)=>{const g=Ry(t,p,o);return h.top=_n(g.top,h.top),h.right=Jr(g.right,h.right),h.bottom=Jr(g.bottom,h.bottom),h.left=_n(g.left,h.left),h},Ry(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function c4(e){const{width:t,height:n}=ky(e);return{width:t,height:n}}function d4(e,t,n){const r=yr(t),o=Er(t),a=n==="fixed",u=ji(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=mr(0);function h(){d.x=Tl(o)}if(r||!r&&!a)if((jo(t)!=="body"||da(o))&&(c=bl(t)),r){const y=ji(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?Oy(o,c):mr(0),g=u.left+c.scrollLeft-d.x-p.x,T=u.top+c.scrollTop-d.y-p.y;return{x:g,y:T,width:u.width,height:u.height}}function rh(e){return Xn(e).position==="static"}function Ly(e,t){if(!yr(e)||Xn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Er(e)===n&&(n=n.ownerDocument.body),n}function Dy(e,t){const n=vn(e);if(yl(e))return n;if(!yr(e)){let o=Zr(e);for(;o&&!$o(o);){if(Qn(o)&&!rh(o))return o;o=Zr(o)}return n}let r=Ly(e,t);for(;r&&W6(r)&&rh(r);)r=Ly(r,t);return r&&$o(r)&&rh(r)&&!Zf(r)?n:r||J6(e)||n}const f4=function(e){return $e(this,null,function*(){const t=this.getOffsetParent||Dy,n=this.getDimensions,r=yield n(e.floating);return{reference:d4(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function h4(e){return Xn(e).direction==="rtl"}const p4={convertOffsetParentRelativeRectToViewportRelativeRect:n4,getDocumentElement:Er,getClippingRect:l4,getOffsetParent:Dy,getElementRects:f4,getClientRects:r4,getDimensions:c4,getScale:Vo,isElement:Qn,isRTL:h4};function My(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function m4(e,t){let n=null,r;const o=Er(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:T,height:y}=h;if(c||t(),!T||!y)return;const w=pl(g),v=pl(o.clientWidth-(p+T)),A=pl(o.clientHeight-(g+y)),C=pl(p),R={rootMargin:-w+"px "+-v+"px "+-A+"px "+-C+"px",threshold:_n(0,Jr(1,d))||1};let U=!0;function Y(F){const X=F[0].intersectionRatio;if(X!==d){if(!U)return u();X?u(!1,X):r=setTimeout(()=>{u(!1,1e-7)},1e3)}X===1&&!My(h,e.getBoundingClientRect())&&u(),U=!1}try{n=new IntersectionObserver(Y,ie(B({},R),{root:o.ownerDocument}))}catch(F){n=new IntersectionObserver(Y,R)}n.observe(e)}return u(!0),a}function g4(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=nh(e),p=o||a?[...h?fa(h):[],...fa(t)]:[];p.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),a&&C.addEventListener("resize",n)});const g=h&&c?m4(h,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(C=>{let[k]=C;k&&k.target===h&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var R;(R=y)==null||R.observe(t)})),n()}),h&&!d&&y.observe(h),y.observe(t));let w,v=d?ji(e):null;d&&A();function A(){const C=ji(e);v&&!My(v,C)&&n(),v=C,w=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(w)}}const E4=z6,y4=j6,b4=B6,T4=V6,x4=U6,w4=F6,_4=$6,v4=(e,t,n)=>{const r=new Map,o=B({platform:p4},n),a=ie(B({},o.platform),{_c:r});return M6(e,t,ie(B({},o),{platform:a}))};function Fy(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 S4(e){if(!e)return Fy();const{x:t,y:n,width:r,height:o}=e;return Fy(t,n,r,o)}function A4(e,t){return{contextElement:Ft(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?S4(r):n.getBoundingClientRect()}}}var ha=e=>({variable:e,reference:`var(${e})`}),Ir={arrowSize:ha("--arrow-size"),arrowSizeHalf:ha("--arrow-size-half"),arrowBg:ha("--arrow-background"),transformOrigin:ha("--transform-origin"),arrowOffset:ha("--arrow-offset")},C4=e=>e==="top"||e==="bottom"?"y":"x";function k4(e,t){return{name:"transformOrigin",fn(n){var de,z,oe,he,ae;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],h=C4(d),p=((de=o.arrow)==null?void 0:de.x)||0,g=((z=o.arrow)==null?void 0:z.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,w=p+T/2,v=g+y/2,A=Math.abs(((oe=o.shift)==null?void 0:oe.y)||0),C=u.reference.height/2,k=y/2,R=(ae=(he=e.offset)==null?void 0:he.mainAxis)!=null?ae:e.gutter,U=typeof R=="number"?R+k:R!=null?R:k,Y=A>U,F={top:`${w}px calc(100% + ${U}px)`,bottom:`${w}px ${-U}px`,left:`calc(100% + ${U}px) ${v}px`,right:`${-U}px ${v}px`}[d],X=`${w}px ${u.reference.y+C-c}px`,ce=!!e.overlap&&h==="y"&&Y;return r.floating.style.setProperty(Ir.transformOrigin.variable,ce?X:F),{data:{transformOrigin:ce?X:F}}}}}var N4={name:"rects",fn({rects:e}){return{data:e}}},O4=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% + ${Ir.arrowOffset.reference})`}),{}}}};function I4(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var R4={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function By(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function ih(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function P4(e,t,n){const r=e||t.createElement("div");return w4({element:r,padding:n.arrowPadding})}function L4(e,t){var n;if(!KR((n=t.offset)!=null?n:t.gutter))return E4(({placement:r})=>{var p,g,T,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}=I4(r),d=c?void 0:t.shift,h=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Rf({crossAxis:h,mainAxis:u,alignmentAxis:t.shift})})}function D4(e){if(!e.flip)return;const t=ih(e.boundary);return b4(ie(B({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function M4(e){if(!e.slide&&!e.overlap)return;const t=ih(e.boundary);return y4(ie(B({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:_4()}))}function F4(e){return T4({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 B4(e){var t;if(e.hideWhenDetached)return x4({strategy:"referenceHidden",boundary:(t=ih(e.boundary))!=null?t:"clippingAncestors"})}function U4(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function H4(e,t,n={}){const r=A4(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},R4,n),a=t.querySelector("[data-part=arrow]"),u=[L4(a,o),D4(o),M4(o),P4(a,t.ownerDocument,o),O4(a),k4({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),F4(o),B4(o),N4],{placement:c,strategy:d,onComplete:h,onPositioned:p}=o,g=()=>$e(null,null,function*(){var U;if(!r||!t)return;const v=yield v4(r,t,{placement:c,middleware:u,strategy:d});h==null||h(v),p==null||p({placed:!0});const A=Po(t),C=By(A,v.x),k=By(A,v.y);t.style.setProperty("--x",`${C}px`),t.style.setProperty("--y",`${k}px`),o.hideWhenDetached&&(((U=v.middlewareData.hide)==null?void 0:U.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const R=t.firstElementChild;if(R){const Y=Do(R);t.style.setProperty("--z-index",Y.zIndex)}}),T=()=>$e(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:g,floatingElement:t}),p==null||p({placed:!0})):yield g()}),y=U4(o.listeners),w=o.listeners?g4(r,t,T,y):iP;return T(),()=>{w==null||w(),p==null||p({placed:!1})}}function Uy(e,t,n={}){const c=n,{defer:r}=c,o=sn(c,["defer"]),a=r?Ot:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof t=="function"?t():t;u.push(H4(d,h,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var z4={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function j4(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Ir.arrowSize.reference,height:Ir.arrowSize.reference,[Ir.arrowSizeHalf.variable]:`calc(${Ir.arrowSize.reference} / 2)`,[Ir.arrowOffset.variable]:`calc(${Ir.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?z4[t.split("-")[0]]:void 0,background:Ir.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 qo=new WeakMap,xl=new WeakMap,wl={},oh=0,Hy=e=>e&&(e.host||Hy(e.parentNode)),$4=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Hy(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),V4=new Set(["script","output","status","next-route-announcer"]),q4=e=>V4.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),Y4=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=$4(n,Array.isArray(e)?e:[e]);wl[r]||(wl[r]=new WeakMap);const c=wl[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&&Ft(y)&&ZE(y,w=>{g(w)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,w=>{if(h.has(w))T(w);else try{if(q4(w))return;const A=w.getAttribute(o)==="true",C=(qo.get(w)||0)+1,k=(c.get(w)||0)+1;qo.set(w,C),c.set(w,k),d.push(w),C===1&&A&&xl.set(w,!0),k===1&&w.setAttribute(r,""),A||w.setAttribute(o,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",w,v)}})};return T(n),h.clear(),oh++,()=>{d.forEach(y=>{const w=qo.get(y)-1,v=c.get(y)-1;qo.set(y,w),c.set(y,v),w||(xl.has(y)||y.removeAttribute(o),xl.delete(y)),v||y.removeAttribute(r)}),oh--,oh||(qo=new WeakMap,qo=new WeakMap,xl=new WeakMap,wl={})}},W4=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,G4=(e,t=W4(e),n="data-aria-hidden",r=!0)=>{if(t)return Y4(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},K4=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function zy(e,t={}){const{defer:n=!0}=t,r=n?K4:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(G4(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function Q4(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 X4(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 jy="pointerdown.outside",$y="focus.outside";function J4(e){for(const t of e)if(Ft(t)&&pr(t))return!0;return!1}var Vy=e=>"clientY"in e;function Z4(e,t){if(!Vy(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 eL(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function qy(e,t){if(!t||!Vy(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 eL(u,c)?r||a:!1}function tL(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=hr(e),h=Po(e),p=Q4(h),g=X4(h);function T(R,U){if(!Ft(U)||!U.isConnected||Ro(e,U)||Z4(e,R)||c&&JE(e,U))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const X=zf(Y);if(qy(R,X))return!1}const F=zf(e);return qy(R,F)?!1:!(n!=null&&n(U))}const y=new Set,w=Bi(e==null?void 0:e.getRootNode());function v(R){function U(Y){var de,z;const F=u&&!ey()?Ot:oe=>oe(),X=Y!=null?Y:R,ce=(z=(de=X==null?void 0:X.composedPath)==null?void 0:de.call(X))!=null?z:[X==null?void 0:X.target];F(()=>{const oe=w?ce[0]:Kn(R);if(!(!e||!T(R,oe))){if(o||a){const he=If(o,a);e.addEventListener(jy,he,{once:!0})}Yy(e,jy,{bubbles:!1,cancelable:!0,detail:{originalEvent:X,contextmenu:UP(X),focusable:J4(ce),target:oe}})}})}R.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(Bt(d,"click",U,{once:!0})),y.add(g.addEventListener("click",U,{once:!0})),y.add(p.addEventListener("click",U,{once:!0}))):U()}const A=new Set,C=setTimeout(()=>{A.add(Bt(d,"pointerdown",v,!0)),A.add(g.addEventListener("pointerdown",v,!0)),A.add(p.addEventListener("pointerdown",v,!0))},0);function k(R){(u?Ot:Y=>Y())(()=>{var X,ce;const Y=(ce=(X=R==null?void 0:R.composedPath)==null?void 0:X.call(R))!=null?ce:[R==null?void 0:R.target],F=w?Y[0]:Kn(R);if(!(!e||!T(R,F))){if(r||a){const de=If(r,a);e.addEventListener($y,de,{once:!0})}Yy(e,$y,{bubbles:!1,cancelable:!0,detail:{originalEvent:R,contextmenu:!1,focusable:pr(F),target:F}})}})}return ey()||(A.add(Bt(d,"focusin",k,!0)),A.add(g.addEventListener("focusin",k,!0)),A.add(p.addEventListener("focusin",k,!0))),()=>{clearTimeout(C),y.forEach(R=>R()),A.forEach(R=>R())}}function nL(e,t){const{defer:n}=t,r=n?Ot:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(tL(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function Yy(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function rL(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Bt(hr(e),"keydown",n,{capture:!0})}var Wy="layer:request-dismiss",Dn={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=>Ro(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Ro(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=>Dn.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];oL(e,Wy,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),iL(e,Wy,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function iL(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 oL(e,t,n){e.addEventListener(t,n,{once:!0})}var Gy;function Ky(){Dn.layers.forEach(({node:e})=>{e.style.pointerEvents=Dn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function sL(e){e.style.pointerEvents=""}function aL(e,t){const n=hr(e),r=[];return Dn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(Gy=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=u6(()=>{const c=o();return Ft(c)?c:null},{timeout:1e3});a.then(c=>r.push(ul(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Dn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Gy,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function uL(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Pf("[@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};Dn.add(h),Ky();function p(v){var C,k;const A=Kn(v.detail.originalEvent);Dn.isBelowPointerBlockingLayer(e)||Dn.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=Kn(v.detail.originalEvent);Dn.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 T(v){var A;Dn.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,v),!v.defaultPrevented&&r&&(v.preventDefault(),r()))}function y(v){var R;if(!e)return!1;const A=typeof u=="function"?u():u,C=Array.isArray(A)?A:[A],k=(R=t.persistentElements)==null?void 0:R.map(U=>U()).filter(Ft);return k&&C.push(...k),C.some(U=>Ro(U,v))||Dn.isInNestedLayer(e,v)}const w=[a?aL(e,t.persistentElements):void 0,rL(e,T),nL(e,{exclude:y,onFocusOutside:g,onPointerDownOutside:p,defer:t.defer})];return()=>{Dn.remove(e),Ky(),sL(e),w.forEach(v=>v==null?void 0:v())}}function Qy(e,t){const{defer:n}=t,r=n?Ot:a=>a(),o=[];return o.push(r(()=>{const a=Oo(e)?e():e;o.push(uL(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var lL=Object.defineProperty,cL=(e,t,n)=>t in e?lL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pt=(e,t,n)=>cL(e,typeof t!="symbol"?t+"":t,n),Xy={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()}},dL=[],fL=class{constructor(e,t){pt(this,"trapStack"),pt(this,"config"),pt(this,"doc"),pt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),pt(this,"portalContainers",new Set),pt(this,"listenerCleanups",[]),pt(this,"handleFocus",r=>{const o=Kn(r),a=this.findContainerIndex(o,r)>=0;if(a||il(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(aa(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=>aa(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}),pt(this,"handlePointerDown",r=>{const o=Kn(r);if(!(this.findContainerIndex(o,r)>=0)){if(ma(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}ma(this.config.allowOutsideClick,r)||r.preventDefault()}}),pt(this,"handleClick",r=>{const o=Kn(r);this.findContainerIndex(o,r)>=0||ma(this.config.clickOutsideDeactivates,r)||ma(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),pt(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;pa(r)&&r.preventDefault(),this.tryFocus(a)}}),pt(this,"handleEscapeKey",r=>{hL(r)&&ma(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),pt(this,"_mutationObserver"),pt(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 OP(h)?!0:h.id&&!this.state.containers.some(p=>p.contains(h))?IP(h):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),pt(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)}))}),pt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!pr(r)){const o=Lo(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}),pt(this,"tryFocus",r=>{if(r!==!1&&r!==Lo(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,pL(r)&&r.select()}}),pt(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(),Xy.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=()=>{Jy(()=>{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}),pt(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}),pt(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}),pt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),pt(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),pt(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),pt(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}),pt(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Kn(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||pr(u)&&!Ui(u)&&!(h!=null&&h.nextTabbableNode(u,!1)))&&(p=d),p>=0){const g=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[g];c=aa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else pa(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||pr(u)&&!Ui(u)&&!(h!=null&&h.nextTabbableNode(u)))&&(p=d),p>=0){const g=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[g];c=aa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else pa(o)||(c=h==null?void 0:h.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||dL;const n=B({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return pa(r)&&!r.shiftKey},isKeyBackward(r){return pa(r)&&r.shiftKey}},t);this.doc=n.document||hr(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=>{CP(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?JE(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Mo(e,{getShadowRoot:this.config.getShadowRoot}),n=ay(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(aa(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 T=n.indexOf(h);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(Ui(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(Ui(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 Xy.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Jy(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Bt(this.doc,"focusin",this.handleFocus,!0),Bt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Bt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Bt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Bt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Bt(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=Lo(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)}},pa=e=>e.key==="Tab",ma=(e,...t)=>typeof e=="function"?e(...t):e,hL=e=>!e.isComposing&&e.key==="Escape",Jy=e=>setTimeout(e,0),pL=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Zy(e,t={}){let n;const r=Ot(()=>{const o=typeof e=="function"?e():e;if(o){n=new fL(o,ie(B({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:hr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var sh="data-scroll-lock";function mL(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function eb(e){const t=Do(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function tb(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(sh))return;const u=eb(r)||eb(o),c=n.innerWidth-r.clientWidth;o.setAttribute(sh,"");const d=()=>s6(r,"--scrollbar-width",`${c}px`),h=mL(r),p=()=>{const w={overflow:"hidden"};return!u&&c>0&&(w[h]=`${c}px`),ul(o,w)},g=()=>{var Y,F;const{scrollX:w,scrollY:v,visualViewport:A}=n,C=(Y=A==null?void 0:A.offsetLeft)!=null?Y:0,k=(F=A==null?void 0:A.offsetTop)!=null?F:0,R={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(k))}px`,left:`${-(w-Math.floor(C))}px`,right:"0"};!u&&c>0&&(R[h]=`${c}px`);const U=ul(o,R);return()=>{U==null||U(),n.scrollTo({left:w,top:v,behavior:"instant"})}},T=[d(),ol()?g():p()];return()=>{T.forEach(w=>w==null?void 0:w()),o.removeAttribute(sh)}}var gL=zi("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),br=gL.build(),nb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},rb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},ah=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},ib=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},EL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},uh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},lh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},yL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},ob=e=>e.getById(nb(e)),Yo=e=>e.getById(rb(e)),Wo=e=>e.getById(ah(e)),sb=e=>e.getById(ib(e)),bL=e=>e.getById(uh(e)),TL=e=>e.getById(lh(e));function xL(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"),T=j4(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:EL(c)},br.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(ie(B({},br.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(ie(B({},br.anchor.attrs),{dir:u("dir"),id:nb(c)}))},getTriggerProps(){return t.button(ie(B({},br.trigger.attrs),{dir:u("dir"),type:"button","data-placement":h,id:rb(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ah(c),onPointerDown(y){ty(y)&&FP()&&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({},br.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ie(B({id:ib(c)},br.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(ie(B({},br.content.attrs),{dir:u("dir"),id:ah(c),tabIndex:-1,role:"dialog","aria-modal":KE(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":Io(d),"aria-labelledby":g.title?uh(c):void 0,"aria-describedby":g.description?lh(c):void 0,"data-placement":h}))},getTitleProps(){return t.element(ie(B({},br.title.attrs),{id:uh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(ie(B({},br.description.attrs),{id:lh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ie(B({},br.closeTrigger.attrs),{dir:u("dir"),id:yL(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var wL={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=ob(n))!=null?a:Yo(n);return Uy(r,()=>sb(n),ie(B({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Wo(n);let o=!0;return Qy(r,{type:"popover",pointerBlocking:t("modal"),exclude:Yo(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:i6(()=>Wo(t),{triggerElement:Yo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?zy(()=>[Wo(t),Yo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return tb(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?Zy(()=>Wo(t),{initialFocus:()=>uy({root:Wo(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=ob(n))!=null?u:Yo(n);Uy(o,()=>sb(n),ie(B(B({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Ot(()=>{Object.assign(e.get("renderedElements"),{title:!!bL(t),description:!!TL(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Ot(()=>{const n=uy({root:Wo(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||Ot(()=>{const a=Yo(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})}}}};Uo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[jF,_l]=Hi({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[$F,ch]=Hi({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),_L=e=>{const t=Z.useId(),{getRootNode:n}=_l(),{dir:r}=ch(),o=B({id:t,dir:r,getRootNode:n},e),a=cl(wL,o);return xL(a,Vf)},vL=e=>{const[t,u]=Ey(e),c=u,{children:n}=c,r=sn(c,["children"]),o=_L(r),a=Wf(It({present:o.open},t));return x.jsx(b6,{value:o,children:x.jsx(py,{value:a,children:n})})},ab=Z.forwardRef((e,t)=>{const n=Yf(),r=ua(),o=It(ie(B({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return x.jsx(Qt.button,ie(B({},o),{ref:t}))});ab.displayName="PopoverTrigger";function SL(e){return ft({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 AL(e){return ft({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 ub(e){return ft({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 lb(e){return ft({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 cb(e){return ft({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 CL=({className:e,componentType:t,children:n})=>{const[r,o]=Z.useState(!1),{globalClassName:a}=At(),u=h=>{o(h.open)},c=Z.useCallback(()=>{o(!1)},[]),d=Z.useMemo(()=>({closeMenu:c}),[c]);return x.jsxs(vL,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[x.jsx(ab,{"aria-label":`Overflow menu for ${t}`,className:j(`${D}-overflow-menu-button-trigger`,`${D}-icon-button`,a,e,`cim-${t}-component`),children:x.jsx(cb,{})}),x.jsx(gy,{children:x.jsx(my,{className:j(`${D}-overflow-menu-list`,a,`cim-${t}-component`),children:x.jsx(jE.Provider,{value:d,children:n})})})]})};function db(e){return ft({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 fb(e){return ft({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[kL,$i]=Hi({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),dh=Z.forwardRef((e,t)=>{const n=$i(),r=It(n.getControlProps(),e);return x.jsx(Qt.div,ie(B(B({},r),e),{ref:t}))});dh.displayName="CarouselControl";const fh=Z.forwardRef((e,t)=>{const[n,r]=la()(e,["readOnly","index"]),o=$i(),a=It(o.getIndicatorProps(n),r);return x.jsx(Qt.button,ie(B({},a),{ref:t}))});fh.displayName="CarouselIndicator";const hh=Z.forwardRef((e,t)=>{const n=$i(),r=It(n.getIndicatorGroupProps(),e);return x.jsx(Qt.div,ie(B({},r),{ref:t}))});hh.displayName="CarouselIndicatorGroup";const ph=Z.forwardRef((e,t)=>{const[n,r]=la()(e,["index","snapAlign"]),o=$i(),a=It(o.getItemProps(n),r);return x.jsx(Qt.div,ie(B({},a),{ref:t}))});ph.displayName="CarouselItem";const mh=Z.forwardRef((e,t)=>{const n=$i(),r=It(n.getItemGroupProps(),e);return x.jsx(Qt.div,ie(B({},r),{ref:t}))});mh.displayName="CarouselItemGroup";const gh=Z.forwardRef((e,t)=>{const n=$i(),r=It(n.getNextTriggerProps(),e);return x.jsx(Qt.button,ie(B({},r),{ref:t}))});gh.displayName="CarouselNextTrigger";const Eh=Z.forwardRef((e,t)=>{const n=$i(),r=It(n.getPrevTriggerProps(),e);return x.jsx(Qt.button,ie(B({},r),{ref:t}))});Eh.displayName="CarouselPrevTrigger";function NL(e){const t=Do(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(T,y){let w=parseFloat(T);return/%/.test(T)&&(w/=100,w*=y),Number.isNaN(w)?0:w}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 OL(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function hb(e){let t=[];for(const n of e.children)t=t.concat(n,hb(n));return t}function pb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?hb(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",h=a==="x"?"scrollLeft":"scrollTop";for(const p of o){const g=p.getBoundingClientRect();if(!OL(n,g,u))continue;const T=Do(p);let[y,w]=T.getPropertyValue("scroll-snap-align").split(" ");typeof w=="undefined"&&(w=y);const v=a==="x"?w: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 mb(e){const t=e.getBoundingClientRect(),n=NL(e),r=pb(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:gb([...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(Eb(0,o.x))),y:gb([...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(Eb(0,o.y)))}}function IL(e,t,n){const r=pb(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var gb=e=>[...new Set(e)],Eb=(e,t)=>n=>Math.max(e,Math.min(t,n)),RL=zi("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Rr=RL.build(),PL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},LL=(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}`},vl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},DL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},ML=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},FL=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},yb=(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}`},hn=e=>e.getById(vl(e)),bb=e=>o6(hn(e),"[data-part=item]"),BL=(e,t)=>e.getById(yb(e,t)),Tb=e=>{const t=hn(e);if(!t)return;const n=Mo(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function UL(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"),T=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),w=r.get("page"),v=c("slidesPerPage"),A=c("padding"),C=c("translations");return{isPlaying:d,isDragging:h,page:w,pageSnapPoints:y,canScrollNext:p,canScrollPrev:g,getProgress(){return w/y.length},scrollToIndex(k,R){a({type:"INDEX.SET",index:k,instant:R})},scrollTo(k,R){a({type:"PAGE.SET",index:k,instant:R})},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({},Rr.root.attrs),{id:PL(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({},Rr.itemGroup.attrs),{id:vl(u),"data-orientation":c("orientation"),"data-dragging":Io(h),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(k){Ro(k.currentTarget,Kn(k))&&a({type:"VIEWPORT.FOCUS"})},onBlur(k){Ro(k.currentTarget,k.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(k){if(k.defaultPrevented||!c("allowMouseDrag")||!ty(k))return;const R=Kn(k);pr(R)&&R!==k.currentTarget||(k.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:oP(k=>{const R=c("orientation")==="horizontal"?"deltaX":"deltaY";k[R]<0&&!o("canScrollPrev")||k[R]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",c("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:A,[T?"paddingInline":"paddingBlock"]:A,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(k){const R=r.get("slidesInView").includes(k.index);return t.element(ie(B({},Rr.item.attrs),{id:LL(u,k.index),dir:c("dir"),role:"group","data-index":k.index,"data-inview":Io(R),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":C.item(k.index,c("slideCount")),"aria-hidden":KE(!R),style:{scrollSnapAlign:(()=>{var ce;const U=(ce=k.snapAlign)!=null?ce:"start",Y=c("slidesPerMove"),F=Y==="auto"?Math.floor(c("slidesPerPage")):Y;return(k.index+F)%F===0?U:void 0})()}}))},getControlProps(){return t.element(ie(B({},Rr.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(ie(B({},Rr.prevTrigger.attrs),{id:ML(u),type:"button",disabled:!g,dir:c("dir"),"aria-label":C.prevTrigger,"data-orientation":c("orientation"),"aria-controls":vl(u),onClick(k){k.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ie(B({},Rr.nextTrigger.attrs),{dir:c("dir"),id:DL(u),type:"button","aria-label":C.nextTrigger,"data-orientation":c("orientation"),"aria-controls":vl(u),disabled:!p,onClick(k){k.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ie(B({},Rr.indicatorGroup.attrs),{dir:c("dir"),id:FL(u),"data-orientation":c("orientation"),onKeyDown(k){if(k.defaultPrevented)return;const R="indicator",U={ArrowDown(X){T||(a({type:"PAGE.NEXT",src:R}),X.preventDefault())},ArrowUp(X){T||(a({type:"PAGE.PREV",src:R}),X.preventDefault())},ArrowRight(X){T&&(a({type:"PAGE.NEXT",src:R}),X.preventDefault())},ArrowLeft(X){T&&(a({type:"PAGE.PREV",src:R}),X.preventDefault())},Home(X){a({type:"PAGE.SET",index:0,src:R}),X.preventDefault()},End(X){a({type:"PAGE.SET",index:y.length-1,src:R}),X.preventDefault()}},Y=jP(k,{dir:c("dir"),orientation:c("orientation")}),F=U[Y];F==null||F(k)}}))},getIndicatorProps(k){return t.button(ie(B({},Rr.indicator.attrs),{dir:c("dir"),id:yb(u,k.index),type:"button","data-orientation":c("orientation"),"data-index":k.index,"data-readonly":Io(k.readOnly),"data-current":Io(k.index===w),"aria-label":C.indicator(k.index),onClick(R){R.defaultPrevented||k.readOnly||a({type:"PAGE.SET",index:k.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ie(B({},Rr.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":Io(d),"aria-label":d?C.autoplayStop:C.autoplayStart,onClick(k){k.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var HL={props({props:e}){return dP(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:zL(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 GR(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(hn(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=hn(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Tb(e)});return Tb(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!hn(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Ot(()=>{o(),Ot(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return bb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=hn(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const c=u.reduce((d,h)=>{var T;const p=h.target,g=Number((T=p.dataset.index)!=null?T:"-1");return g==null||Number.isNaN(g)||g===-1?d:h.isIntersecting?$R(d,g):VR(d,g)},n.get("slidesInView"));n.set("slidesInView",qR(c))},{root:r,threshold:t("inViewThreshold")});return bb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=hn(n);return r?Bt(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 Bt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return n6(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 Bt(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=WE((h=t.index)!=null?h:e.get("page"),0,e.get("pageSnapPoints").length-1),c=hn(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=hn(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=VE(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=YR(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=hn(r);if(!o)return;const a=IL(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=WE(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=hn(n);if(!r)return;const o=mb(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=hn(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=hn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=hn(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=mb(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]);Ot(()=>{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=BL(n,e.get("page"));r&&Ot(()=>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 zL(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}Uo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Uo()(["index","readOnly"]),Uo()(["index","snapAlign"]);const jL=e=>{const t=Z.useId(),{getRootNode:n}=_l(),{dir:r}=ch(),o=B({id:t,dir:r,getRootNode:n},e),a=cl(HL,o);return UL(a,Vf)},yh=Z.forwardRef((e,t)=>{const[n,r]=la()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=jL(n),a=It(o.getRootProps(),r);return x.jsx(kL,{value:o,children:x.jsx(Qt.div,ie(B({},a),{ref:t}))})});yh.displayName="CarouselRoot";const $L=180,VL=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},qL=({globalClassName:e,className:t,itemMinWidth:n=$L,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),T=g.length,y=Z.useRef(null),[w,v]=Z.useState(0),{width:A}=CS();Z.useLayoutEffect(()=>{y.current&&v(y.current.getBoundingClientRect().width)},[A,T]);const C=VL(r),k=n+C,R=w>0?(w+C)/k:1,U=Math.max(1,Math.floor(R));if(T===0)return null;const Y=T>U,F=Math.ceil(T/U),X=Y?Math.max(1,R):U;return x.jsxs(yh,{ref:y,className:j(e,t,`${D}-carousel`),slidesPerPage:X,slidesPerMove:U,spacing:r,loop:o,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":h,children:[x.jsx(mh,{className:j(e,`${D}-carousel__item-group`,{"carousel-row-container":!Y}),children:g.map((ce,de)=>x.jsx(ph,{index:de,className:j(e,`${D}-carousel__item`),children:ce},de))}),c&&Y&&x.jsxs(dh,{className:j(e,`${D}-carousel__control`),children:[x.jsx(Eh,{className:j(e,`${D}-carousel__prev-trigger`),"aria-label":"Previous slide",children:x.jsx(ub,{size:"16px"})}),x.jsx(gh,{className:j(e,`${D}-carousel__next-trigger`),"aria-label":"Next slide",children:x.jsx(lb,{size:"16px"})})]}),u&&Y&&x.jsx(hh,{className:j(e,`${D}-carousel__indicator-group`),children:Array.from({length:F},(ce,de)=>x.jsx(fh,{index:de,className:j(e,`${D}-carousel__indicator`),"aria-label":`Go to slide group ${de+1}`},de))})]})},YL=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>x.jsx("button",{"aria-label":t,title:t,className:j(e,`${D}-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"})})}),[WL,GL]=Hi({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),KL=e=>la()(e,["lazyMount","unmountOnExit"]),[QL,ga]=Hi({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),xb=Z.forwardRef((e,t)=>{const n=ga(),r=GL(),o=Wf(ie(B({},r),{present:n.open})),a=It(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:x.jsx(Qt.div,ie(B({},a),{ref:dl(o.ref,t)}))});xb.displayName="DialogBackdrop";const bh=Z.forwardRef((e,t)=>{const n=ga(),r=ua(),o=It(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Qt.div,ie(B({},o),{ref:dl(r.ref,t)}))});bh.displayName="DialogContent";const Th=Z.forwardRef((e,t)=>{const n=ga(),r=It(n.getDescriptionProps(),e);return x.jsx(Qt.div,ie(B({},r),{ref:t}))});Th.displayName="DialogDescription";const xh=Z.forwardRef((e,t)=>{const n=ga(),r=It(n.getPositionerProps(),e);return ua().unmounted?null:x.jsx(Qt.div,ie(B({},r),{ref:t}))});xh.displayName="DialogPositioner";var XL=zi("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Vi=XL.build(),wb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},_b=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},wh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},vb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},_h=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},vh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Sb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Sl=e=>e.getById(wh(e)),JL=e=>e.getById(wb(e)),ZL=e=>e.getById(_b(e)),eD=e=>e.getById(vb(e)),tD=e=>e.getById(_h(e)),nD=e=>e.getById(vh(e)),rD=e=>e.getById(Sb(e));function iD(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({},Vi.trigger.attrs),{dir:a("dir"),id:vb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":wh(u),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ie(B({},Vi.backdrop.attrs),{dir:a("dir"),hidden:!d,id:_b(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ie(B({},Vi.positioner.attrs),{dir:a("dir"),id:wb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(ie(B({},Vi.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:wh(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:_h(u),"aria-describedby":h.description?vh(u):void 0}))},getTitleProps(){return t.element(ie(B({},Vi.title.attrs),{dir:a("dir"),id:_h(u)}))},getDescriptionProps(){return t.element(ie(B({},Vi.description.attrs),{dir:a("dir"),id:vh(u)}))},getCloseTriggerProps(){return t.button(ie(B({},Vi.closeTrigger.attrs),{dir:a("dir"),id:Sb(u),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var oD={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>rD(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 Qy(()=>Sl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[eD(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 tb(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Zy(()=>Sl(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")?zy(()=>[Sl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Ot(()=>{e.set("rendered",{title:!!tD(t),description:!!nD(t)})})},syncZIndex({scope:e}){Ot(()=>{const t=Sl(e);if(!t)return;const n=Do(t);[JL(e),ZL(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})}}}};Uo()(["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 sD=e=>{const t=Z.useId(),{getRootNode:n}=_l(),{dir:r}=ch(),o=B({id:t,getRootNode:n,dir:r},e),a=cl(oD,o);return iD(a,Vf)},Ab=e=>{const[t,c]=Ey(e),d=c,{children:n}=d,r=sn(d,["children"]),[o]=KL(t),a=sD(r),u=Wf(It({present:a.open},t));return x.jsx(QL,{value:a,children:x.jsx(WL,{value:o,children:x.jsx(py,{value:u,children:n})})})},Cb=Z.forwardRef((e,t)=>{const n=ga(),r=It(n.getTitleProps(),e);return x.jsx(Qt.h2,ie(B({},r),{ref:t}))});Cb.displayName="DialogTitle";const aD=({children:e})=>{const[t,n]=Z.useState(!1),r=Z.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=Z.useMemo(()=>({isOpen:t}),[t]);return x.jsx(Of.Provider,{value:r,children:x.jsx(zE.Provider,{value:o,children:e})})},kb=()=>Z.useContext(zE),Nb=()=>{const e=Z.useContext(Of);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},uD=`${D}-overflow-menu-button-trigger`,lD=({componentType:e,children:t})=>{const{isOpen:n}=kb(),{closeMenu:r}=Nb(),{globalClassName:o}=At(),a=Z.useRef(null);return Z.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const h=d.target;h instanceof Element&&h.closest(`.${uD}`)||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:j(`${D}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},cD=({componentType:e,className:t})=>{const{toggleMenu:n}=Nb(),{isOpen:r}=kb(),{globalClassName:o}=At();return x.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:j(`${D}-overflow-menu-button-trigger`,`${D}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:x.jsx(cb,{})})},dD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=At(),{previousComponentType:r}=Ni(),o=oa(),a=()=>{ku(r||"dialog"),o()};return t?x.jsx(lr,{className:j(n,`${D}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:x.jsx(db,{})}):x.jsxs("button",{className:j(n,`${D}-overflow-menu-button`,`${D}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(db,{}),"Show ",r||"dialog"]})},fD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=At(),{isModalFullscreen:r}=Ni(),o=oa(),a=()=>{Sd(!r),o()},u=r?iA:oA,c="Toggle Fullscreen";return t?x.jsx(lr,{ariaLabel:c,title:c,className:j(n,`${D}-modal-fullscreen-button`,`cim-${e}-component`),icon:x.jsx(u,{}),onClick:a}):x.jsxs("button",{className:j(n,`${D}-overflow-menu-button`,`${D}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(u,{}),c]})},hD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=At(),{dialogPosition:r}=Ni(),o=oa(),a=r==="bottom-left",u=()=>{Ad(a?"bottom-right":"bottom-left"),o()},c=a?AL:SL,d=a?"Move right":"Move left";return t?x.jsx(lr,{className:j(n,`${D}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:x.jsx(c,{})}):x.jsxs("button",{className:j(n,`${D}-overflow-menu-button`,`${D}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[x.jsx(c,{}),d]})},Ob=({componentType:e,onClearChat:t,onClose:n})=>{const{headerConfig:r,globalClassName:o}=At(),{mode:a}=Ni(),u=a==="standalone",c=e==="modal",d=c?dD:Rb,h=c?fD:hD,p=Z.useMemo(()=>r?XS(r):{},[r]);return x.jsx(aD,{children:x.jsxs("div",{className:j(o,`${D}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[x.jsxs("div",{className:j(o,`${D}-${e}-header`,{standalone:u,embedded:!u}),style:p,children:[(r==null?void 0:r.logoUrl)&&x.jsx("img",{alt:"",role:"img",className:j(o,`${D}-${e}-logo`,{standalone:u,embedded:!u}),src:r.logoUrl}),x.jsx(Cb,{className:j(o,`${D}-${e}-title`,{standalone:u,embedded:!u}),children:r==null?void 0:r.headerText}),x.jsxs("div",{className:j(o,`${D}-${e}-controls`),children:[x.jsx(d,{componentType:e,isIcon:!0}),x.jsx(cD,{componentType:e}),x.jsx(YL,{className:j(o,`cim-${e}-component`),onClick:n})]})]}),x.jsxs(lD,{componentType:e,children:[x.jsx(h,{componentType:e}),x.jsx(gD,{componentType:e}),x.jsx($E,{componentType:e,onClearChat:t})]})]})})},Ib="USD",Ea=(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}`}},pD=({retailPrice:e,discountPrice:t,currencyCode:n=Ib})=>{const r=n||Ib,o=typeof t=="number"&&typeof e=="number"&&t<e,a=o?t:e||t||null,u=o?e:null;return{price:Ea(a,r),comparePrice:Ea(u,r),hasDiscount:o}},Sh=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:o,className:a})=>{const{price:u,comparePrice:c,hasDiscount:d}=pD({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const h=typeof r=="string"?{fontSize:r}:{};return x.jsxs("div",{className:j(o,a,`${D}-price`),style:h,children:[x.jsx("span",{className:j(o,`${D}-price__amount`),children:u}),d&&c&&x.jsx("span",{className:j(o,`${D}-price__compare`),children:c})]})},mD=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{const u=o?"standalone":"embedded",c=d=>()=>{a(d)};return x.jsx("div",{className:j(t,`${D}-suggestion-container ${u}`,e),children:n.map(d=>o?x.jsx(Iu,{disabled:r,className:j(t,`${D}-suggestion-button standalone`),onClick:c(d),children:d},d):x.jsx("button",{disabled:r,className:j(t,`${D}-suggestion-button embedded`),onClick:c(d),children:d},d))})},gD=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=At();if(!r)return null;const o=()=>{ki(!1),Cu(!0)};return t?x.jsx(lr,{className:j(n,`${D}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:x.jsx(X0,{})}):x.jsxs("button",{className:j(n,`${D}-overflow-menu-button`,`${D}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[x.jsx(X0,{}),"Minimize"]})},Rb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=At(),r=oa(),o=()=>{ku("modal"),r()};return t?x.jsx(lr,{className:j(n,`${D}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:x.jsx(fb,{})}):x.jsxs("button",{className:j(n,`${D}-overflow-menu-button`,`${D}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[x.jsx(fb,{}),"Show modal"]})},ED=["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"],yD=3e3,bD=400,TD=({globalClassName:e,isWidgetStandalone:t,messages:n=ED})=>{const[r,o]=Z.useState(0),[a,u]=Z.useState(!0);return Z.useEffect(()=>{let c;const d=setInterval(()=>{u(!1),c=setTimeout(()=>{o(h=>(h+1)%n.length),u(!0)},bD)},yD);return()=>{clearInterval(d),clearTimeout(c)}},[n.length]),x.jsxs("div",{className:j(e,`${D}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[x.jsxs("div",{className:`${D}-connecting-pulse-wrapper`,children:[x.jsx("div",{className:`${D}-connecting-pulse`}),x.jsx("div",{className:`${D}-connecting-ring`})]}),x.jsx("span",{className:j(`${D}-connecting-text`,a&&`${D}-connecting-text--visible`),children:n[r]})]})},xD=({shouldShow:e,loadingText:t})=>e?x.jsx("span",{className:`${D}-processing-text`,children:t}):null,wD=({shouldShow:e})=>e?x.jsxs(x.Fragment,{children:[x.jsx("div",{className:`${D}-processing-shimmer-bar`}),x.jsx("div",{className:`${D}-processing-shimmer-bar`}),x.jsx("div",{className:`${D}-processing-shimmer-bar`})]}):null,Ah=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>x.jsxs("div",{className:j(e,`${D}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[x.jsx(xD,{shouldShow:!!n,loadingText:n}),x.jsx(wD,{shouldShow:!n})]});function Pb(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 _D(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function vD(e,t,n){const o=ju((n||{}).ignore||[]),a=SD(t);let u=-1;for(;++u<a.length;)c1(e,"text",c);function c(h,p){let g=-1,T;for(;++g<p.length;){const y=p[g],w=T?T.children:void 0;if(o(y,w?w.indexOf(y):void 0,T))return;T=y}if(T)return d(h,p)}function d(h,p){const g=p[p.length-1],T=a[u][0],y=a[u][1];let w=0;const A=g.children.indexOf(h);let C=!1,k=[];T.lastIndex=0;let R=T.exec(h.value);for(;R;){const U=R.index,Y={index:R.index,input:R.input,stack:[...p,h]};let F=y(...R,Y);if(typeof F=="string"&&(F=F.length>0?{type:"text",value:F}:void 0),F===!1?T.lastIndex=U+1:(w!==U&&k.push({type:"text",value:h.value.slice(w,U)}),Array.isArray(F)?k.push(...F):F&&k.push(F),w=U+R[0].length,C=!0),!T.global)break;R=T.exec(h.value)}return C?(w<h.value.length&&k.push({type:"text",value:h.value.slice(w)}),g.children.splice(A,1,...k)):k=[h],A+k.length}}function SD(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([AD(o[0]),CD(o[1])])}return t}function AD(e){return typeof e=="string"?new RegExp(_D(e),"g"):e}function CD(e){return typeof e=="function"?e:function(){return e}}const Ch="phrasing",kh=["autolink","link","image","label"];function kD(){return{transforms:[DD],enter:{literalAutolink:OD,literalAutolinkEmail:Nh,literalAutolinkHttp:Nh,literalAutolinkWww:Nh},exit:{literalAutolink:LD,literalAutolinkEmail:PD,literalAutolinkHttp:ID,literalAutolinkWww:RD}}}function ND(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ch,notInConstruct:kh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ch,notInConstruct:kh},{character:":",before:"[ps]",after:"\\/",inConstruct:Ch,notInConstruct:kh}]}}function OD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Nh(e){this.config.enter.autolinkProtocol.call(this,e)}function ID(e){this.config.exit.autolinkProtocol.call(this,e)}function RD(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 PD(e){this.config.exit.autolinkEmail.call(this,e)}function LD(e){this.exit(e)}function DD(e){vD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,MD],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),FD]],{ignore:["link","linkReference"]})}function MD(e,t,n,r,o){let a="";if(!Lb(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!BD(n)))return!1;const u=UD(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 FD(e,t,n,r){return!Lb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function BD(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 UD(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=Pb(e,"(");let a=Pb(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 Lb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ii(n)||Du(n))&&(!t||n!==47)}Db.peek=GD;function HD(){this.buffer()}function zD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function jD(){this.buffer()}function $D(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function VD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Wn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function qD(e){this.exit(e)}function YD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Wn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function WD(e){this.exit(e)}function GD(){return"["}function Db(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 KD(){return{enter:{gfmFootnoteCallString:HD,gfmFootnoteCall:zD,gfmFootnoteDefinitionLabelString:jD,gfmFootnoteDefinition:$D},exit:{gfmFootnoteCallString:VD,gfmFootnoteCall:qD,gfmFootnoteDefinitionLabelString:YD,gfmFootnoteDefinition:WD}}}function QD(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Db},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 iE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function oE(e,t){const n=z3(e,t),r=n.one(e,void 0),o=P3(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 Y3(e,t){return e&&"run"in e?function(n,r){return Ve(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 W3(){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,S=arguments[0],A=1,C=arguments.length,k=!1;for(typeof S=="boolean"&&(k=S,S=arguments[1]||{},A=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});A<C;++A)if(h=arguments[A],h!=null)for(p in h)g=c(S,p),b=c(h,p),S!==b&&(k&&b&&(a(b)||(y=o(b)))?(y?(y=!1,x=g&&o(g)?g:[]):x=g&&a(g)?g:{},u(S,{name:p,newValue:d(k,x,b)})):typeof b!="undefined"&&u(S,{name:p,newValue:b}));return S},Rf}var G3=W3();const Lf=Ge(G3);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 X3(){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?K3(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 K3(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:Q3,dirname:J3,extname:Z3,join:eO,sep:"/"};function Q3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ra(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 J3(e){if(ra(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 Z3(e){ra(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 eO(...e){let t=-1,n;for(;++t<e.length;)ra(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":tO(n)}function tO(e){ra(e);const t=e.codePointAt(0)===47;let n=nO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function nO(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 ra(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const rO={cwd:iO};function iO(){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 oO(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 sO(e)}function sO(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"||aO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":rO.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=oO(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 aO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const uO=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),lO={}.hasOwnProperty;class Hf extends uO{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=X3()}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):lO.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);fO(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 S=r[b][1];Df(S)&&Df(y)&&(y=Lf(!0,S,y)),r[b]=[h,y,...x]}}}}const cO=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 dO(e)?e:new uE(e)}function dO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function fO(e){return typeof e=="string"||hO(e)}function hO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",fE=[],hE={allowDangerousHtml:!0},mO=/^(https?|ircs?|mailto|xmpp)$/i,gO=[{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=EO(e),n=yO(e);return TO(t.runSync(t.parse(n),n),e)}function EO(e){const t=e.rehypePlugins||fE,n=e.remarkPlugins||fE,r=e.remarkRehypeOptions?B(B({},e.remarkRehypeOptions),hE):hE;return cO().use(JN).use(n).use(Y3,r).use(t)}function yO(e){const t=e.children||"",n=new uE;return typeof t=="string"&&(n.value=t),n}function TO(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||bO;for(const p of gO)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+pO+p.id,void 0);return ll(e,h),VC(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],S=Tf[y];(S===null||S.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 bO(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||mO.test(e.slice(0,t))?e:""}const mE=/[#.]/g;function _O(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?vO(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=_O(a,t);const h=d.tagName.toLowerCase(),p=r?r.get(h):void 0;if(d.tagName=p||h,xO(u))c.unshift(u);else for(const[g,b]of Object.entries(u))wO(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 xO(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 wO(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"?SO(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===""||Ws(n)===Ws(t)))return!0}return n}function SO(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function vO(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const AO=["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"],CO=gE(Qu,"div"),kO=gE(No,"g",AO);function NO(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,OO=Object.prototype;function PO(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=NO(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=IO(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 IO(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(OO,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?kO:CO)(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=RO(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function RO(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 ia{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}ia.prototype.property={},ia.prototype.normal={},ia.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 ia(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 LO=0;const ze=ji(),Nt=ji(),wE=ji(),Ee=ji(),lt=ji(),Do=ji(),An=ji();function ji(){return Eu(2,++LO)}const Wf=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,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 DO={}.hasOwnProperty;function Mo(e){const t={},n={};let r;for(r in e.properties)if(DO.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 ia(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}}),MO=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:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:lt,autoFocus:ze,autoPlay:ze,blocking:lt,capture:null,charSet:null,checked:ze,cite:null,className:lt,cols:Ee,colSpan:null,content:null,contentEditable:Nt,controls:ze,controlsList:lt,coords:Ee|Do,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:wE,draggable:Nt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:lt,height:Ee,hidden:ze,high:Ee,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:lt,itemRef:lt,itemScope:ze,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ze,optimum:Ee,pattern:null,ping:lt,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:lt,required:ze,reversed:ze,rows:Ee,rowSpan:Ee,sandbox:lt,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,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:ze,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:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,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:ze,disableRemotePlayback:ze,prefix:null,property:null,results:Ee,security:null,unselectable:null}}),FO=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:ze,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}}),BO=/^data[-\w.:]+$/i,PE=/-[a-z]/g,UO=/[A-Z]/g;function HO(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"&&BO.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(PE,jO);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!PE.test(a)){let u=a.replace(UO,zO);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Xf}return new o(r,t)}function zO(e){return"-"+e.toLowerCase()}function jO(e){return e.charAt(1).toUpperCase()}const $O=xE([AE,vE,NE,OE,MO],"html"),IE=xE([AE,vE,NE,OE,FO],"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 VO={},qO={}.hasOwnProperty,DE=LE("type",{handlers:{root:WO,element:JO,text:KO,comment:QO,doctype:XO}});function YO(e,t){const r=(t||VO).space;return DE(e,r==="svg"?IE:$O)}function WO(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 GO(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Kf(e.children,n,t),Fo(e,n),n}function XO(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Fo(e,t),t}function KO(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Fo(e,t),t}function QO(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Fo(e,t),t}function JO(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"&&qO.call(e.properties,a)){const d=ZO(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=GO(e.content,r)),c}function ZO(e,t,n){const r=HO(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 eP=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],tP=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 N;(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"})(N||(N={}));const hn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function ME(e){return e>=55296&&e<=57343}function nP(e){return e>=56320&&e<=57343}function rP(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||tP.has(e)}var ne;(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"})(ne||(ne={}));const iP=65536;class oP{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=iP,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(nP(n))return this.pos++,this._addGap(),rP(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,N.EOF;return this._err(ne.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,N.EOF;const r=this.html.charCodeAt(n);return r===N.CARRIAGE_RETURN?N.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,N.EOF;let t=this.html.charCodeAt(this.pos);return t===N.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,N.LINE_FEED):t===N.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===N.LINE_FEED||t===N.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){FE(t)?this._err(ne.controlCharacterInInputStream):BE(t)&&this._err(ne.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 sP=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))),aP=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 uP(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=aP.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 lP=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 cP(e){return e>=Mt.UPPER_A&&e<=Mt.UPPER_F||e>=Mt.LOWER_A&&e<=Mt.LOWER_F}function dP(e){return e>=Mt.UPPER_A&&e<=Mt.UPPER_Z||e>=Mt.LOWER_A&&e<=Mt.LOWER_Z||Qf(e)}function fP(e){return e===Mt.EQUALS||dP(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 Rr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Rr||(Rr={}));class hP{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=Rr.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)|lP)===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)||cP(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===Rr.Strict)return 0;return this.emitCodePoint(uP(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=pP(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Rr.Attribute&&(a===0||fP(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!==Rr.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!==Rr.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 pP(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 Q;(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"})(Q||(Q={}));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 mP=new Map([[Q.A,m.A],[Q.ADDRESS,m.ADDRESS],[Q.ANNOTATION_XML,m.ANNOTATION_XML],[Q.APPLET,m.APPLET],[Q.AREA,m.AREA],[Q.ARTICLE,m.ARTICLE],[Q.ASIDE,m.ASIDE],[Q.B,m.B],[Q.BASE,m.BASE],[Q.BASEFONT,m.BASEFONT],[Q.BGSOUND,m.BGSOUND],[Q.BIG,m.BIG],[Q.BLOCKQUOTE,m.BLOCKQUOTE],[Q.BODY,m.BODY],[Q.BR,m.BR],[Q.BUTTON,m.BUTTON],[Q.CAPTION,m.CAPTION],[Q.CENTER,m.CENTER],[Q.CODE,m.CODE],[Q.COL,m.COL],[Q.COLGROUP,m.COLGROUP],[Q.DD,m.DD],[Q.DESC,m.DESC],[Q.DETAILS,m.DETAILS],[Q.DIALOG,m.DIALOG],[Q.DIR,m.DIR],[Q.DIV,m.DIV],[Q.DL,m.DL],[Q.DT,m.DT],[Q.EM,m.EM],[Q.EMBED,m.EMBED],[Q.FIELDSET,m.FIELDSET],[Q.FIGCAPTION,m.FIGCAPTION],[Q.FIGURE,m.FIGURE],[Q.FONT,m.FONT],[Q.FOOTER,m.FOOTER],[Q.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[Q.FORM,m.FORM],[Q.FRAME,m.FRAME],[Q.FRAMESET,m.FRAMESET],[Q.H1,m.H1],[Q.H2,m.H2],[Q.H3,m.H3],[Q.H4,m.H4],[Q.H5,m.H5],[Q.H6,m.H6],[Q.HEAD,m.HEAD],[Q.HEADER,m.HEADER],[Q.HGROUP,m.HGROUP],[Q.HR,m.HR],[Q.HTML,m.HTML],[Q.I,m.I],[Q.IMG,m.IMG],[Q.IMAGE,m.IMAGE],[Q.INPUT,m.INPUT],[Q.IFRAME,m.IFRAME],[Q.KEYGEN,m.KEYGEN],[Q.LABEL,m.LABEL],[Q.LI,m.LI],[Q.LINK,m.LINK],[Q.LISTING,m.LISTING],[Q.MAIN,m.MAIN],[Q.MALIGNMARK,m.MALIGNMARK],[Q.MARQUEE,m.MARQUEE],[Q.MATH,m.MATH],[Q.MENU,m.MENU],[Q.META,m.META],[Q.MGLYPH,m.MGLYPH],[Q.MI,m.MI],[Q.MO,m.MO],[Q.MN,m.MN],[Q.MS,m.MS],[Q.MTEXT,m.MTEXT],[Q.NAV,m.NAV],[Q.NOBR,m.NOBR],[Q.NOFRAMES,m.NOFRAMES],[Q.NOEMBED,m.NOEMBED],[Q.NOSCRIPT,m.NOSCRIPT],[Q.OBJECT,m.OBJECT],[Q.OL,m.OL],[Q.OPTGROUP,m.OPTGROUP],[Q.OPTION,m.OPTION],[Q.P,m.P],[Q.PARAM,m.PARAM],[Q.PLAINTEXT,m.PLAINTEXT],[Q.PRE,m.PRE],[Q.RB,m.RB],[Q.RP,m.RP],[Q.RT,m.RT],[Q.RTC,m.RTC],[Q.RUBY,m.RUBY],[Q.S,m.S],[Q.SCRIPT,m.SCRIPT],[Q.SEARCH,m.SEARCH],[Q.SECTION,m.SECTION],[Q.SELECT,m.SELECT],[Q.SOURCE,m.SOURCE],[Q.SMALL,m.SMALL],[Q.SPAN,m.SPAN],[Q.STRIKE,m.STRIKE],[Q.STRONG,m.STRONG],[Q.STYLE,m.STYLE],[Q.SUB,m.SUB],[Q.SUMMARY,m.SUMMARY],[Q.SUP,m.SUP],[Q.TABLE,m.TABLE],[Q.TBODY,m.TBODY],[Q.TEMPLATE,m.TEMPLATE],[Q.TEXTAREA,m.TEXTAREA],[Q.TFOOT,m.TFOOT],[Q.TD,m.TD],[Q.TH,m.TH],[Q.THEAD,m.THEAD],[Q.TITLE,m.TITLE],[Q.TR,m.TR],[Q.TRACK,m.TRACK],[Q.TT,m.TT],[Q.U,m.U],[Q.UL,m.UL],[Q.SVG,m.SVG],[Q.VAR,m.VAR],[Q.WBR,m.WBR],[Q.XMP,m.XMP]]);function Bo(e){var t;return(t=mP.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const he=m,gP={[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]);Q.STYLE,Q.SCRIPT,Q.XMP,Q.IFRAME,Q.NOEMBED,Q.NOFRAMES,Q.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 EP(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function oa(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function yP(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function ei(e){return yP(e)||oa(e)}function HE(e){return ei(e)||EP(e)}function fl(e){return e+32}function zE(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function jE(e){return zE(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function TP(e){return e===N.NULL?ne.nullCharacterReference:e>1114111?ne.characterReferenceOutsideUnicodeRange:ME(e)?ne.surrogateCharacterReference:BE(e)?ne.noncharacterCharacterReference:FE(e)||e===N.CARRIAGE_RETURN?ne.controlCharacterReference:null}class bP{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 oP(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new hP(sP,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ne.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ne.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=TP(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(ne.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(ne.endTagWithAttributes),t.selfClosing&&this._err(ne.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===N.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()?Rr.Attribute:Rr.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 N.LESS_THAN_SIGN:{this.state=R.TAG_OPEN;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitCodePoint(t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case N.AMPERSAND:{this._startCharacterReference();break}case N.LESS_THAN_SIGN:{this.state=R.RCDATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(mt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case N.LESS_THAN_SIGN:{this.state=R.RAWTEXT_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(mt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(mt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(mt);break}case N.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 N.EXCLAMATION_MARK:{this.state=R.MARKUP_DECLARATION_OPEN;break}case N.SOLIDUS:{this.state=R.END_TAG_OPEN;break}case N.QUESTION_MARK:{this._err(ne.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t);break}case N.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ne.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 N.GREATER_THAN_SIGN:{this._err(ne.missingEndTagName),this.state=R.DATA;break}case N.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=R.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.tagName+=mt;break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(oa(t)?fl(t):t)}}_stateRcdataLessThanSign(t){t===N.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=R.BEFORE_ATTRIBUTE_NAME,!1;case N.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=R.SELF_CLOSING_START_TAG,!1;case N.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===N.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 N.SOLIDUS:{this.state=R.SCRIPT_DATA_END_TAG_OPEN;break}case N.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===N.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===N.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 N.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(mt);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(mt);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(mt);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===N.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 N.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(mt);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(mt);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(mt);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===N.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._err(ne.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this._leaveAttrName(),this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._leaveAttrName(),this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:{this._err(ne.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.name+=mt;break}default:this.currentAttr.name+=String.fromCodePoint(oa(t)?fl(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case N.EQUALS_SIGN:{this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{this.state=R.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this.state=R.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingAttributeValue),this.state=R.DATA,this.emitCurrentTagToken();break}default:this.state=R.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case N.QUOTATION_MARK:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=mt;break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case N.APOSTROPHE:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=mt;break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=mt;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:case N.EQUALS_SIGN:case N.GRAVE_ACCENT:{this._err(ne.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this._leaveAttrValue(),this.state=R.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBetweenAttributes),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case N.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=R.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.unexpectedSolidusInTag),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case N.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case N.NULL:{this._err(ne.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(ne.cdataInHtmlContent),this._createCommentToken(hn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=R.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ne.incorrectlyOpenedComment),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case N.HYPHEN_MINUS:{this.state=R.COMMENT_START_DASH;break}case N.GREATER_THAN_SIGN:{this._err(ne.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 N.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=R.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(ne.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 N.HYPHEN_MINUS:{this.state=R.COMMENT_END_DASH;break}case N.LESS_THAN_SIGN:{n.data+="<",this.state=R.COMMENT_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=mt;break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case N.EXCLAMATION_MARK:{n.data+="!",this.state=R.COMMENT_LESS_THAN_SIGN_BANG;break}case N.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===N.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=R.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===N.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=R.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==N.GREATER_THAN_SIGN&&t!==N.EOF&&this._err(ne.nestedComment),this.state=R.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case N.EOF:{this._err(ne.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 N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case N.EXCLAMATION_MARK:{this.state=R.COMMENT_END_BANG;break}case N.HYPHEN_MINUS:{n.data+="-";break}case N.EOF:{this._err(ne.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 N.HYPHEN_MINUS:{n.data+="--!",this.state=R.COMMENT_END_DASH;break}case N.GREATER_THAN_SIGN:{this._err(ne.incorrectlyClosedComment),this.state=R.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=R.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case N.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBeforeDoctypeName),this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(oa(t))this._createDoctypeToken(String.fromCharCode(fl(t))),this.state=R.DOCTYPE_NAME;else switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.NULL:{this._err(ne.unexpectedNullCharacter),this._createDoctypeToken(mt),this.state=R.DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.EOF:{this._err(ne.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=R.AFTER_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.name+=mt;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(oa(t)?fl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.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(ne.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=mt;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.EOF:{this._err(ne.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 N.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=mt;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.EOF:{this._err(ne.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.QUOTATION_MARK:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=mt;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.EOF:{this._err(ne.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 N.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=mt;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.EOF:{this._err(ne.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.NULL:{this._err(ne.unexpectedNullCharacter);break}case N.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case N.RIGHT_SQUARE_BRACKET:{this.state=R.CDATA_SECTION_BRACKET;break}case N.EOF:{this._err(ne.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===N.RIGHT_SQUARE_BRACKET?this.state=R.CDATA_SECTION_END:(this._emitChars("]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case N.GREATER_THAN_SIGN:{this.state=R.DATA;break}case N.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(N.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===N.SEMICOLON&&this._err(ne.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]),_P=new Set([...hl,m.OL,m.UL]),xP=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]),wP=new Set([m.TR,m.TEMPLATE,m.HTML]),SP=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),vP=new Set([m.TABLE,m.TEMPLATE,m.HTML]),AP=new Set([m.TD,m.TH]);class CP{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(AP,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(vP,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(SP,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(wP,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,_P)}hasInButtonScope(t){return this.hasInDynamicScope(t,xP)}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 kP{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",NP="about:legacy-compat",OP="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//"],PP=[...XE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],IP=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//"],RP=[...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 LP(e){return e.name===GE&&e.publicId===null&&(e.systemId===null||e.systemId===NP)}function DP(e){if(e.name!==GE)return Un.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===OP)return Un.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),IP.has(n))return Un.QUIRKS;let r=t===null?PP:XE;if(QE(n,r))return Un.QUIRKS;if(r=t===null?KE:RP,QE(n,r))return Un.LIMITED_QUIRKS}return Un.NO_QUIRKS}const JE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},MP="definitionurl",FP="definitionURL",BP=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])),UP=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}]]),HP=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])),zP=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 jP(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===$i.COLOR||r===$i.SIZE||r===$i.FACE)||zP.has(t)}function ZE(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===MP){e.attrs[t].name=FP;break}}function ey(e){for(let t=0;t<e.attrs.length;t++){const n=BP.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=UP.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 $P(e){const t=HP.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Bo(e.tagName))}function VP(e,t){return t===le.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function qP(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 YP(e,t,n,r){return(!r||r===le.HTML)&&qP(e,t,n)||(!r||r===le.MATHML)&&VP(e,t)}const WP="hidden",GP=8,XP=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 KP={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 bP(this.options,this),this.activeFormattingElements=new kP(this.treeAdapter),this.fragmentContextID=r?Bo(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new CP(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(Q.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:KP,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)===Q.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&&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,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(Q.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)===Q.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 YP(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 gP[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){AR(this,t);return}switch(this.insertionMode){case M.INITIAL:{sa(this,t);break}case M.BEFORE_HTML:{aa(this,t);break}case M.BEFORE_HEAD:{ua(this,t);break}case M.IN_HEAD:{la(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ca(this,t);break}case M.AFTER_HEAD:{da(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){vR(this,t);return}switch(this.insertionMode){case M.INITIAL:{sa(this,t);break}case M.BEFORE_HTML:{aa(this,t);break}case M.BEFORE_HEAD:{ua(this,t);break}case M.IN_HEAD:{la(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ca(this,t);break}case M.AFTER_HEAD:{da(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:{pa(this,t);break}case M.AFTER_BODY:{rI(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{iI(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{oI(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,ne.misplacedDoctype);break}case M.IN_TABLE_TEXT:{pa(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ne.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?CR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{sa(this,t);break}case M.BEFORE_HTML:{sI(this,t);break}case M.BEFORE_HEAD:{uI(this,t);break}case M.IN_HEAD:{er(this,t);break}case M.IN_HEAD_NO_SCRIPT:{dI(this,t);break}case M.AFTER_HEAD:{hI(this,t);break}case M.IN_BODY:{Kt(this,t);break}case M.IN_TABLE:{Uo(this,t);break}case M.IN_TABLE_TEXT:{pa(this,t);break}case M.IN_CAPTION:{lR(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:{fR(this,t);break}case M.IN_SELECT:{gy(this,t);break}case M.IN_SELECT_IN_TABLE:{pR(this,t);break}case M.IN_TEMPLATE:{gR(this,t);break}case M.AFTER_BODY:{yR(this,t);break}case M.IN_FRAMESET:{TR(this,t);break}case M.AFTER_FRAMESET:{_R(this,t);break}case M.AFTER_AFTER_BODY:{wR(this,t);break}case M.AFTER_AFTER_FRAMESET:{SR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?kR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{sa(this,t);break}case M.BEFORE_HTML:{aI(this,t);break}case M.BEFORE_HEAD:{lI(this,t);break}case M.IN_HEAD:{cI(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:{ml(this,t);break}case M.TEXT:{ZI(this,t);break}case M.IN_TABLE:{fa(this,t);break}case M.IN_TABLE_TEXT:{pa(this,t);break}case M.IN_CAPTION:{cR(this,t);break}case M.IN_COLUMN_GROUP:{dR(this,t);break}case M.IN_TABLE_BODY:{sh(this,t);break}case M.IN_ROW:{my(this,t);break}case M.IN_CELL:{hR(this,t);break}case M.IN_SELECT:{Ey(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:{Ty(this,t);break}case M.IN_FRAMESET:{bR(this,t);break}case M.AFTER_FRAMESET:{xR(this,t);break}case M.AFTER_AFTER_BODY:{bl(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{sa(this,t);break}case M.BEFORE_HTML:{aa(this,t);break}case M.BEFORE_HEAD:{ua(this,t);break}case M.IN_HEAD:{la(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ca(this,t);break}case M.AFTER_HEAD:{da(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:{eR(this,t);break}case M.IN_TABLE_TEXT:{pa(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)===N.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 QP(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 JP(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 ZP(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>=XP;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=eI(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function eI(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 tI(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 nI(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<GP;n++){const r=QP(e,t);if(!r)break;const o=JP(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=ZP(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&tI(e,u,a),nI(e,o,r)}}function nh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function rI(e,t){e._appendCommentNode(t,e.openElements.items[0])}function iI(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 oI(e,t){e._setDocumentType(t);const n=t.forceQuirks?Un.QUIRKS:DP(t);LP(t)||e._err(t,ne.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function sa(e,t){e._err(t,ne.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Un.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function sI(e,t){t.tagID===m.HTML?(e._insertElement(t,le.HTML),e.insertionMode=M.BEFORE_HEAD):aa(e,t)}function aI(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&aa(e,t)}function aa(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function uI(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:ua(e,t)}}function lI(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?ua(e,t):e._err(t,ne.endTagWithoutMatchingOpenElement)}function ua(e,t){e._insertFakeElement(Q.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,ne.misplacedStartTagForHeadElement);break}default:la(e,t)}}function cI(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:{la(e,t);break}case m.TEMPLATE:{Vi(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Vi(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,ne.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ne.endTagWithoutMatchingOpenElement)}function la(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function dI(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,ne.nestedNoscriptInHead);break}default:ca(e,t)}}function fI(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case m.BR:{ca(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function ca(e,t){const n=t.type===qe.EOF?ne.openElementsLeftAfterEof:ne.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function hI(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,ne.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),er(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:da(e,t)}}function pI(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{da(e,t);break}case m.TEMPLATE:{Vi(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function da(e,t){e._insertFakeElement(Q.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 mI(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function gI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function EI(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 yI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function TI(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 bI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function _I(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 xI(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 wI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=St.PLAINTEXT}function SI(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 vI(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Q.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 AI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function CI(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 kI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function NI(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()===WP}function OI(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),ay(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function PI(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function II(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function RI(e,t){t.tagName=Q.IMG,t.tagID=m.IMG,sy(e,t)}function LI(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 DI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,St.RAWTEXT)}function MI(e,t){e.framesetOk=!1,e._switchToTextParsing(t,St.RAWTEXT)}function uy(e,t){e._switchToTextParsing(t,St.RAWTEXT)}function FI(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 BI(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function UI(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function HI(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,le.HTML)}function zI(e,t){e._reconstructActiveFormattingElements(),ZE(t),eh(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function jI(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:{AI(e,t);break}case m.A:{vI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{TI(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:{yI(e,t);break}case m.LI:case m.DD:case m.DT:{xI(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:{II(e,t);break}case m.RB:case m.RTC:{UI(e,t);break}case m.RT:case m.RP:{HI(e,t);break}case m.PRE:case m.LISTING:{bI(e,t);break}case m.XMP:{DI(e,t);break}case m.SVG:{jI(e,t);break}case m.HTML:{mI(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:{gI(e,t);break}case m.FORM:{_I(e,t);break}case m.NOBR:{CI(e,t);break}case m.MATH:{zI(e,t);break}case m.TABLE:{NI(e,t);break}case m.INPUT:{OI(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{PI(e,t);break}case m.IMAGE:{RI(e,t);break}case m.BUTTON:{SI(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{kI(e,t);break}case m.IFRAME:{MI(e,t);break}case m.SELECT:{FI(e,t);break}case m.OPTION:case m.OPTGROUP:{BI(e,t);break}case m.NOEMBED:case m.NOFRAMES:{uy(e,t);break}case m.FRAMESET:{EI(e,t);break}case m.TEXTAREA:{LI(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?uy(e,t):ly(e,t);break}case m.PLAINTEXT:{wI(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 $I(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 VI(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=M.AFTER_BODY,Ty(e,t))}function qI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function YI(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 WI(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(Q.P,m.P),e._closePElement()}function GI(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function XI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function KI(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function QI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function JI(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Q.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:{WI(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:{qI(e,t);break}case m.LI:{GI(e);break}case m.DD:case m.DT:{XI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{KI(e);break}case m.BR:{JI(e);break}case m.BODY:{$I(e,t);break}case m.HTML:{VI(e,t);break}case m.FORM:{YI(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{QI(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 ZI(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 eR(e,t){e._err(t,ne.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 ha(e,t)}function tR(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CAPTION}function nR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function rR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.COLGROUP,m.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,oh(e,t)}function iR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_TABLE_BODY}function oR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.TBODY,m.TBODY),e.insertionMode=M.IN_TABLE_BODY,El(e,t)}function sR(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function aR(e,t){ay(t)?e._appendElement(t,le.HTML):ha(e,t),t.ackSelfClosing=!0}function uR(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:{oR(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{er(e,t);break}case m.COL:{rR(e,t);break}case m.FORM:{uR(e,t);break}case m.TABLE:{sR(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{iR(e,t);break}case m.INPUT:{aR(e,t);break}case m.CAPTION:{tR(e,t);break}case m.COLGROUP:{nR(e,t);break}default:ha(e,t)}}function fa(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:ha(e,t)}}function ha(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 pa(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ha(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 lR(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 cR(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&&fa(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 dR(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(Q.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,fa(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:fa(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:fa(e,t)}}function fR(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 hR(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 pR(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 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.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Ey(e,t)}function gR(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 ER(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 yR(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 TR(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 bR(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 _R(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.NOFRAMES:{er(e,t);break}}}function xR(e,t){t.tagID===m.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function wR(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 SR(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.NOFRAMES:{er(e,t);break}}}function vR(e,t){t.chars=mt,e._insertCharacters(t)}function AR(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 CR(e,t){if(jP(t))by(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?ZE(t):r===le.SVG&&($P(t),ey(t)),eh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function kR(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}}}Q.AREA,Q.BASE,Q.BASEFONT,Q.BGSOUND,Q.BR,Q.COL,Q.EMBED,Q.FRAME,Q.HR,Q.IMG,Q.INPUT,Q.KEYGEN,Q.LINK,Q.META,Q.PARAM,Q.SOURCE,Q.TRACK,Q.WBR;const NR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,OR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),_y={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function xy(e,t){const n=HR(e),r=LE("type",{handlers:{root:PR,element:IR,text:RR,comment:Sy,doctype:LR,raw:MR},unknown:FR}),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=PO(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 PR(e,t){wy(e.children,t)}function IR(e,t){BR(e,t),wy(e.children,t),UR(e,t)}function RR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:qe.CHARACTER,chars:e.value,location:ma(e)};Ho(t,mr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function LR(e,t){const n={type:qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ma(e)};Ho(t,mr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function DR(e,t){t.stitches=!0;const n=zR(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:ma(e)};Ho(t,mr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function MR(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(NR,"<$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 FR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))DR(n,t);else{let r="";throw OR.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 BR(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=YO(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:ma(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function UR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&eP.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:ma(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 HR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ma(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 zR(e){return"children"in e?Hi(oe(B({},e),{children:[]})):Hi(e)}function Ay(e){return function(t,n){return xy(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 jR(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 $R(e,n);case"doctype":return VR(e,n);case"element":return qR(e,n);case"root":return YR(e,n);case"text":return WR(e,n)}}}function $R(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 ga(a,t),a}}function VR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ga(n,t),n}}function qR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Ny(e,t.children),o=GR(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 ga(u,t),u}function YR(e,t){const r={type:"root",children:Ny(e,t.children)};return ga(r,t),r}function WR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return ga(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 GR(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)?XR(e,t,n,r):Py(e,t,n,r):void 0}function XR(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")&&KR(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 KR(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 ga(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 QR(e){return function(t){return jR(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",oe(B(B({className:z(e,`${L}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},JR=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=st();return!e&&!t?null:_.jsx("div",{className:z(n,`${L}-disclaimer`),children:t?_.jsx(pE,{rehypePlugins:[Ay,QR],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}=st(),d=V.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(bC,{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(uC,{})})]}),_.jsx(JR,{})]})};function ZR(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=V.createContext({isOpen:!1}),uh=V.createContext(null),Dy=V.createContext(null),Ea=()=>{var n,r;const e=V.useContext(uh),t=V.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=Ea(),r=()=>{e(),n()};return _.jsxs("button",{className:z(`${L}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[_.jsx(ZR,{}),"Clear chat"]})};function e6(e){return e==null?[]:Array.isArray(e)?e:[e]}var t6=(e,...t)=>e.concat(t),n6=(e,...t)=>e.filter(n=>!t.includes(n)),r6=e=>Array.from(new Set(e));function Fy(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 i6(e,t,n={}){const{step:r=1,loop:o=!0}=n;return Fy(e,t,{step:-r,loop:o})}var o6=e=>Array.isArray(e),By=e=>e!=null&&typeof e=="object",s6=e=>By(e)&&!o6(e),_l=e=>typeof e=="string",zo=e=>typeof e=="function",a6=e=>e==null,u6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l6=e=>Object.prototype.toString.call(e),Uy=Function.prototype.toString,c6=Uy.call(Object),d6=e=>{if(!By(e)||l6(e)!="[object Object]"||p6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=u6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Uy.call(n)==c6},f6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,h6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,p6=e=>f6(e)||h6(e),m6=e=>e(),g6=()=>{},lh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function E6(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:y6,max:T6}=Math,b6=e=>Number.isNaN(e),_6=e=>b6(e)?0:e,Hy=(e,t,n)=>y6(T6(_6(e),t),n);function ch(e){if(!d6(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 x6(e,t){if(e==null)throw new Error(t())}function w6(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 S6=Object.defineProperty,v6=(e,t,n)=>t in e?S6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fh=(e,t,n)=>v6(e,typeof t!="symbol"?t+"":t,n),zy=()=>{},xl=e=>typeof e=="object"&&e!==null,jo=e=>e?"":void 0,jy=e=>e?"true":void 0,A6=1,C6=9,k6=11,Bt=e=>xl(e)&&e.nodeType===A6&&typeof e.nodeName=="string",wl=e=>xl(e)&&e.nodeType===C6,N6=e=>xl(e)&&e===e.window,$y=e=>Bt(e)?e.localName||"":"#document";function O6(e){return["html","body","#document"].includes($y(e))}var P6=e=>xl(e)&&e.nodeType!==void 0,Yi=e=>P6(e)&&e.nodeType===k6&&"host"in e,I6=e=>Bt(e)&&e.localName==="input",R6=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 qo(t)===e}var L6=/(textarea|select)/;function D6(e){if(e==null||!Bt(e))return!1;try{return I6(e)&&e.selectionStart!=null||L6.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function $o(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:N6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function M6(e){return yr(e).documentElement}function Vo(e){var t,n,r;return Yi(e)?Vo(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 qo(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 F6(e){if($y(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yi(e)&&e.host||M6(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 Yo(e){return ph.has(e)||ph.set(e,Vo(e).getComputedStyle(e)),ph.get(e)}var mh=new Set(["menu","listbox","dialog","grid","tree","region"]),B6=e=>mh.has(e),Vy=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function qy(e,t){const n=new Set,r=hh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Vy(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&&B6(g)&&!b&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function Yy(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=Vy(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 U6(e){const t=new Set;return Yy(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function H6(e){const t=e.getAttribute("role");return!!(t&&mh.has(t))}function z6(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function j6(e){var t;return z6(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function $6(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)&&H6(e))}var gh=()=>typeof document!="undefined";function V6(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Eh=e=>gh()&&e.test(V6()),q6=e=>gh()&&e.test(navigator.vendor),Wy=()=>gh()&&!!navigator.maxTouchPoints,Y6=()=>Eh(/^iPhone/i),W6=()=>Eh(/^iPad/i)||yh()&&navigator.maxTouchPoints>1,Sl=()=>Y6()||W6(),G6=()=>yh()||Sl(),yh=()=>Eh(/^Mac/i),X6=()=>G6()&&q6(/apple/i);function K6(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=K6(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Gy=e=>e.button===0,Q6=e=>e.button===2||yh()&&e.ctrlKey&&e.button===0,J6=e=>"touches"in e&&e.touches.length>0,Z6={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Xy={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function e4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=Z6[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in Xy&&(o=Xy[o]),o}function Ky(e,t="client"){const n=J6(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)}},Qy=e=>Bt(e)&&e.tagName==="IFRAME",t4=/^(audio|video|details)$/;function Jy(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var n4=e=>!Number.isNaN(Jy(e)),r4=e=>Jy(e)<0;function i4(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;const n=t(e);return(n===!0?e.shadowRoot:n)||null}function Zy(e,t,n){const r=[...e],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=i4(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",eT=(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(Qy(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...eT(d,{getShadowRoot:r}));continue}u.push(c)}return r?Zy(u,r,Tr):u};function Tr(e){return!Bt(e)||e.closest("[inert]")?!1:e.matches(vl)&&R6(e)}function Wo(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(Qy(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Wo(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Zy(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)&&!r4(e)}function o4(e,t={}){const n=Wo(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function s4(e,t={}){const{current:n,getShadowRoot:r}=t,o=Wo(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:qo(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Ta(e){return e.tabIndex<0&&(t4.test(e.localName)||D6(e))&&!n4(e)?0:e.tabIndex}function tT(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=Wo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var a4=class s2{constructor(){fh(this,"id",null),fh(this,"fn_cleanup"),fh(this,"cleanup",()=>{this.cancel()})}static create(){return new s2}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function Pt(e){const t=a4.create();return t.request(e),t.cleanup}function nT(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=F6(e);return O6(t)?yr(t).body:Bt(t)&&c4(t)?t:Th(t)}var u4=/auto|scroll|overlay|hidden|clip/,l4=new Set(["inline","contents"]);function c4(e){const t=Vo(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return u4.test(n+o+r)&&!l4.has(a)}var Go="default",bh="",Al=new WeakMap;function d4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Sl()?(Go==="default"&&(bh=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Go="disabled"):t&&(Al.set(t,t.style.userSelect),t.style.userSelect="none"),()=>f4({target:t,doc:r})}function f4(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Sl()){if(Go!=="disabled")return;Go="restoring",setTimeout(()=>{nT(()=>{Go==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=bh||""),bh="",Go="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 h4(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(d4(oe(B({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function p4(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=Ky(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=Ky(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),h4({doc:e})];return()=>{u.forEach(c=>c())}}function m4(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]=o4(e,{includeContainer:!0,getShadowRoot:a}),y=s4(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 g4(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(m4(d,B({triggerElement:h},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function E4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Cl(e,t){if(!e)return zy;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 y4(e,t,n){if(!e)return zy;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 T4(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 b4(e,t){const{timeout:n,rootNode:r}=t,o=Vo(r),a=yr(r),u=new o.AbortController;return T4(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 _4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),x4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,rT=e=>{const t={};let n;for(;n=x4.exec(e);)t[n[1]]=n[2];return t},w4=(e,t)=>{if(_l(e)){if(_l(t))return`${e};${t}`;e=rT(e)}else _l(t)&&(t=rT(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]=_4(t[o],n[o]);continue}if(o==="style"){t[o]=w4(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 E7(e){return e}var Xo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Xo||{}),_h="__init__";function S4(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=()=>qo(t()),a=u=>t().getElementById(u);return oe(B({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:ya,getById:a})}function v4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Ko=()=>e=>Array.from(new Set(e)),iT=typeof globalThis.document!="undefined"?V.useLayoutEffect:V.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]=V.useState(t),[o,a]=V.useState(r),u=e().value!==void 0,c=V.useRef(o);c.current=u?e().value:o;const d=V.useRef(c.current);iT(()=>{d.current=c.current},[o,e().value]);const h=y=>{var A,C;const x=d.current,S=zo(y)?y(x):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:x}),u||a(S),n(S,x)||(C=(A=e()).onChange)==null||C.call(A,S,x)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Ao.flushSync:m6)(()=>h(y))},invoke(y,x){var S,A;(A=(S=e()).onChange)==null||A.call(S,y,x)},hash(y){var x,S,A;return(A=(S=(x=e()).hash)==null?void 0:S.call(x,y))!=null?A:String(y)}}}kl.cleanup=e=>{V.useEffect(()=>e,[])},kl.ref=e=>{const t=V.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function A4(e){const t=V.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var C4=(e,t)=>{const n=V.useRef(!1),r=V.useRef(!1);V.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),V.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Nl(e,t={}){var re,ae,de,se,be,we;const n=V.useMemo(()=>{const{id:Z,ids:q,getRootNode:W}=t;return S4({id:Z,ids:q,getRootNode:W})},[t]),r=(...Z)=>{e.debug&&console.log(...Z)},o=(ae=(re=e.props)==null?void 0:re.call(e,{props:ch(t),scope:n}))!=null?ae:t,a=k4(o),u=(de=e.context)==null?void 0:de.call(e,{prop:a,bindable:kl,scope:n,flush:sT,getContext(){return d},getComputed(){return Y},getRefs(){return S},getEvent(){return y()}}),c=oT(u),d={get(Z){var q;return(q=c.current)==null?void 0:q[Z].ref.current},set(Z,q){var W;(W=c.current)==null||W[Z].set(q)},initial(Z){var q;return(q=c.current)==null?void 0:q[Z].initial},hash(Z){var W,v;const q=(W=c.current)==null?void 0:W[Z].get();return(v=c.current)==null?void 0:v[Z].hash(q)}},h=V.useRef(new Map),p=V.useRef(null),g=V.useRef(null),b=V.useRef({type:""}),y=()=>oe(B({},b.current),{current(){return b.current},previous(){return g.current}}),x=()=>oe(B({},F),{matches(...Z){return Z.includes(F.ref.current)},hasTag(Z){var q,W;return!!((W=(q=e.states[F.ref.current])==null?void 0:q.tags)!=null&&W.includes(Z))}}),S=A4((be=(se=e.refs)==null?void 0:se.call(e,{prop:a,context:d}))!=null?be:{}),A=()=>({state:x(),context:d,event:y(),prop:a,send:U,action:C,guard:k,track:C4,refs:S,computed:Y,flush:sT,scope:n,choose:j}),C=Z=>{const q=zo(Z)?Z(A()):Z;if(!q)return;const W=q.map(v=>{var G,O;const P=(O=(G=e.implementations)==null?void 0:G.actions)==null?void 0:O[v];return P||dh(`[zag-js] No implementation found for action "${JSON.stringify(v)}"`),P});for(const v of W)v==null||v(A())},k=Z=>{var q,W;return zo(Z)?Z(A()):(W=(q=e.implementations)==null?void 0:q.guards)==null?void 0:W[Z](A())},I=Z=>{const q=zo(Z)?Z(A()):Z;if(!q)return;const W=q.map(P=>{var O,ye;const G=(ye=(O=e.implementations)==null?void 0:O.effects)==null?void 0:ye[P];return G||dh(`[zag-js] No implementation found for effect "${JSON.stringify(P)}"`),G}),v=[];for(const P of W){const G=P==null?void 0:P(A());G&&v.push(G)}return()=>v.forEach(P=>P==null?void 0:P())},j=Z=>e6(Z).find(q=>{let W=!q.guard;return _l(q.guard)?W=!!k(q.guard):zo(q.guard)&&(W=q.guard(A())),W}),Y=Z=>{x6(e.computed,()=>"[zag-js] No computed object found on machine");const q=e.computed[Z];return q({context:d,event:y(),prop:a,refs:S,scope:n,computed:Y})},F=kl(()=>({defaultValue:e.initialState({prop:a}),onChange(Z,q){var v,P,G,O;if(q){const ye=h.current.get(q);ye==null||ye(),h.current.delete(q)}q&&C((v=e.states[q])==null?void 0:v.exit),C((P=p.current)==null?void 0:P.actions);const W=I((G=e.states[Z])==null?void 0:G.effects);if(W&&h.current.set(Z,W),q===_h){C(e.entry);const ye=I(e.effects);ye&&h.current.set(_h,ye)}C((O=e.states[Z])==null?void 0:O.entry)}})),te=V.useRef(void 0),ce=V.useRef(Xo.NotStarted);iT(()=>{queueMicrotask(()=>{var P;const W=ce.current===Xo.Started;ce.current=Xo.Started,r(W?"rehydrating...":"initializing...");const v=(P=te.current)!=null?P:F.initial;F.invoke(v,W?F.get():_h)});const Z=h.current,q=F.ref.current;return()=>{r("unmounting..."),te.current=q,ce.current=Xo.Stopped,Z.forEach(W=>W==null?void 0:W()),h.current=new Map,p.current=null,queueMicrotask(()=>{C(e.exit)})}},[]);const pe=()=>"ref"in F?F.ref.current:F.get(),U=Z=>{queueMicrotask(()=>{var O,ye,Oe,Ie,He;if(ce.current!==Xo.Started)return;g.current=b.current,b.current=Z;let q=pe();const W=(Oe=(O=e.states[q].on)==null?void 0:O[Z.type])!=null?Oe:(ye=e.on)==null?void 0:ye[Z.type],v=j(W);if(!v)return;p.current=v;const P=(Ie=v.target)!=null?Ie:q;r("transition",Z.type,v.target||q,`(${v.actions})`);const G=P!==q;G?Ao.flushSync(()=>F.set(P)):v.reenter&&!G?F.invoke(q,q):C((He=v.actions)!=null?He:[])})};return(we=e.watch)==null||we.call(e,A()),{state:x(),send:U,context:d,prop:a,scope:n,refs:S,computed:Y,event:y(),getStatus:()=>ce.current}}function oT(e){const t=V.useRef(e);return t.current=e,t}function k4(e){const t=oT(e);return function(r){return t.current[r]}}function sT(e){queueMicrotask(()=>{Ao.flushSync(()=>e())})}var xh=v4(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 N4(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=V.memo(V.forwardRef((n,r)=>{const h=n,{asChild:o,children:a}=h,u=an(h,["asChild","children"]);if(!o)return V.createElement(e,oe(B({},u),{ref:r}),a);if(!V.isValidElement(a))return null;const c=V.Children.only(a),d=N4(c);return V.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 O4(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=V.createContext(u);c.displayName=t;function d(){var p;const h=V.useContext(c);if(!h&&n){const g=new Error(a!=null?a:O4(r,o));throw g.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,g,d),g}return h}return[c.Provider,d,c]}const[P4,Sh]=Gi({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[aT,ba]=Gi({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),uT=V.forwardRef((e,t)=>{const n=Sh(),r=ba(),o=It(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(Qt.div,oe(B({},o),{ref:Ol(r.ref,t)}))});uT.displayName="PopoverContent";const lT=V.forwardRef((e,t)=>{const n=Sh(),r=ba(),o=It(n.getPositionerProps(),e);return r.unmounted?null:_.jsx(Qt.div,oe(B({},o),{ref:t}))});lT.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)]),cT=e=>_a()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function I4(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 R4={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",Yo(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),nT(()=>c())}}}}};function Pl(e){return(e==null?void 0:e.animationName)||"none"}Ko()(["onExitComplete","present","immediate"]);function L4(e,t={}){const{sync:n=!1}=t,r=D4(e);return V.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 D4(e){const t=V.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=V.useRef(!1),c=oe(B({},a),{present:r,onExitComplete:L4(e.onExitComplete)}),d=Nl(R4,c),h=I4(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(M4(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="${Qo(e)}"][data-part="${Qo(r)}"]`,`& [data-scope="${Qo(e)}"][data-part="${Qo(r)}"]`].join(", "),attrs:{"data-scope":Qo(e),"data-part":Qo(r)}}}),{})}),Qo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),M4=e=>e.length===0;const F4=["top","right","bottom","left"],ri=Math.min,Cn=Math.max,Il=Math.round,Rl=Math.floor,br=e=>({x:e,y:e}),B4={left:"right",right:"left",bottom:"top",top:"bottom"},U4={start:"end",end:"start"};function Ah(e,t,n){return Cn(e,ri(t,n))}function Lr(e,t){return typeof e=="function"?e(t):e}function Dr(e){return e.split("-")[0]}function Jo(e){return e.split("-")[1]}function Ch(e){return e==="x"?"y":"x"}function kh(e){return e==="y"?"height":"width"}const H4=new Set(["top","bottom"]);function _r(e){return H4.has(Dr(e))?"y":"x"}function Nh(e){return Ch(_r(e))}function z4(e,t,n){n===void 0&&(n=!1);const r=Jo(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 j4(e){const t=Ll(e);return[Oh(e),t,Oh(t)]}function Oh(e){return e.replace(/start|end/g,t=>U4[t])}const dT=["left","right"],fT=["right","left"],$4=["top","bottom"],V4=["bottom","top"];function q4(e,t,n){switch(e){case"top":case"bottom":return n?t?fT:dT:t?dT:fT;case"left":case"right":return t?$4:V4;default:return[]}}function Y4(e,t,n,r){const o=Jo(e);let a=q4(Dr(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=>B4[t])}function W4(e){return B({top:0,right:0,bottom:0,left:0},e)}function hT(e){return typeof e!="number"?W4(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 pT(e,t,n){let{reference:r,floating:o}=e;const a=_r(t),u=Nh(t),c=kh(u),d=Dr(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(Jo(t)){case"start":y[u]-=b*(n&&h?-1:1);break;case"end":y[u]+=b*(n&&h?-1:1);break}return y}const G4=(e,t,n)=>Ve(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}=pT(h,r,d),b=r,y={},x=0;for(let S=0;S<c.length;S++){const{name:A,fn:C}=c[S],{x:k,y:I,data:j,reset:Y}=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=oe(B({},y),{[A]:B(B({},y[A]),j)}),Y&&x<=50&&(x++,typeof Y=="object"&&(Y.placement&&(b=Y.placement),Y.rects&&(h=Y.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):Y.rects),{x:p,y:g}=pT(h,b,d)),S=-1)}return{x:p,y:g,placement:b,strategy:o,middlewareData:y}});function xa(e,t){return Ve(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}=Lr(t,e),x=hT(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),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},Y=Dl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:k,offsetParent:I,strategy:d}):k);return{top:(C.top-Y.top+x.top)/j.y,bottom:(Y.bottom-C.bottom+x.bottom)/j.y,left:(C.left-Y.left+x.left)/j.x,right:(Y.right-C.right+x.right)/j.x}})}const X4=e=>({name:"arrow",options:e,fn(n){return Ve(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:h}=n,{element:p,padding:g=0}=Lr(e,n)||{};if(p==null)return{};const b=hT(g),y={x:r,y:o},x=Nh(a),S=kh(x),A=yield c.getDimensions(p),C=x==="y",k=C?"top":"left",I=C?"bottom":"right",j=C?"clientHeight":"clientWidth",Y=u.reference[S]+u.reference[x]-y[x]-u.floating[S],F=y[x]-u.reference[x],te=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ce=te?te[j]:0;(!ce||!(yield c.isElement==null?void 0:c.isElement(te)))&&(ce=d.floating[j]||u.floating[S]);const pe=Y/2-F/2,U=ce/2-A[S]/2-1,re=ri(b[k],U),ae=ri(b[I],U),de=re,se=ce-A[S]-ae,be=ce/2-A[S]/2+pe,we=Ah(de,be,se),Z=!h.arrow&&Jo(a)!=null&&be!==we&&u.reference[S]/2-(be<de?re:ae)-A[S]/2<0,q=Z?be<de?be-de:be-se:0;return{[x]:y[x]+q,data:B({[x]:we,centerOffset:be-we-q},Z&&{alignmentOffset:q}),reset:Z}})}}),K4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ve(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:h,elements:p}=n,be=Lr(e,n),{mainAxis:g=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:A=!0}=be,C=an(be,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const k=Dr(a),I=_r(d),j=Dr(d)===d,Y=yield h.isRTL==null?void 0:h.isRTL(p.floating),F=y||(j||!A?[Ll(d)]:j4(d)),te=S!=="none";!y&&te&&F.push(...Y4(d,A,S,Y));const ce=[d,...F],pe=yield xa(n,C),U=[];let re=((o=u.flip)==null?void 0:o.overflows)||[];if(g&&U.push(pe[k]),b){const we=z4(a,c,Y);U.push(pe[we[0]],pe[we[1]])}if(re=[...re,{placement:a,overflows:U}],!U.every(we=>we<=0)){var ae,de;const we=(((ae=u.flip)==null?void 0:ae.index)||0)+1,Z=ce[we];if(Z&&(!(b==="alignment"?I!==_r(Z):!1)||re.every(v=>_r(v.placement)===I?v.overflows[0]>0:!0)))return{data:{index:we,overflows:re},reset:{placement:Z}};let q=(de=re.filter(W=>W.overflows[0]<=0).sort((W,v)=>W.overflows[1]-v.overflows[1])[0])==null?void 0:de.placement;if(!q)switch(x){case"bestFit":{var se;const W=(se=re.filter(v=>{if(te){const P=_r(v.placement);return P===I||P==="y"}return!0}).map(v=>[v.placement,v.overflows.filter(P=>P>0).reduce((P,G)=>P+G,0)]).sort((v,P)=>v[1]-P[1])[0])==null?void 0:se[0];W&&(q=W);break}case"initialPlacement":q=d;break}if(a!==q)return{reset:{placement:q}}}return{}})}}};function mT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gT(e){return F4.some(t=>e[t]>=0)}const Q4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ve(this,null,function*(){const{rects:r}=n,u=Lr(e,n),{strategy:o="referenceHidden"}=u,a=an(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield xa(n,oe(B({},a),{elementContext:"reference"})),d=mT(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:gT(d)}}}case"escaped":{const c=yield xa(n,oe(B({},a),{altBoundary:!0})),d=mT(c,r.floating);return{data:{escapedOffsets:d,escaped:gT(d)}}}default:return{}}})}}},ET=new Set(["left","top"]);function J4(e,t){return Ve(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Dr(n),c=Jo(n),d=_r(n)==="y",h=ET.has(u)?-1:1,p=a&&d?-1:1,g=Lr(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 Z4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ve(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,h=yield J4(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})}})}}},eL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ve(this,null,function*(){const{x:r,y:o,placement:a}=n,C=Lr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:k=>{let{x:I,y:j}=k;return{x:I,y:j}}}}=C,h=an(C,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},g=yield xa(n,h),b=_r(Dr(a)),y=Ch(b);let x=p[y],S=p[b];if(u){const k=y==="y"?"top":"left",I=y==="y"?"bottom":"right",j=x+g[k],Y=x-g[I];x=Ah(j,x,Y)}if(c){const k=b==="y"?"top":"left",I=b==="y"?"bottom":"right",j=S+g[k],Y=S-g[I];S=Ah(j,S,Y)}const A=d.fn(oe(B({},n),{[y]:x,[b]:S}));return oe(B({},A),{data:{x:A.x-r,y:A.y-o,enabled:{[y]:u,[b]:c}}})})}}},tL=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}=Lr(e,t),p={x:n,y:r},g=_r(o),b=Ch(g);let y=p[b],x=p[g];const S=Lr(c,t),A=typeof S=="number"?{mainAxis:S,crossAxis:0}:B({mainAxis:0,crossAxis:0},S);if(d){const I=b==="y"?"height":"width",j=a.reference[b]-a.floating[I]+A.mainAxis,Y=a.reference[b]+a.reference[I]-A.mainAxis;y<j?y=j:y>Y&&(y=Y)}if(h){var C,k;const I=b==="y"?"width":"height",j=ET.has(Dr(o)),Y=a.reference[g]-a.floating[I]+(j&&((C=u.offset)==null?void 0:C[g])||0)+(j?0:A.crossAxis),F=a.reference[g]+a.reference[I]+(j?0:((k=u.offset)==null?void 0:k[g])||0)-(j?A.crossAxis:0);x<Y?x=Y:x>F&&(x=F)}return{[b]:y,[g]:x}}}},nL=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ve(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,re=Lr(e,n),{apply:h=()=>{}}=re,p=an(re,["apply"]),g=yield xa(n,p),b=Dr(a),y=Jo(a),x=_r(a)==="y",{width:S,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,j=S-g.left-g.right,Y=ri(A-g[C],I),F=ri(S-g[k],j),te=!n.middlewareData.shift;let ce=Y,pe=F;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(pe=j),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ce=I),te&&!y){const ae=Cn(g.left,0),de=Cn(g.right,0),se=Cn(g.top,0),be=Cn(g.bottom,0);x?pe=S-2*(ae!==0||de!==0?ae+de:Cn(g.left,g.right)):ce=A-2*(se!==0||be!==0?se+be:Cn(g.top,g.bottom))}yield h(oe(B({},n),{availableWidth:pe,availableHeight:ce}));const U=yield c.getDimensions(d.floating);return S!==U.width||A!==U.height?{reset:{rects:!0}}:{}})}}};function Ml(){return typeof window!="undefined"}function Zo(e){return yT(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=(yT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yT(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 TT(e){return!Ml()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof kn(e).ShadowRoot}const rL=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)&&!rL.has(o)}const iL=new Set(["table","td","th"]);function oL(e){return iL.has(Zo(e))}const sL=[":popover-open",":modal"];function Fl(e){return sL.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const aL=["transform","translate","scale","rotate","perspective"],uL=["transform","translate","scale","rotate","perspective","filter"],lL=["paint","layout","strict","content"];function Ph(e){const t=Ih(),n=nr(e)?rr(e):e;return aL.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)||uL.some(r=>(n.willChange||"").includes(r))||lL.some(r=>(n.contain||"").includes(r))}function cL(e){let t=ii(e);for(;wr(t)&&!es(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 dL=new Set(["html","body","#document"]);function es(e){return dL.has(Zo(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(Zo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||TT(e)&&e.host||xr(e);return TT(t)?t.host:t}function bT(e){const t=ii(e);return es(t)?e.ownerDocument?e.ownerDocument.body:e.body:wr(t)&&wa(t)?t:bT(t)}function Sa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=bT(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 _T(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 ts(e){const t=Lh(e);if(!wr(t))return br(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=_T(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 fL=br(0);function xT(e){const t=kn(e);return!Ih()||!t.visualViewport?fL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==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=ts(r)):u=ts(e));const c=hL(a,n,r)?xT(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,S=Rh(x);for(;S&&r&&y!==x;){const A=ts(S),C=S.getBoundingClientRect(),k=rr(S),I=C.left+(S.clientLeft+parseFloat(k.paddingLeft))*A.x,j=C.top+(S.clientTop+parseFloat(k.paddingTop))*A.y;d*=A.x,h*=A.y,p*=A.x,g*=A.y,d+=I,h+=j,x=kn(S),S=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 wT(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 pL(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)&&((Zo(r)!=="body"||wa(u))&&(d=Bl(r)),wr(r))){const y=Ki(r);h=ts(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=u&&!g&&!a?wT(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 mL(e){return Array.from(e.getClientRects())}function gL(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 ST=25;function EL(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<=ST&&(a-=x)}else h<=ST&&(a+=h);return{width:a,height:u,x:c,y:d}}const yL=new Set(["absolute","fixed"]);function TL(e,t){const n=Ki(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=wr(e)?ts(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 vT(e,t,n){let r;if(t==="viewport")r=EL(e,n);else if(t==="document")r=gL(xr(e));else if(nr(t))r=TL(t,n);else{const o=xT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Dl(r)}function AT(e,t){const n=ii(e);return n===t||!nr(n)||es(n)?!1:rr(n).position==="fixed"||AT(n,t)}function bL(e,t){const n=t.get(e);if(n)return n;let r=Sa(e,[],!1).filter(c=>nr(c)&&Zo(c)!=="body"),o=null;const a=rr(e).position==="fixed";let u=a?ii(e):e;for(;nr(u)&&!es(u);){const c=rr(u),d=Ph(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&yL.has(o.position)||wa(u)&&!d&&AT(e,u))?r=r.filter(p=>p!==u):o=c,u=ii(u)}return t.set(e,r),r}function _L(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?Fl(t)?[]:bL(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((h,p)=>{const g=vT(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},vT(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function xL(e){const{width:t,height:n}=_T(e);return{width:t,height:n}}function wL(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((Zo(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?wT(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 CT(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 kT(e,t){const n=kn(e);if(Fl(e))return n;if(!wr(e)){let o=ii(e);for(;o&&!es(o);){if(nr(o)&&!Dh(o))return o;o=ii(o)}return n}let r=CT(e,t);for(;r&&oL(r)&&Dh(r);)r=CT(r,t);return r&&es(r)&&Dh(r)&&!Ph(r)?n:r||cL(e)||n}const SL=function(e){return Ve(this,null,function*(){const t=this.getOffsetParent||kT,n=this.getDimensions,r=yield n(e.floating);return{reference:wL(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function vL(e){return rr(e).direction==="rtl"}const AL={convertOffsetParentRelativeRectToViewportRelativeRect:pL,getDocumentElement:xr,getClippingRect:_L,getOffsetParent:kT,getElementRects:SL,getClientRects:mL,getDimensions:xL,getScale:ts,isElement:nr,isRTL:vL};function NT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function CL(e,t){let n=null,r;const 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),S=Rl(o.clientWidth-(p+b)),A=Rl(o.clientHeight-(g+y)),C=Rl(p),I={rootMargin:-x+"px "+-S+"px "+-A+"px "+-C+"px",threshold:Cn(0,ri(1,d))||1};let j=!0;function Y(F){const te=F[0].intersectionRatio;if(te!==d){if(!j)return u();te?u(!1,te):r=setTimeout(()=>{u(!1,1e-7)},1e3)}te===1&&!NT(h,e.getBoundingClientRect())&&u(),j=!1}try{n=new IntersectionObserver(Y,oe(B({},I),{root:o.ownerDocument}))}catch(F){n=new IntersectionObserver(Y,I)}n.observe(e)}return u(!0),a}function kL(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?CL(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,S=d?Ki(e):null;d&&A();function A(){const C=Ki(e);S&&!NT(S,C)&&n(),S=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 NL=Z4,OL=eL,PL=K4,IL=nL,RL=Q4,LL=X4,DL=tL,ML=(e,t,n)=>{const r=new Map,o=B({platform:AL},n),a=oe(B({},o.platform),{_c:r});return G4(e,t,oe(B({},o),{platform:a}))};function OT(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 FL(e){if(!e)return OT();const{x:t,y:n,width:r,height:o}=e;return OT(t,n,r,o)}function BL(e,t){return{contextElement:Bt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?FL(r):n.getBoundingClientRect()}}}var va=e=>({variable:e,reference:`var(${e})`}),Mr={arrowSize:va("--arrow-size"),arrowSizeHalf:va("--arrow-size-half"),arrowBg:va("--arrow-background"),transformOrigin:va("--transform-origin"),arrowOffset:va("--arrow-offset")},UL=e=>e==="top"||e==="bottom"?"y":"x";function HL(e,t){return{name:"transformOrigin",fn(n){var pe,U,re,ae,de;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],h=UL(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,S=g+y/2,A=Math.abs(((re=o.shift)==null?void 0:re.y)||0),C=u.reference.height/2,k=y/2,I=(de=(ae=e.offset)==null?void 0:ae.mainAxis)!=null?de:e.gutter,j=typeof I=="number"?I+k:I!=null?I:k,Y=A>j,F={top:`${x}px calc(100% + ${j}px)`,bottom:`${x}px ${-j}px`,left:`calc(100% + ${j}px) ${S}px`,right:`${-j}px ${S}px`}[d],te=`${x}px ${u.reference.y+C-c}px`,ce=!!e.overlap&&h==="y"&&Y;return r.floating.style.setProperty(Mr.transformOrigin.variable,ce?te:F),{data:{transformOrigin:ce?te:F}}}}}var zL={name:"rects",fn({rects:e}){return{data:e}}},jL=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% + ${Mr.arrowOffset.reference})`}),{}}}};function $L(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var VL={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function PT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Mh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function qL(e,t,n){const r=e||t.createElement("div");return LL({element:r,padding:n.arrowPadding})}function YL(e,t){var n;if(!a6((n=t.offset)!=null?n:t.gutter))return NL(({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}=$L(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 WL(e){if(!e.flip)return;const t=Mh(e.boundary);return PL(oe(B({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function GL(e){if(!e.slide&&!e.overlap)return;const t=Mh(e.boundary);return OL(oe(B({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:DL()}))}function XL(e){return IL({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 KL(e){var t;if(e.hideWhenDetached)return RL({strategy:"referenceHidden",boundary:(t=Mh(e.boundary))!=null?t:"clippingAncestors"})}function QL(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function JL(e,t,n={}){const r=BL(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},VL,n),a=t.querySelector("[data-part=arrow]"),u=[YL(a,o),WL(o),GL(o),qL(a,t.ownerDocument,o),jL(a),HL({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),XL(o),KL(o),zL],{placement:c,strategy:d,onComplete:h,onPositioned:p}=o,g=()=>Ve(null,null,function*(){var j;if(!r||!t)return;const S=yield ML(r,t,{placement:c,middleware:u,strategy:d});h==null||h(S),p==null||p({placed:!0});const A=Vo(t),C=PT(A,S.x),k=PT(A,S.y);t.style.setProperty("--x",`${C}px`),t.style.setProperty("--y",`${k}px`),o.hideWhenDetached&&(((j=S.middlewareData.hide)==null?void 0:j.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const I=t.firstElementChild;if(I){const Y=Yo(I);t.style.setProperty("--z-index",Y.zIndex)}}),b=()=>Ve(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:g,floatingElement:t}),p==null||p({placed:!0})):yield g()}),y=QL(o.listeners),x=o.listeners?kL(r,t,b,y):g6;return b(),()=>{x==null||x(),p==null||p({placed:!1})}}function IT(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(JL(d,h,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var ZL={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function eD(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Mr.arrowSize.reference,height:Mr.arrowSize.reference,[Mr.arrowSizeHalf.variable]:`calc(${Mr.arrowSize.reference} / 2)`,[Mr.arrowOffset.variable]:`calc(${Mr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?ZL[t.split("-")[0]]:void 0,background:Mr.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 ns=new WeakMap,Hl=new WeakMap,zl={},Fh=0,RT=e=>e&&(e.host||RT(e.parentNode)),tD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=RT(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),nD=new Set(["script","output","status","next-route-announcer"]),rD=e=>nD.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),iD=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=tD(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)&&Yy(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(rD(x))return;const A=x.getAttribute(o)==="true",C=(ns.get(x)||0)+1,k=(c.get(x)||0)+1;ns.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(S){console.error("[zag-js > ariaHidden] cannot operate on ",x,S)}})};return b(n),h.clear(),Fh++,()=>{d.forEach(y=>{const x=ns.get(y)-1,S=c.get(y)-1;ns.set(y,x),c.set(y,S),x||(Hl.has(y)||y.removeAttribute(o),Hl.delete(y)),S||y.removeAttribute(r)}),Fh--,Fh||(ns=new WeakMap,ns=new WeakMap,Hl=new WeakMap,zl={})}},oD=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,sD=(e,t=oD(e),n="data-aria-hidden",r=!0)=>{if(t)return iD(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},aD=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function LT(e,t={}){const{defer:n=!0}=t,r=n?aD:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(sD(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function uD(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 lD(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 DT="pointerdown.outside",MT="focus.outside";function cD(e){for(const t of e)if(Bt(t)&&Tr(t))return!0;return!1}var FT=e=>"clientY"in e;function dD(e,t){if(!FT(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 fD(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function BT(e,t){if(!t||!FT(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 fD(u,c)?r||a:!1}function hD(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=Vo(e),p=uD(h),g=lD(h);function b(I,j){if(!Bt(j)||!j.isConnected||$o(e,j)||dD(e,I)||c&&qy(e,j))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const te=Th(Y);if(BT(I,te))return!1}const F=Th(e);return BT(I,F)?!1:!(n!=null&&n(j))}const y=new Set,x=Yi(e==null?void 0:e.getRootNode());function S(I){function j(Y){var pe,U;const F=u&&!Wy()?Pt:re=>re(),te=Y!=null?Y:I,ce=(U=(pe=te==null?void 0:te.composedPath)==null?void 0:pe.call(te))!=null?U:[te==null?void 0:te.target];F(()=>{const re=x?ce[0]:tr(I);if(!(!e||!b(I,re))){if(o||a){const ae=lh(o,a);e.addEventListener(DT,ae,{once:!0})}UT(e,DT,{bubbles:!1,cancelable:!0,detail:{originalEvent:te,contextmenu:Q6(te),focusable:cD(ce),target:re}})}})}I.pointerType==="touch"?(y.forEach(Y=>Y()),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,C=setTimeout(()=>{A.add(Ut(d,"pointerdown",S,!0)),A.add(g.addEventListener("pointerdown",S,!0)),A.add(p.addEventListener("pointerdown",S,!0))},0);function k(I){(u?Pt:Y=>Y())(()=>{var te,ce;const Y=(ce=(te=I==null?void 0:I.composedPath)==null?void 0:te.call(I))!=null?ce:[I==null?void 0:I.target],F=x?Y[0]:tr(I);if(!(!e||!b(I,F))){if(r||a){const pe=lh(r,a);e.addEventListener(MT,pe,{once:!0})}UT(e,MT,{bubbles:!1,cancelable:!0,detail:{originalEvent:I,contextmenu:!1,focusable:Tr(F),target:F}})}})}return Wy()||(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 pD(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(hD(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function UT(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function mD(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Ut(yr(e),"keydown",n,{capture:!0})}var HT="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=>$o(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>$o(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];ED(e,HT,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),gD(e,HT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function gD(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 ED(e,t,n){e.addEventListener(t,n,{once:!0})}var zT;function jT(){Hn.layers.forEach(({node:e})=>{e.style.pointerEvents=Hn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function yD(e){e.style.pointerEvents=""}function TD(e,t){const n=yr(e),r=[];return Hn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(zT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=b4(()=>{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=zT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function bD(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),jT();function p(S){var C,k;const A=tr(S.detail.originalEvent);Hn.isBelowPointerBlockingLayer(e)||Hn.isInBranch(A)||((C=t.onPointerDownOutside)==null||C.call(t,S),(k=t.onInteractOutside)==null||k.call(t,S),!S.defaultPrevented&&(c&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function g(S){var C,k;const A=tr(S.detail.originalEvent);Hn.isInBranch(A)||((C=t.onFocusOutside)==null||C.call(t,S),(k=t.onInteractOutside)==null||k.call(t,S),!S.defaultPrevented&&(c&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function b(S){var A;Hn.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function y(S){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(j=>j()).filter(Bt);return k&&C.push(...k),C.some(j=>$o(j,S))||Hn.isInNestedLayer(e,S)}const x=[a?TD(e,t.persistentElements):void 0,mD(e,b),pD(e,{exclude:y,onFocusOutside:g,onPointerDownOutside:p,defer:t.defer})];return()=>{Hn.remove(e),jT(),yD(e),x.forEach(S=>S==null?void 0:S())}}function $T(e,t){const{defer:n}=t,r=n?Pt:a=>a(),o=[];return o.push(r(()=>{const a=zo(e)?e():e;o.push(bD(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var _D=Object.defineProperty,xD=(e,t,n)=>t in e?_D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gt=(e,t,n)=>xD(e,typeof t!="symbol"?t+"":t,n),VT={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()}},wD=[],SD=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=>{vD(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 j6(h)?!0:h.id&&!this.state.containers.some(p=>p.contains(h))?$6(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=qo(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!==qo(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,AD(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(),VT.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=()=>{qT(()=>{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||wD;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=>{U6(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?qy(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Wo(e,{getShadowRoot:this.config.getShadowRoot}),n=eT(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 VT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?qT(()=>{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=qo(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,vD=e=>!e.isComposing&&e.key==="Escape",qT=e=>setTimeout(e,0),AD=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function YT(e,t={}){let n;const r=Pt(()=>{const o=typeof e=="function"?e():e;if(o){n=new SD(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 CD(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function WT(e){const t=Yo(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function GT(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=WT(r)||WT(o),c=n.innerWidth-r.clientWidth;o.setAttribute(Bh,"");const d=()=>y4(r,"--scrollbar-width",`${c}px`),h=CD(r),p=()=>{const x={overflow:"hidden"};return!u&&c>0&&(x[h]=`${c}px`),Cl(o,x)},g=()=>{var Y,F;const{scrollX:x,scrollY:S,visualViewport:A}=n,C=(Y=A==null?void 0:A.offsetLeft)!=null?Y:0,k=(F=A==null?void 0:A.offsetTop)!=null?F:0,I={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(k))}px`,left:`${-(x-Math.floor(C))}px`,right:"0"};!u&&c>0&&(I[h]=`${c}px`);const j=Cl(o,I);return()=>{j==null||j(),n.scrollTo({left:x,top:S,behavior:"instant"})}},b=[d(),Sl()?g():p()];return()=>{b.forEach(x=>x==null?void 0:x()),o.removeAttribute(Bh)}}var kD=Xi("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Sr=kD.build(),XT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},KT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Uh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},QT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},ND=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`},OD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},JT=e=>e.getById(XT(e)),rs=e=>e.getById(KT(e)),is=e=>e.getById(Uh(e)),ZT=e=>e.getById(QT(e)),PD=e=>e.getById(Hh(e)),ID=e=>e.getById(zh(e));function RD(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=eD(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:ND(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:XT(c)}))},getTriggerProps(){return t.button(oe(B({},Sr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":h,id:KT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Uh(c),onPointerDown(y){Gy(y)&&X6()&&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:QT(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":jy(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":jo(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:OD(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var LD={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=JT(n))!=null?a:rs(n);return IT(r,()=>ZT(n),oe(B({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>is(n);let o=!0;return $T(r,{type:"popover",pointerBlocking:t("modal"),exclude:rs(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:g4(()=>is(t),{triggerElement:rs(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?LT(()=>[is(t),rs(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return GT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?YT(()=>is(t),{initialFocus:()=>tT({root:is(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=JT(n))!=null?u:rs(n);IT(o,()=>ZT(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:!!PD(t),description:!!ID(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Pt(()=>{const n=tT({root:is(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=rs(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})}}}};Ko()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[T7,jl]=Gi({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[b7,jh]=Gi({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),DD=e=>{const t=V.useId(),{getRootNode:n}=jl(),{dir:r}=jh(),o=B({id:t,dir:r,getRootNode:n},e),a=Nl(LD,o);return RD(a,xh)},MD=e=>{const[t,u]=cT(e),c=u,{children:n}=c,r=an(c,["children"]),o=DD(r),a=vh(It({present:o.open},t));return _.jsx(P4,{value:o,children:_.jsx(aT,{value:a,children:n})})},eb=V.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 _.jsx(Qt.button,oe(B({},o),{ref:t}))});eb.displayName="PopoverTrigger";function FD(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 BD(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 tb(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 nb(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 UD(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 HD(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 rb(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 zD=({className:e,componentType:t,children:n})=>{const[r,o]=V.useState(!1),{globalClassName:a}=st(),u=h=>{o(h.open)},c=V.useCallback(()=>{o(!1)},[]),d=V.useMemo(()=>({closeMenu:c}),[c]);return _.jsxs(MD,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[_.jsx(eb,{"aria-label":`Overflow menu for ${t}`,className:z(`${L}-overflow-menu-button-trigger`,`${L}-icon-button`,a,e,`cim-${t}-component`),children:_.jsx(rb,{})}),_.jsx(lT,{children:_.jsx(uT,{className:z(`${L}-overflow-menu-list`,a,`cim-${t}-component`),children:_.jsx(Dy.Provider,{value:d,children:n})})})]})};function ib(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 ob(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[jD,Qi]=Gi({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Vh=V.forwardRef((e,t)=>{const n=Qi(),r=It(n.getControlProps(),e);return _.jsx(Qt.div,oe(B(B({},r),e),{ref:t}))});Vh.displayName="CarouselControl";const qh=V.forwardRef((e,t)=>{const[n,r]=_a()(e,["readOnly","index"]),o=Qi(),a=It(o.getIndicatorProps(n),r);return _.jsx(Qt.button,oe(B({},a),{ref:t}))});qh.displayName="CarouselIndicator";const Yh=V.forwardRef((e,t)=>{const n=Qi(),r=It(n.getIndicatorGroupProps(),e);return _.jsx(Qt.div,oe(B({},r),{ref:t}))});Yh.displayName="CarouselIndicatorGroup";const Wh=V.forwardRef((e,t)=>{const[n,r]=_a()(e,["index","snapAlign"]),o=Qi(),a=It(o.getItemProps(n),r);return _.jsx(Qt.div,oe(B({},a),{ref:t}))});Wh.displayName="CarouselItem";const Gh=V.forwardRef((e,t)=>{const n=Qi(),r=It(n.getItemGroupProps(),e);return _.jsx(Qt.div,oe(B({},r),{ref:t}))});Gh.displayName="CarouselItemGroup";const Xh=V.forwardRef((e,t)=>{const n=Qi(),r=It(n.getNextTriggerProps(),e);return _.jsx(Qt.button,oe(B({},r),{ref:t}))});Xh.displayName="CarouselNextTrigger";const Kh=V.forwardRef((e,t)=>{const n=Qi(),r=It(n.getPrevTriggerProps(),e);return _.jsx(Qt.button,oe(B({},r),{ref:t}))});Kh.displayName="CarouselPrevTrigger";function $D(e){const t=Yo(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 VD(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 sb(e){let t=[];for(const n of e.children)t=t.concat(n,sb(n));return t}function ab(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?sb(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(!VD(n,g,u))continue;const b=Yo(p);let[y,x]=b.getPropertyValue("scroll-snap-align").split(" ");typeof x=="undefined"&&(x=y);const S=a==="x"?x:y,A=g[c]-n[c]+e[h];switch(S){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 ub(e){const t=e.getBoundingClientRect(),n=$D(e),r=ab(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:lb([...r.x.start.map(a=>a.position-n.x.before),...r.x.center.map(a=>a.position-t.width/2),...r.x.end.map(a=>a.position-t.width+n.x.after)].map(cb(0,o.x))),y:lb([...r.y.start.map(a=>a.position-n.y.before),...r.y.center.map(a=>a.position-t.height/2),...r.y.end.map(a=>a.position-t.height+n.y.after)].map(cb(0,o.y)))}}function qD(e,t,n){const r=ab(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var lb=e=>[...new Set(e)],cb=(e,t)=>n=>Math.max(e,Math.min(t,n)),YD=Xi("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Fr=YD.build(),WD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},GD=(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`},XD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},KD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},QD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},db=(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)),fb=e=>E4(pn(e),"[data-part=item]"),JD=(e,t)=>e.getById(db(e,t)),hb=e=>{const t=pn(e);if(!t)return;const n=Wo(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function ZD(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"),S=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(oe(B({},Fr.root.attrs),{id:WD(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":S,"--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({},Fr.itemGroup.attrs),{id:$l(u),"data-orientation":c("orientation"),"data-dragging":jo(h),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(k){$o(k.currentTarget,tr(k))&&a({type:"VIEWPORT.FOCUS"})},onBlur(k){$o(k.currentTarget,k.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(k){if(k.defaultPrevented||!c("allowMouseDrag")||!Gy(k))return;const I=tr(k);Tr(I)&&I!==k.currentTarget||(k.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:E6(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(oe(B({},Fr.item.attrs),{id:GD(u,k.index),dir:c("dir"),role:"group","data-index":k.index,"data-inview":jo(I),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":C.item(k.index,c("slideCount")),"aria-hidden":jy(!I),style:{scrollSnapAlign:(()=>{var ce;const j=(ce=k.snapAlign)!=null?ce:"start",Y=c("slidesPerMove"),F=Y==="auto"?Math.floor(c("slidesPerPage")):Y;return(k.index+F)%F===0?j:void 0})()}}))},getControlProps(){return t.element(oe(B({},Fr.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(oe(B({},Fr.prevTrigger.attrs),{id:KD(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(oe(B({},Fr.nextTrigger.attrs),{dir:c("dir"),id:XD(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(oe(B({},Fr.indicatorGroup.attrs),{dir:c("dir"),id:QD(u),"data-orientation":c("orientation"),onKeyDown(k){if(k.defaultPrevented)return;const I="indicator",j={ArrowDown(te){b||(a({type:"PAGE.NEXT",src:I}),te.preventDefault())},ArrowUp(te){b||(a({type:"PAGE.PREV",src:I}),te.preventDefault())},ArrowRight(te){b&&(a({type:"PAGE.NEXT",src:I}),te.preventDefault())},ArrowLeft(te){b&&(a({type:"PAGE.PREV",src:I}),te.preventDefault())},Home(te){a({type:"PAGE.SET",index:0,src:I}),te.preventDefault()},End(te){a({type:"PAGE.SET",index:y.length-1,src:I}),te.preventDefault()}},Y=e4(k,{dir:c("dir"),orientation:c("orientation")}),F=j[Y];F==null||F(k)}}))},getIndicatorProps(k){return t.button(oe(B({},Fr.indicator.attrs),{dir:c("dir"),id:db(u,k.index),type:"button","data-orientation":c("orientation"),"data-index":k.index,"data-readonly":jo(k.readOnly),"data-current":jo(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(oe(B({},Fr.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":jo(d),"aria-label":d?C.autoplayStop:C.autoplayStart,onClick(k){k.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var e5={props({props:e}){return w6(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:t5(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 s6(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"}),hb(e)});return hb(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 fb(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?t6(d,g):n6(d,g)},n.get("slidesInView"));n.set("slidesInView",r6(c))},{root:r,threshold:t("inViewThreshold")});return fb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=pn(n);return r?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 p4(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=Hy((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=Fy(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=i6(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=qD(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=Hy(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=ub(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=ub(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=JD(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 t5(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}Ko()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Ko()(["index","readOnly"]),Ko()(["index","snapAlign"]);const n5=e=>{const t=V.useId(),{getRootNode:n}=jl(),{dir:r}=jh(),o=B({id:t,dir:r,getRootNode:n},e),a=Nl(e5,o);return ZD(a,xh)},Qh=V.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=n5(n),a=It(o.getRootProps(),r);return _.jsx(jD,{value:o,children:_.jsx(Qt.div,oe(B({},a),{ref:t}))})});Qh.displayName="CarouselRoot";const r5=180,i5=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},o5=({globalClassName:e,className:t,itemMinWidth:n=r5,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=V.useRef(null),[x,S]=V.useState(0),{width:A}=UA();V.useLayoutEffect(()=>{y.current&&S(y.current.getBoundingClientRect().width)},[A,b]);const C=i5(r),k=n+C,I=x>0?(x+C)/k:1,j=Math.max(1,Math.floor(I));if(b===0)return null;const Y=b>j,F=Math.ceil(b/j),te=Y?Math.max(1,I):j;return _.jsxs(Qh,{ref:y,className:z(e,t,`${L}-carousel`),slidesPerPage:te,slidesPerMove:j,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":!Y}),children:g.map((ce,pe)=>_.jsx(Wh,{index:pe,className:z(e,`${L}-carousel__item`),children:ce},pe))}),c&&Y&&_.jsxs(Vh,{className:z(e,`${L}-carousel__control`),children:[_.jsx(Kh,{className:z(e,`${L}-carousel__prev-trigger`),"aria-label":"Previous slide",children:_.jsx(tb,{size:"16px"})}),_.jsx(Xh,{className:z(e,`${L}-carousel__next-trigger`),"aria-label":"Next slide",children:_.jsx(nb,{size:"16px"})})]}),u&&Y&&_.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))})]})},s5=({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"})})}),[a5,u5]=Gi({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),l5=e=>_a()(e,["lazyMount","unmountOnExit"]),[c5,ka]=Gi({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),pb=V.forwardRef((e,t)=>{const n=ka(),r=u5(),o=vh(oe(B({},r),{present:n.open})),a=It(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:_.jsx(Qt.div,oe(B({},a),{ref:Ol(o.ref,t)}))});pb.displayName="DialogBackdrop";const Jh=V.forwardRef((e,t)=>{const n=ka(),r=ba(),o=It(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(Qt.div,oe(B({},o),{ref:Ol(r.ref,t)}))});Jh.displayName="DialogContent";const Zh=V.forwardRef((e,t)=>{const n=ka(),r=It(n.getDescriptionProps(),e);return _.jsx(Qt.div,oe(B({},r),{ref:t}))});Zh.displayName="DialogDescription";const ep=V.forwardRef((e,t)=>{const n=ka(),r=It(n.getPositionerProps(),e);return ba().unmounted?null:_.jsx(Qt.div,oe(B({},r),{ref:t}))});ep.displayName="DialogPositioner";var d5=Xi("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Ji=d5.build(),mb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},gb=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`},Eb=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`},yb=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)),f5=e=>e.getById(mb(e)),h5=e=>e.getById(gb(e)),p5=e=>e.getById(Eb(e)),m5=e=>e.getById(np(e)),g5=e=>e.getById(rp(e)),E5=e=>e.getById(yb(e));function y5(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:Eb(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:gb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(oe(B({},Ji.positioner.attrs),{dir:a("dir"),id:mb(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:yb(u),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var T5={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>E5(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 $T(()=>Vl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[p5(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 GT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?YT(()=>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")?LT(()=>[Vl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Pt(()=>{e.set("rendered",{title:!!m5(t),description:!!g5(t)})})},syncZIndex({scope:e}){Pt(()=>{const t=Vl(e);if(!t)return;const n=Yo(t);[f5(e),h5(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})}}}};Ko()(["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 b5=e=>{const t=V.useId(),{getRootNode:n}=jl(),{dir:r}=jh(),o=B({id:t,getRootNode:n,dir:r},e),a=Nl(T5,o);return y5(a,xh)},Tb=e=>{const[t,c]=cT(e),d=c,{children:n}=d,r=an(d,["children"]),[o]=l5(t),a=b5(r),u=vh(It({present:a.open},t));return _.jsx(c5,{value:a,children:_.jsx(a5,{value:o,children:_.jsx(aT,{value:u,children:n})})})},bb=V.forwardRef((e,t)=>{const n=ka(),r=It(n.getTitleProps(),e);return _.jsx(Qt.h2,oe(B({},r),{ref:t}))});bb.displayName="DialogTitle";const _5=({children:e})=>{const[t,n]=V.useState(!1),r=V.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=V.useMemo(()=>({isOpen:t}),[t]);return _.jsx(uh.Provider,{value:r,children:_.jsx(Ly.Provider,{value:o,children:e})})},_b=()=>V.useContext(Ly),xb=()=>{const e=V.useContext(uh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},x5=`${L}-overflow-menu-button-trigger`,w5=({componentType:e,children:t})=>{const{isOpen:n}=_b(),{closeMenu:r}=xb(),{globalClassName:o}=st(),a=V.useRef(null);return V.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const h=d.target;h instanceof Element&&h.closest(`.${x5}`)||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},S5=({componentType:e,className:t})=>{const{toggleMenu:n}=xb(),{isOpen:r}=_b(),{globalClassName:o}=st();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(rb,{})})};class v5{constructor(){$e(this,"initialState",kg);$e(this,"promptsStateProxy");$e(this,"promptsParamsProxy");$e(this,"_fullGet",(t,n)=>Reflect.get(t,n));$e(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return k5(n,r),Reflect.set(t,n,r)});$e(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));$e(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));$e(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 v5,A5=e=>{window.addEventListener(tf,e)},C5=e=>{window.removeEventListener(tf,e)},k5=(e,t)=>{const n=new CustomEvent(tf,{detail:{property:e,value:t}});window.dispatchEvent(n)},wb=e=>{const t=oi.isOpen,n=typeof e=="boolean"?e:!t;oi.promptsStateProxy.isOpen=n},N5=e=>{const t=oi.isInline,n=typeof e=="boolean"?e:!t;oi.promptsStateProxy.isInline=n},O5=({elementId:e,entryType:t,params:n,isInline:r})=>{oi.promptsStateProxy.elementId=e,t&&(oi.promptsStateProxy.entryType=t),typeof r=="boolean"&&N5(r),n&&oi.updatePromptsParamsProxy(n),oi.isOpen||wb(!0)},P5=()=>{const e=V.useContext(Og);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},ql=()=>{const e=V.useContext(Ng);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},I5=({componentType:e,isIcon:t})=>{const{globalClassName:n}=st(),{previousComponentType:r}=Fi(),o=Ea(),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(ib,{})}):_.jsxs("button",{className:z(n,`${L}-overflow-menu-button`,`${L}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(ib,{}),"Show ",r||"dialog"]})},R5=({componentType:e,isIcon:t})=>{const{globalClassName:n}=st(),{isModalFullscreen:r}=Fi(),o=Ea(),a=()=>{nf(!r),o()},u=r?gC:EC,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]})},L5=({componentType:e,isIcon:t})=>{const{globalClassName:n}=st(),{dialogPosition:r}=Fi(),o=Ea(),a=r==="bottom-left",u=()=>{rf(a?"bottom-right":"bottom-left"),o()},c=a?BD:FD,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]})},Sb=({componentType:e,onClearChat:t,onClose:n})=>{const{headerConfig:r,globalClassName:o}=st(),{mode:a}=Fi(),u=a==="standalone",c=e==="modal",d=c?I5:Cb,h=c?R5:L5,p=V.useMemo(()=>r?lC(r):{},[r]);return _.jsx(_5,{children:_.jsxs("div",{className:z(o,`${L}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[_.jsxs("div",{className:z(o,`${L}-${e}-header`,{standalone:u,embedded:!u}),style:p,children:[(r==null?void 0:r.logoUrl)&&_.jsx("img",{alt:"",role:"img",className:z(o,`${L}-${e}-logo`,{standalone:u,embedded:!u}),src:r.logoUrl}),_.jsx(bb,{className:z(o,`${L}-${e}-title`,{standalone:u,embedded:!u}),children:r==null?void 0:r.headerText}),_.jsxs("div",{className:z(o,`${L}-${e}-controls`),children:[_.jsx(d,{componentType:e,isIcon:!0}),_.jsx(S5,{componentType:e}),_.jsx(s5,{className:z(o,`cim-${e}-component`),onClick:n})]})]}),_.jsxs(w5,{componentType:e,children:[_.jsx(h,{componentType:e}),_.jsx(B5,{componentType:e}),_.jsx(My,{componentType:e,onClearChat:t})]})]})})},vb="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}`}},D5=({retailPrice:e,discountPrice:t,currencyCode:n=vb})=>{const r=n||vb,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}=D5({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})]})},M5={sparkle:$h,plus:UD,"paper-plane":HD},Ab=({icon:e,className:t})=>{const n=M5[e];return n?_.jsx(n,{className:t,"aria-hidden":"true"}):null},F5=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=st(),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(Ab,{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))})},B5=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=st();if(!r)return null;const o=()=>{Ir(!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"]})},Cb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=st(),r=Ea(),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(ob,{})}):_.jsxs("button",{className:z(n,`${L}-overflow-menu-button`,`${L}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[_.jsx(ob,{}),"Show modal"]})},U5=["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"],H5=3e3,z5=400,j5=({globalClassName:e,isWidgetStandalone:t,messages:n=U5})=>{const[r,o]=V.useState(0),[a,u]=V.useState(!0);return V.useEffect(()=>{let c;const d=setInterval(()=>{u(!1),c=setTimeout(()=>{o(h=>(h+1)%n.length),u(!0)},z5)},H5);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]})]})},$5=({shouldShow:e,loadingText:t})=>e?_.jsx("span",{className:`${L}-processing-text`,children:t}):null,V5=({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($5,{shouldShow:!!n,loadingText:n}),_.jsx(V5,{shouldShow:!n})]});function kb(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 q5(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Y5(e,t,n){const o=al((n||{}).ignore||[]),a=W5(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 j=I.index,Y={index:I.index,input:I.input,stack:[...p,h]};let F=y(...I,Y);if(typeof F=="string"&&(F=F.length>0?{type:"text",value:F}:void 0),F===!1?b.lastIndex=j+1:(x!==j&&k.push({type:"text",value:h.value.slice(x,j)}),Array.isArray(F)?k.push(...F):F&&k.push(F),x=j+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 W5(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([G5(o[0]),X5(o[1])])}return t}function G5(e){return typeof e=="string"?new RegExp(q5(e),"g"):e}function X5(e){return typeof e=="function"?e:function(){return e}}const sp="phrasing",ap=["autolink","link","image","label"];function K5(){return{transforms:[r8],enter:{literalAutolink:J5,literalAutolinkEmail:up,literalAutolinkHttp:up,literalAutolinkWww:up},exit:{literalAutolink:n8,literalAutolinkEmail:t8,literalAutolinkHttp:Z5,literalAutolinkWww:e8}}}function Q5(){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 J5(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function up(e){this.config.enter.autolinkProtocol.call(this,e)}function Z5(e){this.config.exit.autolinkProtocol.call(this,e)}function e8(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 t8(e){this.config.exit.autolinkEmail.call(this,e)}function n8(e){this.exit(e)}function r8(e){Y5(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,i8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),o8]],{ignore:["link","linkReference"]})}function i8(e,t,n,r,o){let a="";if(!Nb(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!s8(n)))return!1;const u=a8(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 o8(e,t,n,r){return!Nb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function s8(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 a8(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=kb(e,"(");let a=kb(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 Nb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ui(n)||el(n))&&(!t||n!==47)}Ob.peek=g8;function u8(){this.buffer()}function l8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function c8(){this.buffer()}function d8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function f8(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 h8(e){this.exit(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(){return"["}function Ob(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 E8(){return{enter:{gfmFootnoteCallString:u8,gfmFootnoteCall:l8,gfmFootnoteDefinitionLabelString:c8,gfmFootnoteDefinition:d8},exit:{gfmFootnoteCallString:f8,gfmFootnoteCall:h8,gfmFootnoteDefinitionLabelString:p8,gfmFootnoteDefinition:m8}}}function y8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ob},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?Pb:T8))),h(),d}}function T8(e,t,n){return t===0?e:Pb(e,t,n)}function Pb(e,t,n){return(n?"":" ")+e}const b8=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ib.peek=v8;function _8(){return{canContainEols:["delete"],enter:{strikethrough:w8},exit:{strikethrough:S8}}}function x8(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:b8}],handlers:{delete:Ib}}}function w8(e){this.enter({type:"delete",children:[]},e)}function S8(e){this.exit(e)}function Ib(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 v8(){return"~"}function A8(e){return e.length}function C8(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||A8,a=[],u=[],c=[],d=[];let h=0,p=-1;for(;++p<e.length;){const S=[],A=[];let C=-1;for(e[p].length>h&&(h=e[p].length);++C<e[p].length;){const k=k8(e[p][C]);if(n.alignDelimiters!==!1){const I=o(k);A[C]=I,(d[C]===void 0||I>d[C])&&(d[C]=I)}S.push(k)}u[p]=S,c[p]=A}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<h;)a[g]=Rb(r[g]);else{const S=Rb(r);for(;++g<h;)a[g]=S}g=-1;const b=[],y=[];for(;++g<h;){const S=a[g];let A="",C="";S===99?(A=":",C=":"):S===108?A=":":S===114&&(C=":");let k=n.alignDelimiters===!1?1:Math.max(1,d[g]-A.length-C.length);const I=A+"-".repeat(k)+C;n.alignDelimiters!==!1&&(k=A.length+k+C.length,k>d[g]&&(d[g]=k),y[g]=k),b[g]=I}u.splice(1,0,b),c.splice(1,0,y),p=-1;const x=[];for(;++p<u.length;){const S=u[p],A=c[p];g=-1;const C=[];for(;++g<h;){const k=S[g]||"";let I="",j="";if(n.alignDelimiters!==!1){const Y=d[g]-(A[g]||0),F=a[g];F===114?I=" ".repeat(Y):F===99?Y%2?(I=" ".repeat(Y/2+.5),j=" ".repeat(Y/2-.5)):(I=" ".repeat(Y/2),j=I):j=" ".repeat(Y)}n.delimiterStart!==!1&&!g&&C.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||g)&&C.push(" "),n.alignDelimiters!==!1&&C.push(I),C.push(k),n.alignDelimiters!==!1&&C.push(j),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||g!==h-1)&&C.push("|")}x.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return x.join(`
|
|
39
|
+
`)}function k8(e){return e==null?"":String(e)}function Rb(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function N8(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()),O8);return o(),u}function O8(e,t,n){return">"+(n?"":" ")+e}function P8(e,t){return Lb(e,t.inConstruct,!0)&&!Lb(e,t.notInConstruct,!1)}function Lb(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Db(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
40
|
+
`&&P8(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
41
|
+
`}function I8(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 R8(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 L8(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 D8(e,t,n,r){const o=L8(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(R8(e,n)){const g=n.enter("codeIndented"),b=n.indentLines(a,M8);return g(),b}const c=n.createTracker(r),d=o.repeat(Math.max(I8(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 M8(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 F8(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 B8(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}}Mb.peek=U8;function Mb(e,t,n,r){const o=B8(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 U8(e,t,n){return n.options.emphasis||"*"}function H8(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 z8(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(H8(e,n)){const p=n.enter("headingSetext"),g=n.enter("phrasing"),b=n.containerPhrasing(e,oe(B({},a.current()),{before:`
|
|
46
46
|
`,after:`
|
|
47
|
-
`}));return g(),p(),
|
|
48
|
-
`+(o===1?"=":"-").repeat(
|
|
47
|
+
`}));return g(),p(),b+`
|
|
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=
|
|
51
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:
|
|
52
|
-
`))}function d(y,w,v,A){const C=v.enter("tableCell"),k=v.enter("phrasing"),R=v.containerPhrasing(y,ie(B({},A),{before:a,after:a}));return k(),C(),R}function h(y,w){return o5(y,{align:w,alignDelimiters:r,padding:n,stringLength:o})}function p(y,w,v){const A=y.children;let C=-1;const k=[],R=w.enter("table");for(;++C<A.length;)k[C]=g(A[C],w,v);return R(),k}function g(y,w,v){const A=y.children;let C=-1;const k=[],R=w.enter("tableRow");for(;++C<A.length;)k[C]=d(A[C],y,w,v);return R(),k}function T(y,w,v){let A=Xb.inlineCode(y,w,v);return v.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function Y5(){return{exit:{taskListCheckValueChecked:Zb,taskListCheckValueUnchecked:Zb,paragraph:G5}}}function W5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:K5}}}function Zb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function G5(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 K5(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=Xb.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 Q5(){return[kD(),KD(),ZD(),U5(),Y5()]}function X5(e){return{extensions:[ND(),QD(e),e5(),q5(e),W5()]}}const J5={tokenize:i8,partial:!0},eT={tokenize:o8,partial:!0},tT={tokenize:s8,partial:!0},nT={tokenize:a8,partial:!0},Z5={tokenize:u8,partial:!0},rT={name:"wwwAutolink",tokenize:n8,previous:oT},iT={name:"protocolAutolink",tokenize:r8,previous:sT},Pr={name:"emailAutolink",tokenize:t8,previous:aT},Tr={};function e8(){return{text:Tr}}let qi=48;for(;qi<123;)Tr[qi]=Pr,qi++,qi===58?qi=65:qi===91&&(qi=97);Tr[43]=Pr,Tr[45]=Pr,Tr[46]=Pr,Tr[95]=Pr,Tr[72]=[Pr,iT],Tr[104]=[Pr,iT],Tr[87]=[Pr,rT],Tr[119]=[Pr,rT];function t8(e,t,n){const r=this;let o,a;return u;function u(g){return!Ph(g)||!aT.call(r,r.previous)||Lh(r.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(g))}function c(g){return Ph(g)?(e.consume(g),c):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(Z5,p,h)(g):g===45||g===95||Gt(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&&nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function n8(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!oT.call(r,r.previous)||Lh(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(J5,e.attempt(eT,e.attempt(tT,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function r8(e,t,n){const r=this;let o="",a=!1;return u;function u(g){return(g===72||g===104)&&sT.call(r,r.previous)&&!Lh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),e.consume(g),c):n(g)}function c(g){if(nn(g)&&o.length<5)return o+=String.fromCodePoint(g),e.consume(g),c;if(g===58){const T=o.toLowerCase();if(T==="http"||T==="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||Lu(g)||it(g)||Ii(g)||Du(g)?n(g):e.attempt(eT,e.attempt(tT,p),n)(g)}function p(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function i8(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 o8(e,t,n){let r,o,a;return u;function u(h){return h===46||h===95?e.check(nT,d,c)(h):h===null||it(h)||Ii(h)||h!==45&&Du(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 s8(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(nT,t,a)(u):u===null||it(u)||Ii(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function a8(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||it(c)||Ii(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||it(c)||Ii(c)?t(c):r(c)}function a(c){return nn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):nn(c)?(e.consume(c),u):n(c)}}function u8(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return Gt(a)?n(a):t(a)}}function oT(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||it(e)}function sT(e){return!nn(e)}function aT(e){return!(e===47||Ph(e))}function Ph(e){return e===43||e===45||e===46||e===95||Gt(e)}function Lh(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 l8={tokenize:E8,partial:!0};function c8(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:p8,continuation:{tokenize:m8},exit:g8}},text:{91:{name:"gfmFootnoteCall",tokenize:h8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:d8,resolveTo:f8}}}}function d8(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=Wn(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 f8(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 h8(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||it(g))return n(g);if(g===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return o.includes(Wn(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return it(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 p8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(w)}function p(w){if(u>999||w===93&&!c||w===null||w===91||it(w))return n(w);if(w===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=Wn(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return it(w)||(c=!0),u++,e.consume(w),w===92?g:p}function g(w){return w===91||w===92||w===93?(e.consume(w),u++,p):p(w)}function T(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),o.includes(a)||o.push(a),Qe(e,y,"gfmFootnoteDefinitionWhitespace")):n(w)}function y(w){return t(w)}}function m8(e,t,n){return e.check(Hs,t,e.attempt(l8,t,n))}function g8(e){e.exit("gfmFootnoteDefinition")}function E8(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 y8(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)},T=[["enter",p,c],["enter",u[h][1],c],["exit",u[h][1],c],["enter",g,c]],y=c.parser.constructs.insideSpan.null;y&&xn(T,T.length,0,Mu(y,u.slice(h+1,d),c)),xn(T,T.length,0,[["exit",g,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),xn(u,h-1,d-h+3,T),d=h+T.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,c,d){const h=this.previous,p=this.events;let g=0;return T;function T(w){return h===126&&p[p.length-1][1].type!=="characterEscape"?d(w):(u.enter("strikethroughSequenceTemporary"),y(w))}function y(w){const v=xo(h);if(w===126)return g>1?d(w):(u.consume(w),g++,y);if(g<2&&!n)return d(w);const A=u.exit("strikethroughSequenceTemporary"),C=xo(w);return A._open=!C||C===2&&!!v,A._close=!v||v===2&&!!C,c(w)}}}class b8{constructor(){this.map=[]}add(t,n,r){T8(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 T8(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 x8(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 w8(){return{flow:{null:{name:"table",tokenize:_8,resolveAll:v8}}}}function _8(e,t,n){const r=this;let o=0,a=0,u;return c;function c(z){let oe=r.events.length-1;for(;oe>-1;){const se=r.events[oe][1].type;if(se==="lineEnding"||se==="linePrefix")oe--;else break}const he=oe>-1?r.events[oe][1].type:null,ae=he==="tableHead"||he==="tableRow"?F:d;return ae===F&&r.parser.lazy[r.now().line]?n(z):ae(z)}function d(z){return e.enter("tableHead"),e.enter("tableRow"),h(z)}function h(z){return z===124||(u=!0,a+=1),p(z)}function p(z){return z===null?n(z):Le(z)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),y):n(z):Ge(z)?Qe(e,p,"whitespace")(z):(a+=1,u&&(u=!1,o+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),g(z)))}function g(z){return z===null||z===124||it(z)?(e.exit("data"),p(z)):(e.consume(z),z===92?T:g)}function T(z){return z===92||z===124?(e.consume(z),g):g(z)}function y(z){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(z):(e.enter("tableDelimiterRow"),u=!1,Ge(z)?Qe(e,w,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):w(z))}function w(z){return z===45||z===58?A(z):z===124?(u=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),v):Y(z)}function v(z){return Ge(z)?Qe(e,A,"whitespace")(z):A(z)}function A(z){return z===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),C):z===45?(a+=1,C(z)):z===null||Le(z)?U(z):Y(z)}function C(z){return z===45?(e.enter("tableDelimiterFiller"),k(z)):Y(z)}function k(z){return z===45?(e.consume(z),k):z===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(z))}function R(z){return Ge(z)?Qe(e,U,"whitespace")(z):U(z)}function U(z){return z===124?w(z):z===null||Le(z)?!u||o!==a?Y(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):Y(z)}function Y(z){return n(z)}function F(z){return e.enter("tableRow"),X(z)}function X(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),X):z===null||Le(z)?(e.exit("tableRow"),t(z)):Ge(z)?Qe(e,X,"whitespace")(z):(e.enter("data"),ce(z))}function ce(z){return z===null||z===124||it(z)?(e.exit("data"),X(z)):(e.consume(z),z===92?de:ce)}function de(z){return z===92||z===124?(e.consume(z),ce):ce(z)}}function v8(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 T=new b8;for(;++n<e.length;){const y=e[n],w=y[1];y[0]==="enter"?w.type==="tableHead"?(c=!1,d!==0&&(uT(T,t,d,h,p),p=void 0,d=0),h={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},T.add(n,0,[["enter",h,t]])):w.type==="tableRow"||w.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({},w.start),end:Object.assign({},w.end)},T.add(n,0,[["enter",p,t]])),o=w.type==="tableDelimiterRow"?2:p?3:1):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],g=Cl(T,t,a,o,void 0,g),a=[0,0,0,0]),u[2]=n)):w.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],g=Cl(T,t,a,o,void 0,g)),a=u,u=[a[1],n,0,0])):w.type==="tableHead"?(c=!0,d=n):w.type==="tableRow"||w.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],g=Cl(T,t,a,o,n,g)):u[1]!==0&&(g=Cl(T,t,u,o,n,g)),o=0):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&uT(T,t,d,h,p),T.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=x8(t.events,n))}return e}function Cl(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},Go(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Go(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=Go(t.events,n[2]),p=Go(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 T=t.events[n[2]],y=t.events[n[3]];if(T[1].end=Object.assign({},y[1].end),T[1].type="chunkText",T[1].contentType="text",n[3]>n[2]+1){const w=n[2]+1,v=n[3]-n[2]-1;e.add(w,v,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return o!==void 0&&(a.end=Object.assign({},Go(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function uT(e,t,n,r,o){const a=[],u=Go(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 Go(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const S8={name:"tasklistCheck",tokenize:C8};function A8(){return{text:{91:S8}}}function C8(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 it(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):Ge(d)?e.check({tokenize:k8},t,n)(d):n(d)}}function k8(e,t,n){return Qe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function N8(e){return Ig([e8(),c8(),y8(e),w8(),A8()])}const O8={};function I8(e){const t=this,n=e||O8,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(N8(n)),a.push(Q5()),u.push(X5(n))}const R8=()=>x.jsx("span",{className:`${D}-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"})})}),Dh=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>x.jsx(x1,{remarkPlugins:[I8],rehypePlugins:[PE],components:{h1:({children:o})=>x.jsx("h1",{className:j(e,`${D}-header h1`),children:o}),h2:({children:o})=>x.jsx("h2",{className:j(e,`${D}-header h2`),children:o}),h3:({children:o})=>x.jsx("h3",{className:j(e,`${D}-header h3`),children:o}),ul:({children:o})=>x.jsx("ul",{className:j(e,`${D}-ul`),children:o}),ol:({children:o})=>x.jsx("ol",{className:j(e,`${D}-ol`),children:o}),li:({children:o})=>x.jsx("li",{className:j(e,`${D}-li`),children:o}),a:({href:o,children:a})=>x.jsx(HE,{globalClassName:e,openLinksInNewTab:t,href:o,children:a}),table:({children:o})=>x.jsx("div",{className:j(e,`${D}-table-container`),children:x.jsx("table",{className:j(e,`${D}-table`),children:o})}),thead:({children:o})=>x.jsx("thead",{className:j(e,`${D}-thead`),children:o}),tbody:({children:o})=>x.jsx("tbody",{className:j(e,`${D}-tbody`),children:o}),tr:({children:o})=>x.jsx("tr",{className:j(e,`${D}-tr`),children:o}),th:({children:o})=>x.jsx("th",{className:j(e,`${D}-th`),children:o}),td:({children:o})=>x.jsx("td",{className:j(e,`${D}-td`),children:o}),span:({className:o,children:a})=>o===`${D}-blinking-cursor`?x.jsx(R8,{}):x.jsx("span",{children:a})},children:r+(n?`<span className='${D}-blinking-cursor'></span>`:"")}),lT=({product:e,globalClassName:t,isFullWidth:n,openLinksInNewTab:r,isCartMgmtSupported:o=!1})=>{const{sendMessage:a,loading:u}=Yn(),{id:c,name:d,imageUrl:h,productPageUrl:p,price:g,discountPrice:T,compareAtPrice:y,currencyCode:w}=e,v=typeof T=="number"&&typeof g=="number"&&T<g,A=v?g:y!=null?y:g,C=v?T:g,k=()=>{if(u)return;const U=d||"this product",Y=c?` [SKU: ${c}]`:"";a(`Show me details for ${U}${Y}`)},R=o?`View details for ${d}`:`Go to product page for ${d}`;return x.jsxs("div",{className:j(t,`${D}-msg-product-card`,{"card-full-width":n}),children:[x.jsx("div",{className:j(t,`${D}-msg-product-card__image-wrapper`),children:h&&(o?x.jsx("button",{type:"button",className:j(t,`${D}-msg-product-card__image-button`),onClick:k,disabled:u,"aria-label":R,children:x.jsx("img",{className:j(t,`${D}-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":R,children:x.jsx("img",{className:j(t,`${D}-msg-product-card__image`),src:h,alt:d||"Product image",loading:"lazy"})}):x.jsx("img",{className:j(t,`${D}-msg-product-card__image`),src:h,alt:d||"Product image",loading:"lazy"}))}),x.jsxs("div",{className:j(t,`${D}-msg-product-card__content`),children:[o?x.jsx("button",{type:"button",disabled:u,onClick:k,className:j(t,`${D}-msg-product-card__title-link`),"aria-label":R,children:d}):p?x.jsx("a",{href:p,target:r?"_blank":"_self",rel:"noopener",className:j(t,`${D}-msg-product-card__title-link`),"aria-label":R,children:d}):x.jsx("p",{className:j(t,`${D}-msg-product-card__title`),children:d}),x.jsx("div",{className:j(t,`${D}-msg-product-card__price-row`),children:x.jsx(Sh,{globalClassName:t,retailPrice:A,discountPrice:C,currencyCode:w})})]})]})},cT=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}),P8=({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:j(n,`${D}-product-carousel-title`),children:e}),x.jsx(lT,{product:cT(u),globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o,isCartMgmtSupported:a,isFullWidth:!o})]})}return x.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&x.jsx("p",{className:j(n,`${D}-product-carousel-title`),children:e}),x.jsx(qL,{globalClassName:n,spacing:o?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(u=>x.jsx(lT,{product:cT(u),globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o,isCartMgmtSupported:a},u.id))})]})},dT=({code:e,globalClassName:t})=>x.jsxs("span",{className:j(t,`${D}-cart-chip`),children:[x.jsx(Z0,{"aria-hidden":"true"}),x.jsx("span",{children:e})]}),Yi=({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=Ea(u?-n:n,r);else if(c)d=c;else return null;return x.jsxs("div",{className:j(o,`${D}-cart-total-row`,{emphasized:a}),children:[x.jsxs("span",{className:j(o,`${D}-cart-total-label`),children:[e,t&&x.jsx("span",{className:j(o,`${D}-cart-total-badge`),children:t})]}),x.jsx("span",{className:j(o,`${D}-cart-total-value`),children:d})]})},L8=({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:j(r,`${D}-cart-item`),children:[e.imageUrl&&x.jsx("div",{className:j(r,`${D}-cart-item-image`),children:x.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),x.jsxs("div",{className:j(r,`${D}-cart-item-details`),children:[x.jsx("p",{className:j(r,`${D}-cart-item-name`),children:e.name}),x.jsxs("div",{className:j(r,`${D}-cart-item-attrs`),children:[((u=e.variants)!=null?u:[]).map(h=>x.jsxs("p",{className:j(r,`${D}-cart-item-attr`),children:[h.lbl,": ",h.value]},`${h.type}-${h.value}`)),((c=e.promotions)!=null?c:[]).map(h=>x.jsxs("p",{className:j(r,`${D}-cart-item-attr`),children:["Promotion: ",h]},h))]}),((d=e.coupons)!=null?d:[]).length>0&&x.jsx("div",{className:j(r,`${D}-cart-chips`),children:e.coupons.map(h=>x.jsx(dT,{code:h,globalClassName:r},h))}),x.jsxs("span",{className:j(r,`${D}-cart-item-price`),children:[a&&x.jsx("span",{className:j(r,`${D}-cart-item-original-price`),children:Ea(e.originalSubtotal,t)}),x.jsx("span",{className:j(r,`${D}-cart-item-final-price`),children:Ea(e.itemSubtotal,t)})]}),x.jsxs("div",{className:j(r,`${D}-cart-item-footer`),children:[x.jsxs("span",{className:j(r,`${D}-cart-item-qty`),children:["Qty: ",e.quantity]}),x.jsx("button",{type:"button",className:j(r,`${D}-cart-item-remove`),disabled:n,onClick:()=>o(e),children:"Remove"})]})]})]})},D8=({cart:e,globalClassName:t,openLinksInNewTab:n})=>{const{sendMessage:r,loading:o}=Yn(),[a,u]=Z.useState(!0),[c,d]=Z.useState(""),{items:h=[],currencyCode:p="USD",subtotal:g,total:T,taxes:y,shippingCost:w,shippingDiscount:v,shippingPromotions:A=[],promotionsDiscount:C,promotions:k=[],couponsDiscount:R,couponsApplied:U=[],bodyMessage:Y,footerMessage:F,checkoutButtonUrl:X}=e,ce=z=>{o||r(`Remove ${z.name} from my cart`)},de=()=>{const z=c.trim();!z||o||(r(`Apply coupon code ${z}`),d(""))};return x.jsxs("div",{className:j(t,`${D}-cart`),children:[x.jsxs("div",{className:j(t,`${D}-cart-box`),children:[Y&&x.jsxs("button",{type:"button",className:j(t,`${D}-cart-summary`),"aria-expanded":a,onClick:()=>u(z=>!z),children:[x.jsx("span",{className:j(t,`${D}-cart-summary-text`),children:x.jsx(Dh,{text:Y,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})}),x.jsx("span",{className:j(t,`${D}-cart-summary-toggle`),"aria-hidden":"true",children:a?x.jsx(nA,{}):x.jsx(rA,{})})]}),a&&x.jsxs("div",{className:j(t,`${D}-cart-expanded`),children:[x.jsx("ul",{className:j(t,`${D}-cart-items`),children:h.map(z=>x.jsx(L8,{item:z,currencyCode:p,loading:o,globalClassName:t,onRemove:ce},z.itemId))}),U.length>0&&x.jsx("div",{className:j(t,`${D}-cart-chips`,`${D}-cart-applied-coupons`),children:U.map(z=>x.jsx(dT,{code:z,globalClassName:t},z))}),x.jsxs("div",{className:j(t,`${D}-cart-totals`),children:[x.jsx(Yi,{label:"Subtotal",value:g,currencyCode:p,globalClassName:t}),x.jsx(Yi,{label:"Coupon",value:R,currencyCode:p,globalClassName:t,isDiscount:!0}),x.jsx(Yi,{label:"Promotions",badge:k[0],value:C,currencyCode:p,globalClassName:t,isDiscount:!0}),x.jsx(Yi,{label:"Shipping",value:w,currencyCode:p,globalClassName:t,fallback:"TBD"}),x.jsx(Yi,{label:"Shipping Discount",badge:A[0],value:v,currencyCode:p,globalClassName:t,isDiscount:!0}),x.jsx(Yi,{label:"Tax",value:y,currencyCode:p,globalClassName:t,fallback:"TBD"}),x.jsx(Yi,{label:"Total",value:T,currencyCode:p,globalClassName:t,emphasized:!0})]})]})]}),x.jsxs("div",{className:j(t,`${D}-cart-coupon`),children:[x.jsxs("div",{className:j(t,`${D}-cart-coupon-field`),children:[x.jsx("span",{className:j(t,`${D}-cart-coupon-icon`),"aria-hidden":"true",children:x.jsx(Z0,{})}),x.jsx("input",{type:"text",className:j(t,`${D}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:c,disabled:o,onChange:z=>d(z.target.value),onKeyDown:z=>{z.key==="Enter"&&(z.preventDefault(),de())}})]}),x.jsx("button",{type:"button",className:j(t,`${D}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:o||!c.trim(),onClick:de,children:x.jsx(tA,{"aria-hidden":"true"})})]}),X&&x.jsxs("a",{className:j(t,`${D}-cart-checkout-button`),href:X,target:n?"_blank":"_self",rel:"noopener noreferrer",children:[x.jsx(ZS,{"aria-hidden":"true"}),x.jsx("span",{children:"Checkout"})]}),x.jsx("p",{className:j(t,`${D}-cart-footer`),children:F||"Shipping and taxes calculated at checkout."})]})},M8=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return x.jsxs(yh,{className:j(n,`${D}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[x.jsx(mh,{className:j(n,`${D}-pdp-gallery__item-group`),children:e.map((o,a)=>x.jsx(ph,{index:a,className:j(n,`${D}-pdp-gallery__item`),children:x.jsx("img",{className:j(n,`${D}-pdp-gallery__image`),src:o,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,loading:"lazy"})},o))}),r&&x.jsxs(dh,{className:j(n,`${D}-pdp-gallery__control`),children:[x.jsx(Eh,{className:j(n,`${D}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:x.jsx(ub,{size:"16px"})}),x.jsx(gh,{className:j(n,`${D}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:x.jsx(lb,{size:"16px"})})]}),r&&x.jsx(hh,{className:j(n,`${D}-pdp-gallery__indicator-group`),children:e.map((o,a)=>x.jsx(fh,{index:a,className:j(n,`${D}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},ba="color",Mh=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,fT=e=>e.replace(/(^|\/)large\//,"$1medium/"),hT=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===ba&&n.vals.includes(t)),F8=(e,t)=>{var c,d;const n=((c=e.imgGroups)!=null?c:[]).filter(h=>h.viewType==="large"),r=t&&n.find(h=>hT(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=>Mh(e.baseUrl,fT(h.url)));return u.length>0?u:e.imageUrl?[Mh(e.baseUrl,fT(e.imageUrl))]:[]},B8=(e,t)=>{var o,a,u;const n=((o=e.imgGroups)!=null?o:[]).find(c=>c.viewType==="swatch"&&hT(c,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?Mh(e.baseUrl,r):""},kl=(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})}),U8=(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]}))},H8=(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})},z8=(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},j8=(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},$8=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const o=r.opts.find(u=>kl(e.vmat,r.id,u.val)),a=o!=null?o:r.opts[0];a&&(t[r.id]=a.val)}return t},V8=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var se,Te,Ce,ee,V,q,S;const{addToCart:o,loading:a}=Yn(),u=e.data,c=(se=u.vattr)!=null?se:[],[d,h]=Z.useState(()=>$8(u)),p=U8(u.vmat,d),g=(Ce=(Te=u.quantity)==null?void 0:Te.minQuantity)!=null?Ce:1,T=(V=(ee=u.quantity)==null?void 0:ee.maxQuantity)!=null?V:Number.POSITIVE_INFINITY,y=(S=(q=u.quantity)==null?void 0:q.increment)!=null?S:1,[w,v]=Z.useState(g),A=d[ba],C=Z.useMemo(()=>F8(u,A),[u,A]),k=Z.useMemo(()=>j8(u,d),[u,d]),R=c.find(I=>I.id===ba),U=c.filter(I=>I.id!==ba),Y=(I,W)=>()=>{h(O=>{const be=!kl(u.vmat,I,W,O);return I===ba||be?H8(u.vmat,c,I,W,O):ie(B({},O),{[I]:W})})},F=()=>{if(a)return;const I=z8(u,d);if(!I)return;const W=c.map(O=>{const be=O.opts.find(Oe=>Oe.val===d[O.id]);return be?{label:O.lbl||O.id,value:be.name||be.val}:null}).filter(O=>O!==null);o({productName:u.name,sku:I,quantity:w,variants:W})},X=!p||w-y<g,ce=!p||w+y>T,de=I=>{var O;const W=d[I.id];return(O=I.opts.find(be=>be.val===W))==null?void 0:O.name},z=()=>v(I=>Math.max(g,I-y)),oe=()=>v(I=>Math.min(T,I+y)),he=I=>x.jsxs("div",{className:j(t,`${D}-msg-pdp__variant`),children:[x.jsxs("div",{className:j(t,`${D}-msg-pdp__variant-label`),children:[x.jsx("span",{id:`variant-label-${I.id}`,className:j(t,`${D}-msg-pdp__variant-name`),children:I.lbl||I.id}),de(I)&&x.jsx("span",{className:j(t,`${D}-msg-pdp__variant-value`),children:de(I)})]}),x.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${I.id}`,className:j(t,`${D}-msg-pdp__chips`),children:I.opts.map(W=>{const O=kl(u.vmat,I.id,W.val,d),be=d[I.id]===W.val;return x.jsxs("label",{className:j(`${D}-msg-pdp__chip`,{selected:be,unavailable:!O}),children:[x.jsx("input",{type:"radio",name:`variant-${I.id}`,value:W.val,checked:be,"aria-description":O?void 0:"unavailable",onChange:Y(I.id,W.val),className:`${D}-msg-pdp__radio-input`}),x.jsx("span",{children:W.name||W.val})]},W.val)})})]},I.id),ae=I=>x.jsxs("div",{className:j(t,`${D}-msg-pdp__variant`),children:[x.jsxs("div",{className:j(t,`${D}-msg-pdp__variant-label`),children:[x.jsx("span",{id:`variant-label-${I.id}`,className:j(t,`${D}-msg-pdp__variant-name`),children:I.lbl||"Color"}),de(I)&&x.jsx("span",{className:j(t,`${D}-msg-pdp__variant-value`),children:de(I)})]}),x.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${I.id}`,className:j(t,`${D}-msg-pdp__swatches`),children:I.opts.map(W=>{const O=kl(u.vmat,I.id,W.val,d),be=d[I.id]===W.val,Oe=B8(u,W.val);return Oe?x.jsxs("label",{className:j(`${D}-msg-pdp__swatch`,{selected:be,unavailable:!O}),children:[x.jsx("input",{type:"radio",name:`variant-${I.id}`,value:W.val,checked:be,"aria-label":W.name||W.val,"aria-description":O?void 0:"unavailable",onChange:Y(I.id,W.val),className:`${D}-msg-pdp__radio-input`}),x.jsx("img",{className:j(t,`${D}-msg-pdp__swatch-image`),src:Oe,alt:W.name||W.val,loading:"lazy"})]},W.val):x.jsxs("label",{className:j(`${D}-msg-pdp__chip`,{selected:be,unavailable:!O}),children:[x.jsx("input",{type:"radio",name:`variant-${I.id}`,value:W.val,checked:be,"aria-description":O?void 0:"unavailable",onChange:Y(I.id,W.val),className:`${D}-msg-pdp__radio-input`}),x.jsx("span",{children:W.name||W.val})]},W.val)})})]});return x.jsx("div",{className:j(t,`${D}-msg-pdp`),children:x.jsxs("div",{className:j(t,`${D}-msg-pdp__card`),children:[x.jsx("div",{className:j(t,`${D}-msg-pdp__gallery`),children:x.jsx(M8,{images:C,altText:u.name,globalClassName:t})}),x.jsxs("div",{className:j(t,`${D}-msg-pdp__content`),children:[u.slugUrl?x.jsx("a",{href:u.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:j(t,`${D}-msg-pdp__title-link`),"aria-label":`Go to product page for ${u.name}`,children:u.name}):x.jsx("p",{className:j(t,`${D}-msg-pdp__title`),children:u.name}),x.jsx(Sh,{globalClassName:t,className:`${D}-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&&x.jsx("p",{className:j(t,`${D}-msg-pdp__description`),children:u.dscr}),R&&ae(R),U.map(he),x.jsxs("div",{className:j(t,`${D}-msg-pdp__variant`),children:[x.jsxs("div",{className:j(t,`${D}-msg-pdp__variant-label`),children:[x.jsx("span",{className:j(t,`${D}-msg-pdp__variant-name`),children:"Quantity"}),x.jsx("span",{className:j(t,`${D}-msg-pdp__variant-value`),children:w})]}),x.jsxs("div",{className:j(t,`${D}-msg-pdp__stepper`),children:[x.jsx(lr,{className:`${D}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:x.jsx(VS,{}),disabled:X,onClick:z}),x.jsx("span",{className:j(t,`${D}-msg-pdp__quantity`),children:w}),x.jsx(lr,{className:`${D}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:x.jsx(qS,{}),disabled:ce,onClick:oe})]})]}),r&&x.jsx("div",{className:j(t,`${D}-msg-pdp__actions`),children:x.jsx(Iu,{className:`${D}-msg-pdp__add-to-cart`,disabled:!p||a,onClick:F,children:a?"Adding...":"Add to cart"})})]})]})})},q8=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},Y8=({products:e,table:t,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:o=!1})=>{const{addToCart:a,loading:u}=Yn();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:j(n,`${D}-product-comparison`),children:x.jsxs("div",{className:`${D}-product-comparison__grid`,style:{gridTemplateColumns:c,minWidth:d},children:[x.jsxs("div",{className:`${D}-product-comparison__header`,children:[x.jsx("div",{className:`${D}-product-comparison__header-spacer`}),e.map(p=>{var T,y,w,v;const g=q8(p);return x.jsxs("div",{className:j(n,`${D}-product-comparison__product-col`),children:[g&&x.jsx("img",{className:j(n,`${D}-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:j(n,`${D}-product-comparison__name`),"aria-label":`Go to product page for ${p.name}`,children:p.name}):x.jsx("span",{className:j(n,`${D}-product-comparison__name`),children:p.name}),x.jsx(Sh,{globalClassName:n,retailPrice:(T=p.pr)==null?void 0:T.orig,discountPrice:(v=(y=p.pr)==null?void 0:y.prom)!=null?v:(w=p.pr)==null?void 0:w.cur,currencyCode:p.ccy,fontSize:"0.875rem"})]},p.id)})]}),x.jsx("div",{className:`${D}-product-comparison__table`,children:t.map(p=>x.jsxs("div",{className:`${D}-product-comparison__row`,children:[x.jsx("div",{className:j(n,`${D}-product-comparison__row-label`),children:p.row_name}),p.values.map((g,T)=>x.jsx("div",{className:j(n,`${D}-product-comparison__row-value`),children:g},`${p.row_name}-${T}`))]},p.row_name))}),o&&x.jsxs("div",{className:`${D}-product-comparison__footer`,children:[x.jsx("div",{className:`${D}-product-comparison__footer-spacer`}),e.map(p=>x.jsx("div",{className:j(n,`${D}-product-comparison__footer-cell`),children:x.jsxs(Iu,{className:`${D}-product-comparison__add-to-cart`,disabled:u,onClick:h(p),children:[x.jsx(JS,{size:"14px"}),"Add to cart"]})},`cart-${p.id}`))]})]})})},pT=({content:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{sendMessage:o,loading:a}=Yn(),{isCartMgmtSupported:u}=At();return x.jsx(x.Fragment,{children:e.response.map((c,d)=>{var h,p,g,T,y,w,v,A,C,k,R,U,Y,F,X,ce,de,z,oe,he,ae;switch(c.type){case"markdown":return x.jsx(Dh,{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(P8,{title:(y=(T=c.data)==null?void 0:T.title)!=null?y:"",products:(v=(w=c.data)==null?void 0:w.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(V8,{product:c.data,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${c.type}-${(C=c.index)!=null?C:d}`);case"product_comparison":return x.jsx(Y8,{products:(R=(k=c.data)==null?void 0:k.products)!=null?R:[],table:(Y=(U=c.data)==null?void 0:U.table)!=null?Y:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${c.type}-${(F=c.index)!=null?F:d}`);case"cart":{const se=(de=(ce=(X=c.data)==null?void 0:X.cart)==null?void 0:ce.cartSummary)==null?void 0:de.cartDetails;return se?x.jsx(D8,{cart:se,productsToHighlight:c.data.products_to_highlight,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${c.type}-${(z=c.index)!=null?z:d}`):null}case"suggestions":return x.jsx("div",{style:{marginTop:"0.5rem"},children:x.jsx(mD,{disabled:a,suggestions:(he=(oe=c.data)==null?void 0:oe.display_text)!=null?he:[],globalClassName:t,isWidgetStandalone:r,onSuggestionClick:o})},`${c.type}-${(ae=c.index)!=null?ae:d}`);default:return null}})})},W8=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:o}=At(),a=Z.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=Z.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:j(t,`${D}-message`,r?"standalone":"embedded"),children:x.jsx("div",{className:j(t,`${D}-user-message`,r?"standalone":"embedded"),children:x.jsxs("div",{className:j(t,`${D}-user-message-row`,r?"standalone":"embedded"),children:[x.jsx("span",{className:j(t,`${D}-message-icon user-message-icon`,r?"standalone":"embedded"),children:x.jsx(eA,{})}),x.jsx("p",{className:j(t,`${D}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return x.jsx("div",{className:j(t,`${D}-message-group`,r?"standalone":"embedded"),children:x.jsx("div",{className:`${D}-message-group-child`,children:a?x.jsx(pT,{content:a,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r}):x.jsx(Dh,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return x.jsx("div",{className:j(t,`${D}-message`,r?"standalone":"embedded"),children:x.jsx("p",{className:j(t,`${D}-reset-message`),children:e.content})})}},G8=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>x.jsxs("div",{className:j(n,`${D}-send-error`,r?"standalone":"embedded"),role:"alert",children:[x.jsx("span",{className:j(n,`${D}-send-error-text`),children:e}),x.jsxs("button",{type:"button",className:j(n,`${D}-retry-button`),onClick:t,children:[x.jsx(sA,{"aria-hidden":"true"})," Retry"]})]}),K8="You are offline or we couldn't reach the assistant. Check connection and try again.",Fh=({isWidgetStandalone:e})=>{var X,ce;const{globalClassName:t,openLinksInNewTab:n,logger:r}=At(),{messages:o,streamingBlocks:a,isAgentTyping:u,loading:c,progressMessage:d,connectionStatus:h,error:p,sendError:g,retryLastMessage:T,retryConnection:y}=Yn(),w=Z.useRef(null),v=o.length>0,A=a.length>0,C=v&&(c||u)&&!A,k=h==="reconnecting"&&!C,R=h==="error";let U=null;R?U={message:p!=null?p:K8,kind:"connection",onRetry:y}:g&&(U={message:g.message,kind:"send",onRetry:T}),Z.useEffect(()=>{var de;(de=w.current)==null||de.scrollIntoView({behavior:"smooth"})},[o,a,g,p]);const Y=(X=U==null?void 0:U.message)!=null?X:null,F=(ce=U==null?void 0:U.kind)!=null?ce:null;return Z.useEffect(()=>{Y&&(r==null||r.error("Error message shown to user",{message:Y,kind:F}))},[Y,F,r]),x.jsxs(x.Fragment,{children:[c&&!v&&x.jsx(TD,{globalClassName:t,isWidgetStandalone:e}),o.map(de=>x.jsx(W8,{message:de,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},de.id)),U&&x.jsx(G8,{message:U.message,onRetry:U.onRetry,globalClassName:t,isWidgetStandalone:e}),A&&x.jsxs("div",{className:j(t,`${D}-message-group`,e?"standalone":"embedded"),children:[x.jsx(pT,{content:{response:a},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e}),(c||u)&&x.jsx(Ah,{globalClassName:t,isWidgetStandalone:e})]}),C&&x.jsx(Ah,{globalClassName:t,isWidgetStandalone:e,loadingText:d}),k&&x.jsx(Ah,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),x.jsx("div",{ref:w})]})},Q8=()=>x.jsxs("svg",{className:`${D}-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"})]}),X8=()=>x.jsx("svg",{className:`${D}-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"})}),Bh=({steps:e,globalClassName:t})=>e.length===0?null:x.jsx("div",{className:j(t,`${D}-progress-steps-panel`),children:x.jsxs("div",{className:`${D}-progress-steps`,children:[x.jsxs("span",{className:`${D}-progress-steps-header`,children:["Loading Step ",e.length]}),x.jsx("ul",{className:`${D}-progress-steps-list`,children:e.map((n,r)=>{const o=r<e.length-1,a=r===e.length-1;return x.jsxs("li",{className:j(`${D}-progress-step`,a&&"active"),children:[a&&x.jsx("span",{className:`${D}-progress-step-arc`}),x.jsx("span",{className:`${D}-progress-step-text`,children:n}),x.jsx("span",{className:j(`${D}-progress-step-icon`,o?"done":"active"),children:o?x.jsx(Q8,{}):x.jsx(X8,{})})]},`${r}-${n}`)})})]})}),mT=()=>{const{globalClassName:e,themeVariables:t}=At(),{isAgentTyping:n,sendMessage:r,resetConversation:o,progressSteps:a}=Yn(),u=n;return x.jsxs("div",{className:j(e,`${D}-container`,`${D}-embedded-chat`),style:t,children:[x.jsx("div",{className:j(e,`${D}-message-container`,"embedded"),children:x.jsx(Fh,{isWidgetStandalone:!1})}),x.jsx(Bh,{steps:a,globalClassName:e}),x.jsx(Nf,{componentType:"chat",className:"embedded-chat",isLoading:u,onSubmit:c=>r(c)}),x.jsx("div",{className:j(`${D}-embedded-chat-menu`),children:x.jsxs(CL,{componentType:"chat",children:[x.jsx(Rb,{componentType:"chat"}),x.jsx($E,{componentType:"chat",onClearChat:o})]})})]})},gT=e=>{var d;const{children:t,disabled:n}=e,[r,o]=Z.useState((d=e.container)==null?void 0:d.current),a=Z.useSyncExternalStore(Z8,()=>!1,()=>!0),{getRootNode:u}=_l();if(Z.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:J8(u);return x.jsx(x.Fragment,{children:Z.Children.map(t,h=>Ps.createPortal(h,c))})},J8=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Bi(n)?n:hr(t).body},Z8=()=>()=>{},ET=()=>{const{globalClassName:e,themeVariables:t}=At(),{mode:n,status:r,dialogPosition:o,isDialogFullHeight:a,dialogWidth:u}=Ni(),{loading:c,isAgentTyping:d,sendMessage:h,resetConversation:p,progressSteps:g}=Yn(),{isOpen:T}=r||{},y=!!r.isOpen,w=n==="standalone",v=d||c,A=()=>{ki(!1)};return x.jsx(Ab,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:y,children:x.jsx(gT,{children:x.jsx(xh,{className:j(e,`${D}-container`,`${D}-dialog`,o,a&&"full-height"),style:B(B({},t),u&&{width:u}),children:x.jsxs(bh,{className:j(e,`${D}-dialog-content`,{standalone:w,embedded:!w}),children:[x.jsx(Ob,{componentType:"dialog",onClearChat:p,onClose:A}),x.jsx(Th,{className:j(e,`${D}-message-container`,{standalone:w,embedded:!w}),children:x.jsx(Fh,{isWidgetStandalone:w,isOpen:T})}),x.jsx(Bh,{steps:g,globalClassName:e}),x.jsx(Nf,{componentType:"dialog",isLoading:v,onSubmit:C=>h(C)})]})})})})},yT=()=>{const{globalClassName:e,themeVariables:t}=At(),{mode:n,status:r,isModalFullscreen:o}=Ni(),{isAgentTyping:a,sendMessage:u,resetConversation:c,progressSteps:d}=Yn(),{isOpen:h}=r||{},p=!!r.isOpen,g=n==="standalone",T=a,y=({open:v})=>{ki(v)},w=()=>{ki(!1)};return p?x.jsx(Ab,{lazyMount:!0,unmountOnExit:!0,open:p,onOpenChange:y,children:x.jsx(gT,{children:x.jsxs("div",{className:j(e,`${D}-modal-container`),style:t,children:[x.jsx(xb,{className:j(e,`${D}-modal-backdrop`)}),x.jsx(xh,{className:j(e,`${D}-container`,`${D}-modal`,{fullscreen:o,standalone:g,embedded:!g}),children:x.jsxs(bh,{className:j(e,`${D}-modal-content`,{standalone:g,embedded:!g}),children:[x.jsx(Ob,{componentType:"modal",onClearChat:c,onClose:w}),x.jsx(Th,{className:j(e,`${D}-message-container`,{standalone:g,embedded:!g}),children:x.jsx(Fh,{isWidgetStandalone:g,isOpen:h})}),x.jsx(Bh,{steps:d,globalClassName:e}),x.jsx(Nf,{componentType:"modal",isLoading:T,onSubmit:v=>u(v)})]})})]})})}):null},eM=()=>{const e=Ni(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?x.jsx(KS,{}):t==="dialog"?x.jsx(ET,{}):t==="modal"?x.jsx(yT,{}):x.jsx(mT,{})},Uh=e=>x.jsx(H0,ie(B({},e),{children:x.jsx(eM,{})}));var Nl={},bT;function tM(){if(bT)return Nl;bT=1;var e=q0();return Nl.createRoot=e.createRoot,Nl.hydrateRoot=e.hydrateRoot,Nl}var TT=tM();const nM=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=sn(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 T of g.addedNodes)T.nodeType===Node.ELEMENT_NODE&&T.id===e&&(Ci(!0,"log","Target element found, rendering Messaging Widget"),h.disconnect(),clearTimeout(a),(p=TT.createRoot(T))==null||p.render(x.jsx(Uh,ie(B({},n),{mode:"messaging"}))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ci(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},rM=r=>{var o=r,{timeout:e,elementId:t}=o,n=sn(o,["timeout","elementId"]);if(!n.messagingConfig){Ci(!0,"error","Messaging Widget requires messagingConfig");return}if(!n.messagingConfig.scrt2Url||!n.messagingConfig.orgId||!n.messagingConfig.esDeveloperName){Ci(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const a=document.getElementById(t);if(!a){Ci(!0,"warn","Container element not found for id:",t),Ci(!0,"warn","Beginning observation for element"),nM(B({elementId:t,timeout:e},n));return}TT.createRoot(a).render(x.jsx(Uh,ie(B({},n),{mode:"messaging"})))},iM={components:{setEntryType:B0,toggleWidgetOpen:ki,toggleWidgetMinimized:Cu,toggleModalFullscreen:Sd,setWidgetType:ku,setWidgetDialogPosition:Ad}};Ie.AgentForceWidget=Uh,Ie.AgentforceWidgetProvider=H0,Ie.CIMULATE_WIDGET_READY_EVENT=L0,Ie.MessagingDialog=ET,Ie.MessagingEmbed=mT,Ie.MessagingModal=yT,Ie.MessagingProvider=F0,Ie.eventHandlers=iM,Ie.injectMessagingWidget=rM,Ie.useMessaging=Yn,Object.defineProperty(Ie,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}Fb.peek=j8;function Fb(e){return e.value||""}function j8(){return"<"}Bb.peek=$8;function Bb(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 $8(){return"!"}Ub.peek=V8;function Ub(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 V8(){return"!"}Hb.peek=q8;function Hb(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 q8(){return"`"}function zb(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))}jb.peek=Y8;function jb(e,t,n,r){const o=lp(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(zb(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 Y8(e,t,n){return zb(e,n)?"<":"["}$b.peek=W8;function $b(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 W8(){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 G8(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 X8(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Vb(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function K8(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?X8(n):cp(n);const c=e.ordered?u==="."?")":".":G8(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),Vb(n)===u&&p){let 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 Q8(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 J8(e,t,n,r){const o=Q8(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 Z8(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const eM=al(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function tM(e,t,n,r){return(e.children.some(function(u){return eM(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function nM(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}qb.peek=rM;function qb(e,t,n,r){const o=nM(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 rM(e,t,n){return n.options.strong||"*"}function iM(e,t,n,r){return n.safe(e.value,r)}function oM(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 sM(e,t,n){const r=(Vb(n)+(n.options.ruleSpaces?" ":"")).repeat(oM(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Yb={blockquote:N8,break:Db,code:D8,definition:F8,emphasis:Mb,hardBreak:Db,heading:z8,html:Fb,image:Bb,imageReference:Ub,inlineCode:Hb,link:jb,linkReference:$b,list:K8,listItem:J8,paragraph:Z8,root:tM,strong:qb,text:iM,thematicBreak:sM};function aM(){return{enter:{table:uM,tableData:Wb,tableHeader:Wb,tableRow:cM},exit:{codeText:dM,table:lM,tableData:dp,tableHeader:dp,tableRow:dp}}}function uM(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 lM(e){this.exit(e),this.data.inTable=void 0}function cM(e){this.enter({type:"tableRow",children:[]},e)}function dp(e){this.exit(e)}function Wb(e){this.enter({type:"tableCell",children:[]},e)}function dM(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,fM));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function fM(e,t){return t==="|"?t:e}function hM(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,x,S,A){return h(p(y,S,A),y.align)}function c(y,x,S,A){const C=g(y,S,A),k=h([C]);return k.slice(0,k.indexOf(`
|
|
52
|
+
`))}function d(y,x,S,A){const C=S.enter("tableCell"),k=S.enter("phrasing"),I=S.containerPhrasing(y,oe(B({},A),{before:a,after:a}));return k(),C(),I}function h(y,x){return C8(y,{align:x,alignDelimiters:r,padding:n,stringLength:o})}function p(y,x,S){const A=y.children;let C=-1;const k=[],I=x.enter("table");for(;++C<A.length;)k[C]=g(A[C],x,S);return I(),k}function g(y,x,S){const A=y.children;let C=-1;const k=[],I=x.enter("tableRow");for(;++C<A.length;)k[C]=d(A[C],y,x,S);return I(),k}function b(y,x,S){let A=Yb.inlineCode(y,x,S);return S.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function pM(){return{exit:{taskListCheckValueChecked:Gb,taskListCheckValueUnchecked:Gb,paragraph:gM}}}function mM(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:EM}}}function Gb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function gM(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 EM(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=Yb.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 yM(){return[K5(),E8(),_8(),aM(),pM()]}function TM(e){return{extensions:[Q5(),y8(e),x8(),hM(e),mM()]}}const bM={tokenize:AM,partial:!0},Xb={tokenize:CM,partial:!0},Kb={tokenize:kM,partial:!0},Qb={tokenize:NM,partial:!0},_M={tokenize:OM,partial:!0},Jb={name:"wwwAutolink",tokenize:SM,previous:e_},Zb={name:"protocolAutolink",tokenize:vM,previous:t_},Br={name:"emailAutolink",tokenize:wM,previous:n_},vr={};function xM(){return{text:vr}}let Zi=48;for(;Zi<123;)vr[Zi]=Br,Zi++,Zi===58?Zi=65:Zi===91&&(Zi=97);vr[43]=Br,vr[45]=Br,vr[46]=Br,vr[95]=Br,vr[72]=[Br,Zb],vr[104]=[Br,Zb],vr[87]=[Br,Jb],vr[119]=[Br,Jb];function wM(e,t,n){const r=this;let o,a;return u;function u(g){return!fp(g)||!n_.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(_M,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 SM(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!e_.call(r,r.previous)||hp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(bM,e.attempt(Xb,e.attempt(Kb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function vM(e,t,n){const r=this;let o="",a=!1;return u;function u(g){return(g===72||g===104)&&t_.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)||ot(g)||Ui(g)||el(g)?n(g):e.attempt(Xb,e.attempt(Kb,p),n)(g)}function p(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function AM(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 CM(e,t,n){let r,o,a;return u;function u(h){return h===46||h===95?e.check(Qb,d,c)(h):h===null||ot(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 kM(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(Qb,t,a)(u):u===null||ot(u)||Ui(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function NM(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||ot(c)||Ui(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||ot(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 OM(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return Xt(a)?n(a):t(a)}}function e_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ot(e)}function t_(e){return!rn(e)}function n_(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 PM={tokenize:UM,partial:!0};function IM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:MM,continuation:{tokenize:FM},exit:BM}},text:{91:{name:"gfmFootnoteCall",tokenize:DM},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:RM,resolveTo:LM}}}}function RM(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 LM(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 DM(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||ot(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 ot(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 MM(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||ot(x))return n(x);if(x===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=Zn(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return ot(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 FM(e,t,n){return e.check(Js,t,e.attempt(PM,t,n))}function BM(e){e.exit("gfmFootnoteDefinition")}function UM(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 HM(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 S=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&&!!S,A._close=!S||S===2&&!!C,c(x)}}}class zM{constructor(){this.map=[]}add(t,n,r){jM(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 jM(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 $M(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 VM(){return{flow:{null:{name:"table",tokenize:qM,resolveAll:YM}}}}function qM(e,t,n){const r=this;let o=0,a=0,u;return c;function c(U){let re=r.events.length-1;for(;re>-1;){const se=r.events[re][1].type;if(se==="lineEnding"||se==="linePrefix")re--;else break}const ae=re>-1?r.events[re][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||ot(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"),S):Y(U)}function S(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)?j(U):Y(U)}function C(U){return U===45?(e.enter("tableDelimiterFiller"),k(U)):Y(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,j,"whitespace")(U):j(U)}function j(U){return U===124?x(U):U===null||Le(U)?!u||o!==a?Y(U):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(U)):Y(U)}function Y(U){return n(U)}function F(U){return e.enter("tableRow"),te(U)}function te(U){return U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),te):U===null||Le(U)?(e.exit("tableRow"),t(U)):Xe(U)?Qe(e,te,"whitespace")(U):(e.enter("data"),ce(U))}function ce(U){return U===null||U===124||ot(U)?(e.exit("data"),te(U)):(e.consume(U),U===92?pe:ce)}function pe(U){return U===92||U===124?(e.consume(U),ce):ce(U)}}function YM(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 zM;for(;++n<e.length;){const y=e[n],x=y[1];y[0]==="enter"?x.type==="tableHead"?(c=!1,d!==0&&(r_(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&&r_(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=$M(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({},os(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=os(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=os(t.events,n[2]),p=os(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,S=n[3]-n[2]-1;e.add(x,S,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return o!==void 0&&(a.end=Object.assign({},os(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function r_(e,t,n,r,o){const a=[],u=os(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 os(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const WM={name:"tasklistCheck",tokenize:XM};function GM(){return{text:{91:WM}}}function XM(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 ot(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:KM},t,n)(d):n(d)}}function KM(e,t,n){return Qe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function QM(e){return S1([xM(),IM(),HM(e),VM(),GM()])}const JM={};function ZM(e){const t=this,n=e||JM,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(QM(n)),a.push(yM()),u.push(TM(n))}const e9=()=>_.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:[ZM],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(e9,{}):_.jsx("span",{children:a})},children:r+(n?`<span className='${L}-blinking-cursor'></span>`:"")}),i_=({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,S=typeof b=="number"&&typeof g=="number"&&b<g,A=S?g:y!=null?y:g,C=S?b:g,k=()=>{if(u)return;const j=d||"this product",Y=c?` [SKU: ${c}]`:"";a(`Show me details for ${j}${Y}`)},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})})]})]})},o_=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}),t9=({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(i_,{product:o_(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(o5,{globalClassName:n,spacing:o?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(u=>_.jsx(i_,{product:o_(u),globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o,isCartMgmtSupported:a},u.id))})]})},s_=({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})]})},n9=({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(s_,{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"})]})]})]})},r9=({cart:e,globalClassName:t,openLinksInNewTab:n})=>{const{sendMessage:r,loading:o}=Mn(),[a,u]=V.useState(!0),[c,d]=V.useState(""),{items:h=[],currencyCode:p="USD",subtotal:g,total:b,taxes:y,shippingCost:x,shippingDiscount:S,shippingPromotions:A=[],promotionsDiscount:C,promotions:k=[],couponsDiscount:I,couponsApplied:j=[],bodyMessage:Y,footerMessage:F,checkoutButtonUrl:te}=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:[Y&&_.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:Y,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})}),_.jsx("span",{className:z(t,`${L}-cart-summary-toggle`),"aria-hidden":"true",children:a?_.jsx(pC,{}):_.jsx(mC,{})})]}),a&&_.jsxs("div",{className:z(t,`${L}-cart-expanded`),children:[_.jsx("ul",{className:z(t,`${L}-cart-items`),children:h.map(U=>_.jsx(n9,{item:U,currencyCode:p,loading:o,globalClassName:t,onRemove:ce},U.itemId))}),j.length>0&&_.jsx("div",{className:z(t,`${L}-cart-chips`,`${L}-cart-applied-coupons`),children:j.map(U=>_.jsx(s_,{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:S,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(hC,{"aria-hidden":"true"})})]}),te&&_.jsxs("a",{className:z(t,`${L}-cart-checkout-button`),href:te,target:n?"_blank":"_self",rel:"noopener noreferrer",children:[_.jsx(dC,{"aria-hidden":"true"}),_.jsx("span",{children:"Checkout"})]}),_.jsx("p",{className:z(t,`${L}-cart-footer`),children:F||"Shipping and taxes calculated at checkout."})]})},i9=({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(tb,{size:"16px"})}),_.jsx(Xh,{className:z(n,`${L}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:_.jsx(nb,{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}`,a_=e=>e.replace(/(^|\/)large\//,"$1medium/"),u_=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===Pa&&n.vals.includes(t)),o9=(e,t)=>{var c,d;const n=((c=e.imgGroups)!=null?c:[]).filter(h=>h.viewType==="large"),r=t&&n.find(h=>u_(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,a_(h.url)));return u.length>0?u:e.imageUrl?[mp(e.baseUrl,a_(e.imageUrl))]:[]},s9=(e,t)=>{var o,a,u;const n=((o=e.imgGroups)!=null?o:[]).find(c=>c.viewType==="swatch"&&u_(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})}),a9=(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]}))},u9=(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})},l9=(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},c9=(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},d9=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},f9=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var se,be,we,Z,q,W,v;const{addToCart:o,loading:a}=Mn(),u=e.data,c=(se=u.vattr)!=null?se:[],[d,h]=V.useState(()=>d9(u)),p=a9(u.vmat,d),g=(we=(be=u.quantity)==null?void 0:be.minQuantity)!=null?we:1,b=(q=(Z=u.quantity)==null?void 0:Z.maxQuantity)!=null?q:Number.POSITIVE_INFINITY,y=(v=(W=u.quantity)==null?void 0:W.increment)!=null?v:1,[x,S]=V.useState(g),A=d[Pa],C=V.useMemo(()=>o9(u,A),[u,A]),k=V.useMemo(()=>c9(u,d),[u,d]),I=c.find(P=>P.id===Pa),j=c.filter(P=>P.id!==Pa),Y=(P,G)=>()=>{h(O=>{const ye=!Gl(u.vmat,P,G,O);return P===Pa||ye?u9(u.vmat,c,P,G,O):oe(B({},O),{[P]:G})})},F=()=>{if(a)return;const P=l9(u,d);if(!P)return;const G=c.map(O=>{const ye=O.opts.find(Oe=>Oe.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:P,quantity:x,variants:G})},te=!p||x-y<g,ce=!p||x+y>b,pe=P=>{var O;const G=d[P.id];return(O=P.opts.find(ye=>ye.val===G))==null?void 0:O.name},U=()=>S(P=>Math.max(g,P-y)),re=()=>S(P=>Math.min(b,P+y)),ae=P=>_.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-${P.id}`,className:z(t,`${L}-msg-pdp__variant-name`),children:P.lbl||P.id}),pe(P)&&_.jsx("span",{className:z(t,`${L}-msg-pdp__variant-value`),children:pe(P)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${P.id}`,className:z(t,`${L}-msg-pdp__chips`),children:P.opts.map(G=>{const O=Gl(u.vmat,P.id,G.val,d),ye=d[P.id]===G.val;return _.jsxs("label",{className:z(`${L}-msg-pdp__chip`,{selected:ye,unavailable:!O}),children:[_.jsx("input",{type:"radio",name:`variant-${P.id}`,value:G.val,checked:ye,"aria-description":O?void 0:"unavailable",onChange:Y(P.id,G.val),className:`${L}-msg-pdp__radio-input`}),_.jsx("span",{children:G.name||G.val})]},G.val)})})]},P.id),de=P=>_.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-${P.id}`,className:z(t,`${L}-msg-pdp__variant-name`),children:P.lbl||"Color"}),pe(P)&&_.jsx("span",{className:z(t,`${L}-msg-pdp__variant-value`),children:pe(P)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${P.id}`,className:z(t,`${L}-msg-pdp__swatches`),children:P.opts.map(G=>{const O=Gl(u.vmat,P.id,G.val,d),ye=d[P.id]===G.val,Oe=s9(u,G.val);return Oe?_.jsxs("label",{className:z(`${L}-msg-pdp__swatch`,{selected:ye,unavailable:!O}),children:[_.jsx("input",{type:"radio",name:`variant-${P.id}`,value:G.val,checked:ye,"aria-label":G.name||G.val,"aria-description":O?void 0:"unavailable",onChange:Y(P.id,G.val),className:`${L}-msg-pdp__radio-input`}),_.jsx("img",{className:z(t,`${L}-msg-pdp__swatch-image`),src:Oe,alt:G.name||G.val,loading:"lazy"})]},G.val):_.jsxs("label",{className:z(`${L}-msg-pdp__chip`,{selected:ye,unavailable:!O}),children:[_.jsx("input",{type:"radio",name:`variant-${P.id}`,value:G.val,checked:ye,"aria-description":O?void 0:"unavailable",onChange:Y(P.id,G.val),className:`${L}-msg-pdp__radio-input`}),_.jsx("span",{children:G.name||G.val})]},G.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(i9,{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),j.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(nC,{}),disabled:te,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(rC,{}),disabled:ce,onClick:re})]})]}),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"})})]})]})})},h9=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},p9=({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,S;const g=h9(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:(S=(y=p.pr)==null?void 0:y.prom)!=null?S:(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(cC,{size:"14px"}),"Add to cart"]})},`cart-${p.id}`))]})]})})},l_=({content:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{sendMessage:o,loading:a}=Mn(),{isCartMgmtSupported:u}=st();return _.jsx(_.Fragment,{children:e.response.map((c,d)=>{var h,p,g,b,y,x,S,A,C,k,I,j,Y,F,te,ce,pe,U,re,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(t9,{title:(y=(b=c.data)==null?void 0:b.title)!=null?y:"",products:(S=(x=c.data)==null?void 0:x.products)!=null?S:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${c.type}-${(A=c.index)!=null?A:d}`);case"product_tile":return _.jsx(f9,{product:c.data,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${c.type}-${(C=c.index)!=null?C:d}`);case"product_comparison":return _.jsx(p9,{products:(I=(k=c.data)==null?void 0:k.products)!=null?I:[],table:(Y=(j=c.data)==null?void 0:j.table)!=null?Y:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${c.type}-${(F=c.index)!=null?F:d}`);case"cart":{const se=(pe=(ce=(te=c.data)==null?void 0:te.cart)==null?void 0:ce.cartSummary)==null?void 0:pe.cartDetails;return se?_.jsx(r9,{cart:se,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(F5,{disabled:a,suggestions:(ae=(re=c.data)==null?void 0:re.display_text)!=null?ae:[],globalClassName:t,isWidgetStandalone:r,onSuggestionClick:o})},`${c.type}-${(de=c.index)!=null?de:d}`);default:return null}})})},m9=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:o}=st(),a=V.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=V.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(fC,{})}),_.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(l_,{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})})}},g9=({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(yC,{"aria-hidden":"true"})," Retry"]})]}),E9="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}=st(),{messages:a,streamingBlocks:u,isAgentTyping:c,loading:d,progressMessage:h,connectionStatus:p,error:g,sendError:b,retryLastMessage:y,retryConnection:x}=Mn(),S=V.useRef(null),A=a.length>0,C=u.length>0,k=A&&(d||c)&&!C,I=p==="reconnecting"&&!k,j=p==="error";let Y=null;j?Y={message:g!=null?g:E9,kind:"connection",onRetry:x}:b&&(Y={message:b.message,kind:"send",onRetry:y}),V.useEffect(()=>{var U;(U=S.current)==null||U.scrollIntoView({behavior:"smooth"})},[]),V.useEffect(()=>{var U;o&&((U=S.current)==null||U.scrollIntoView({behavior:"smooth"}))},[a,u,b,g,o]);const F=(ce=Y==null?void 0:Y.message)!=null?ce:null,te=(pe=Y==null?void 0:Y.kind)!=null?pe:null;return V.useEffect(()=>{F&&(r==null||r.error("Error message shown to user",{message:F,kind:te}))},[F,te,r]),_.jsxs(_.Fragment,{children:[d&&!A&&_.jsx(j5,{globalClassName:t,isWidgetStandalone:e}),a.map(U=>_.jsx(m9,{message:U,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},U.id)),Y&&_.jsx(g9,{message:Y.message,onRetry:Y.onRetry,globalClassName:t,isWidgetStandalone:e}),C&&_.jsxs("div",{className:z(t,`${L}-message-group`,e?"standalone":"embedded"),children:[_.jsx(l_,{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:S})]})},y9=()=>_.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"})]}),T9=()=>_.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(y9,{}):_.jsx(T9,{})})]},`${r}-${n}`)})})]})}),c_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=st(),{isAgentTyping:r,sendMessage:o,resetConversation:a,progressSteps:u}=Mn(),c=r;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:u,globalClassName:e}),_.jsx(ah,{componentType:"chat",className:"embedded-chat",isLoading:c,onSubmit:d=>o(d)}),_.jsx("div",{className:z(`${L}-embedded-chat-menu`),children:_.jsxs(zD,{componentType:"chat",children:[_.jsx(Cb,{componentType:"chat"}),_.jsx(My,{componentType:"chat",onClearChat:a})]})})]})},d_=e=>{var d;const{children:t,disabled:n}=e,[r,o]=V.useState((d=e.container)==null?void 0:d.current),a=V.useSyncExternalStore(_9,()=>!1,()=>!0),{getRootNode:u}=jl();if(V.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:b9(u);return _.jsx(_.Fragment,{children:V.Children.map(t,h=>Ao.createPortal(h,c))})},b9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Yi(n)?n:yr(t).body},_9=()=>()=>{},f_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=st(),{mode:r,status:o,dialogPosition:a,isDialogFullHeight:u,dialogWidth:c}=Fi(),{loading:d,isAgentTyping:h,sendMessage:p,resetConversation:g,progressSteps:b}=Mn(),{isOpen:y}=o||{},x=!!o.isOpen,S=r==="standalone",A=h||d,C=()=>{Ir(!1)};return x?_.jsx(Tb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:x,children:_.jsx(d_,{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:S,embedded:!S}),children:[_.jsx(Sb,{componentType:"dialog",onClearChat:g,onClose:C}),_.jsx(Zh,{className:z(e,`${L}-message-container`,`container-${n}`,{standalone:S,embedded:!S}),children:_.jsx(gp,{isWidgetStandalone:S,isOpen:y})}),_.jsx(Ep,{steps:b,globalClassName:e}),_.jsx(ah,{componentType:"dialog",isLoading:A,onSubmit:k=>p(k)})]})})})}):null},h_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=st(),{mode:r,status:o,isModalFullscreen:a}=Fi(),{loading:u,isAgentTyping:c,sendMessage:d,resetConversation:h,progressSteps:p}=Mn(),{isOpen:g}=o||{},b=!!o.isOpen,y=r==="standalone",x=c||u,S=({open:C})=>{Ir(C)},A=()=>{Ir(!1)};return b?_.jsx(Tb,{lazyMount:!0,unmountOnExit:!0,open:b,onOpenChange:S,children:_.jsx(d_,{children:_.jsxs("div",{className:z(e,`${L}-modal-container`),style:t,children:[_.jsx(pb,{className:z(e,`${L}-modal-backdrop`)}),_.jsx(ep,{className:z(e,`${L}-container`,`${L}-modal`,{fullscreen:a,standalone:y,embedded:!y}),children:_.jsxs(Jh,{className:z(e,`${L}-modal-content`,{standalone:y,embedded:!y}),children:[_.jsx(Sb,{componentType:"modal",onClearChat:h,onClose:A}),_.jsx(Zh,{className:z(e,`${L}-message-container`,`container-${n}`,{standalone:y,embedded:!y}),children:_.jsx(gp,{isWidgetStandalone:y,isOpen:g})}),_.jsx(Ep,{steps:p,globalClassName:e}),_.jsx(ah,{componentType:"modal",isLoading:x,onSubmit:C=>d(C)})]})})]})})}):null},x9=()=>{const e=Fi(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?_.jsx(aC,{}):t==="dialog"?_.jsx(f_,{}):t==="modal"?_.jsx(h_,{}):_.jsx(c_,{})},w9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:o}=P5();V.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 A5(a),()=>{C5(a)}},[e,t,n,r,o])};function S9({isReady:e,hasError:t,transmit:n}){const r=V.useRef([]),o=V.useRef(e);o.current=e;const a=V.useRef(n);a.current=n;const u=V.useCallback(c=>{o.current?a.current(c):r.current.push(c)},[]);return V.useEffect(()=>{if(e&&r.current.length){const c=r.current;r.current=[],c.forEach(d=>a.current(d))}},[e]),V.useEffect(()=>{t&&(r.current=[])},[t]),u}const p_={copilot:"Ask Copilot",messaging:"Ask a question"},v9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=st(),{placeholder:o,isResponseLoading:a}=ql(),u=o||p_[r],[c,d]=V.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})]})},A9=()=>{const{globalClassName:e,mode:t}=st(),{placeholder:n}=ql(),r=n||p_[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})]})},m_=({label:e,disabled:t=!1,onClick:n})=>{var c;const{globalClassName:r,suggestionButtonConfig:o}=st(),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(Ab,{icon:a,className:`${L}-suggestion-button-icon`}),_.jsx("span",{children:e})]})},C9="Ask me something else",k9=({label:e,disabled:t=!1})=>_.jsx(m_,{label:e||C9,disabled:t,onClick:()=>Ir(!0)}),N9=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),O9=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=st(),{staticQuestions:r,askElseButtonLabel:o,disableAskElseButton:a}=ql(),u=N9(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(m_,{label:d,disabled:t,onClick:c(d)},d)),!a&&_.jsx(k9,{label:o,disabled:t})]})},P9=()=>{const{globalClassName:e,themeVariables:t}=st(),{isOpen:n,elementId:r,promptsDisplay:o}=ql(),{isConnected:a,sendMessage:u,connectionStatus:c}=Mn(),d=o!=="buttons",h=o!=="input",[p,g]=V.useState(null),b=c==="error",y=c==="connecting",x=S9({isReady:a,hasError:b,transmit:u});V.useEffect(()=>{if(!r||p)return;const A=document.getElementById(r);A&&g(A)},[r,p]);const S=V.useCallback(A=>{Ir(!0),x(A)},[x]);return!n||!p?null:Ao.createPortal(_.jsxs("div",{className:z(e,`${L}-prompts-extension-container`),style:t,children:[d&&_.jsx(v9,{onSubmit:S,disabled:b}),!d&&_.jsx(A9,{}),h&&_.jsx(O9,{onPromptClick:S,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)},I9=()=>(w9(),_.jsx(P9,{})),yp=e=>_.jsxs(Lg,oe(B({},e),{children:[_.jsx(x9,{}),_.jsx(I9,{})]}));var Xl={},g_;function R9(){if(g_)return Xl;g_=1;var e=Ug();return Xl.createRoot=e.createRoot,Xl.hydrateRoot=e.hydrateRoot,Xl}var E_=R9();const L9=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=E_.createRoot(b))==null||p.render(_.jsx(yp,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},D9=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"),L9(B({elementId:t,timeout:e},n));return}E_.createRoot(a).render(_.jsx(yp,oe(B({},n),{mode:"messaging"})))},M9={components:{setEntryType:Ig,toggleWidgetOpen:Ir,toggleWidgetMinimized:Yu,toggleModalFullscreen:nf,setWidgetType:Wu,setWidgetDialogPosition:rf,loadPromptsComponent:O5,togglePromptsExtensionOpen:wb}};Pe.AgentForceWidget=yp,Pe.AgentforceWidgetProvider=Lg,Pe.CIMULATE_WIDGET_READY_EVENT=hg,Pe.MessagingDialog=f_,Pe.MessagingEmbed=c_,Pe.MessagingModal=h_,Pe.MessagingProvider=gg,Pe.eventHandlers=M9,Pe.injectMessagingWidget=D9,Pe.useMessaging=Mn,Object.defineProperty(Pe,Symbol.toStringTag,{value:"Module"})}));
|