@cimulate/copilot-widget 1.42.0 → 1.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,35 +1,35 @@
1
- (function(De,$e){typeof exports=="object"&&typeof module!="undefined"?$e(exports):typeof define=="function"&&define.amd?define(["exports"],$e):(De=typeof globalThis!="undefined"?globalThis:De||self,$e(De.CimulateCopilot={}))})(this,(function(De){"use strict";var H7=Object.defineProperty,z7=Object.defineProperties;var j7=Object.getOwnPropertyDescriptors;var Sd=Object.getOwnPropertySymbols;var L2=Object.prototype.hasOwnProperty,D2=Object.prototype.propertyIsEnumerable;var Jo=(De,$e)=>($e=Symbol[De])?$e:Symbol.for("Symbol."+De),$7=De=>{throw TypeError(De)},Bu=Math.pow,l0=(De,$e,Qe)=>$e in De?H7(De,$e,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):De[$e]=Qe,B=(De,$e)=>{for(var Qe in $e||($e={}))L2.call($e,Qe)&&l0(De,Qe,$e[Qe]);if(Sd)for(var Qe of Sd($e))D2.call($e,Qe)&&l0(De,Qe,$e[Qe]);return De},fe=(De,$e)=>z7(De,j7($e));var fn=(De,$e)=>{var Qe={};for(var ct in De)L2.call(De,ct)&&$e.indexOf(ct)<0&&(Qe[ct]=De[ct]);if(De!=null&&Sd)for(var ct of Sd(De))$e.indexOf(ct)<0&&D2.call(De,ct)&&(Qe[ct]=De[ct]);return Qe};var Te=(De,$e,Qe)=>l0(De,typeof $e!="symbol"?$e+"":$e,Qe);var Ke=(De,$e,Qe)=>new Promise((ct,Ot)=>{var yt=bt=>{try{rn(Qe.next(bt))}catch(wn){Ot(wn)}},Fe=bt=>{try{rn(Qe.throw(bt))}catch(wn){Ot(wn)}},rn=bt=>bt.done?ct(bt.value):Promise.resolve(bt.value).then(yt,Fe);rn((Qe=Qe.apply(De,$e)).next())}),Qr=function(De,$e){this[0]=De,this[1]=$e},xd=(De,$e,Qe)=>{var ct=(rn,bt,wn,fr)=>{try{var Ki=Qe[rn](bt),Fs=(bt=Ki.value)instanceof Qr,Bs=Ki.done;Promise.resolve(Fs?bt[0]:bt).then(Pn=>Fs?ct(rn==="return"?rn:"next",bt[1]?{done:Pn.done,value:Pn.value}:Pn,wn,fr):wn({value:Pn,done:Bs})).catch(Pn=>ct("throw",Pn,wn,fr))}catch(Pn){fr(Pn)}},Ot=(rn,bt,wn,fr)=>Fe[rn]=Ki=>(bt=new Promise((Fs,Bs,Pn)=>(Pn=()=>ct(rn,Ki,Fs,Bs),yt?yt.then(Pn):Pn())),fr=()=>yt===wn&&(yt=0),yt=wn=bt.then(fr,fr),bt),yt,Fe={};return Qe=Qe.apply(De,$e),Fe[Jo("asyncIterator")]=()=>Fe,Ot("next"),Ot("throw"),Ot("return"),Fe},c0=De=>{var $e=De[Jo("asyncIterator")],Qe=!1,ct,Ot={};return $e==null?($e=De[Jo("iterator")](),ct=yt=>Ot[yt]=Fe=>$e[yt](Fe)):($e=$e.call(De),ct=yt=>Ot[yt]=Fe=>{if(Qe){if(Qe=!1,yt==="throw")throw Fe;return Fe}return Qe=!0,{done:!1,value:new Qr(new Promise(rn=>{var bt=$e[yt](Fe);bt instanceof Object||$7("Object expected"),rn(bt)}),1)}}),Ot[Jo("iterator")]=()=>Ot,ct("next"),"throw"in $e?ct("throw"):Ot.throw=yt=>{throw yt},"return"in $e&&ct("return"),Ot},M2=(De,$e,Qe)=>($e=De[Jo("asyncIterator")])?$e.call(De):(De=De[Jo("iterator")](),$e={},Qe=(ct,Ot)=>(Ot=De[ct])&&($e[ct]=yt=>new Promise((Fe,rn,bt)=>(yt=Ot.call(De,yt),bt=yt.done,Promise.resolve(yt.value).then(wn=>Fe({value:wn,done:bt}),rn)))),Qe("next"),Qe("return"),$e);var $e=document.createElement("style");$e.textContent=`.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;height:auto;line-height:normal;background-color:transparent;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;z-index:9999;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-cancel-button{color:#8a8a8a}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;font-size:.875rem;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button-container{display:inline-flex;height:100%}button.cim-widget-image-upload-button{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin:0;color:inherit;background:transparent;border:0;border-radius:var(--cim-widget-border-radius);cursor:pointer;&:hover{background-color:#f0f0f0}&:disabled,&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:#fff;border-radius:var(--cim-widget-border-radius);box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:10dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media(max-width:576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;gap:4px;color:var(--cim-widget-primary-color)}.cim-widget-refined-event-query-text{line-height:normal}.cim-widget-message-icon.refined-event-icon{font-size:1.5rem;&.embedded,&.standalone{color:var(--cim-widget-primary-color)}}.cim-widget-facet-pill{display:inline-flex;align-items:center;margin-left:4px;padding:.25rem .5rem;color:var(--cim-widget-primary-color);border-radius:9999px;font-size:.75rem;font-weight:700;&.embedded{background-color:#ffffff90}&.standalone{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent)}}.cim-widget-facet-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.25rem}.cim-widget-facets{display:flex;flex-direction:column;padding:.25rem}.cim-widget-facets .cim-widget-facet-category{margin-bottom:0;font-size:.875rem;font-weight:700;word-wrap:break-word}.cim-widget-facets .cim-widget-facet-values{margin-top:0;font-size:.675rem}.cim-widget-message-timestamp.standalone{font-size:.75rem;color:#00000090}.cim-widget-message-timestamp.embedded{font-size:.65rem;color:#333333bf}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-message-text{font-weight:700}.cim-widget-user-message-text.standalone{font-size:1.125rem;margin:0}.cim-widget-user-message-text.embedded{margin:0}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-user-search{display:flex;flex-direction:column}.cim-widget-user-search.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;font-size:1.125rem;padding-top:.5rem;padding-bottom:.5rem}.cim-widget-user-search-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-search-query{display:inline-flex}.cim-widget-message-icon.user-search-icon.embedded,.cim-widget-message-icon.user-search-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;border-radius:var(--cim-widget-border-radius);&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:700;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}
2
- /*$vite$:1*/`,document.head.appendChild($e);function Qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ct={exports:{}},Ot={},yt={exports:{}},Fe={};var rn;function bt(){if(rn)return Fe;rn=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function T(R){return R===null||typeof R!="object"?null:(R=m&&R[m]||R["@@iterator"],typeof R=="function"?R:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,w={};function v(R,ee,O){this.props=R,this.context=ee,this.refs=w,this.updater=O||y}v.prototype.isReactComponent={},v.prototype.setState=function(R,ee){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,ee,"setState")},v.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function A(){}A.prototype=v.prototype;function N(R,ee,O){this.props=R,this.context=ee,this.refs=w,this.updater=O||y}var C=N.prototype=new A;C.constructor=N,_(C,v.prototype),C.isPureReactComponent=!0;var z=Array.isArray,Y=Object.prototype.hasOwnProperty,D={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function ne(R,ee,O){var Se,Ue={},ye=null,Le=null;if(ee!=null)for(Se in ee.ref!==void 0&&(Le=ee.ref),ee.key!==void 0&&(ye=""+ee.key),ee)Y.call(ee,Se)&&!q.hasOwnProperty(Se)&&(Ue[Se]=ee[Se]);var He=arguments.length-2;if(He===1)Ue.children=O;else if(1<He){for(var Ye=Array(He),ht=0;ht<He;ht++)Ye[ht]=arguments[ht+2];Ue.children=Ye}if(R&&R.defaultProps)for(Se in He=R.defaultProps,He)Ue[Se]===void 0&&(Ue[Se]=He[Se]);return{$$typeof:e,type:R,key:ye,ref:Le,props:Ue,_owner:D.current}}function ue(R,ee){return{$$typeof:e,type:R.type,key:ee,ref:R.ref,props:R.props,_owner:R._owner}}function V(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function se(R){var ee={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(O){return ee[O]})}var pe=/\/+/g;function ve(R,ee){return typeof R=="object"&&R!==null&&R.key!=null?se(""+R.key):ee.toString(36)}function re(R,ee,O,Se,Ue){var ye=typeof R;(ye==="undefined"||ye==="boolean")&&(R=null);var Le=!1;if(R===null)Le=!0;else switch(ye){case"string":case"number":Le=!0;break;case"object":switch(R.$$typeof){case e:case t:Le=!0}}if(Le)return Le=R,Ue=Ue(Le),R=Se===""?"."+ve(Le,0):Se,z(Ue)?(O="",R!=null&&(O=R.replace(pe,"$&/")+"/"),re(Ue,ee,O,"",function(ht){return ht})):Ue!=null&&(V(Ue)&&(Ue=ue(Ue,O+(!Ue.key||Le&&Le.key===Ue.key?"":(""+Ue.key).replace(pe,"$&/")+"/")+R)),ee.push(Ue)),1;if(Le=0,Se=Se===""?".":Se+":",z(R))for(var He=0;He<R.length;He++){ye=R[He];var Ye=Se+ve(ye,He);Le+=re(ye,ee,O,Ye,Ue)}else if(Ye=T(R),typeof Ye=="function")for(R=Ye.call(R),He=0;!(ye=R.next()).done;)ye=ye.value,Ye=Se+ve(ye,He++),Le+=re(ye,ee,O,Ye,Ue);else if(ye==="object")throw ee=String(R),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.");return Le}function ae(R,ee,O){if(R==null)return R;var Se=[],Ue=0;return re(R,Se,"","",function(ye){return ee.call(O,ye,Ue++)}),Se}function xe(R){if(R._status===-1){var ee=R._result;ee=ee(),ee.then(function(O){(R._status===0||R._status===-1)&&(R._status=1,R._result=O)},function(O){(R._status===0||R._status===-1)&&(R._status=2,R._result=O)}),R._status===-1&&(R._status=0,R._result=ee)}if(R._status===1)return R._result.default;throw R._result}var oe={current:null},Q={transition:null},ie={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:Q,ReactCurrentOwner:D};function k(){throw Error("act(...) is not supported in production builds of React.")}return Fe.Children={map:ae,forEach:function(R,ee,O){ae(R,function(){ee.apply(this,arguments)},O)},count:function(R){var ee=0;return ae(R,function(){ee++}),ee},toArray:function(R){return ae(R,function(ee){return ee})||[]},only:function(R){if(!V(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},Fe.Component=v,Fe.Fragment=n,Fe.Profiler=s,Fe.PureComponent=N,Fe.StrictMode=r,Fe.Suspense=d,Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ie,Fe.act=k,Fe.cloneElement=function(R,ee,O){if(R==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+R+".");var Se=_({},R.props),Ue=R.key,ye=R.ref,Le=R._owner;if(ee!=null){if(ee.ref!==void 0&&(ye=ee.ref,Le=D.current),ee.key!==void 0&&(Ue=""+ee.key),R.type&&R.type.defaultProps)var He=R.type.defaultProps;for(Ye in ee)Y.call(ee,Ye)&&!q.hasOwnProperty(Ye)&&(Se[Ye]=ee[Ye]===void 0&&He!==void 0?He[Ye]:ee[Ye])}var Ye=arguments.length-2;if(Ye===1)Se.children=O;else if(1<Ye){He=Array(Ye);for(var ht=0;ht<Ye;ht++)He[ht]=arguments[ht+2];Se.children=He}return{$$typeof:e,type:R.type,key:Ue,ref:ye,props:Se,_owner:Le}},Fe.createContext=function(R){return R={$$typeof:u,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},R.Provider={$$typeof:a,_context:R},R.Consumer=R},Fe.createElement=ne,Fe.createFactory=function(R){var ee=ne.bind(null,R);return ee.type=R,ee},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(R){return{$$typeof:c,render:R}},Fe.isValidElement=V,Fe.lazy=function(R){return{$$typeof:p,_payload:{_status:-1,_result:R},_init:xe}},Fe.memo=function(R,ee){return{$$typeof:f,type:R,compare:ee===void 0?null:ee}},Fe.startTransition=function(R){var ee=Q.transition;Q.transition={};try{R()}finally{Q.transition=ee}},Fe.unstable_act=k,Fe.useCallback=function(R,ee){return oe.current.useCallback(R,ee)},Fe.useContext=function(R){return oe.current.useContext(R)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(R){return oe.current.useDeferredValue(R)},Fe.useEffect=function(R,ee){return oe.current.useEffect(R,ee)},Fe.useId=function(){return oe.current.useId()},Fe.useImperativeHandle=function(R,ee,O){return oe.current.useImperativeHandle(R,ee,O)},Fe.useInsertionEffect=function(R,ee){return oe.current.useInsertionEffect(R,ee)},Fe.useLayoutEffect=function(R,ee){return oe.current.useLayoutEffect(R,ee)},Fe.useMemo=function(R,ee){return oe.current.useMemo(R,ee)},Fe.useReducer=function(R,ee,O){return oe.current.useReducer(R,ee,O)},Fe.useRef=function(R){return oe.current.useRef(R)},Fe.useState=function(R){return oe.current.useState(R)},Fe.useSyncExternalStore=function(R,ee,O){return oe.current.useSyncExternalStore(R,ee,O)},Fe.useTransition=function(){return oe.current.useTransition()},Fe.version="18.3.1",Fe}var wn;function fr(){return wn||(wn=1,yt.exports=bt()),yt.exports}var Ki;function Fs(){if(Ki)return Ot;Ki=1;var e=fr(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,f){var p,m={},T=null,y=null;f!==void 0&&(T=""+f),d.key!==void 0&&(T=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(m[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:c,key:T,ref:y,props:m,_owner:s.current}}return Ot.Fragment=n,Ot.jsx=u,Ot.jsxs=u,Ot}var Bs;function Pn(){return Bs||(Bs=1,ct.exports=Fs()),ct.exports}var S=Pn();const kr=Object.create(null);kr.open="0",kr.close="1",kr.ping="2",kr.pong="3",kr.message="4",kr.upgrade="5",kr.noop="6";const Uu=Object.create(null);Object.keys(kr).forEach(e=>{Uu[kr[e]]=e});const wd={type:"error",data:"parser error"},d0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",f0=typeof ArrayBuffer=="function",h0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Ad=({type:e,data:t},n,r)=>d0&&t instanceof Blob?n?r(t):p0(t,r):f0&&(t instanceof ArrayBuffer||h0(t))?n?r(t):p0(new Blob([t]),r):r(kr[e]+(t||"")),p0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function m0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Cd;function H2(e,t){if(d0&&e.data instanceof Blob)return e.data.arrayBuffer().then(m0).then(t);if(f0&&(e.data instanceof ArrayBuffer||h0(e.data)))return t(m0(e.data));Ad(e,!1,n=>{Cd||(Cd=new TextEncoder),t(Cd.encode(n))})}const g0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<g0.length;e++)Zo[g0.charCodeAt(e)]=e;const z2=e=>{let t=e.length*.75,n=e.length,r,s=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=Zo[e.charCodeAt(r)],u=Zo[e.charCodeAt(r+1)],c=Zo[e.charCodeAt(r+2)],d=Zo[e.charCodeAt(r+3)],p[s++]=a<<2|u>>4,p[s++]=(u&15)<<4|c>>2,p[s++]=(c&3)<<6|d&63;return f},j2=typeof ArrayBuffer=="function",vd=(e,t)=>{if(typeof e!="string")return{type:"message",data:E0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:$2(e.substring(1),t)}:Uu[n]?e.length>1?{type:Uu[n],data:e.substring(1)}:{type:Uu[n]}:wd},$2=(e,t)=>{if(j2){const n=z2(e);return E0(n,t)}else return{base64:!0,data:e}},E0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,y0="",V2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{Ad(a,!1,c=>{r[u]=c,++s===n&&t(r.join(y0))})})},q2=(e,t)=>{const n=e.split(y0),r=[];for(let s=0;s<n.length;s++){const a=vd(n[s],t);if(r.push(a),a.type==="error")break}return r};function Y2(){return new TransformStream({transform(e,t){H2(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const a=new DataView(s.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{s=new Uint8Array(9);const a=new DataView(s.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let Nd;function Hu(e){return e.reduce((t,n)=>t+n.length,0)}function zu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function W2(e,t){Nd||(Nd=new TextDecoder);const n=[];let r=0,s=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(Hu(n)<1)break;const d=zu(n,1);a=(d[0]&128)===128,s=d[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(Hu(n)<2)break;const d=zu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Hu(n)<8)break;const d=zu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(wd);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Hu(n)<s)break;const d=zu(n,s);c.enqueue(vd(a?d:Nd.decode(d),t)),r=0}if(s===0||s>e){c.enqueue(wd);break}}}})}const b0=4;function Ft(e){if(e)return G2(e)}function G2(e){for(var t in Ft.prototype)e[t]=Ft.prototype[t];return e}Ft.prototype.on=Ft.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ft.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ft.prototype.off=Ft.prototype.removeListener=Ft.prototype.removeAllListeners=Ft.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Ft.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this},Ft.prototype.emitReserved=Ft.prototype.emit,Ft.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ft.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ju=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Zn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),X2="arraybuffer";function V7(){}function T0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const K2=Zn.setTimeout,Q2=Zn.clearTimeout;function $u(e,t){t.useNativeTimers?(e.setTimeoutFn=K2.bind(Zn),e.clearTimeoutFn=Q2.bind(Zn)):(e.setTimeoutFn=Zn.setTimeout.bind(Zn),e.clearTimeoutFn=Zn.clearTimeout.bind(Zn))}const J2=1.33;function Z2(e){return typeof e=="string"?ew(e):Math.ceil((e.byteLength||e.size)*J2)}function ew(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function _0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function tw(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function nw(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class rw extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class kd extends Ft{constructor(t){super(),this.writable=!1,$u(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new rw(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=vd(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=tw(t);return n.length?"?"+n:""}}class iw extends kd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};q2(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,V2(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]=_0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let S0=!1;try{S0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const sw=S0;function ow(){}class aw extends iw{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,a)=>{this.onError("xhr post error",s,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Pr extends Ft{constructor(t,n,r){super(),this.createRequest=t,$u(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=T0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch(s){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{r.setRequestHeader("Accept","*/*")}catch(s){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document!="undefined"&&(this._index=Pr.requestsCount++,Pr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=ow,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Pr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(Pr.requestsCount=0,Pr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",x0);else if(typeof addEventListener=="function"){const e="onpagehide"in Zn?"pagehide":"unload";addEventListener(e,x0,!1)}}function x0(){for(let e in Pr.requests)Pr.requests.hasOwnProperty(e)&&Pr.requests[e].abort()}const uw=(function(){const e=w0({xdomain:!1});return e&&e.responseType!==null})();class lw extends aw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=uw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Pr(w0,this.uri(),t)}}function w0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||sw))return new XMLHttpRequest}catch(n){}if(!t)try{return new Zn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const A0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class cw extends kd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=A0?{}:T0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;Ad(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&ju(()=>{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]=_0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Pd=Zn.WebSocket||Zn.MozWebSocket;class dw extends cw{createSocket(t,n,r){return A0?new Pd(t,n,r):n?new Pd(t,n):new Pd(t)}doWrite(t,n){this.ws.send(n)}}class fw extends kd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=W2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=Y2();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&ju(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const hw={websocket:dw,webtransport:fw,polling:lw},pw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,mw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Od(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=pw.exec(e||""),a={},u=14;for(;u--;)a[mw[u]]=s[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=gw(a,a.path),a.queryKey=Ew(a,a.query),a}function gw(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 Ew(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const Id=typeof addEventListener=="function"&&typeof removeEventListener=="function",Vu=[];Id&&addEventListener("offline",()=>{Vu.forEach(e=>e())},!1);class bi extends Ft{constructor(t,n){if(super(),this.binaryType=X2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=Od(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Od(n.host).host);$u(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=nw(this.opts.query)),Id&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Vu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=b0,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&&bi.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",bi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=Z2(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,ju(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(bi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Id&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Vu.indexOf(this._offlineEventListener);r!==-1&&Vu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}bi.protocol=b0;class yw extends bi{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;bi.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;bi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=n.name,this.emitReserved("upgradeError",T)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const T=new Error("probe error: "+m);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function c(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",s),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",s),n.once("error",u),n.once("close",c),this.once("close",d),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let bw=class extends yw{constructor(t,n={}){const r=typeof t=="object",s=r?B({},t):B({},n);(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(a=>hw[a]).filter(a=>!!a)),super(r?s:t,s)}};function Tw(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=Od(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const _w=typeof ArrayBuffer=="function",Sw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,C0=Object.prototype.toString,xw=typeof Blob=="function"||typeof Blob!="undefined"&&C0.call(Blob)==="[object BlobConstructor]",ww=typeof File=="function"||typeof File!="undefined"&&C0.call(File)==="[object FileConstructor]";function Rd(e){return _w&&(e instanceof ArrayBuffer||Sw(e))||xw&&e instanceof Blob||ww&&e instanceof File}function qu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(qu(e[n]))return!0;return!1}if(Rd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return qu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&qu(e[n]))return!0;return!1}function Aw(e){const t=[],n=e.data,r=e;return r.data=Yu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Yu(e,t,n){if(!e)return e;if(Rd(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let s=0;s<e.length;s++)r[s]=Yu(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Yu(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Yu(e[s],t));return r}return e}function Cw(e,t){return e.data=Ld(e.data,t),delete e.attachments,e}function Ld(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Ld(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Ld(e[n],t));return e}const vw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var et;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(et||(et={}));class Nw{constructor(t){this.replacer=t}encode(t){return(t.type===et.EVENT||t.type===et.ACK)&&qu(t)?this.encodeAsBinary({type:t.type===et.EVENT?et.BINARY_EVENT:et.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===et.BINARY_EVENT||t.type===et.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Aw(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Dd extends Ft{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===et.BINARY_EVENT;r||n.type===et.BINARY_ACK?(n.type=r?et.EVENT:et.ACK,this.reconstructor=new kw(n)):super.emitReserved("decoded",n)}else if(Rd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(et[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===et.BINARY_EVENT||r.type===et.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Pw(c)||c<1)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(Dd.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case et.CONNECT:return v0(n);case et.DISCONNECT:return n===void 0;case et.CONNECT_ERROR:return typeof n=="string"||v0(n);case et.EVENT:case et.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&vw.indexOf(n[0])===-1);case et.ACK:case et.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class kw{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=Cw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Pw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function v0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Ow=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Dd,Encoder:Nw,get PacketType(){return et}},Symbol.toStringTag,{value:"Module"}));function hr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Iw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class N0 extends Ft{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hr(t,"open",this.onopen.bind(this)),hr(t,"packet",this.onpacket.bind(this)),hr(t,"error",this.onerror.bind(this)),hr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,s,a;if(Iw.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:et.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const c=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},s),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,s)=>{const a=(u,c)=>u?s(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...a)=>(this._queue[0],s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:et.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case et.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case et.EVENT:case et.BINARY_EVENT:this.onevent(t);break;case et.ACK:case et.BINARY_ACK:this.onack(t);break;case et.DISCONNECT:this.ondisconnect();break;case et.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:et.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:et.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Us(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}Us.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},Us.prototype.reset=function(){this.attempts=0},Us.prototype.setMin=function(e){this.ms=e},Us.prototype.setMax=function(e){this.max=e},Us.prototype.setJitter=function(e){this.jitter=e};class Md extends Ft{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,$u(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Us({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||Ow;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new bw(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=hr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=hr(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{s(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(s),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hr(t,"ping",this.onping.bind(this)),hr(t,"data",this.ondata.bind(this)),hr(t,"error",this.onerror.bind(this)),hr(t,"close",this.onclose.bind(this)),hr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){ju(()=>{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 N0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ea={};function Wu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Tw(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=ea[s]&&a in ea[s].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Md(r,t):(ea[s]||(ea[s]=new Md(r,t)),d=ea[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Wu,{Manager:Md,Socket:N0,io:Wu,connect:Wu});var Rw=function(e){return(function(t){return!!t&&typeof t=="object"})(e)&&!(function(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||(function(r){return r.$$typeof===Lw})(t)})(e)},Lw=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ta(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Hs((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Dw(e,t,n){return e.concat(t).map((function(r){return ta(r,n)}))}function k0(e){return Object.keys(e).concat((function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(n){return Object.propertyIsEnumerable.call(t,n)})):[]})(e))}function P0(e,t){try{return t in e}catch(n){return!1}}function Mw(e,t,n){var r={};return n.isMergeableObject(e)&&k0(e).forEach((function(s){r[s]=ta(e[s],n)})),k0(t).forEach((function(s){(function(a,u){return P0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,s)||(P0(e,s)&&n.isMergeableObject(t[s])?r[s]=(function(a,u){if(!u.customMerge)return Hs;var c=u.customMerge(a);return typeof c=="function"?c:Hs})(s,n)(e[s],t[s],n):r[s]=ta(t[s],n))})),r}function Hs(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Dw,n.isMergeableObject=n.isMergeableObject||Rw,n.cloneUnlessOtherwiseSpecified=ta;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Mw(e,t,n):ta(t,n)}Hs.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Hs(n,r,t)}),{})};var Fw=Hs;let Bw=class{constructor(t){Object.assign(this,t)}};function An(e){if(e)return(function(t){for(var n in An.prototype)t[n]=An.prototype[n];return t})(e)}An.prototype.on=An.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},An.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},An.prototype.off=An.prototype.removeListener=An.prototype.removeAllListeners=An.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var s=0;s<r.length;s++)if((n=r[s])===t||n.fn===t){r.splice(s,1);break}return r.length===0&&delete this._callbacks["$"+e],this},An.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var s=(n=n.slice(0)).length;r<s;++r)n[r].apply(this,t)}return this},An.prototype.emitReserved=An.prototype.emit,An.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},An.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Uw=typeof ArrayBuffer=="function",O0=Object.prototype.toString,Hw=typeof Blob=="function"||typeof Blob!="undefined"&&O0.call(Blob)==="[object BlobConstructor]",zw=typeof File=="function"||typeof File!="undefined"&&O0.call(File)==="[object FileConstructor]";function Fd(e){return Uw&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||Hw&&e instanceof Blob||zw&&e instanceof File}function Gu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Gu(e[n]))return!0;return!1}if(Fd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Gu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Gu(e[n]))return!0;return!1}function jw(e){const t=[],n=e.data,r=e;return r.data=Bd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Bd(e,t){if(!e)return e;if(Fd(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Bd(e[r],t);return n}if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Bd(e[r],t));return n}return e}function $w(e,t){return e.data=Ud(e.data,t),delete e.attachments,e}function Ud(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Ud(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Ud(e[n],t));return e}const Vw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var vt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(vt||(vt={}));class qw{constructor(t){this.replacer=t}encode(t){return t.type!==vt.EVENT&&t.type!==vt.ACK||!Gu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===vt.EVENT?vt.BINARY_EVENT:vt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==vt.BINARY_EVENT&&t.type!==vt.BINARY_ACK||(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=jw(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Hd extends An{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===vt.BINARY_EVENT;r||n.type===vt.BINARY_ACK?(n.type=r?vt.EVENT:vt.ACK,this.reconstructor=new Yw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!Fd(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n))}}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(vt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===vt.BINARY_EVENT||r.type===vt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Ww(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(!Hd.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case vt.CONNECT:return I0(n);case vt.DISCONNECT:return n===void 0;case vt.CONNECT_ERROR:return typeof n=="string"||I0(n);case vt.EVENT:case vt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Vw.indexOf(n[0])===-1);case vt.ACK:case vt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Yw{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=$w(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Ww=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function I0(e){return Object.prototype.toString.call(e)==="[object Object]"}const R0=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],L0=(e,t,n)=>function r(s,a=[]){const u=Object.entries(s).map((([c,d])=>{const f=[...a,t(c)];return[e(c),d instanceof Object&&!(n!=null&&n.includes(f.join(".")))?r(d,f):d]}));return Array.isArray(s)?u.map((c=>c[1])):Object.fromEntries(u)},D0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),Gw=L0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),R0),M0=L0(D0,D0,R0),Xw={Encoder:class extends qw{encode(e){var t,n;return super.encode(fe(B({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],Gw(e.data[1])]:((n=e.data)==null?void 0:n.length)==1?[e.data[0]]:typeof e.data=="object"&&e.data!=null?e.data:void 0}))}},Decoder:class extends Hd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?M0(r):r)):n instanceof Object?M0(n):n)):t))}}},Kw={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class Qw{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:s="/copilot",customerId:a,tenantId:u,socketOptions:c={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=m=>{console.log("[Copilot SDK] Connect Ack:",m),this.socket.auth={[this.sessionIdKey]:m.sessionId}},this.handleDisconnect=m=>{console.warn(`[Copilot SDK] Disconnected: ${m}`),m!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${m}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=m=>{console.error(`[Copilot SDK] Connect error: ${m.message}`);const T=m.message.match(/['"]error['"]:\s*['"](\w+)['"]/),y=T==null?void 0:T[1];y&&["InvalidApiKey","InvalidToken","BadRequest"].includes(y)?this.disconnect():this.socket.connected||this.socket.active||(console.log("[Copilot SDK] Retrying connect attempt..."),this.retryConnect())},this.offInternalHandlers=()=>{this.socket.off("connect_ack",this.handleConnectAck),this.socket.off("disconnect",this.handleDisconnect),this.off("connect_error",this.handleConnectError)},t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");const d=`${r}${s}`,f={};t?f["x-cimulate-api-key"]=t:n&&(f.Authorization=`Bearer ${n}`),a&&(f["x-cimulate-customer-id"]=a),u&&(f["Tenant-ID"]=u);const p=[Kw,c,{parser:Xw,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=Wu(d,Fw.all(p))}connect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.offInternalHandlers(),this.on("connect_ack",this.handleConnectAck),this.socket.on("disconnect",this.handleDisconnect),this.on("connect_error",this.handleConnectError),this.socket.auth&&this.sessionIdKey in this.socket.auth&&(this.socket.auth={}),this.socket.connect()}retryConnect(){if(!(this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts))if(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.reconnectAttempts<this.maxReconnectAttempts){const t=Math.min(1e3*Bu(2,this.reconnectAttempts),this.maxReconnectDelay);console.info(`[Copilot SDK] Retry #${this.reconnectAttempts+1} in ${t}ms...`),this.reconnectTimeout=setTimeout((()=>{this.socket.connected||this.socket.active||(this.reconnectAttempts++,this.reconnect())}),t)}else console.error("[Copilot SDK] Max reconnect attempts reached.")}reconnect(){this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts||(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.socket.connect())}browse(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return Ke(this,null,function*(){return this.asyncResponse("faceted_navigation",t,n)})}cancelRequest(t,n){return this.asyncResponse("cancel",t,n)}conversationReset(t,n){return this.asyncResponse("conversation_reset",t,n)}productView(t,n){return Ke(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return Ke(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return Ke(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return Ke(this,null,function*(){return new Promise((r=>{this.socket.emit("conversation_events",t,(s=>{n&&n(s),r(s)}))}))})}on(t,n){return this.socket.on(t,n),n}once(t,n){this.socket.once(t,n)}off(t,n){this.socket.off(t,n)}disconnect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.offInternalHandlers(),this.socket.disconnect()}onDisconnect(t){this.socket.on("disconnect",t)}asyncResponse(t,n,r){return Ke(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let s="";const a=(function(u){return xd(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Qr(u({emit:m=>{c.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Qr(new Promise((m=>{f=m})));for(;c.length>0;)yield c.shift()}finally{yield new Qr(p==null?void 0:p())}})})((({emit:u,cancel:c})=>{const d=(f,p)=>{["done","error"].includes(p.name)&&c(),p.eventSourceId==s&&u(p)};return this.socket.onAny(d),()=>Ke(this,null,function*(){this.socket.offAny(d)})}));return{result:yield new Promise(((u,c)=>this.socket.emit(t,n,(d=>{d.name==="error"?c(new Bw(d)):(s=d==null?void 0:d.id,u(d))})))),events:a}})}}const F0=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),B0=(e,t,n)=>{if(n==="override"&&t.length>0)return t;const r=n==="prepend"?[...t,...e]:[...e,...t];return Array.from(new Set(r))};var F=fr();const Qi=Qe(F);var U0=Symbol.for("immer-nothing"),H0=Symbol.for("immer-draftable"),ot=Symbol.for("immer-state");function er(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var zs=Object.getPrototypeOf;function js(e){return!!e&&!!e[ot]}function Jr(e){var t;return e?z0(e)||Array.isArray(e)||!!e[H0]||!!((t=e.constructor)!=null&&t[H0])||ra(e)||Ku(e):!1}var Jw=Object.prototype.constructor.toString();function z0(e){if(!e||typeof e!="object")return!1;const t=zs(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)===Jw}function na(e,t){Xu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Xu(e){const t=e[ot];return t?t.type_:Array.isArray(e)?1:ra(e)?2:Ku(e)?3:0}function zd(e,t){return Xu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function j0(e,t,n){const r=Xu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Zw(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ra(e){return e instanceof Map}function Ku(e){return e instanceof Set}function Gt(e){return e.copy_||e.base_}function jd(e,t){if(ra(e))return new Map(e);if(Ku(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=z0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[ot];let s=Reflect.ownKeys(r);for(let a=0;a<s.length;a++){const u=s[a],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(zs(e),r)}else{const r=zs(e);if(r!==null&&n)return B({},e);const s=Object.create(r);return Object.assign(s,e)}}function $d(e,t=!1){return Ju(e)||js(e)||!Jr(e)||(Xu(e)>1&&Object.defineProperties(e,{set:{value:Qu},add:{value:Qu},clear:{value:Qu},delete:{value:Qu}}),Object.freeze(e),t&&Object.values(e).forEach(n=>$d(n,!0))),e}function Qu(){er(2)}function Ju(e){return Object.isFrozen(e)}var Vd={};function Ji(e){const t=Vd[e];return t||er(0,e),t}function eA(e,t){Vd[e]||(Vd[e]=t)}var ia;function Zu(){return ia}function tA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function $0(e,t){t&&(Ji("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function qd(e){Yd(e),e.drafts_.forEach(nA),e.drafts_=null}function Yd(e){e===ia&&(ia=e.parent_)}function V0(e){return ia=tA(ia,e)}function nA(e){const t=e[ot];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function q0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ot].modified_&&(qd(t),er(4)),Jr(e)&&(e=el(t,e),t.parent_||tl(t,e)),t.patches_&&Ji("Patches").generateReplacementPatches_(n[ot].base_,e,t.patches_,t.inversePatches_)):e=el(t,n,[]),qd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==U0?e:void 0}function el(e,t,n){if(Ju(t))return t;const r=t[ot];if(!r)return na(t,(s,a)=>Y0(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return tl(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let a=s,u=!1;r.type_===3&&(a=new Set(s),s.clear(),u=!0),na(a,(c,d)=>Y0(e,r,s,c,d,n,u)),tl(e,s,!1),n&&e.patches_&&Ji("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Y0(e,t,n,r,s,a,u){if(js(s)){const c=a&&t&&t.type_!==3&&!zd(t.assigned_,r)?a.concat(r):void 0,d=el(e,s,c);if(j0(n,r,d),js(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Jr(s)&&!Ju(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;el(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(ra(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&tl(e,s)}}function tl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$d(t,n)}function rA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Zu(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=Wd;n&&(s=[r],a=sa);const{revoke:u,proxy:c}=Proxy.revocable(s,a);return r.draft_=c,r.revoke_=u,c}var Wd={get(e,t){if(t===ot)return e;const n=Gt(e);if(!zd(n,t))return iA(e,n,t);const r=n[t];return e.finalized_||!Jr(r)?r:r===Gd(e.base_,t)?(Xd(e),e.copy_[t]=oa(r,e)):r},has(e,t){return t in Gt(e)},ownKeys(e){return Reflect.ownKeys(Gt(e))},set(e,t,n){const r=W0(Gt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Gd(Gt(e),t),a=s==null?void 0:s[ot];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Zw(n,s)&&(n!==void 0||zd(e.base_,t)))return!0;Xd(e),Zr(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Gd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Xd(e),Zr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Gt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){er(11)},getPrototypeOf(e){return zs(e.base_)},setPrototypeOf(){er(12)}},sa={};na(Wd,(e,t)=>{sa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),sa.deleteProperty=function(e,t){return sa.set.call(this,e,t,void 0)},sa.set=function(e,t,n){return Wd.set.call(this,e[0],t,n,e[0])};function Gd(e,t){const n=e[ot];return(n?Gt(n):e)[t]}function iA(e,t,n){var s;const r=W0(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function W0(e,t){if(!(t in e))return;let n=zs(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=zs(n)}}function Zr(e){e.modified_||(e.modified_=!0,e.parent_&&Zr(e.parent_))}function Xd(e){e.copy_||(e.copy_=jd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var sA=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&er(6),r!==void 0&&typeof r!="function"&&er(7);let s;if(Jr(t)){const a=V0(this),u=oa(t,void 0);let c=!0;try{s=n(u),c=!1}finally{c?qd(a):Yd(a)}return $0(a,r),q0(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===U0&&(s=void 0),this.autoFreeze_&&$d(s,!0),r){const a=[],u=[];Ji("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else er(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,s;return[this.produce(t,n,(u,c)=>{r=u,s=c}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Jr(e)||er(8),js(e)&&(e=oA(e));const t=V0(this),n=oa(e,void 0);return n[ot].isManual_=!0,Yd(t),n}finishDraft(e,t){const n=e&&e[ot];(!n||!n.isManual_)&&er(9);const{scope_:r}=n;return $0(r,t),q0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Ji("Patches").applyPatches_;return js(e)?r(e,t):this.produce(e,s=>r(s,t))}};function oa(e,t){const n=ra(e)?Ji("MapSet").proxyMap_(e,t):Ku(e)?Ji("MapSet").proxySet_(e,t):rA(e,t);return(t?t.scope_:Zu()).drafts_.push(n),n}function oA(e){return js(e)||er(10,e),G0(e)}function G0(e){if(!Jr(e)||Ju(e))return e;const t=e[ot];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=jd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=jd(e,!0);return na(n,(r,s)=>{j0(n,r,G0(s))}),t&&(t.finalized_=!1),n}function aA(){class e extends Map{constructor(d,f){super(),this[ot]={type_:2,parent_:f,scope_:f?f.scope_:Zu(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Gt(this[ot]).size}has(d){return Gt(this[ot]).has(d)}set(d,f){const p=this[ot];return u(p),(!Gt(p).has(d)||Gt(p).get(d)!==f)&&(n(p),Zr(p),p.assigned_.set(d,!0),p.copy_.set(d,f),p.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const f=this[ot];return u(f),n(f),Zr(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[ot];u(d),Gt(d).size&&(n(d),Zr(d),d.assigned_=new Map,na(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[ot];Gt(p).forEach((m,T,y)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[ot];u(f);const p=Gt(f).get(d);if(f.finalized_||!Jr(p)||p!==f.base_.get(d))return p;const m=oa(p,f);return n(f),f.copy_.set(d,m),m}keys(){return Gt(this[ot]).keys()}values(){const d=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const f=d.next();return f.done?f:{done:!1,value:this.get(f.value)}}}}entries(){const d=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const f=d.next();if(f.done)return f;const p=this.get(f.value);return{done:!1,value:[f.value,p]}}}}[Symbol.iterator](){return this.entries()}}function t(c,d){return new e(c,d)}function n(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.base_))}class r extends Set{constructor(d,f){super(),this[ot]={type_:3,parent_:f,scope_:f?f.scope_:Zu(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Gt(this[ot]).size}has(d){const f=this[ot];return u(f),f.copy_?!!(f.copy_.has(d)||f.drafts_.has(d)&&f.copy_.has(f.drafts_.get(d))):f.base_.has(d)}add(d){const f=this[ot];return u(f),this.has(d)||(a(f),Zr(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[ot];return u(f),a(f),Zr(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[ot];u(d),Gt(d).size&&(a(d),Zr(d),d.copy_.clear())}values(){const d=this[ot];return u(d),a(d),d.copy_.values()}entries(){const d=this[ot];return u(d),a(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,f){const p=this.values();let m=p.next();for(;!m.done;)d.call(f,m.value,m.value,this),m=p.next()}}function s(c,d){return new r(c,d)}function a(c){c.copy_||(c.copy_=new Set,c.base_.forEach(d=>{if(Jr(d)){const f=oa(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&er(3,JSON.stringify(Gt(c)))}eA("MapSet",{proxyMap_:t,proxySet_:s})}var uA=new sA,lA=uA.produce;function X0(e,t,n){var r=F.useMemo(function(){return lA(e)},[e]);return F.useReducer(r,t,n)}const K0={PAGE_CHANGED:"page-changed",PAGE_SIZE_CHANGED:"page-size-changed",FACET_FILTERS_CHANGED:"facet-filters-changed",RANGE_FILTERS_CHANGED:"range-filters-changed",CATALOG_SEGMENT_CHANGED:"catalog-segment-changed",PRICEBOOKS_CHANGED:"pricebooks-changed"},mt={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",ADD_LOADING_MESSAGE:"ADD_LOADING_MESSAGE",REMOVE_LOADING_MESSAGE:"REMOVE_LOADING_MESSAGE",SET_ACTIVE_CONVERSATION_ID:"SET_ACTIVE_CONVERSATION_ID",ADD_CONVERSATION_ID:"ADD_CONVERSATION_ID",SET_CONVERSATION_IDS:"SET_CONVERSATION_IDS",SET_CONVERSATION_HISTORY_LOADED:"SET_CONVERSATION_HISTORY_LOADED",SET_IMAGE_FILE:"SET_IMAGE_FILE",SET_ASK_CIM_PROMPTS:"SET_ASK_CIM_PROMPTS"},Zi={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},Q0=["ask_cim","search","browse","pdp"],cA=e=>Q0.includes(e),J0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(J0));const dA=new Map(Object.entries(J0).map(([e,t])=>[t,e])),fA=e=>{var t;return(t=dA.get(e))!=null?t:null},$s="cimulate",Kd=`${$s}:pdp-update`,Qd=`${$s}:browse-update`,Jd=`${$s}:search-update`,Zd=`${$s}:ui-state-update`,ef=`${$s}:prompts-state-update`,tf=`${$s}:session-state`,Or=B({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},K0),hA={"browse-context":Or.CONTEXT_UPDATED,categoryId:Or.CATEGORY_ID_CHANGED,categoryName:Or.CATEGORY_NAME_CHANGED,page:Or.PAGE_CHANGED,pageSize:Or.PAGE_SIZE_CHANGED,includeFacets:Or.FACET_FILTERS_CHANGED,facetFilters:Or.FACET_FILTERS_CHANGED,rangeFilters:Or.RANGE_FILTERS_CHANGED,catalogSegment:Or.CATALOG_SEGMENT_CHANGED,pricebooks:Or.PRICEBOOKS_CHANGED},ei=B({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},K0),pA={"search-context":ei.SEARCH_CONTEXT_UPDATED,query:ei.QUERY_CHANGED,page:ei.PAGE_CHANGED,pageSize:ei.PAGE_SIZE_CHANGED,includeFacets:ei.FACET_FILTERS_CHANGED,facetFilters:ei.FACET_FILTERS_CHANGED,rangeFilters:ei.RANGE_FILTERS_CHANGED,catalogSegment:ei.CATALOG_SEGMENT_CHANGED,pricebooks:ei.PRICEBOOKS_CHANGED},H="cim-widget",$n=`--${H}`,Ti={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},mA=(e=Ti)=>({[`${$n}-primary-color`]:e.primaryColor||Ti.primaryColor,[`${$n}-secondary-color`]:e.secondaryColor||Ti.secondaryColor,[`${$n}-font-color`]:e.fontColor||Ti.fontColor,[`${$n}-font-family`]:e.fontFamily||Ti.fontFamily,[`${$n}-background-color`]:e.backgroundColor||Ti.backgroundColor,[`${$n}-border-color`]:e.borderColor||Ti.borderColor,[`${$n}-border-radius`]:e.borderRadius||Ti.borderRadius}),ti={RESET_CONVERSATION:"reset-conversation",END_CONVERSATION:"end-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},Z0=F.createContext(null),eg=F.createContext(null),gt={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"},tg={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,askElseButtonLabel:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null,promptsDisplay:"both",staticQuestions:[],staticQuestionsStrategy:"append",disableAskElseButton:!1};function ng(e,t){return function(){return e.apply(t,arguments)}}const{toString:gA}=Object.prototype,{getPrototypeOf:Vs}=Object,{iterator:aa,toStringTag:rg}=Symbol,nl=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ua=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),nl(n,t))return!0;n=Vs(n)}return!1},EA=(e,t)=>e!=null&&ua(e,t)?e[t]:void 0,nf=(e=>t=>{const n=gA.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),pr=e=>(e=e.toLowerCase(),t=>nf(t)===e),rl=e=>t=>typeof t===e,{isArray:es}=Array,qs=rl("undefined");function Ys(e){return e!==null&&!qs(e)&&e.constructor!==null&&!qs(e.constructor)&&On(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ig=pr("ArrayBuffer");function yA(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ig(e.buffer),t}const bA=rl("string"),On=rl("function"),sg=rl("number"),Ws=e=>e!==null&&typeof e=="object",TA=e=>e===!0||e===!1,il=e=>{if(!Ws(e))return!1;const t=Vs(e);return(t===null||t===Object.prototype||Vs(t)===null)&&!ua(e,rg)&&!ua(e,aa)},_A=e=>{if(!Ws(e)||Ys(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},SA=pr("Date"),xA=pr("File"),wA=e=>!!(e&&typeof e.uri!="undefined"),AA=e=>e&&typeof e.getParts!="undefined",CA=pr("Blob"),vA=pr("FileList"),NA=e=>Ws(e)&&On(e.pipe);function kA(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const og=kA(),ag=typeof og.FormData!="undefined"?og.FormData:void 0,PA=e=>{if(!e)return!1;if(ag&&e instanceof ag)return!0;const t=Vs(e);if(!t||t===Object.prototype||!On(e.append))return!1;const n=nf(e);return n==="formdata"||n==="object"&&On(e.toString)&&e.toString()==="[object FormData]"},OA=pr("URLSearchParams"),[IA,RA,LA,DA]=["ReadableStream","Request","Response","Headers"].map(pr),MA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function la(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),es(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Ys(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 ug(e,t){if(Ys(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const ts=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,lg=e=>!qs(e)&&e!==ts;function rf(...e){const{caseless:t,skipUndefined:n}=lg(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&typeof u=="string"&&ug(r,u)||u,d=nl(r,c)?r[c]:void 0;il(d)&&il(a)?r[c]=rf(d,a):il(a)?r[c]=rf({},a):es(a)?r[c]=a.slice():(!n||!qs(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++){const c=e[a];if(!c||Ys(c)||(la(c,s),typeof c!="object"||es(c)))continue;const d=Object.getOwnPropertySymbols(c);for(let f=0;f<d.length;f++){const p=d[f];GA.call(c,p)&&s(c[p],p)}}return r}const FA=(e,t,n,{allOwnKeys:r}={})=>(la(t,(s,a)=>{n&&On(s)?Object.defineProperty(e,a,{__proto__:null,value:ng(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),BA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),UA=(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)},HA=(e,t,n,r)=>{let s,a,u;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&Vs(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},zA=(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},jA=e=>{if(!e)return null;if(es(e))return e;let t=e.length;if(!sg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},$A=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Vs(Uint8Array)),VA=(e,t)=>{const r=(e&&e[aa]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},qA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},YA=pr("HTMLFormElement"),WA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:GA}=Object.prototype,XA=pr("RegExp"),cg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};la(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},KA=e=>{cg(e,(t,n)=>{if(On(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(On(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},QA=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return es(e)?r(e):r(String(e).split(t)),n},JA=()=>{},ZA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function eC(e){return!!(e&&On(e.append)&&e[rg]==="FormData"&&e[aa])}const tC=e=>{const t=new WeakSet,n=r=>{if(Ws(r)){if(t.has(r))return;if(Ys(r))return r;if(!("toJSON"in r)){t.add(r);const s=es(r)?[]:{};return la(r,(a,u)=>{const c=n(a);!qs(c)&&(s[u]=c)}),t.delete(r),s}}return r};return n(e)},nC=pr("AsyncFunction"),rC=e=>e&&(Ws(e)||On(e))&&On(e.then)&&On(e.catch),dg=((e,t)=>e?setImmediate:t?((n,r)=>(ts.addEventListener("message",({source:s,data:a})=>{s===ts&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),ts.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",On(ts.postMessage)),iC=typeof queueMicrotask!="undefined"?queueMicrotask.bind(ts):typeof process!="undefined"&&process.nextTick||dg,fg=e=>e!=null&&On(e[aa]),$={isArray:es,isArrayBuffer:ig,isBuffer:Ys,isFormData:PA,isArrayBufferView:yA,isString:bA,isNumber:sg,isBoolean:TA,isObject:Ws,isPlainObject:il,isEmptyObject:_A,isReadableStream:IA,isRequest:RA,isResponse:LA,isHeaders:DA,isUndefined:qs,isDate:SA,isFile:xA,isReactNativeBlob:wA,isReactNative:AA,isBlob:CA,isRegExp:XA,isFunction:On,isStream:NA,isURLSearchParams:OA,isTypedArray:$A,isFileList:vA,forEach:la,merge:rf,extend:FA,trim:MA,stripBOM:BA,inherits:UA,toFlatObject:HA,kindOf:nf,kindOfTest:pr,endsWith:zA,toArray:jA,forEachEntry:VA,matchAll:qA,isHTMLForm:YA,hasOwnProperty:nl,hasOwnProp:nl,hasOwnInPrototypeChain:ua,getSafeProp:EA,reduceDescriptors:cg,freezeMethods:KA,toObjectSet:QA,toCamelCase:WA,noop:JA,toFiniteNumber:ZA,findKey:ug,global:ts,isContextDefined:lg,isSpecCompliantForm:eC,toJSONObject:tC,isAsyncFn:nC,isThenable:rC,setImmediate:dg,asap:iC,isIterable:fg,isSafeIterable:e=>e!=null&&ua(e,aa)&&fg(e)},sC=$.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"]),oC=e=>{const t={};let n,r,s;return e&&e.split(`
1
+ (function(De,$e){typeof exports=="object"&&typeof module!="undefined"?$e(exports):typeof define=="function"&&define.amd?define(["exports"],$e):(De=typeof globalThis!="undefined"?globalThis:De||self,$e(De.CimulateCopilot={}))})(this,(function(De){"use strict";var H7=Object.defineProperty,z7=Object.defineProperties;var j7=Object.getOwnPropertyDescriptors;var Sd=Object.getOwnPropertySymbols;var L2=Object.prototype.hasOwnProperty,D2=Object.prototype.propertyIsEnumerable;var Jo=(De,$e)=>($e=Symbol[De])?$e:Symbol.for("Symbol."+De),$7=De=>{throw TypeError(De)},Bu=Math.pow,l0=(De,$e,Qe)=>$e in De?H7(De,$e,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):De[$e]=Qe,B=(De,$e)=>{for(var Qe in $e||($e={}))L2.call($e,Qe)&&l0(De,Qe,$e[Qe]);if(Sd)for(var Qe of Sd($e))D2.call($e,Qe)&&l0(De,Qe,$e[Qe]);return De},fe=(De,$e)=>z7(De,j7($e));var fn=(De,$e)=>{var Qe={};for(var dt in De)L2.call(De,dt)&&$e.indexOf(dt)<0&&(Qe[dt]=De[dt]);if(De!=null&&Sd)for(var dt of Sd(De))$e.indexOf(dt)<0&&D2.call(De,dt)&&(Qe[dt]=De[dt]);return Qe};var _e=(De,$e,Qe)=>l0(De,typeof $e!="symbol"?$e+"":$e,Qe);var Ke=(De,$e,Qe)=>new Promise((dt,Ot)=>{var yt=bt=>{try{rn(Qe.next(bt))}catch(wn){Ot(wn)}},Fe=bt=>{try{rn(Qe.throw(bt))}catch(wn){Ot(wn)}},rn=bt=>bt.done?dt(bt.value):Promise.resolve(bt.value).then(yt,Fe);rn((Qe=Qe.apply(De,$e)).next())}),Qr=function(De,$e){this[0]=De,this[1]=$e},xd=(De,$e,Qe)=>{var dt=(rn,bt,wn,fr)=>{try{var Ki=Qe[rn](bt),Fs=(bt=Ki.value)instanceof Qr,Bs=Ki.done;Promise.resolve(Fs?bt[0]:bt).then(Pn=>Fs?dt(rn==="return"?rn:"next",bt[1]?{done:Pn.done,value:Pn.value}:Pn,wn,fr):wn({value:Pn,done:Bs})).catch(Pn=>dt("throw",Pn,wn,fr))}catch(Pn){fr(Pn)}},Ot=(rn,bt,wn,fr)=>Fe[rn]=Ki=>(bt=new Promise((Fs,Bs,Pn)=>(Pn=()=>dt(rn,Ki,Fs,Bs),yt?yt.then(Pn):Pn())),fr=()=>yt===wn&&(yt=0),yt=wn=bt.then(fr,fr),bt),yt,Fe={};return Qe=Qe.apply(De,$e),Fe[Jo("asyncIterator")]=()=>Fe,Ot("next"),Ot("throw"),Ot("return"),Fe},c0=De=>{var $e=De[Jo("asyncIterator")],Qe=!1,dt,Ot={};return $e==null?($e=De[Jo("iterator")](),dt=yt=>Ot[yt]=Fe=>$e[yt](Fe)):($e=$e.call(De),dt=yt=>Ot[yt]=Fe=>{if(Qe){if(Qe=!1,yt==="throw")throw Fe;return Fe}return Qe=!0,{done:!1,value:new Qr(new Promise(rn=>{var bt=$e[yt](Fe);bt instanceof Object||$7("Object expected"),rn(bt)}),1)}}),Ot[Jo("iterator")]=()=>Ot,dt("next"),"throw"in $e?dt("throw"):Ot.throw=yt=>{throw yt},"return"in $e&&dt("return"),Ot},M2=(De,$e,Qe)=>($e=De[Jo("asyncIterator")])?$e.call(De):(De=De[Jo("iterator")](),$e={},Qe=(dt,Ot)=>(Ot=De[dt])&&($e[dt]=yt=>new Promise((Fe,rn,bt)=>(yt=Ot.call(De,yt),bt=yt.done,Promise.resolve(yt.value).then(wn=>Fe({value:wn,done:bt}),rn)))),Qe("next"),Qe("return"),$e);var $e=document.createElement("style");$e.textContent=`.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;height:auto;line-height:normal;background-color:transparent;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;z-index:9999;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-cancel-button{color:#8a8a8a}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;font-size:.875rem;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button-container{display:inline-flex;height:100%}button.cim-widget-image-upload-button{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin:0;color:inherit;background:transparent;border:0;border-radius:var(--cim-widget-border-radius);cursor:pointer;&:hover{background-color:#f0f0f0}&:disabled,&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:#fff;border-radius:var(--cim-widget-border-radius);box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:10dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media(max-width:576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;gap:4px;color:var(--cim-widget-primary-color)}.cim-widget-refined-event-query-text{line-height:normal}.cim-widget-message-icon.refined-event-icon{font-size:1.5rem;&.embedded,&.standalone{color:var(--cim-widget-primary-color)}}.cim-widget-facet-pill{display:inline-flex;align-items:center;margin-left:4px;padding:.25rem .5rem;color:var(--cim-widget-primary-color);border-radius:9999px;font-size:.75rem;font-weight:700;&.embedded{background-color:#ffffff90}&.standalone{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent)}}.cim-widget-facet-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.25rem}.cim-widget-facets{display:flex;flex-direction:column;padding:.25rem}.cim-widget-facets .cim-widget-facet-category{margin-bottom:0;font-size:.875rem;font-weight:700;word-wrap:break-word}.cim-widget-facets .cim-widget-facet-values{margin-top:0;font-size:.675rem}.cim-widget-message-timestamp.standalone{font-size:.75rem;color:#00000090}.cim-widget-message-timestamp.embedded{font-size:.65rem;color:#333333bf}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-message-text{font-weight:700}.cim-widget-user-message-text.standalone{font-size:1.125rem;margin:0}.cim-widget-user-message-text.embedded{margin:0}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-user-search{display:flex;flex-direction:column}.cim-widget-user-search.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;font-size:1.125rem;padding-top:.5rem;padding-bottom:.5rem}.cim-widget-user-search-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-search-query{display:inline-flex}.cim-widget-message-icon.user-search-icon.embedded,.cim-widget-message-icon.user-search-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;border-radius:var(--cim-widget-border-radius);&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;label[for=cim-widget-prompts-input]{width:auto}.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:700;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}
2
+ /*$vite$:1*/`,document.head.appendChild($e);function Qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dt={exports:{}},Ot={},yt={exports:{}},Fe={};var rn;function bt(){if(rn)return Fe;rn=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function T(L){return L===null||typeof L!="object"?null:(L=m&&L[m]||L["@@iterator"],typeof L=="function"?L:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,w={};function v(L,J,I){this.props=L,this.context=J,this.refs=w,this.updater=I||y}v.prototype.isReactComponent={},v.prototype.setState=function(L,J){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,J,"setState")},v.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function A(){}A.prototype=v.prototype;function k(L,J,I){this.props=L,this.context=J,this.refs=w,this.updater=I||y}var C=k.prototype=new A;C.constructor=k,_(C,v.prototype),C.isPureReactComponent=!0;var z=Array.isArray,Y=Object.prototype.hasOwnProperty,D={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function ne(L,J,I){var Te,He={},ye=null,Le=null;if(J!=null)for(Te in J.ref!==void 0&&(Le=J.ref),J.key!==void 0&&(ye=""+J.key),J)Y.call(J,Te)&&!q.hasOwnProperty(Te)&&(He[Te]=J[Te]);var Be=arguments.length-2;if(Be===1)He.children=I;else if(1<Be){for(var Ge=Array(Be),at=0;at<Be;at++)Ge[at]=arguments[at+2];He.children=Ge}if(L&&L.defaultProps)for(Te in Be=L.defaultProps,Be)He[Te]===void 0&&(He[Te]=Be[Te]);return{$$typeof:e,type:L,key:ye,ref:Le,props:He,_owner:D.current}}function ue(L,J){return{$$typeof:e,type:L.type,key:J,ref:L.ref,props:L.props,_owner:L._owner}}function V(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function se(L){var J={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(I){return J[I]})}var pe=/\/+/g;function ve(L,J){return typeof L=="object"&&L!==null&&L.key!=null?se(""+L.key):J.toString(36)}function re(L,J,I,Te,He){var ye=typeof L;(ye==="undefined"||ye==="boolean")&&(L=null);var Le=!1;if(L===null)Le=!0;else switch(ye){case"string":case"number":Le=!0;break;case"object":switch(L.$$typeof){case e:case t:Le=!0}}if(Le)return Le=L,He=He(Le),L=Te===""?"."+ve(Le,0):Te,z(He)?(I="",L!=null&&(I=L.replace(pe,"$&/")+"/"),re(He,J,I,"",function(at){return at})):He!=null&&(V(He)&&(He=ue(He,I+(!He.key||Le&&Le.key===He.key?"":(""+He.key).replace(pe,"$&/")+"/")+L)),J.push(He)),1;if(Le=0,Te=Te===""?".":Te+":",z(L))for(var Be=0;Be<L.length;Be++){ye=L[Be];var Ge=Te+ve(ye,Be);Le+=re(ye,J,I,Ge,He)}else if(Ge=T(L),typeof Ge=="function")for(L=Ge.call(L),Be=0;!(ye=L.next()).done;)ye=ye.value,Ge=Te+ve(ye,Be++),Le+=re(ye,J,I,Ge,He);else if(ye==="object")throw J=String(L),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.");return Le}function ae(L,J,I){if(L==null)return L;var Te=[],He=0;return re(L,Te,"","",function(ye){return J.call(I,ye,He++)}),Te}function xe(L){if(L._status===-1){var J=L._result;J=J(),J.then(function(I){(L._status===0||L._status===-1)&&(L._status=1,L._result=I)},function(I){(L._status===0||L._status===-1)&&(L._status=2,L._result=I)}),L._status===-1&&(L._status=0,L._result=J)}if(L._status===1)return L._result.default;throw L._result}var oe={current:null},Q={transition:null},ie={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:Q,ReactCurrentOwner:D};function N(){throw Error("act(...) is not supported in production builds of React.")}return Fe.Children={map:ae,forEach:function(L,J,I){ae(L,function(){J.apply(this,arguments)},I)},count:function(L){var J=0;return ae(L,function(){J++}),J},toArray:function(L){return ae(L,function(J){return J})||[]},only:function(L){if(!V(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},Fe.Component=v,Fe.Fragment=n,Fe.Profiler=s,Fe.PureComponent=k,Fe.StrictMode=r,Fe.Suspense=d,Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ie,Fe.act=N,Fe.cloneElement=function(L,J,I){if(L==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var Te=_({},L.props),He=L.key,ye=L.ref,Le=L._owner;if(J!=null){if(J.ref!==void 0&&(ye=J.ref,Le=D.current),J.key!==void 0&&(He=""+J.key),L.type&&L.type.defaultProps)var Be=L.type.defaultProps;for(Ge in J)Y.call(J,Ge)&&!q.hasOwnProperty(Ge)&&(Te[Ge]=J[Ge]===void 0&&Be!==void 0?Be[Ge]:J[Ge])}var Ge=arguments.length-2;if(Ge===1)Te.children=I;else if(1<Ge){Be=Array(Ge);for(var at=0;at<Ge;at++)Be[at]=arguments[at+2];Te.children=Be}return{$$typeof:e,type:L.type,key:He,ref:ye,props:Te,_owner:Le}},Fe.createContext=function(L){return L={$$typeof:u,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},L.Provider={$$typeof:a,_context:L},L.Consumer=L},Fe.createElement=ne,Fe.createFactory=function(L){var J=ne.bind(null,L);return J.type=L,J},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(L){return{$$typeof:c,render:L}},Fe.isValidElement=V,Fe.lazy=function(L){return{$$typeof:p,_payload:{_status:-1,_result:L},_init:xe}},Fe.memo=function(L,J){return{$$typeof:f,type:L,compare:J===void 0?null:J}},Fe.startTransition=function(L){var J=Q.transition;Q.transition={};try{L()}finally{Q.transition=J}},Fe.unstable_act=N,Fe.useCallback=function(L,J){return oe.current.useCallback(L,J)},Fe.useContext=function(L){return oe.current.useContext(L)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(L){return oe.current.useDeferredValue(L)},Fe.useEffect=function(L,J){return oe.current.useEffect(L,J)},Fe.useId=function(){return oe.current.useId()},Fe.useImperativeHandle=function(L,J,I){return oe.current.useImperativeHandle(L,J,I)},Fe.useInsertionEffect=function(L,J){return oe.current.useInsertionEffect(L,J)},Fe.useLayoutEffect=function(L,J){return oe.current.useLayoutEffect(L,J)},Fe.useMemo=function(L,J){return oe.current.useMemo(L,J)},Fe.useReducer=function(L,J,I){return oe.current.useReducer(L,J,I)},Fe.useRef=function(L){return oe.current.useRef(L)},Fe.useState=function(L){return oe.current.useState(L)},Fe.useSyncExternalStore=function(L,J,I){return oe.current.useSyncExternalStore(L,J,I)},Fe.useTransition=function(){return oe.current.useTransition()},Fe.version="18.3.1",Fe}var wn;function fr(){return wn||(wn=1,yt.exports=bt()),yt.exports}var Ki;function Fs(){if(Ki)return Ot;Ki=1;var e=fr(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,f){var p,m={},T=null,y=null;f!==void 0&&(T=""+f),d.key!==void 0&&(T=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(m[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:c,key:T,ref:y,props:m,_owner:s.current}}return Ot.Fragment=n,Ot.jsx=u,Ot.jsxs=u,Ot}var Bs;function Pn(){return Bs||(Bs=1,dt.exports=Fs()),dt.exports}var S=Pn();const kr=Object.create(null);kr.open="0",kr.close="1",kr.ping="2",kr.pong="3",kr.message="4",kr.upgrade="5",kr.noop="6";const Uu=Object.create(null);Object.keys(kr).forEach(e=>{Uu[kr[e]]=e});const wd={type:"error",data:"parser error"},d0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",f0=typeof ArrayBuffer=="function",h0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Ad=({type:e,data:t},n,r)=>d0&&t instanceof Blob?n?r(t):p0(t,r):f0&&(t instanceof ArrayBuffer||h0(t))?n?r(t):p0(new Blob([t]),r):r(kr[e]+(t||"")),p0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function m0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Cd;function H2(e,t){if(d0&&e.data instanceof Blob)return e.data.arrayBuffer().then(m0).then(t);if(f0&&(e.data instanceof ArrayBuffer||h0(e.data)))return t(m0(e.data));Ad(e,!1,n=>{Cd||(Cd=new TextEncoder),t(Cd.encode(n))})}const g0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<g0.length;e++)Zo[g0.charCodeAt(e)]=e;const z2=e=>{let t=e.length*.75,n=e.length,r,s=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=Zo[e.charCodeAt(r)],u=Zo[e.charCodeAt(r+1)],c=Zo[e.charCodeAt(r+2)],d=Zo[e.charCodeAt(r+3)],p[s++]=a<<2|u>>4,p[s++]=(u&15)<<4|c>>2,p[s++]=(c&3)<<6|d&63;return f},j2=typeof ArrayBuffer=="function",vd=(e,t)=>{if(typeof e!="string")return{type:"message",data:E0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:$2(e.substring(1),t)}:Uu[n]?e.length>1?{type:Uu[n],data:e.substring(1)}:{type:Uu[n]}:wd},$2=(e,t)=>{if(j2){const n=z2(e);return E0(n,t)}else return{base64:!0,data:e}},E0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,y0="",V2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{Ad(a,!1,c=>{r[u]=c,++s===n&&t(r.join(y0))})})},q2=(e,t)=>{const n=e.split(y0),r=[];for(let s=0;s<n.length;s++){const a=vd(n[s],t);if(r.push(a),a.type==="error")break}return r};function Y2(){return new TransformStream({transform(e,t){H2(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const a=new DataView(s.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{s=new Uint8Array(9);const a=new DataView(s.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let Nd;function Hu(e){return e.reduce((t,n)=>t+n.length,0)}function zu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function W2(e,t){Nd||(Nd=new TextDecoder);const n=[];let r=0,s=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(Hu(n)<1)break;const d=zu(n,1);a=(d[0]&128)===128,s=d[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(Hu(n)<2)break;const d=zu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Hu(n)<8)break;const d=zu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(wd);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Hu(n)<s)break;const d=zu(n,s);c.enqueue(vd(a?d:Nd.decode(d),t)),r=0}if(s===0||s>e){c.enqueue(wd);break}}}})}const b0=4;function Bt(e){if(e)return G2(e)}function G2(e){for(var t in Bt.prototype)e[t]=Bt.prototype[t];return e}Bt.prototype.on=Bt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Bt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Bt.prototype.off=Bt.prototype.removeListener=Bt.prototype.removeAllListeners=Bt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Bt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this},Bt.prototype.emitReserved=Bt.prototype.emit,Bt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Bt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ju=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Zn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),X2="arraybuffer";function V7(){}function T0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const K2=Zn.setTimeout,Q2=Zn.clearTimeout;function $u(e,t){t.useNativeTimers?(e.setTimeoutFn=K2.bind(Zn),e.clearTimeoutFn=Q2.bind(Zn)):(e.setTimeoutFn=Zn.setTimeout.bind(Zn),e.clearTimeoutFn=Zn.clearTimeout.bind(Zn))}const J2=1.33;function Z2(e){return typeof e=="string"?ew(e):Math.ceil((e.byteLength||e.size)*J2)}function ew(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function _0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function tw(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function nw(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class rw extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class kd extends Bt{constructor(t){super(),this.writable=!1,$u(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new rw(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=vd(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=tw(t);return n.length?"?"+n:""}}class iw extends kd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};q2(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,V2(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]=_0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let S0=!1;try{S0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const sw=S0;function ow(){}class aw extends iw{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,a)=>{this.onError("xhr post error",s,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Pr extends Bt{constructor(t,n,r){super(),this.createRequest=t,$u(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=T0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch(s){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{r.setRequestHeader("Accept","*/*")}catch(s){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document!="undefined"&&(this._index=Pr.requestsCount++,Pr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=ow,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Pr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(Pr.requestsCount=0,Pr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",x0);else if(typeof addEventListener=="function"){const e="onpagehide"in Zn?"pagehide":"unload";addEventListener(e,x0,!1)}}function x0(){for(let e in Pr.requests)Pr.requests.hasOwnProperty(e)&&Pr.requests[e].abort()}const uw=(function(){const e=w0({xdomain:!1});return e&&e.responseType!==null})();class lw extends aw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=uw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Pr(w0,this.uri(),t)}}function w0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||sw))return new XMLHttpRequest}catch(n){}if(!t)try{return new Zn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const A0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class cw extends kd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=A0?{}:T0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;Ad(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&ju(()=>{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]=_0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Pd=Zn.WebSocket||Zn.MozWebSocket;class dw extends cw{createSocket(t,n,r){return A0?new Pd(t,n,r):n?new Pd(t,n):new Pd(t)}doWrite(t,n){this.ws.send(n)}}class fw extends kd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=W2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=Y2();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&ju(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const hw={websocket:dw,webtransport:fw,polling:lw},pw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,mw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Od(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=pw.exec(e||""),a={},u=14;for(;u--;)a[mw[u]]=s[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=gw(a,a.path),a.queryKey=Ew(a,a.query),a}function gw(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 Ew(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const Id=typeof addEventListener=="function"&&typeof removeEventListener=="function",Vu=[];Id&&addEventListener("offline",()=>{Vu.forEach(e=>e())},!1);class bi extends Bt{constructor(t,n){if(super(),this.binaryType=X2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=Od(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Od(n.host).host);$u(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=nw(this.opts.query)),Id&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Vu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=b0,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&&bi.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",bi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=Z2(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,ju(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(bi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Id&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Vu.indexOf(this._offlineEventListener);r!==-1&&Vu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}bi.protocol=b0;class yw extends bi{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;bi.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;bi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=n.name,this.emitReserved("upgradeError",T)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const T=new Error("probe error: "+m);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function c(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",s),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",s),n.once("error",u),n.once("close",c),this.once("close",d),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let bw=class extends yw{constructor(t,n={}){const r=typeof t=="object",s=r?B({},t):B({},n);(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(a=>hw[a]).filter(a=>!!a)),super(r?s:t,s)}};function Tw(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=Od(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const _w=typeof ArrayBuffer=="function",Sw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,C0=Object.prototype.toString,xw=typeof Blob=="function"||typeof Blob!="undefined"&&C0.call(Blob)==="[object BlobConstructor]",ww=typeof File=="function"||typeof File!="undefined"&&C0.call(File)==="[object FileConstructor]";function Rd(e){return _w&&(e instanceof ArrayBuffer||Sw(e))||xw&&e instanceof Blob||ww&&e instanceof File}function qu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(qu(e[n]))return!0;return!1}if(Rd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return qu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&qu(e[n]))return!0;return!1}function Aw(e){const t=[],n=e.data,r=e;return r.data=Yu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Yu(e,t,n){if(!e)return e;if(Rd(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let s=0;s<e.length;s++)r[s]=Yu(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Yu(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Yu(e[s],t));return r}return e}function Cw(e,t){return e.data=Ld(e.data,t),delete e.attachments,e}function Ld(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Ld(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Ld(e[n],t));return e}const vw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var et;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(et||(et={}));class Nw{constructor(t){this.replacer=t}encode(t){return(t.type===et.EVENT||t.type===et.ACK)&&qu(t)?this.encodeAsBinary({type:t.type===et.EVENT?et.BINARY_EVENT:et.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===et.BINARY_EVENT||t.type===et.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Aw(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Dd extends Bt{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===et.BINARY_EVENT;r||n.type===et.BINARY_ACK?(n.type=r?et.EVENT:et.ACK,this.reconstructor=new kw(n)):super.emitReserved("decoded",n)}else if(Rd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(et[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===et.BINARY_EVENT||r.type===et.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Pw(c)||c<1)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(Dd.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case et.CONNECT:return v0(n);case et.DISCONNECT:return n===void 0;case et.CONNECT_ERROR:return typeof n=="string"||v0(n);case et.EVENT:case et.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&vw.indexOf(n[0])===-1);case et.ACK:case et.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class kw{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=Cw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Pw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function v0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Ow=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Dd,Encoder:Nw,get PacketType(){return et}},Symbol.toStringTag,{value:"Module"}));function hr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Iw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class N0 extends Bt{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hr(t,"open",this.onopen.bind(this)),hr(t,"packet",this.onpacket.bind(this)),hr(t,"error",this.onerror.bind(this)),hr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,s,a;if(Iw.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:et.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const c=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},s),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,s)=>{const a=(u,c)=>u?s(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...a)=>(this._queue[0],s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:et.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case et.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case et.EVENT:case et.BINARY_EVENT:this.onevent(t);break;case et.ACK:case et.BINARY_ACK:this.onack(t);break;case et.DISCONNECT:this.ondisconnect();break;case et.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:et.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:et.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Us(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}Us.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},Us.prototype.reset=function(){this.attempts=0},Us.prototype.setMin=function(e){this.ms=e},Us.prototype.setMax=function(e){this.max=e},Us.prototype.setJitter=function(e){this.jitter=e};class Md extends Bt{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,$u(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Us({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||Ow;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new bw(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=hr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=hr(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{s(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(s),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hr(t,"ping",this.onping.bind(this)),hr(t,"data",this.ondata.bind(this)),hr(t,"error",this.onerror.bind(this)),hr(t,"close",this.onclose.bind(this)),hr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){ju(()=>{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 N0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ea={};function Wu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Tw(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=ea[s]&&a in ea[s].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Md(r,t):(ea[s]||(ea[s]=new Md(r,t)),d=ea[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Wu,{Manager:Md,Socket:N0,io:Wu,connect:Wu});var Rw=function(e){return(function(t){return!!t&&typeof t=="object"})(e)&&!(function(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||(function(r){return r.$$typeof===Lw})(t)})(e)},Lw=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ta(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Hs((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Dw(e,t,n){return e.concat(t).map((function(r){return ta(r,n)}))}function k0(e){return Object.keys(e).concat((function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(n){return Object.propertyIsEnumerable.call(t,n)})):[]})(e))}function P0(e,t){try{return t in e}catch(n){return!1}}function Mw(e,t,n){var r={};return n.isMergeableObject(e)&&k0(e).forEach((function(s){r[s]=ta(e[s],n)})),k0(t).forEach((function(s){(function(a,u){return P0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,s)||(P0(e,s)&&n.isMergeableObject(t[s])?r[s]=(function(a,u){if(!u.customMerge)return Hs;var c=u.customMerge(a);return typeof c=="function"?c:Hs})(s,n)(e[s],t[s],n):r[s]=ta(t[s],n))})),r}function Hs(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Dw,n.isMergeableObject=n.isMergeableObject||Rw,n.cloneUnlessOtherwiseSpecified=ta;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Mw(e,t,n):ta(t,n)}Hs.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Hs(n,r,t)}),{})};var Fw=Hs;let Bw=class{constructor(t){Object.assign(this,t)}};function An(e){if(e)return(function(t){for(var n in An.prototype)t[n]=An.prototype[n];return t})(e)}An.prototype.on=An.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},An.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},An.prototype.off=An.prototype.removeListener=An.prototype.removeAllListeners=An.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var s=0;s<r.length;s++)if((n=r[s])===t||n.fn===t){r.splice(s,1);break}return r.length===0&&delete this._callbacks["$"+e],this},An.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var s=(n=n.slice(0)).length;r<s;++r)n[r].apply(this,t)}return this},An.prototype.emitReserved=An.prototype.emit,An.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},An.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Uw=typeof ArrayBuffer=="function",O0=Object.prototype.toString,Hw=typeof Blob=="function"||typeof Blob!="undefined"&&O0.call(Blob)==="[object BlobConstructor]",zw=typeof File=="function"||typeof File!="undefined"&&O0.call(File)==="[object FileConstructor]";function Fd(e){return Uw&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||Hw&&e instanceof Blob||zw&&e instanceof File}function Gu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Gu(e[n]))return!0;return!1}if(Fd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Gu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Gu(e[n]))return!0;return!1}function jw(e){const t=[],n=e.data,r=e;return r.data=Bd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Bd(e,t){if(!e)return e;if(Fd(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Bd(e[r],t);return n}if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Bd(e[r],t));return n}return e}function $w(e,t){return e.data=Ud(e.data,t),delete e.attachments,e}function Ud(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Ud(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Ud(e[n],t));return e}const Vw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var vt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(vt||(vt={}));class qw{constructor(t){this.replacer=t}encode(t){return t.type!==vt.EVENT&&t.type!==vt.ACK||!Gu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===vt.EVENT?vt.BINARY_EVENT:vt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==vt.BINARY_EVENT&&t.type!==vt.BINARY_ACK||(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=jw(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Hd extends An{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===vt.BINARY_EVENT;r||n.type===vt.BINARY_ACK?(n.type=r?vt.EVENT:vt.ACK,this.reconstructor=new Yw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!Fd(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n))}}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(vt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===vt.BINARY_EVENT||r.type===vt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Ww(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(!Hd.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case vt.CONNECT:return I0(n);case vt.DISCONNECT:return n===void 0;case vt.CONNECT_ERROR:return typeof n=="string"||I0(n);case vt.EVENT:case vt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Vw.indexOf(n[0])===-1);case vt.ACK:case vt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Yw{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=$w(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Ww=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function I0(e){return Object.prototype.toString.call(e)==="[object Object]"}const R0=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],L0=(e,t,n)=>function r(s,a=[]){const u=Object.entries(s).map((([c,d])=>{const f=[...a,t(c)];return[e(c),d instanceof Object&&!(n!=null&&n.includes(f.join(".")))?r(d,f):d]}));return Array.isArray(s)?u.map((c=>c[1])):Object.fromEntries(u)},D0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),Gw=L0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),R0),M0=L0(D0,D0,R0),Xw={Encoder:class extends qw{encode(e){var t,n;return super.encode(fe(B({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],Gw(e.data[1])]:((n=e.data)==null?void 0:n.length)==1?[e.data[0]]:typeof e.data=="object"&&e.data!=null?e.data:void 0}))}},Decoder:class extends Hd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?M0(r):r)):n instanceof Object?M0(n):n)):t))}}},Kw={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class Qw{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:s="/copilot",customerId:a,tenantId:u,socketOptions:c={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=m=>{console.log("[Copilot SDK] Connect Ack:",m),this.socket.auth={[this.sessionIdKey]:m.sessionId}},this.handleDisconnect=m=>{console.warn(`[Copilot SDK] Disconnected: ${m}`),m!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${m}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=m=>{console.error(`[Copilot SDK] Connect error: ${m.message}`);const T=m.message.match(/['"]error['"]:\s*['"](\w+)['"]/),y=T==null?void 0:T[1];y&&["InvalidApiKey","InvalidToken","BadRequest"].includes(y)?this.disconnect():this.socket.connected||this.socket.active||(console.log("[Copilot SDK] Retrying connect attempt..."),this.retryConnect())},this.offInternalHandlers=()=>{this.socket.off("connect_ack",this.handleConnectAck),this.socket.off("disconnect",this.handleDisconnect),this.off("connect_error",this.handleConnectError)},t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");const d=`${r}${s}`,f={};t?f["x-cimulate-api-key"]=t:n&&(f.Authorization=`Bearer ${n}`),a&&(f["x-cimulate-customer-id"]=a),u&&(f["Tenant-ID"]=u);const p=[Kw,c,{parser:Xw,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=Wu(d,Fw.all(p))}connect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.offInternalHandlers(),this.on("connect_ack",this.handleConnectAck),this.socket.on("disconnect",this.handleDisconnect),this.on("connect_error",this.handleConnectError),this.socket.auth&&this.sessionIdKey in this.socket.auth&&(this.socket.auth={}),this.socket.connect()}retryConnect(){if(!(this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts))if(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.reconnectAttempts<this.maxReconnectAttempts){const t=Math.min(1e3*Bu(2,this.reconnectAttempts),this.maxReconnectDelay);console.info(`[Copilot SDK] Retry #${this.reconnectAttempts+1} in ${t}ms...`),this.reconnectTimeout=setTimeout((()=>{this.socket.connected||this.socket.active||(this.reconnectAttempts++,this.reconnect())}),t)}else console.error("[Copilot SDK] Max reconnect attempts reached.")}reconnect(){this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts||(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.socket.connect())}browse(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return Ke(this,null,function*(){return this.asyncResponse("faceted_navigation",t,n)})}cancelRequest(t,n){return this.asyncResponse("cancel",t,n)}conversationReset(t,n){return this.asyncResponse("conversation_reset",t,n)}productView(t,n){return Ke(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return Ke(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return Ke(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return Ke(this,null,function*(){return new Promise((r=>{this.socket.emit("conversation_events",t,(s=>{n&&n(s),r(s)}))}))})}on(t,n){return this.socket.on(t,n),n}once(t,n){this.socket.once(t,n)}off(t,n){this.socket.off(t,n)}disconnect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.offInternalHandlers(),this.socket.disconnect()}onDisconnect(t){this.socket.on("disconnect",t)}asyncResponse(t,n,r){return Ke(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let s="";const a=(function(u){return xd(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Qr(u({emit:m=>{c.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Qr(new Promise((m=>{f=m})));for(;c.length>0;)yield c.shift()}finally{yield new Qr(p==null?void 0:p())}})})((({emit:u,cancel:c})=>{const d=(f,p)=>{["done","error"].includes(p.name)&&c(),p.eventSourceId==s&&u(p)};return this.socket.onAny(d),()=>Ke(this,null,function*(){this.socket.offAny(d)})}));return{result:yield new Promise(((u,c)=>this.socket.emit(t,n,(d=>{d.name==="error"?c(new Bw(d)):(s=d==null?void 0:d.id,u(d))})))),events:a}})}}const F0=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),B0=(e,t,n)=>{if(n==="override"&&t.length>0)return t;const r=n==="prepend"?[...t,...e]:[...e,...t];return Array.from(new Set(r))};var F=fr();const Qi=Qe(F);var U0=Symbol.for("immer-nothing"),H0=Symbol.for("immer-draftable"),ot=Symbol.for("immer-state");function er(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var zs=Object.getPrototypeOf;function js(e){return!!e&&!!e[ot]}function Jr(e){var t;return e?z0(e)||Array.isArray(e)||!!e[H0]||!!((t=e.constructor)!=null&&t[H0])||ra(e)||Ku(e):!1}var Jw=Object.prototype.constructor.toString();function z0(e){if(!e||typeof e!="object")return!1;const t=zs(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)===Jw}function na(e,t){Xu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Xu(e){const t=e[ot];return t?t.type_:Array.isArray(e)?1:ra(e)?2:Ku(e)?3:0}function zd(e,t){return Xu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function j0(e,t,n){const r=Xu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Zw(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ra(e){return e instanceof Map}function Ku(e){return e instanceof Set}function Gt(e){return e.copy_||e.base_}function jd(e,t){if(ra(e))return new Map(e);if(Ku(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=z0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[ot];let s=Reflect.ownKeys(r);for(let a=0;a<s.length;a++){const u=s[a],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(zs(e),r)}else{const r=zs(e);if(r!==null&&n)return B({},e);const s=Object.create(r);return Object.assign(s,e)}}function $d(e,t=!1){return Ju(e)||js(e)||!Jr(e)||(Xu(e)>1&&Object.defineProperties(e,{set:{value:Qu},add:{value:Qu},clear:{value:Qu},delete:{value:Qu}}),Object.freeze(e),t&&Object.values(e).forEach(n=>$d(n,!0))),e}function Qu(){er(2)}function Ju(e){return Object.isFrozen(e)}var Vd={};function Ji(e){const t=Vd[e];return t||er(0,e),t}function eA(e,t){Vd[e]||(Vd[e]=t)}var ia;function Zu(){return ia}function tA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function $0(e,t){t&&(Ji("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function qd(e){Yd(e),e.drafts_.forEach(nA),e.drafts_=null}function Yd(e){e===ia&&(ia=e.parent_)}function V0(e){return ia=tA(ia,e)}function nA(e){const t=e[ot];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function q0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ot].modified_&&(qd(t),er(4)),Jr(e)&&(e=el(t,e),t.parent_||tl(t,e)),t.patches_&&Ji("Patches").generateReplacementPatches_(n[ot].base_,e,t.patches_,t.inversePatches_)):e=el(t,n,[]),qd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==U0?e:void 0}function el(e,t,n){if(Ju(t))return t;const r=t[ot];if(!r)return na(t,(s,a)=>Y0(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return tl(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let a=s,u=!1;r.type_===3&&(a=new Set(s),s.clear(),u=!0),na(a,(c,d)=>Y0(e,r,s,c,d,n,u)),tl(e,s,!1),n&&e.patches_&&Ji("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Y0(e,t,n,r,s,a,u){if(js(s)){const c=a&&t&&t.type_!==3&&!zd(t.assigned_,r)?a.concat(r):void 0,d=el(e,s,c);if(j0(n,r,d),js(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Jr(s)&&!Ju(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;el(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(ra(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&tl(e,s)}}function tl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$d(t,n)}function rA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Zu(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=Wd;n&&(s=[r],a=sa);const{revoke:u,proxy:c}=Proxy.revocable(s,a);return r.draft_=c,r.revoke_=u,c}var Wd={get(e,t){if(t===ot)return e;const n=Gt(e);if(!zd(n,t))return iA(e,n,t);const r=n[t];return e.finalized_||!Jr(r)?r:r===Gd(e.base_,t)?(Xd(e),e.copy_[t]=oa(r,e)):r},has(e,t){return t in Gt(e)},ownKeys(e){return Reflect.ownKeys(Gt(e))},set(e,t,n){const r=W0(Gt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Gd(Gt(e),t),a=s==null?void 0:s[ot];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Zw(n,s)&&(n!==void 0||zd(e.base_,t)))return!0;Xd(e),Zr(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Gd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Xd(e),Zr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Gt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){er(11)},getPrototypeOf(e){return zs(e.base_)},setPrototypeOf(){er(12)}},sa={};na(Wd,(e,t)=>{sa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),sa.deleteProperty=function(e,t){return sa.set.call(this,e,t,void 0)},sa.set=function(e,t,n){return Wd.set.call(this,e[0],t,n,e[0])};function Gd(e,t){const n=e[ot];return(n?Gt(n):e)[t]}function iA(e,t,n){var s;const r=W0(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function W0(e,t){if(!(t in e))return;let n=zs(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=zs(n)}}function Zr(e){e.modified_||(e.modified_=!0,e.parent_&&Zr(e.parent_))}function Xd(e){e.copy_||(e.copy_=jd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var sA=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&er(6),r!==void 0&&typeof r!="function"&&er(7);let s;if(Jr(t)){const a=V0(this),u=oa(t,void 0);let c=!0;try{s=n(u),c=!1}finally{c?qd(a):Yd(a)}return $0(a,r),q0(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===U0&&(s=void 0),this.autoFreeze_&&$d(s,!0),r){const a=[],u=[];Ji("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else er(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,s;return[this.produce(t,n,(u,c)=>{r=u,s=c}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Jr(e)||er(8),js(e)&&(e=oA(e));const t=V0(this),n=oa(e,void 0);return n[ot].isManual_=!0,Yd(t),n}finishDraft(e,t){const n=e&&e[ot];(!n||!n.isManual_)&&er(9);const{scope_:r}=n;return $0(r,t),q0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Ji("Patches").applyPatches_;return js(e)?r(e,t):this.produce(e,s=>r(s,t))}};function oa(e,t){const n=ra(e)?Ji("MapSet").proxyMap_(e,t):Ku(e)?Ji("MapSet").proxySet_(e,t):rA(e,t);return(t?t.scope_:Zu()).drafts_.push(n),n}function oA(e){return js(e)||er(10,e),G0(e)}function G0(e){if(!Jr(e)||Ju(e))return e;const t=e[ot];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=jd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=jd(e,!0);return na(n,(r,s)=>{j0(n,r,G0(s))}),t&&(t.finalized_=!1),n}function aA(){class e extends Map{constructor(d,f){super(),this[ot]={type_:2,parent_:f,scope_:f?f.scope_:Zu(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Gt(this[ot]).size}has(d){return Gt(this[ot]).has(d)}set(d,f){const p=this[ot];return u(p),(!Gt(p).has(d)||Gt(p).get(d)!==f)&&(n(p),Zr(p),p.assigned_.set(d,!0),p.copy_.set(d,f),p.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const f=this[ot];return u(f),n(f),Zr(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[ot];u(d),Gt(d).size&&(n(d),Zr(d),d.assigned_=new Map,na(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[ot];Gt(p).forEach((m,T,y)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[ot];u(f);const p=Gt(f).get(d);if(f.finalized_||!Jr(p)||p!==f.base_.get(d))return p;const m=oa(p,f);return n(f),f.copy_.set(d,m),m}keys(){return Gt(this[ot]).keys()}values(){const d=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const f=d.next();return f.done?f:{done:!1,value:this.get(f.value)}}}}entries(){const d=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const f=d.next();if(f.done)return f;const p=this.get(f.value);return{done:!1,value:[f.value,p]}}}}[Symbol.iterator](){return this.entries()}}function t(c,d){return new e(c,d)}function n(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.base_))}class r extends Set{constructor(d,f){super(),this[ot]={type_:3,parent_:f,scope_:f?f.scope_:Zu(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Gt(this[ot]).size}has(d){const f=this[ot];return u(f),f.copy_?!!(f.copy_.has(d)||f.drafts_.has(d)&&f.copy_.has(f.drafts_.get(d))):f.base_.has(d)}add(d){const f=this[ot];return u(f),this.has(d)||(a(f),Zr(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[ot];return u(f),a(f),Zr(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[ot];u(d),Gt(d).size&&(a(d),Zr(d),d.copy_.clear())}values(){const d=this[ot];return u(d),a(d),d.copy_.values()}entries(){const d=this[ot];return u(d),a(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,f){const p=this.values();let m=p.next();for(;!m.done;)d.call(f,m.value,m.value,this),m=p.next()}}function s(c,d){return new r(c,d)}function a(c){c.copy_||(c.copy_=new Set,c.base_.forEach(d=>{if(Jr(d)){const f=oa(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&er(3,JSON.stringify(Gt(c)))}eA("MapSet",{proxyMap_:t,proxySet_:s})}var uA=new sA,lA=uA.produce;function X0(e,t,n){var r=F.useMemo(function(){return lA(e)},[e]);return F.useReducer(r,t,n)}const K0={PAGE_CHANGED:"page-changed",PAGE_SIZE_CHANGED:"page-size-changed",FACET_FILTERS_CHANGED:"facet-filters-changed",RANGE_FILTERS_CHANGED:"range-filters-changed",CATALOG_SEGMENT_CHANGED:"catalog-segment-changed",PRICEBOOKS_CHANGED:"pricebooks-changed"},mt={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",ADD_LOADING_MESSAGE:"ADD_LOADING_MESSAGE",REMOVE_LOADING_MESSAGE:"REMOVE_LOADING_MESSAGE",SET_ACTIVE_CONVERSATION_ID:"SET_ACTIVE_CONVERSATION_ID",ADD_CONVERSATION_ID:"ADD_CONVERSATION_ID",SET_CONVERSATION_IDS:"SET_CONVERSATION_IDS",SET_CONVERSATION_HISTORY_LOADED:"SET_CONVERSATION_HISTORY_LOADED",SET_IMAGE_FILE:"SET_IMAGE_FILE",SET_ASK_CIM_PROMPTS:"SET_ASK_CIM_PROMPTS"},Zi={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},Q0=["ask_cim","search","browse","pdp"],cA=e=>Q0.includes(e),J0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(J0));const dA=new Map(Object.entries(J0).map(([e,t])=>[t,e])),fA=e=>{var t;return(t=dA.get(e))!=null?t:null},$s="cimulate",Kd=`${$s}:pdp-update`,Qd=`${$s}:browse-update`,Jd=`${$s}:search-update`,Zd=`${$s}:ui-state-update`,ef=`${$s}:prompts-state-update`,tf=`${$s}:session-state`,Or=B({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},K0),hA={"browse-context":Or.CONTEXT_UPDATED,categoryId:Or.CATEGORY_ID_CHANGED,categoryName:Or.CATEGORY_NAME_CHANGED,page:Or.PAGE_CHANGED,pageSize:Or.PAGE_SIZE_CHANGED,includeFacets:Or.FACET_FILTERS_CHANGED,facetFilters:Or.FACET_FILTERS_CHANGED,rangeFilters:Or.RANGE_FILTERS_CHANGED,catalogSegment:Or.CATALOG_SEGMENT_CHANGED,pricebooks:Or.PRICEBOOKS_CHANGED},ei=B({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},K0),pA={"search-context":ei.SEARCH_CONTEXT_UPDATED,query:ei.QUERY_CHANGED,page:ei.PAGE_CHANGED,pageSize:ei.PAGE_SIZE_CHANGED,includeFacets:ei.FACET_FILTERS_CHANGED,facetFilters:ei.FACET_FILTERS_CHANGED,rangeFilters:ei.RANGE_FILTERS_CHANGED,catalogSegment:ei.CATALOG_SEGMENT_CHANGED,pricebooks:ei.PRICEBOOKS_CHANGED},H="cim-widget",$n=`--${H}`,Ti={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},mA=(e=Ti)=>({[`${$n}-primary-color`]:e.primaryColor||Ti.primaryColor,[`${$n}-secondary-color`]:e.secondaryColor||Ti.secondaryColor,[`${$n}-font-color`]:e.fontColor||Ti.fontColor,[`${$n}-font-family`]:e.fontFamily||Ti.fontFamily,[`${$n}-background-color`]:e.backgroundColor||Ti.backgroundColor,[`${$n}-border-color`]:e.borderColor||Ti.borderColor,[`${$n}-border-radius`]:e.borderRadius||Ti.borderRadius}),ti={RESET_CONVERSATION:"reset-conversation",END_CONVERSATION:"end-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},Z0=F.createContext(null),eg=F.createContext(null),gt={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"},tg={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,askElseButtonLabel:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null,promptsDisplay:"both",staticQuestions:[],staticQuestionsStrategy:"append",disableAskElseButton:!1};function ng(e,t){return function(){return e.apply(t,arguments)}}const{toString:gA}=Object.prototype,{getPrototypeOf:Vs}=Object,{iterator:aa,toStringTag:rg}=Symbol,nl=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ua=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),nl(n,t))return!0;n=Vs(n)}return!1},EA=(e,t)=>e!=null&&ua(e,t)?e[t]:void 0,nf=(e=>t=>{const n=gA.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),pr=e=>(e=e.toLowerCase(),t=>nf(t)===e),rl=e=>t=>typeof t===e,{isArray:es}=Array,qs=rl("undefined");function Ys(e){return e!==null&&!qs(e)&&e.constructor!==null&&!qs(e.constructor)&&On(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ig=pr("ArrayBuffer");function yA(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ig(e.buffer),t}const bA=rl("string"),On=rl("function"),sg=rl("number"),Ws=e=>e!==null&&typeof e=="object",TA=e=>e===!0||e===!1,il=e=>{if(!Ws(e))return!1;const t=Vs(e);return(t===null||t===Object.prototype||Vs(t)===null)&&!ua(e,rg)&&!ua(e,aa)},_A=e=>{if(!Ws(e)||Ys(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},SA=pr("Date"),xA=pr("File"),wA=e=>!!(e&&typeof e.uri!="undefined"),AA=e=>e&&typeof e.getParts!="undefined",CA=pr("Blob"),vA=pr("FileList"),NA=e=>Ws(e)&&On(e.pipe);function kA(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const og=kA(),ag=typeof og.FormData!="undefined"?og.FormData:void 0,PA=e=>{if(!e)return!1;if(ag&&e instanceof ag)return!0;const t=Vs(e);if(!t||t===Object.prototype||!On(e.append))return!1;const n=nf(e);return n==="formdata"||n==="object"&&On(e.toString)&&e.toString()==="[object FormData]"},OA=pr("URLSearchParams"),[IA,RA,LA,DA]=["ReadableStream","Request","Response","Headers"].map(pr),MA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function la(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),es(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Ys(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 ug(e,t){if(Ys(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const ts=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,lg=e=>!qs(e)&&e!==ts;function rf(...e){const{caseless:t,skipUndefined:n}=lg(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&typeof u=="string"&&ug(r,u)||u,d=nl(r,c)?r[c]:void 0;il(d)&&il(a)?r[c]=rf(d,a):il(a)?r[c]=rf({},a):es(a)?r[c]=a.slice():(!n||!qs(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++){const c=e[a];if(!c||Ys(c)||(la(c,s),typeof c!="object"||es(c)))continue;const d=Object.getOwnPropertySymbols(c);for(let f=0;f<d.length;f++){const p=d[f];GA.call(c,p)&&s(c[p],p)}}return r}const FA=(e,t,n,{allOwnKeys:r}={})=>(la(t,(s,a)=>{n&&On(s)?Object.defineProperty(e,a,{__proto__:null,value:ng(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),BA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),UA=(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)},HA=(e,t,n,r)=>{let s,a,u;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&Vs(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},zA=(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},jA=e=>{if(!e)return null;if(es(e))return e;let t=e.length;if(!sg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},$A=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Vs(Uint8Array)),VA=(e,t)=>{const r=(e&&e[aa]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},qA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},YA=pr("HTMLFormElement"),WA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:GA}=Object.prototype,XA=pr("RegExp"),cg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};la(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},KA=e=>{cg(e,(t,n)=>{if(On(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(On(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},QA=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return es(e)?r(e):r(String(e).split(t)),n},JA=()=>{},ZA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function eC(e){return!!(e&&On(e.append)&&e[rg]==="FormData"&&e[aa])}const tC=e=>{const t=new WeakSet,n=r=>{if(Ws(r)){if(t.has(r))return;if(Ys(r))return r;if(!("toJSON"in r)){t.add(r);const s=es(r)?[]:{};return la(r,(a,u)=>{const c=n(a);!qs(c)&&(s[u]=c)}),t.delete(r),s}}return r};return n(e)},nC=pr("AsyncFunction"),rC=e=>e&&(Ws(e)||On(e))&&On(e.then)&&On(e.catch),dg=((e,t)=>e?setImmediate:t?((n,r)=>(ts.addEventListener("message",({source:s,data:a})=>{s===ts&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),ts.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",On(ts.postMessage)),iC=typeof queueMicrotask!="undefined"?queueMicrotask.bind(ts):typeof process!="undefined"&&process.nextTick||dg,fg=e=>e!=null&&On(e[aa]),$={isArray:es,isArrayBuffer:ig,isBuffer:Ys,isFormData:PA,isArrayBufferView:yA,isString:bA,isNumber:sg,isBoolean:TA,isObject:Ws,isPlainObject:il,isEmptyObject:_A,isReadableStream:IA,isRequest:RA,isResponse:LA,isHeaders:DA,isUndefined:qs,isDate:SA,isFile:xA,isReactNativeBlob:wA,isReactNative:AA,isBlob:CA,isRegExp:XA,isFunction:On,isStream:NA,isURLSearchParams:OA,isTypedArray:$A,isFileList:vA,forEach:la,merge:rf,extend:FA,trim:MA,stripBOM:BA,inherits:UA,toFlatObject:HA,kindOf:nf,kindOfTest:pr,endsWith:zA,toArray:jA,forEachEntry:VA,matchAll:qA,isHTMLForm:YA,hasOwnProperty:nl,hasOwnProp:nl,hasOwnInPrototypeChain:ua,getSafeProp:EA,reduceDescriptors:cg,freezeMethods:KA,toObjectSet:QA,toCamelCase:WA,noop:JA,toFiniteNumber:ZA,findKey:ug,global:ts,isContextDefined:lg,isSpecCompliantForm:eC,toJSONObject:tC,isAsyncFn:nC,isThenable:rC,setImmediate:dg,asap:iC,isIterable:fg,isSafeIterable:e=>e!=null&&ua(e,aa)&&fg(e)},sC=$.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"]),oC=e=>{const t={};let n,r,s;return e&&e.split(`
3
3
  `).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&sC[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function aC(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 uC=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),lC=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function sf(e,t){return $.isArray(e)?e.map(n=>sf(n,t)):aC(String(e).replace(t,""))}const cC=e=>sf(e,uC),dC=e=>sf(e,lC);function hg(e){const t=Object.create(null);return $.forEach(e.toJSON(),(n,r)=>{t[r]=dC(n)}),t}const pg=Symbol("internals");function ca(e){return e&&String(e).trim().toLowerCase()}function sl(e){return e===!1||e==null?e:$.isArray(e)?e.map(sl):cC(String(e))}function fC(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 hC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function of(e,t,n,r,s){if($.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!$.isString(t)){if($.isString(r))return t.indexOf(r)!==-1;if($.isRegExp(r))return r.test(t)}}function pC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function mC(e,t){const n=$.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,a,u){return this[r].call(this,t,s,a,u)},configurable:!0})})}let hn=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(c,d,f){const p=ca(d);if(!p)return;const m=$.findKey(s,p);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||d]=sl(c))}const u=(c,d)=>$.forEach(c,(f,p)=>a(f,p,d));if($.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if($.isString(t)&&(t=t.trim())&&!hC(t))u(oC(t),n);else if($.isObject(t)&&$.isSafeIterable(t)){let c=Object.create(null),d,f;for(const p of t){if(!$.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],$.hasOwnProp(c,f)?(d=c[f],c[f]=$.isArray(d)?[...d,p[1]]:[d,p[1]]):c[f]=p[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=ca(t),t){const r=$.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return fC(s);if($.isFunction(n))return n.call(this,s,r);if($.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ca(t),t){const r=$.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||of(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(u){if(u=ca(u),u){const c=$.findKey(r,u);c&&(!n||of(r,r[c],c,n))&&(delete r[c],s=!0)}}return $.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const a=n[r];(!t||of(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return $.forEach(this,(s,a)=>{const u=$.findKey(r,a);if(u){n[u]=sl(s),delete n[a];return}const c=t?pC(a):String(a).trim();c!==a&&delete n[a],n[c]=sl(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return $.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&$.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
4
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[pg]=this[pg]={accessors:{}}).accessors,s=this.prototype;function a(u){const c=ca(u);r[c]||(mC(s,u),r[c]=!0)}return $.isArray(t)?t.forEach(a):a(t),this}};hn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(hn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),$.freezeMethods(hn);const gC="[REDACTED ****]";function EC(e){if($.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if($.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function yC(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||$.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof hn&&(a=a.toJSON()),r.push(a);let u;if($.isArray(a))u=[],a.forEach((c,d)=>{const f=s(c);$.isUndefined(f)||(u[d]=f)});else{if(!$.isPlainObject(a)&&EC(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?gC:s(d);$.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return s(e)}let _e=class F2 extends Error{static from(t,n,r,s,a,u){const c=new F2(t.message,n||t.code,r,s,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,s,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&$.hasOwnProp(t,"redact")?t.redact:void 0,r=$.isArray(n)&&n.length>0?yC(t,n):$.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};_e.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",_e.ERR_BAD_OPTION="ERR_BAD_OPTION",_e.ECONNABORTED="ECONNABORTED",_e.ETIMEDOUT="ETIMEDOUT",_e.ECONNREFUSED="ECONNREFUSED",_e.ERR_NETWORK="ERR_NETWORK",_e.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",_e.ERR_DEPRECATED="ERR_DEPRECATED",_e.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",_e.ERR_BAD_REQUEST="ERR_BAD_REQUEST",_e.ERR_CANCELED="ERR_CANCELED",_e.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",_e.ERR_INVALID_URL="ERR_INVALID_URL",_e.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const bC=null,mg=100;function af(e){return $.isPlainObject(e)||$.isArray(e)}function gg(e){return $.endsWith(e,"[]")?e.slice(0,-2):e}function uf(e,t,n){return e?e.concat(t).map(function(s,a){return s=gg(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function TC(e){return $.isArray(e)&&!e.some(af)}const _C=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function ol(e,t,n){if(!$.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=$.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(N,C){return!$.isUndefined(C[N])});const r=n.metaTokens,s=n.visitor||_,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?mg:n.maxDepth,f=c&&$.isSpecCompliantForm(t),p=[];if(!$.isFunction(s))throw new TypeError("visitor must be a function");function m(A){if(A===null)return"";if($.isDate(A))return A.toISOString();if($.isBoolean(A))return A.toString();if(!f&&$.isBlob(A))throw new _e("Blob is not supported. Use a Buffer instead.");if($.isArrayBuffer(A)||$.isTypedArray(A)){if(f&&typeof c=="function")return new c([A]);if(typeof Buffer!="undefined")return Buffer.from(A);throw new _e("Blob is not supported. Use a Buffer instead.",_e.ERR_NOT_SUPPORT)}return A}function T(A){if(A>d)throw new _e("Object is too deeply nested ("+A+" levels). Max depth: "+d,_e.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(A,N){if(d===1/0)return JSON.stringify(A);const C=[];return JSON.stringify(A,function(Y,D){if(!$.isObject(D))return D;for(;C.length&&C[C.length-1]!==this;)C.pop();return C.push(D),T(N+C.length-1),D})}function _(A,N,C){let z=A;if($.isReactNative(t)&&$.isReactNativeBlob(A))return t.append(uf(C,N,a),m(A)),!1;if(A&&!C&&typeof A=="object"){if($.endsWith(N,"{}"))N=r?N:N.slice(0,-2),A=y(A,1);else if($.isArray(A)&&TC(A)||($.isFileList(A)||$.endsWith(N,"[]"))&&(z=$.toArray(A)))return N=gg(N),z.forEach(function(D,q){!($.isUndefined(D)||D===null)&&t.append(u===!0?uf([N],q,a):u===null?N:N+"[]",m(D))}),!1}return af(A)?!0:(t.append(uf(C,N,a),m(A)),!1)}const w=Object.assign(_C,{defaultVisitor:_,convertValue:m,isVisitable:af});function v(A,N,C=0){if(!$.isUndefined(A)){if(T(C),p.indexOf(A)!==-1)throw new Error("Circular reference detected in "+N.join("."));p.push(A),$.forEach(A,function(Y,D){(!($.isUndefined(Y)||Y===null)&&s.call(t,Y,$.isString(D)?D.trim():D,N,w))===!0&&v(Y,N?N.concat(D):[D],C+1)}),p.pop()}}if(!$.isObject(e))throw new TypeError("data must be an object");return v(e),t}function Eg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function lf(e,t){this._pairs=[],e&&ol(e,this,t)}const yg=lf.prototype;yg.append=function(t,n){this._pairs.push([t,n])},yg.toString=function(t){const n=t?r=>t.call(this,r,Eg):Eg;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function SC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function bg(e,t,n){if(!t)return e;e=e||"";const r=$.isFunction(n)?{serialize:n}:n,s=$.getSafeProp(r,"encode")||SC,a=$.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=$.isURLSearchParams(t)?t.toString():new lf(t,r).toString(s),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class Tg{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$.forEach(this.handlers,function(r){r!==null&&t(r)})}}const cf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},xC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:lf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},df=typeof window!="undefined"&&typeof document!="undefined",ff=typeof navigator=="object"&&navigator||void 0,wC=df&&(!ff||["ReactNative","NativeScript","NS"].indexOf(ff.product)<0),AC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",CC=df&&window.location.href||"http://localhost",sn=B(B({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:df,hasStandardBrowserEnv:wC,hasStandardBrowserWebWorkerEnv:AC,navigator:ff,origin:CC},Symbol.toStringTag,{value:"Module"}))),xC);function vC(e,t){return ol(e,new sn.classes.URLSearchParams,B({visitor:function(n,r,s,a){return sn.isNode&&$.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const _g=mg;function Sg(e){if(e>_g)throw new _e("FormData field is too deeply nested ("+e+" levels). Max depth: "+_g,_e.ERR_FORM_DATA_DEPTH_EXCEEDED)}function NC(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)Sg(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function kC(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}function xg(e){function t(n,r,s,a){Sg(a);let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&$.isArray(s)?s.length:u,d?($.hasOwnProp(s,u)?s[u]=$.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!c):((!$.hasOwnProp(s,u)||!$.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&$.isArray(s[u])&&(s[u]=kC(s[u])),!c)}if($.isFormData(e)&&$.isFunction(e.entries)){const n={};return $.forEachEntry(e,(r,s)=>{t(NC(r),s,n,0)}),n}return null}const Gs=(e,t)=>e!=null&&$.hasOwnProp(e,t)?e[t]:void 0;function PC(e,t,n){if($.isString(e))try{return(t||JSON.parse)(e),$.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const da={transitional:cf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=$.isObject(t);if(a&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return s?JSON.stringify(xg(t)):t;if($.isArrayBuffer(t)||$.isBuffer(t)||$.isStream(t)||$.isFile(t)||$.isBlob(t)||$.isReadableStream(t))return t;if($.isArrayBufferView(t))return t.buffer;if($.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=Gs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return vC(t,d).toString();if((c=$.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Gs(this,"env"),p=f&&f.FormData;return ol(c?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),PC(t)):t}],transformResponse:[function(t){const n=Gs(this,"transitional")||da.transitional,r=n&&n.forcedJSONParsing,s=Gs(this,"responseType"),a=s==="json";if($.isResponse(t)||$.isReadableStream(t))return t;if(t&&$.isString(t)&&(r&&!s||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Gs(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?_e.from(d,_e.ERR_BAD_RESPONSE,this,null,Gs(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:sn.classes.FormData,Blob:sn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$.forEach(["delete","get","head","post","put","patch","query"],e=>{da.headers[e]={}});function hf(e,t){const n=this||da,r=t||n,s=hn.from(r.headers);let a=r.data;return $.forEach(e,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function wg(e){return!!(e&&e.__CANCEL__)}let fa=class extends _e{constructor(t,n,r){super(t==null?"canceled":t,_e.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Ag(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new _e("Request failed with status code "+n.status,n.status>=400&&n.status<500?_e.ERR_BAD_REQUEST:_e.ERR_BAD_RESPONSE,n.config,n.request,n))}function OC(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function IC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[s]=d,r[s]=f;let m=a,T=0;for(;m!==s;)T+=n[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(T*1e3/y):void 0}}function RC(e,t){let n=0,r=1e3/t,s,a;const u=(f,p=Date.now())=>{n=p,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),m=p-n;m>=r?u(f,p):(s=f,a||(a=setTimeout(()=>{a=null,u(s)},r-m)))},()=>s&&u(s)]}const al=(e,t,n=3)=>{let r=0;const s=IC(50,250);return RC(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,f=Math.max(0,d-r),p=s(f);r=Math.max(r,d);const m={loaded:d,total:c,progress:c?d/c:void 0,bytes:f,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},n)},Cg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},vg=e=>(...t)=>$.asap(()=>e(...t)),LC=sn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,sn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(sn.origin),sn.navigator&&/(msie|trident)/i.test(sn.navigator.userAgent)):()=>!0,DC=sn.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];$.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),$.isString(r)&&c.push(`path=${r}`),$.isString(s)&&c.push(`domain=${s}`),a===!0&&c.push("secure"),$.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===e)try{return decodeURIComponent(r.slice(s+1))}catch(a){return r.slice(s+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function MC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function FC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const BC=/^https?:(?!\/\/)/i,UC=/[\t\n\r]/g;function HC(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function zC(e){return HC(e).replace(UC,"")}function Ng(e,t){if(typeof e=="string"&&BC.test(zC(e)))throw new _e('Invalid URL: missing "//" after protocol',_e.ERR_INVALID_URL,t)}function kg(e,t,n,r){Ng(t,r);let s=!MC(t);return e&&(s||n===!1)?(Ng(e,r),FC(e,t)):t}const Pg=e=>e instanceof hn?B({},e):e;function ns(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,T,y){return $.isPlainObject(p)&&$.isPlainObject(m)?$.merge.call({caseless:y},p,m):$.isPlainObject(m)?$.merge({},m):$.isArray(m)?m.slice():m}function s(p,m,T,y){if($.isUndefined(m)){if(!$.isUndefined(p))return r(void 0,p,T,y)}else return r(p,m,T,y)}function a(p,m){if(!$.isUndefined(m))return r(void 0,m)}function u(p,m){if($.isUndefined(m)){if(!$.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function c(p){const m=$.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!$.isUndefined(m))if($.isPlainObject(m)){if($.hasOwnProp(m,p))return m[p]}else return;const T=$.hasOwnProp(e,"transitional")?e.transitional:void 0;if($.isPlainObject(T)&&$.hasOwnProp(T,p))return T[p]}function d(p,m,T){if($.hasOwnProp(t,T))return r(p,m);if($.hasOwnProp(e,T))return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:d,headers:(p,m,T)=>s(Pg(p),Pg(m),T,!0)};return $.forEach(Object.keys(B(B({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=$.hasOwnProp(f,m)?f[m]:s,y=$.hasOwnProp(e,m)?e[m]:void 0,_=$.hasOwnProp(t,m)?t[m]:void 0,w=T(y,_,m);$.isUndefined(w)&&T!==d||(n[m]=w)}),$.hasOwnProp(t,"validateStatus")&&$.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&($.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const jC=["content-type","content-length"];function $C(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{jC.includes(r.toLowerCase())&&e.set(r,s)})}const VC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Og(e){const t=ns({},e),n=T=>$.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let s=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=c=hn.from(c),t.url=bg(kg(f,m,p,t),n("params"),n("paramsSerializer")),d){const T=$.getSafeProp(d,"username")||"",y=$.getSafeProp(d,"password")||"";try{c.set("Authorization","Basic "+btoa(T+":"+(y?VC(y):"")))}catch(_){throw _e.from(_,_e.ERR_BAD_OPTION_VALUE,e)}}if($.isFormData(r)&&(sn.hasStandardBrowserEnv||sn.hasStandardBrowserWebWorkerEnv||$.isReactNative(r)?c.setContentType(void 0):$.isFunction(r.getHeaders)&&$C(c,r.getHeaders(),n("formDataHeaderPolicy"))),sn.hasStandardBrowserEnv&&($.isFunction(s)&&(s=s(t)),s===!0||s==null&&LC(t.url))){const y=a&&u&&DC.read(u);y&&c.set(a,y)}return t}const qC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=Og(e);let a=s.data;const u=hn.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=s,p,m,T,y,_;function w(){y&&y(),_&&_(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let v=new XMLHttpRequest;v.open(s.method.toUpperCase(),s.url,!0),v.timeout=s.timeout;function A(){if(!v)return;const C=hn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),Y={data:!c||c==="text"||c==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:C,config:e,request:v};Ag(function(q){n(q),w()},function(q){r(q),w()},Y),v=null}"onloadend"in v?v.onloadend=A:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(A)},v.onabort=function(){v&&(r(new _e("Request aborted",_e.ECONNABORTED,e,v)),w(),v=null)},v.onerror=function(z){const Y=z&&z.message?z.message:"Network Error",D=new _e(Y,_e.ERR_NETWORK,e,v);D.event=z||null,r(D),w(),v=null},v.ontimeout=function(){let z=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const Y=s.transitional||cf;s.timeoutErrorMessage&&(z=s.timeoutErrorMessage),r(new _e(z,Y.clarifyTimeoutError?_e.ETIMEDOUT:_e.ECONNABORTED,e,v)),w(),v=null},a===void 0&&u.setContentType(null),"setRequestHeader"in v&&$.forEach(hg(u),function(z,Y){v.setRequestHeader(Y,z)}),$.isUndefined(s.withCredentials)||(v.withCredentials=!!s.withCredentials),c&&c!=="json"&&(v.responseType=s.responseType),f&&([T,_]=al(f,!0),v.addEventListener("progress",T)),d&&v.upload&&([m,y]=al(d),v.upload.addEventListener("progress",m),v.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=C=>{v&&(r(!C||C.type?new fa(null,e,v):C),v.abort(),w(),v=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const N=OC(s.url);if(N&&!sn.protocols.includes(N)){r(new _e("Unsupported protocol "+N+":",_e.ERR_BAD_REQUEST,e)),w();return}v.send(a||null)})},YC=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof _e?f:new fa(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new _e(`timeout of ${t}ms exceeded`,_e.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s,{once:!0}));const{signal:c}=n;return c.unsubscribe=()=>$.asap(u),c},WC=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},GC=function(e,t){return xd(this,null,function*(){try{for(var n=M2(XC(e)),r,s,a;r=!(s=yield new Qr(n.next())).done;r=!1){const u=s.value;yield*c0(WC(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new Qr(s.call(n)))}finally{if(a)throw a[0]}}})},XC=function(e){return xd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*c0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Qr(t.read());if(n)break;yield r}}finally{yield new Qr(t.cancel())}})},Ig=(e,t,n,r)=>{const s=GC(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return Ke(this,null,function*(){try{const{done:p,value:m}=yield s.next();if(p){c(),f.close();return}let T=m.byteLength;if(n){let y=a+=T;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw c(p),p}})},cancel(f){return c(f),s.return()}},{highWaterMark:2})},ul=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,KC=(e,t,n)=>t+2<n&&ul(e.charCodeAt(t+1))&&ul(e.charCodeAt(t+2));function QC(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const c=r.length;for(let y=0;y<c;y++)if(r.charCodeAt(y)===37&&y+2<c){const _=r.charCodeAt(y+1),w=r.charCodeAt(y+2);ul(_)&&ul(w)&&(u-=2,y+=2)}let d=0,f=c-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const T=Math.floor(u/4)*3-(d||0);return T>0?T:0}let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d===37&&KC(r,u,c))a+=1,u+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const pf="1.18.1",Rg=64*1024,{isFunction:ll}=$,JC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Lg=e=>{if(!$.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Dg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},ZC=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},ev=e=>{const t=$.global!==void 0&&$.global!==null?$.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=$.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,c=s?ll(s):typeof fetch=="function",d=ll(a),f=ll(u);if(!c)return!1;const p=c&&ll(n),m=c&&(typeof r=="function"?(A=>N=>A.encode(N))(new r):A=>Ke(null,null,function*(){return new Uint8Array(yield new a(A).arrayBuffer())})),T=d&&p&&Dg(()=>{let A=!1;const N=new a(sn.origin,{body:new n,method:"POST",get duplex(){return A=!0,"half"}}),C=N.headers.has("Content-Type");return N.body!=null&&N.body.cancel(),A&&!C}),y=f&&p&&Dg(()=>$.isReadableStream(new u("").body)),_={stream:y&&(A=>A.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(A=>{!_[A]&&(_[A]=(N,C)=>{let z=N&&N[A];if(z)return z.call(N);throw new _e(`Response type '${A}' is not supported`,_e.ERR_NOT_SUPPORT,C)})});const w=A=>Ke(null,null,function*(){if(A==null)return 0;if($.isBlob(A))return A.size;if($.isSpecCompliantForm(A))return(yield new a(sn.origin,{method:"POST",body:A}).arrayBuffer()).byteLength;if($.isArrayBufferView(A)||$.isArrayBuffer(A))return A.byteLength;if($.isURLSearchParams(A)&&(A=A+""),$.isString(A))return(yield m(A)).byteLength}),v=(A,N)=>Ke(null,null,function*(){const C=$.toFiniteNumber(A.getContentLength());return C==null?w(N):C});return A=>Ke(null,null,function*(){let{url:N,method:C,data:z,signal:Y,cancelToken:D,timeout:q,onDownloadProgress:ne,onUploadProgress:ue,responseType:V,headers:se,withCredentials:pe="same-origin",fetchOptions:ve,maxContentLength:re,maxBodyLength:ae}=Og(A);const xe=$.isNumber(re)&&re>-1,oe=$.isNumber(ae)&&ae>-1,Q=ye=>$.hasOwnProp(A,ye)?A[ye]:void 0;let ie=s||fetch;V=V?(V+"").toLowerCase():"text";let k=YC([Y,D&&D.toAbortSignal()],q),R=null;const ee=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let O,Se=null;const Ue=()=>new _e("Request body larger than maxBodyLength limit",_e.ERR_BAD_REQUEST,A,R);try{let ye;const Le=Q("auth");if(Le){const Ve=$.getSafeProp(Le,"username")||"",Nt=$.getSafeProp(Le,"password")||"";ye={username:Ve,password:Nt}}if(ZC(N)){const Ve=new URL(N,sn.origin);if(!ye&&(Ve.username||Ve.password)){const Nt=Lg(Ve.username),vn=Lg(Ve.password);ye={username:Nt,password:vn}}(Ve.username||Ve.password)&&(Ve.username="",Ve.password="",N=Ve.href)}if(ye&&(se.delete("authorization"),se.set("Authorization","Basic "+btoa(JC((ye.username||"")+":"+(ye.password||""))))),xe&&typeof N=="string"&&N.startsWith("data:")&&QC(N)>re)throw new _e("maxContentLength size of "+re+" exceeded",_e.ERR_BAD_RESPONSE,A,R);if(oe&&C!=="get"&&C!=="head"){const Ve=yield w(z);if(typeof Ve=="number"&&isFinite(Ve)&&(O=Ve,Ve>ae))throw Ue()}const He=oe&&($.isReadableStream(z)||$.isStream(z)),Ye=(Ve,Nt,vn)=>Ig(Ve,Rg,an=>{if(oe&&an>ae)throw Se=Ue();Nt&&Nt(an)},vn);if(T&&C!=="get"&&C!=="head"&&(ue||He)){if(O=O==null?yield v(se,z):O,O!==0||He){let Ve=new a(N,{method:"POST",body:z,duplex:"half"}),Nt;if($.isFormData(z)&&(Nt=Ve.headers.get("content-type"))&&se.setContentType(Nt),Ve.body){const[vn,an]=ue&&Cg(O,al(vg(ue)))||[];z=Ye(Ve.body,vn,an)}}}else if(He&&!d&&p&&C!=="get"&&C!=="head")z=Ye(z);else if(He&&d&&!T&&C!=="get"&&C!=="head")throw new _e("Stream request bodies are not supported by the current fetch implementation",_e.ERR_NOT_SUPPORT,A,R);$.isString(pe)||(pe=pe?"include":"omit");const ht=d&&"credentials"in a.prototype;if($.isFormData(z)){const Ve=se.getContentType();Ve&&/^multipart\/form-data/i.test(Ve)&&!/boundary=/i.test(Ve)&&se.delete("content-type")}se.set("User-Agent","axios/"+pf,!1);const Vt=fe(B({},ve),{signal:k,method:C.toUpperCase(),headers:hg(se.normalize()),body:z,duplex:"half",credentials:ht?pe:void 0});R=d&&new a(N,Vt);let on=yield d?ie(R,ve):ie(N,Vt);const _r=hn.from(on.headers);if(xe){const Ve=$.toFiniteNumber(_r.getContentLength());if(Ve!=null&&Ve>re)throw new _e("maxContentLength size of "+re+" exceeded",_e.ERR_BAD_RESPONSE,A,R)}const sr=y&&(V==="stream"||V==="response");if(y&&on.body&&(ne||xe||sr&&ee)){const Ve={};["status","statusText","headers"].forEach(Pe=>{Ve[Pe]=on[Pe]});const Nt=$.toFiniteNumber(_r.getContentLength()),[vn,an]=ne&&Cg(Nt,al(vg(ne),!0))||[];let Fn=0;const we=Pe=>{if(xe&&(Fn=Pe,Fn>re))throw new _e("maxContentLength size of "+re+" exceeded",_e.ERR_BAD_RESPONSE,A,R);vn&&vn(Pe)};on=new u(Ig(on.body,Rg,we,()=>{an&&an(),ee&&ee()}),Ve)}V=V||"text";let Zt=yield _[$.findKey(_,V)||"text"](on,A);if(xe&&!y&&!sr){let Ve;if(Zt!=null&&(typeof Zt.byteLength=="number"?Ve=Zt.byteLength:typeof Zt.size=="number"?Ve=Zt.size:typeof Zt=="string"&&(Ve=typeof r=="function"?new r().encode(Zt).byteLength:Zt.length)),typeof Ve=="number"&&Ve>re)throw new _e("maxContentLength size of "+re+" exceeded",_e.ERR_BAD_RESPONSE,A,R)}return!sr&&ee&&ee(),yield new Promise((Ve,Nt)=>{Ag(Ve,Nt,{data:Zt,headers:hn.from(on.headers),status:on.status,statusText:on.statusText,config:A,request:R})})}catch(ye){if(ee&&ee(),k&&k.aborted&&k.reason instanceof _e){const Le=k.reason;throw Le.config=A,R&&(Le.request=R),ye!==Le&&Object.defineProperty(Le,"cause",{__proto__:null,value:ye,writable:!0,enumerable:!1,configurable:!0}),Le}if(Se)throw R&&!Se.request&&(Se.request=R),Se;if(ye instanceof _e)throw R&&!ye.request&&(ye.request=R),ye;if(ye&&ye.name==="TypeError"&&/Load failed|fetch/i.test(ye.message)){const Le=new _e("Network Error",_e.ERR_NETWORK,A,R,ye&&ye.response);throw Object.defineProperty(Le,"cause",{__proto__:null,value:ye.cause||ye,writable:!0,enumerable:!1,configurable:!0}),Le}throw _e.from(ye,ye&&ye.code,A,R,ye&&ye.response)}})},tv=new Map,Mg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let u=a.length,c=u,d,f,p=tv;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:ev(t)),p=f;return f};Mg();const mf={http:bC,xhr:qC,fetch:{get:Mg}};$.forEach(mf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Fg=e=>`- ${e}`,nv=e=>$.isFunction(e)||e===null||e===!1;function rv(e,t){e=$.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(s=r,!nv(r)&&(s=mf[(c=String(r)).toLowerCase()],s===void 0))throw new _e(`Unknown adapter '${c}'`);if(s&&($.isFunction(s)||(s=s.get(t))))break;a[c||"#"+u]=s}if(!s){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
4
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[pg]=this[pg]={accessors:{}}).accessors,s=this.prototype;function a(u){const c=ca(u);r[c]||(mC(s,u),r[c]=!0)}return $.isArray(t)?t.forEach(a):a(t),this}};hn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(hn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),$.freezeMethods(hn);const gC="[REDACTED ****]";function EC(e){if($.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if($.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function yC(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||$.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof hn&&(a=a.toJSON()),r.push(a);let u;if($.isArray(a))u=[],a.forEach((c,d)=>{const f=s(c);$.isUndefined(f)||(u[d]=f)});else{if(!$.isPlainObject(a)&&EC(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?gC:s(d);$.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return s(e)}let Se=class F2 extends Error{static from(t,n,r,s,a,u){const c=new F2(t.message,n||t.code,r,s,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,s,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&$.hasOwnProp(t,"redact")?t.redact:void 0,r=$.isArray(n)&&n.length>0?yC(t,n):$.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Se.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Se.ERR_BAD_OPTION="ERR_BAD_OPTION",Se.ECONNABORTED="ECONNABORTED",Se.ETIMEDOUT="ETIMEDOUT",Se.ECONNREFUSED="ECONNREFUSED",Se.ERR_NETWORK="ERR_NETWORK",Se.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Se.ERR_DEPRECATED="ERR_DEPRECATED",Se.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Se.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Se.ERR_CANCELED="ERR_CANCELED",Se.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Se.ERR_INVALID_URL="ERR_INVALID_URL",Se.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const bC=null,mg=100;function af(e){return $.isPlainObject(e)||$.isArray(e)}function gg(e){return $.endsWith(e,"[]")?e.slice(0,-2):e}function uf(e,t,n){return e?e.concat(t).map(function(s,a){return s=gg(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function TC(e){return $.isArray(e)&&!e.some(af)}const _C=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function ol(e,t,n){if(!$.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=$.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,C){return!$.isUndefined(C[k])});const r=n.metaTokens,s=n.visitor||_,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?mg:n.maxDepth,f=c&&$.isSpecCompliantForm(t),p=[];if(!$.isFunction(s))throw new TypeError("visitor must be a function");function m(A){if(A===null)return"";if($.isDate(A))return A.toISOString();if($.isBoolean(A))return A.toString();if(!f&&$.isBlob(A))throw new Se("Blob is not supported. Use a Buffer instead.");if($.isArrayBuffer(A)||$.isTypedArray(A)){if(f&&typeof c=="function")return new c([A]);if(typeof Buffer!="undefined")return Buffer.from(A);throw new Se("Blob is not supported. Use a Buffer instead.",Se.ERR_NOT_SUPPORT)}return A}function T(A){if(A>d)throw new Se("Object is too deeply nested ("+A+" levels). Max depth: "+d,Se.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(A,k){if(d===1/0)return JSON.stringify(A);const C=[];return JSON.stringify(A,function(Y,D){if(!$.isObject(D))return D;for(;C.length&&C[C.length-1]!==this;)C.pop();return C.push(D),T(k+C.length-1),D})}function _(A,k,C){let z=A;if($.isReactNative(t)&&$.isReactNativeBlob(A))return t.append(uf(C,k,a),m(A)),!1;if(A&&!C&&typeof A=="object"){if($.endsWith(k,"{}"))k=r?k:k.slice(0,-2),A=y(A,1);else if($.isArray(A)&&TC(A)||($.isFileList(A)||$.endsWith(k,"[]"))&&(z=$.toArray(A)))return k=gg(k),z.forEach(function(D,q){!($.isUndefined(D)||D===null)&&t.append(u===!0?uf([k],q,a):u===null?k:k+"[]",m(D))}),!1}return af(A)?!0:(t.append(uf(C,k,a),m(A)),!1)}const w=Object.assign(_C,{defaultVisitor:_,convertValue:m,isVisitable:af});function v(A,k,C=0){if(!$.isUndefined(A)){if(T(C),p.indexOf(A)!==-1)throw new Error("Circular reference detected in "+k.join("."));p.push(A),$.forEach(A,function(Y,D){(!($.isUndefined(Y)||Y===null)&&s.call(t,Y,$.isString(D)?D.trim():D,k,w))===!0&&v(Y,k?k.concat(D):[D],C+1)}),p.pop()}}if(!$.isObject(e))throw new TypeError("data must be an object");return v(e),t}function Eg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function lf(e,t){this._pairs=[],e&&ol(e,this,t)}const yg=lf.prototype;yg.append=function(t,n){this._pairs.push([t,n])},yg.toString=function(t){const n=t?r=>t.call(this,r,Eg):Eg;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function SC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function bg(e,t,n){if(!t)return e;e=e||"";const r=$.isFunction(n)?{serialize:n}:n,s=$.getSafeProp(r,"encode")||SC,a=$.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=$.isURLSearchParams(t)?t.toString():new lf(t,r).toString(s),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class Tg{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$.forEach(this.handlers,function(r){r!==null&&t(r)})}}const cf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},xC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:lf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},df=typeof window!="undefined"&&typeof document!="undefined",ff=typeof navigator=="object"&&navigator||void 0,wC=df&&(!ff||["ReactNative","NativeScript","NS"].indexOf(ff.product)<0),AC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",CC=df&&window.location.href||"http://localhost",sn=B(B({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:df,hasStandardBrowserEnv:wC,hasStandardBrowserWebWorkerEnv:AC,navigator:ff,origin:CC},Symbol.toStringTag,{value:"Module"}))),xC);function vC(e,t){return ol(e,new sn.classes.URLSearchParams,B({visitor:function(n,r,s,a){return sn.isNode&&$.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const _g=mg;function Sg(e){if(e>_g)throw new Se("FormData field is too deeply nested ("+e+" levels). Max depth: "+_g,Se.ERR_FORM_DATA_DEPTH_EXCEEDED)}function NC(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)Sg(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function kC(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}function xg(e){function t(n,r,s,a){Sg(a);let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&$.isArray(s)?s.length:u,d?($.hasOwnProp(s,u)?s[u]=$.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!c):((!$.hasOwnProp(s,u)||!$.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&$.isArray(s[u])&&(s[u]=kC(s[u])),!c)}if($.isFormData(e)&&$.isFunction(e.entries)){const n={};return $.forEachEntry(e,(r,s)=>{t(NC(r),s,n,0)}),n}return null}const Gs=(e,t)=>e!=null&&$.hasOwnProp(e,t)?e[t]:void 0;function PC(e,t,n){if($.isString(e))try{return(t||JSON.parse)(e),$.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const da={transitional:cf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=$.isObject(t);if(a&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return s?JSON.stringify(xg(t)):t;if($.isArrayBuffer(t)||$.isBuffer(t)||$.isStream(t)||$.isFile(t)||$.isBlob(t)||$.isReadableStream(t))return t;if($.isArrayBufferView(t))return t.buffer;if($.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=Gs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return vC(t,d).toString();if((c=$.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Gs(this,"env"),p=f&&f.FormData;return ol(c?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),PC(t)):t}],transformResponse:[function(t){const n=Gs(this,"transitional")||da.transitional,r=n&&n.forcedJSONParsing,s=Gs(this,"responseType"),a=s==="json";if($.isResponse(t)||$.isReadableStream(t))return t;if(t&&$.isString(t)&&(r&&!s||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Gs(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Se.from(d,Se.ERR_BAD_RESPONSE,this,null,Gs(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:sn.classes.FormData,Blob:sn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$.forEach(["delete","get","head","post","put","patch","query"],e=>{da.headers[e]={}});function hf(e,t){const n=this||da,r=t||n,s=hn.from(r.headers);let a=r.data;return $.forEach(e,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function wg(e){return!!(e&&e.__CANCEL__)}let fa=class extends Se{constructor(t,n,r){super(t==null?"canceled":t,Se.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Ag(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Se("Request failed with status code "+n.status,n.status>=400&&n.status<500?Se.ERR_BAD_REQUEST:Se.ERR_BAD_RESPONSE,n.config,n.request,n))}function OC(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function IC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[s]=d,r[s]=f;let m=a,T=0;for(;m!==s;)T+=n[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(T*1e3/y):void 0}}function RC(e,t){let n=0,r=1e3/t,s,a;const u=(f,p=Date.now())=>{n=p,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),m=p-n;m>=r?u(f,p):(s=f,a||(a=setTimeout(()=>{a=null,u(s)},r-m)))},()=>s&&u(s)]}const al=(e,t,n=3)=>{let r=0;const s=IC(50,250);return RC(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,f=Math.max(0,d-r),p=s(f);r=Math.max(r,d);const m={loaded:d,total:c,progress:c?d/c:void 0,bytes:f,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},n)},Cg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},vg=e=>(...t)=>$.asap(()=>e(...t)),LC=sn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,sn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(sn.origin),sn.navigator&&/(msie|trident)/i.test(sn.navigator.userAgent)):()=>!0,DC=sn.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];$.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),$.isString(r)&&c.push(`path=${r}`),$.isString(s)&&c.push(`domain=${s}`),a===!0&&c.push("secure"),$.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===e)try{return decodeURIComponent(r.slice(s+1))}catch(a){return r.slice(s+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function MC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function FC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const BC=/^https?:(?!\/\/)/i,UC=/[\t\n\r]/g;function HC(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function zC(e){return HC(e).replace(UC,"")}function Ng(e,t){if(typeof e=="string"&&BC.test(zC(e)))throw new Se('Invalid URL: missing "//" after protocol',Se.ERR_INVALID_URL,t)}function kg(e,t,n,r){Ng(t,r);let s=!MC(t);return e&&(s||n===!1)?(Ng(e,r),FC(e,t)):t}const Pg=e=>e instanceof hn?B({},e):e;function ns(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,T,y){return $.isPlainObject(p)&&$.isPlainObject(m)?$.merge.call({caseless:y},p,m):$.isPlainObject(m)?$.merge({},m):$.isArray(m)?m.slice():m}function s(p,m,T,y){if($.isUndefined(m)){if(!$.isUndefined(p))return r(void 0,p,T,y)}else return r(p,m,T,y)}function a(p,m){if(!$.isUndefined(m))return r(void 0,m)}function u(p,m){if($.isUndefined(m)){if(!$.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function c(p){const m=$.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!$.isUndefined(m))if($.isPlainObject(m)){if($.hasOwnProp(m,p))return m[p]}else return;const T=$.hasOwnProp(e,"transitional")?e.transitional:void 0;if($.isPlainObject(T)&&$.hasOwnProp(T,p))return T[p]}function d(p,m,T){if($.hasOwnProp(t,T))return r(p,m);if($.hasOwnProp(e,T))return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:d,headers:(p,m,T)=>s(Pg(p),Pg(m),T,!0)};return $.forEach(Object.keys(B(B({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=$.hasOwnProp(f,m)?f[m]:s,y=$.hasOwnProp(e,m)?e[m]:void 0,_=$.hasOwnProp(t,m)?t[m]:void 0,w=T(y,_,m);$.isUndefined(w)&&T!==d||(n[m]=w)}),$.hasOwnProp(t,"validateStatus")&&$.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&($.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const jC=["content-type","content-length"];function $C(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{jC.includes(r.toLowerCase())&&e.set(r,s)})}const VC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Og(e){const t=ns({},e),n=T=>$.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let s=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=c=hn.from(c),t.url=bg(kg(f,m,p,t),n("params"),n("paramsSerializer")),d){const T=$.getSafeProp(d,"username")||"",y=$.getSafeProp(d,"password")||"";try{c.set("Authorization","Basic "+btoa(T+":"+(y?VC(y):"")))}catch(_){throw Se.from(_,Se.ERR_BAD_OPTION_VALUE,e)}}if($.isFormData(r)&&(sn.hasStandardBrowserEnv||sn.hasStandardBrowserWebWorkerEnv||$.isReactNative(r)?c.setContentType(void 0):$.isFunction(r.getHeaders)&&$C(c,r.getHeaders(),n("formDataHeaderPolicy"))),sn.hasStandardBrowserEnv&&($.isFunction(s)&&(s=s(t)),s===!0||s==null&&LC(t.url))){const y=a&&u&&DC.read(u);y&&c.set(a,y)}return t}const qC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=Og(e);let a=s.data;const u=hn.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=s,p,m,T,y,_;function w(){y&&y(),_&&_(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let v=new XMLHttpRequest;v.open(s.method.toUpperCase(),s.url,!0),v.timeout=s.timeout;function A(){if(!v)return;const C=hn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),Y={data:!c||c==="text"||c==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:C,config:e,request:v};Ag(function(q){n(q),w()},function(q){r(q),w()},Y),v=null}"onloadend"in v?v.onloadend=A:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(A)},v.onabort=function(){v&&(r(new Se("Request aborted",Se.ECONNABORTED,e,v)),w(),v=null)},v.onerror=function(z){const Y=z&&z.message?z.message:"Network Error",D=new Se(Y,Se.ERR_NETWORK,e,v);D.event=z||null,r(D),w(),v=null},v.ontimeout=function(){let z=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const Y=s.transitional||cf;s.timeoutErrorMessage&&(z=s.timeoutErrorMessage),r(new Se(z,Y.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,e,v)),w(),v=null},a===void 0&&u.setContentType(null),"setRequestHeader"in v&&$.forEach(hg(u),function(z,Y){v.setRequestHeader(Y,z)}),$.isUndefined(s.withCredentials)||(v.withCredentials=!!s.withCredentials),c&&c!=="json"&&(v.responseType=s.responseType),f&&([T,_]=al(f,!0),v.addEventListener("progress",T)),d&&v.upload&&([m,y]=al(d),v.upload.addEventListener("progress",m),v.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=C=>{v&&(r(!C||C.type?new fa(null,e,v):C),v.abort(),w(),v=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const k=OC(s.url);if(k&&!sn.protocols.includes(k)){r(new Se("Unsupported protocol "+k+":",Se.ERR_BAD_REQUEST,e)),w();return}v.send(a||null)})},YC=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof Se?f:new fa(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new Se(`timeout of ${t}ms exceeded`,Se.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s,{once:!0}));const{signal:c}=n;return c.unsubscribe=()=>$.asap(u),c},WC=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},GC=function(e,t){return xd(this,null,function*(){try{for(var n=M2(XC(e)),r,s,a;r=!(s=yield new Qr(n.next())).done;r=!1){const u=s.value;yield*c0(WC(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new Qr(s.call(n)))}finally{if(a)throw a[0]}}})},XC=function(e){return xd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*c0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Qr(t.read());if(n)break;yield r}}finally{yield new Qr(t.cancel())}})},Ig=(e,t,n,r)=>{const s=GC(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return Ke(this,null,function*(){try{const{done:p,value:m}=yield s.next();if(p){c(),f.close();return}let T=m.byteLength;if(n){let y=a+=T;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw c(p),p}})},cancel(f){return c(f),s.return()}},{highWaterMark:2})},ul=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,KC=(e,t,n)=>t+2<n&&ul(e.charCodeAt(t+1))&&ul(e.charCodeAt(t+2));function QC(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const c=r.length;for(let y=0;y<c;y++)if(r.charCodeAt(y)===37&&y+2<c){const _=r.charCodeAt(y+1),w=r.charCodeAt(y+2);ul(_)&&ul(w)&&(u-=2,y+=2)}let d=0,f=c-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const T=Math.floor(u/4)*3-(d||0);return T>0?T:0}let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d===37&&KC(r,u,c))a+=1,u+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const pf="1.18.1",Rg=64*1024,{isFunction:ll}=$,JC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Lg=e=>{if(!$.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Dg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},ZC=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},ev=e=>{const t=$.global!==void 0&&$.global!==null?$.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=$.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,c=s?ll(s):typeof fetch=="function",d=ll(a),f=ll(u);if(!c)return!1;const p=c&&ll(n),m=c&&(typeof r=="function"?(A=>k=>A.encode(k))(new r):A=>Ke(null,null,function*(){return new Uint8Array(yield new a(A).arrayBuffer())})),T=d&&p&&Dg(()=>{let A=!1;const k=new a(sn.origin,{body:new n,method:"POST",get duplex(){return A=!0,"half"}}),C=k.headers.has("Content-Type");return k.body!=null&&k.body.cancel(),A&&!C}),y=f&&p&&Dg(()=>$.isReadableStream(new u("").body)),_={stream:y&&(A=>A.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(A=>{!_[A]&&(_[A]=(k,C)=>{let z=k&&k[A];if(z)return z.call(k);throw new Se(`Response type '${A}' is not supported`,Se.ERR_NOT_SUPPORT,C)})});const w=A=>Ke(null,null,function*(){if(A==null)return 0;if($.isBlob(A))return A.size;if($.isSpecCompliantForm(A))return(yield new a(sn.origin,{method:"POST",body:A}).arrayBuffer()).byteLength;if($.isArrayBufferView(A)||$.isArrayBuffer(A))return A.byteLength;if($.isURLSearchParams(A)&&(A=A+""),$.isString(A))return(yield m(A)).byteLength}),v=(A,k)=>Ke(null,null,function*(){const C=$.toFiniteNumber(A.getContentLength());return C==null?w(k):C});return A=>Ke(null,null,function*(){let{url:k,method:C,data:z,signal:Y,cancelToken:D,timeout:q,onDownloadProgress:ne,onUploadProgress:ue,responseType:V,headers:se,withCredentials:pe="same-origin",fetchOptions:ve,maxContentLength:re,maxBodyLength:ae}=Og(A);const xe=$.isNumber(re)&&re>-1,oe=$.isNumber(ae)&&ae>-1,Q=ye=>$.hasOwnProp(A,ye)?A[ye]:void 0;let ie=s||fetch;V=V?(V+"").toLowerCase():"text";let N=YC([Y,D&&D.toAbortSignal()],q),L=null;const J=N&&N.unsubscribe&&(()=>{N.unsubscribe()});let I,Te=null;const He=()=>new Se("Request body larger than maxBodyLength limit",Se.ERR_BAD_REQUEST,A,L);try{let ye;const Le=Q("auth");if(Le){const Ve=$.getSafeProp(Le,"username")||"",Nt=$.getSafeProp(Le,"password")||"";ye={username:Ve,password:Nt}}if(ZC(k)){const Ve=new URL(k,sn.origin);if(!ye&&(Ve.username||Ve.password)){const Nt=Lg(Ve.username),vn=Lg(Ve.password);ye={username:Nt,password:vn}}(Ve.username||Ve.password)&&(Ve.username="",Ve.password="",k=Ve.href)}if(ye&&(se.delete("authorization"),se.set("Authorization","Basic "+btoa(JC((ye.username||"")+":"+(ye.password||""))))),xe&&typeof k=="string"&&k.startsWith("data:")&&QC(k)>re)throw new Se("maxContentLength size of "+re+" exceeded",Se.ERR_BAD_RESPONSE,A,L);if(oe&&C!=="get"&&C!=="head"){const Ve=yield w(z);if(typeof Ve=="number"&&isFinite(Ve)&&(I=Ve,Ve>ae))throw He()}const Be=oe&&($.isReadableStream(z)||$.isStream(z)),Ge=(Ve,Nt,vn)=>Ig(Ve,Rg,an=>{if(oe&&an>ae)throw Te=He();Nt&&Nt(an)},vn);if(T&&C!=="get"&&C!=="head"&&(ue||Be)){if(I=I==null?yield v(se,z):I,I!==0||Be){let Ve=new a(k,{method:"POST",body:z,duplex:"half"}),Nt;if($.isFormData(z)&&(Nt=Ve.headers.get("content-type"))&&se.setContentType(Nt),Ve.body){const[vn,an]=ue&&Cg(I,al(vg(ue)))||[];z=Ge(Ve.body,vn,an)}}}else if(Be&&!d&&p&&C!=="get"&&C!=="head")z=Ge(z);else if(Be&&d&&!T&&C!=="get"&&C!=="head")throw new Se("Stream request bodies are not supported by the current fetch implementation",Se.ERR_NOT_SUPPORT,A,L);$.isString(pe)||(pe=pe?"include":"omit");const at=d&&"credentials"in a.prototype;if($.isFormData(z)){const Ve=se.getContentType();Ve&&/^multipart\/form-data/i.test(Ve)&&!/boundary=/i.test(Ve)&&se.delete("content-type")}se.set("User-Agent","axios/"+pf,!1);const on=fe(B({},ve),{signal:N,method:C.toUpperCase(),headers:hg(se.normalize()),body:z,duplex:"half",credentials:at?pe:void 0});L=d&&new a(k,on);let Dt=yield d?ie(L,ve):ie(k,on);const _r=hn.from(Dt.headers);if(xe){const Ve=$.toFiniteNumber(_r.getContentLength());if(Ve!=null&&Ve>re)throw new Se("maxContentLength size of "+re+" exceeded",Se.ERR_BAD_RESPONSE,A,L)}const sr=y&&(V==="stream"||V==="response");if(y&&Dt.body&&(ne||xe||sr&&J)){const Ve={};["status","statusText","headers"].forEach(Pe=>{Ve[Pe]=Dt[Pe]});const Nt=$.toFiniteNumber(_r.getContentLength()),[vn,an]=ne&&Cg(Nt,al(vg(ne),!0))||[];let Fn=0;const we=Pe=>{if(xe&&(Fn=Pe,Fn>re))throw new Se("maxContentLength size of "+re+" exceeded",Se.ERR_BAD_RESPONSE,A,L);vn&&vn(Pe)};Dt=new u(Ig(Dt.body,Rg,we,()=>{an&&an(),J&&J()}),Ve)}V=V||"text";let Zt=yield _[$.findKey(_,V)||"text"](Dt,A);if(xe&&!y&&!sr){let Ve;if(Zt!=null&&(typeof Zt.byteLength=="number"?Ve=Zt.byteLength:typeof Zt.size=="number"?Ve=Zt.size:typeof Zt=="string"&&(Ve=typeof r=="function"?new r().encode(Zt).byteLength:Zt.length)),typeof Ve=="number"&&Ve>re)throw new Se("maxContentLength size of "+re+" exceeded",Se.ERR_BAD_RESPONSE,A,L)}return!sr&&J&&J(),yield new Promise((Ve,Nt)=>{Ag(Ve,Nt,{data:Zt,headers:hn.from(Dt.headers),status:Dt.status,statusText:Dt.statusText,config:A,request:L})})}catch(ye){if(J&&J(),N&&N.aborted&&N.reason instanceof Se){const Le=N.reason;throw Le.config=A,L&&(Le.request=L),ye!==Le&&Object.defineProperty(Le,"cause",{__proto__:null,value:ye,writable:!0,enumerable:!1,configurable:!0}),Le}if(Te)throw L&&!Te.request&&(Te.request=L),Te;if(ye instanceof Se)throw L&&!ye.request&&(ye.request=L),ye;if(ye&&ye.name==="TypeError"&&/Load failed|fetch/i.test(ye.message)){const Le=new Se("Network Error",Se.ERR_NETWORK,A,L,ye&&ye.response);throw Object.defineProperty(Le,"cause",{__proto__:null,value:ye.cause||ye,writable:!0,enumerable:!1,configurable:!0}),Le}throw Se.from(ye,ye&&ye.code,A,L,ye&&ye.response)}})},tv=new Map,Mg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let u=a.length,c=u,d,f,p=tv;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:ev(t)),p=f;return f};Mg();const mf={http:bC,xhr:qC,fetch:{get:Mg}};$.forEach(mf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Fg=e=>`- ${e}`,nv=e=>$.isFunction(e)||e===null||e===!1;function rv(e,t){e=$.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(s=r,!nv(r)&&(s=mf[(c=String(r)).toLowerCase()],s===void 0))throw new Se(`Unknown adapter '${c}'`);if(s&&($.isFunction(s)||(s=s.get(t))))break;a[c||"#"+u]=s}if(!s){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
5
5
  `+u.map(Fg).join(`
6
- `):" "+Fg(u[0]):"as no adapter specified";throw new _e("There is no suitable adapter to dispatch the request "+c,_e.ERR_NOT_SUPPORT)}return s}const Bg={getAdapter:rv,adapters:mf};function gf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new fa(null,e)}function Ug(e){return gf(e),e.headers=hn.from(e.headers),e.data=hf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Bg.getAdapter(e.adapter||da.adapter,e)(e).then(function(r){gf(e),e.response=r;try{r.data=hf.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=hn.from(r.headers),r},function(r){if(!wg(r)&&(gf(e),r&&r.response)){e.response=r.response;try{r.response.data=hf.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=hn.from(r.response.headers)}return Promise.reject(r)})}const cl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{cl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Hg={};cl.transitional=function(t,n,r){function s(a,u){return"[Axios v"+pf+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new _e(s(u," has been removed"+(n?" in "+n:"")),_e.ERR_DEPRECATED);return n&&!Hg[u]&&(Hg[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},cl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function iv(e,t,n){if(typeof e!="object"||e===null)throw new _e("options must be an object",_e.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new _e("option "+a+" must be "+d,_e.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new _e("Unknown option "+a,_e.ERR_BAD_OPTION)}}const dl={assertOptions:iv,validators:cl},pn=dl.validators;let rs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Tg,response:new Tg}}request(t,n){return Ke(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=(()=>{if(!s.stack)return"";const u=s.stack.indexOf(`
6
+ `):" "+Fg(u[0]):"as no adapter specified";throw new Se("There is no suitable adapter to dispatch the request "+c,Se.ERR_NOT_SUPPORT)}return s}const Bg={getAdapter:rv,adapters:mf};function gf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new fa(null,e)}function Ug(e){return gf(e),e.headers=hn.from(e.headers),e.data=hf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Bg.getAdapter(e.adapter||da.adapter,e)(e).then(function(r){gf(e),e.response=r;try{r.data=hf.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=hn.from(r.headers),r},function(r){if(!wg(r)&&(gf(e),r&&r.response)){e.response=r.response;try{r.response.data=hf.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=hn.from(r.response.headers)}return Promise.reject(r)})}const cl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{cl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Hg={};cl.transitional=function(t,n,r){function s(a,u){return"[Axios v"+pf+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new Se(s(u," has been removed"+(n?" in "+n:"")),Se.ERR_DEPRECATED);return n&&!Hg[u]&&(Hg[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},cl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function iv(e,t,n){if(typeof e!="object"||e===null)throw new Se("options must be an object",Se.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new Se("option "+a+" must be "+d,Se.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Se("Unknown option "+a,Se.ERR_BAD_OPTION)}}const dl={assertOptions:iv,validators:cl},pn=dl.validators;let rs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Tg,response:new Tg}}request(t,n){return Ke(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=(()=>{if(!s.stack)return"";const u=s.stack.indexOf(`
7
7
  `);return u===-1?"":s.stack.slice(u+1)})();try{if(!r.stack)r.stack=a;else if(a){const u=a.indexOf(`
8
8
  `),c=u===-1?-1:a.indexOf(`
9
9
  `,u+1),d=c===-1?"":a.slice(c+1);String(r.stack).endsWith(d)||(r.stack+=`
10
- `+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ns(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&dl.assertOptions(r,{silentJSONParsing:pn.transitional(pn.boolean),forcedJSONParsing:pn.transitional(pn.boolean),clarifyTimeoutError:pn.transitional(pn.boolean),legacyInterceptorReqResOrdering:pn.transitional(pn.boolean),advertiseZstdAcceptEncoding:pn.transitional(pn.boolean),validateStatusUndefinedResolves:pn.transitional(pn.boolean)},!1),s!=null&&($.isFunction(s)?n.paramsSerializer={serialize:s}:dl.assertOptions(s,{encode:pn.function,serialize:pn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),dl.assertOptions(n,{baseUrl:pn.spelling("baseURL"),withXsrfToken:pn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&$.merge(a.common,a[n.method]);a&&$.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete a[_]}),n.headers=hn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(w){if(typeof w.runWhen=="function"&&w.runWhen(n)===!1)return;d=d&&w.synchronous;const v=n.transitional||cf;v&&v.legacyInterceptorReqResOrdering?c.unshift(w.fulfilled,w.rejected):c.push(w.fulfilled,w.rejected)});const f=[];this.interceptors.response.forEach(function(w){f.push(w.fulfilled,w.rejected)});let p,m=0,T;if(!d){const _=[Ug.bind(this),void 0];for(_.unshift(...c),_.push(...f),T=_.length,p=Promise.resolve(n);m<T;)p=p.then(_[m++],_[m++]);return p}T=c.length;let y=n;for(;m<T;){const _=c[m++],w=c[m++];try{y=_(y)}catch(v){w.call(this,v);break}}try{p=Ug.call(this,y)}catch(_){return Promise.reject(_)}for(m=0,T=f.length;m<T;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=ns(this.defaults,t);const n=kg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return bg(n,t.params,t.paramsSerializer)}};$.forEach(["delete","get","head","options"],function(t){rs.prototype[t]=function(n,r){return this.request(ns(r||{},{method:t,url:n,data:r&&$.hasOwnProp(r,"data")?r.data:void 0}))}}),$.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(ns(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}rs.prototype[t]=n(),t!=="query"&&(rs.prototype[t+"Form"]=n(!0))});let sv=class B2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(s);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new fa(a,u,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new B2(function(s){t=s}),cancel:t}}};function ov(e){return function(n){return e.apply(null,n)}}function av(e){return $.isObject(e)&&e.isAxiosError===!0}const Ef={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ef).forEach(([e,t])=>{Ef[t]=e});function zg(e){const t=new rs(e),n=ng(rs.prototype.request,t);return $.extend(n,rs.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return zg(ns(e,s))},n}const Rt=zg(da);Rt.Axios=rs,Rt.CanceledError=fa,Rt.CancelToken=sv,Rt.isCancel=wg,Rt.VERSION=pf,Rt.toFormData=ol,Rt.AxiosError=_e,Rt.Cancel=Rt.CanceledError,Rt.all=function(t){return Promise.all(t)},Rt.spread=ov,Rt.isAxiosError=av,Rt.mergeConfig=ns,Rt.AxiosHeaders=hn,Rt.formToJSON=e=>xg($.isHTMLForm(e)?new FormData(e):e),Rt.getAdapter=Bg.getAdapter,Rt.HttpStatusCode=Ef,Rt.default=Rt;const{Axios:Q7,AxiosError:J7,CanceledError:Z7,isCancel:eU,CancelToken:tU,VERSION:nU,all:rU,Cancel:iU,isAxiosError:sU,spread:oU,toFormData:aU,AxiosHeaders:uU,HttpStatusCode:lU,formToJSON:cU,getAdapter:dU,mergeConfig:fU,create:hU}=Rt;class uv{constructor(t,n,r,s=!1,a,u){Te(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Te(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Te(this,"CIMULATE_SEARCH_API_PATH","api/v1");Te(this,"baseApiUrl");Te(this,"headers",{});Te(this,"fetchConfig",()=>Ke(this,null,function*(){try{const t=yield Rt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));Te(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const s=new URL(t);return s.hostname=s.hostname.replace(/^copilot\./,"api."),s.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,s)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class lv{constructor(t,n,r,s=!1,a,u){Te(this,"apiService");Te(this,"config",null);Te(this,"getConfig",()=>Ke(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));Te(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Te(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Te(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Te(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Te(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Te(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Te(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Te(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Te(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Te(this,"getProductField",t=>this.config?this.config[t]:"");Te(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new uv(t,n,r,s,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Xs=(e,t,n,...r)=>{if(!e)return;const s=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",s,n,...r)};class cv{constructor(t=!1){Te(this,"isDevelopment");Te(this,"_log",(t,n,...r)=>{Xs(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 dv={copilot:"Your Search Assistant",messaging:"Commerce Client"},jg=F.createContext(null),fv=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:T,searchConfig:y,suggestionButtonConfig:_,progressStepsLimit:w=3,messageAlignment:v="start",autoScroll:A=!0,showProductDescription:N=!1,componentConfig:C,conversationHistory:z,resetConversationMessage:Y="",apiKey:D,apiToken:q,baseUrl:ne,customerId:ue,tenantId:V,theme:se,isDevelopment:pe,__features:ve,routingAttributes:re,enableDownloadTranscript:ae=!0,enableEscalationToAgent:xe=!1,showProductCaptions:oe=!1,staticQuestions:Q,staticQuestionsStrategy:ie="append",children:k})=>{const R=e==="messaging",ee=F.useMemo(()=>{const Ye=re==null?void 0:re.isCartMgmtSupported;return Ye===!0||Ye==="true"},[re]),O=F.useMemo(()=>R?{config:null}:new lv(ne,D,q,pe,ue,V),[R,ne,D,q,pe,ue,V]),Se=F.useMemo(()=>new cv(pe),[pe]);F.useEffect(()=>{R||!O||O.config||O.getConfig()},[O,R]);const Ue=F.useMemo(()=>mA(se),[se]),ye=F.useMemo(()=>{const Ye=(y==null?void 0:y.placeholder)||m,ht=(y==null?void 0:y.buttonLabel)||T;let Vt="icon";return y!=null&&y.buttonType?Vt=y.buttonType:T&&(Vt="text"),fe(B({},y||{}),{placeholder:Ye,buttonLabel:ht,buttonType:Vt})},[y,m,T]),Le=F.useMemo(()=>fe(B({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||dv[e!=null?e:"copilot"]}),[r,t,n,e]),He=F.useMemo(()=>({configModule:O,mode:e!=null?e:"copilot",headerConfig:Le,entryMessage:a,staticQuestions:Q||[],staticQuestionsStrategy:ie,globalClassName:s,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:Ue,logger:Se,searchConfig:ye,suggestionButtonConfig:_,progressStepsLimit:w,messageAlignment:v,autoScroll:A,showProductDescription:!!N,enableMinimize:!!(C!=null&&C.enableMinimize),launcherAriaLabel:C==null?void 0:C.launcherAriaLabel,enableDownloadTranscript:ae,enableEscalationToAgent:xe,showProductCaptions:!!oe,resetConversationMessage:Y,conversationHistory:{sinceHours:typeof(z==null?void 0:z.sinceHours)=="number"?z.sinceHours:R?24:1,limit:z==null?void 0:z.limit},features:ve,isCartMgmtSupported:ee}),[O,e,Le,a,Q,ie,s,f,p,c,d,u,ye,_,v,A,N,C,ae,xe,w,oe,Y,Se,Ue,z,ve,ee,R]);return S.jsx(jg.Provider,{value:He,children:k})},tt=()=>{const e=F.useContext(jg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class hv{constructor(){Te(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}});Te(this,"connectedProxy");Te(this,"modeProxy");Te(this,"entryTypeProxy");Te(this,"statusProxy");Te(this,"dialogProxy");Te(this,"modalProxy",{isFullscreen:!1});Te(this,"_fullGet",(t,n)=>Reflect.get(t,n));Te(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return yv(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position,isFullHeight:this.initialState.dialog.isFullHeight,width:this.initialState.dialog.width},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position,isFullHeight:this.dialogProxy.isFullHeight,width:this.dialogProxy.width},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const Je=new hv,is=()=>Je.connected,ha=()=>Je.isOpen,yf="cimulate.widget.minimizedOnNav";function pv(){try{const e=sessionStorage.getItem(yf)==="1";return sessionStorage.removeItem(yf),e}catch(e){return!1}}function mv(){try{sessionStorage.removeItem(yf)}catch(e){return}}const gv=e=>{window.addEventListener(Zd,e)},Ev=e=>{window.removeEventListener(Zd,e)},yv=(e,t)=>{const n=new CustomEvent(Zd,{detail:{property:e,value:t}});window.dispatchEvent(n)},bv=e=>{Je.connectedProxy.connected=e},pa=e=>{if(!cA(e)){const t=Q0.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}Je.entryTypeProxy.entryType=e},ni=e=>{const t=Je.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;Je.statusProxy.isOpen=n,n&&(Je.statusProxy.isMinimized=!1,mv())},ma=e=>{const t=Je.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Je.statusProxy.isMinimized=n,n&&(Je.statusProxy.isOpen=!1)},bf=e=>{Je.modalProxy.isFullscreen=e},fl=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);Je.statusProxy.type=e,e==="dialog"||e==="chat"?Je.modeProxy.mode="embedded":Je.modeProxy.mode="standalone"},Tf=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);Je.dialogProxy.position=e},Tv=e=>{const t=Je.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Je.dialogProxy.isFullHeight=n},_v=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=tt(),s=F.useCallback(C=>{n({type:mt.SET_COPILOT,payload:C})},[n]),a=F.useCallback(C=>{bv(C),n({type:mt.SET_CONNECTED,payload:C})},[n]),u=F.useCallback(()=>{n({type:mt.RESET_COPILOT,payload:{}})},[n]),c=F.useCallback(()=>{n({type:mt.RESET_STATE,payload:{}})},[n]),d=F.useCallback(C=>{r==null||r.log(`${C.name} event received`,C),n({type:mt.ADD_MESSAGE,payload:C}),C.bypassHandlers||e==null||e(C)},[e,r,n]),f=F.useCallback(C=>{n({type:mt.ADD_LOADING_MESSAGE,payload:C})},[n]),p=F.useCallback(C=>{n({type:mt.REMOVE_LOADING_MESSAGE,payload:C})},[n]),m=F.useCallback(C=>{d(C),f(C.id)},[d,f]),T=F.useCallback(C=>{n({type:mt.SET_ACTIVE_CONVERSATION_ID,payload:C})},[n]),y=F.useCallback(C=>{n({type:mt.ADD_CONVERSATION_ID,payload:C})},[n]),_=F.useCallback(C=>{n({type:mt.SET_CONVERSATION_IDS,payload:C})},[n]),w=F.useCallback(C=>{n({type:mt.SET_IMAGE_FILE,payload:C})},[n]),v=F.useCallback(C=>{n({type:mt.SET_ASK_CIM_PROMPTS,payload:C})},[n]),A=F.useCallback(C=>{n({type:mt.SET_CONVERSATION_HISTORY_LOADED,payload:C})},[n]),N=F.useMemo(()=>({setCopilot:s,setConnected:a,resetCopilot:u,resetCopilotState:c,addCopilotEvent:d,addLoadingMessage:f,removeLoadingMessage:p,handleCopilotRequestAck:m,setActiveConversationId:T,addConversationId:y,setConversationIds:_,setImageFile:w,setAskCimPrompts:v,setConversationHistoryLoaded:A}),[s,a,u,c,d,f,p,m,T,y,_,w,v,A]);return S.jsx(eg.Provider,{value:N,children:t})};aA();const Sv=(e,t)=>{const{type:n,payload:r}=t;if(n===mt.ADD_MESSAGE){const s=r;if(e.messages.push(s),s.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===s.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const c=u.findIndex(d=>d.id===s.id);if(c!==-1){u[c]=s;return}u.push(s);return}else{e.groupedMessages.push({type:"group",eventSourceId:s.eventSourceId,messages:[s],createdAt:new Date(s.createdAt)});return}}e.groupedMessages.push({type:"individual",message:s,createdAt:new Date(s.createdAt)});return}switch(n){case mt.RESET_STATE:e.messages=Zi.messages,e.groupedMessages=Zi.groupedMessages,e.loadingMessages=Zi.loadingMessages,e.imageFile=Zi.imageFile,e.askCimPrompts=Zi.askCimPrompts,e.conversationHistoryLoaded=Zi.conversationHistoryLoaded;break;case mt.RESET_COPILOT:e.copilot=null;break;case mt.SET_COPILOT:e.copilot=r;break;case mt.SET_CONNECTED:e.connected=r;break;case mt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case mt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case mt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case mt.ADD_CONVERSATION_ID:{const s=r;e.conversationIds.includes(s)||e.conversationIds.push(s)}break;case mt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case mt.SET_IMAGE_FILE:e.imageFile=r;break;case mt.SET_ASK_CIM_PROMPTS:e.askCimPrompts.requestId=(r==null?void 0:r.requestId)||null,e.askCimPrompts.message=(r==null?void 0:r.message)||null;break;case mt.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},xv=({onCopilotEvent:e,children:t})=>{const[n,r]=X0(Sv,Zi);return S.jsx(Z0.Provider,{value:n,children:S.jsx(_v,{onCopilotEvent:e,dispatch:r,children:t})})};function wv(){var e=F.useRef(!0);return e.current?(e.current=!1,!0):e.current}function Av(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function Cv(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var _f=typeof window!="undefined",ga=function(e){F.useEffect(e,[])},vv=function(e){var t=F.useRef(e);t.current=e,ga(function(){return function(){return t.current()}})},Nv=function(e){var t=F.useRef(0),n=F.useState(e),r=n[0],s=n[1],a=F.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return vv(function(){cancelAnimationFrame(t.current)}),[r,a]},kv=function(e,t){return e===t};function Pv(e,t){t===void 0&&(t=kv);var n=F.useRef(),r=F.useRef(e),s=wv();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var Ov=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,s=t.initialHeight,a=s===void 0?1/0:s,u=t.onChange,c=Nv({width:_f?window.innerWidth:r,height:_f?window.innerHeight:a}),d=c[0],f=c[1];return F.useEffect(function(){if(_f){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return Av(window,"resize",p),function(){Cv(window,"resize",p)}}},[]),d};class Iv{constructor(){Te(this,"items",[]);Te(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});Te(this,"remove",()=>this.items.shift());Te(this,"first",()=>this.items.length>0?this.items[0]:null);Te(this,"clear",()=>{this.items.length=0});Te(this,"processQueue",t=>{new Array(mn.size).fill(1).forEach(()=>{const r=mn.first();r&&(t(r),mn.remove())})})}get size(){return this.items.length}}const mn=new Iv,$g=e=>{window.addEventListener(Jd,e)},Vg=e=>{window.removeEventListener(Jd,e)},Rv=(e,t,n)=>{const r=new CustomEvent(Jd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},qg=e=>{window.addEventListener(Qd,e)},Yg=e=>{window.removeEventListener(Qd,e)},Lv=(e,t,n)=>{const r=new CustomEvent(Qd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Wg=e=>{window.addEventListener(Kd,e)},Gg=e=>{window.removeEventListener(Kd,e)},Sf=(e,t,n)=>{const r=new CustomEvent(Kd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},Dv=e=>{window.addEventListener(tf,e)},Mv=e=>{window.removeEventListener(tf,e)},Ea=(e,t,n)=>{const r=new CustomEvent(tf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class Fv{constructor(){Te(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Te(this,"categoryIdProxy");Te(this,"facetFiltersProxy");Te(this,"rangeFiltersProxy");Te(this,"catalogSegmentProxy");Te(this,"pricebooksProxy");Te(this,"_fullGet",(t,n)=>Reflect.get(t,n));Te(this,"_fullSet",(t,n,r)=>{const s=hA[n];return Lv(s,n,r),Reflect.set(t,n,r)});Te(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Te(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Te(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId,categoryName:this.initialParams.categoryName},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get categoryId(){return this.categoryIdProxy.categoryId||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{categoryId:this.categoryId,categoryName:this.categoryIdProxy.categoryName,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const at=new Fv,Xg=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},Kg=(e,t,n)=>{var u,c;const r=B({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((c=r[e])!=null&&c.includes(t))){const d=r[e].filter(f=>f!==t);d.length>0?r[e]=d:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];const a=n.updateFacetFiltersProxy(r);n.facetFiltersProxy.facetFilters=a.facetFilters},Qg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},Jg=({field:e,value:t},n)=>{const[r,s]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof s=="undefined")throw new Error("Range values must be an array with two numbers for min and max");const a=[...n.rangeFiltersProxy.rangeFilters||[]],u=a.findIndex(d=>d.field===e);if(u!==-1){a[u]={field:e,min:r,max:s},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:s});const c=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=c.rangeFilters},Zg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},e1=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},Bv=e=>{if(!is()||!ha()){is()&&mn.clear(),mn.add({context:"browse",payload:fe(B({},at.state),{categoryId:e})});return}at.categoryIdProxy.categoryId=e},t1=e=>{Xg(e,at)},Uv=(e,t)=>{Kg(e,t,at)},n1=e=>{Qg(e,at)},Hv=({field:e,value:t})=>{Jg({field:e,value:t},at)},zv=e=>{Zg(e,at)},r1=e=>{e1(e,at)},i1=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=is(),n=ha();if(!t||!n){t&&mn.clear(),mn.add({context:"browse",payload:B({},e)});return}"facetFilters"in e&&t1(e.facetFilters||{}),"rangeFilters"in e&&n1(e.rangeFilters||[]),"catalogSegment"in e&&(at.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&r1(e.pricebooks||[]),"categoryName"in e&&(at.categoryIdProxy.categoryName=e.categoryName||""),at.categoryIdProxy.categoryId=e.categoryId},jv=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:i1,updateBrowseCategoryId:Bv,updateCatalogSegment:zv,updateFacetFilter:Uv,updateFacetFilters:t1,updatePricebooks:r1,updateRangeFilter:Hv,updateRangeFilters:n1},Symbol.toStringTag,{value:"Module"}));class $v{constructor(){Te(this,"initialParams",{productId:"",productName:"",pdpLink:""});Te(this,"proxy");Te(this,"_fullGet",(t,n)=>Reflect.get(t,n));Te(this,"_fullSet",(t,n,r)=>(Sf(n,r),Reflect.set(t,n,r)));Te(this,"updateProxy",t=>{t.productId&&(this.proxy=this.createProxy(t))});Te(this,"clear",()=>{this.proxy=this.createProxy(this.initialParams)});Te(this,"dispatchContextUpdate",()=>{Sf("pdp-context",this.state)});Te(this,"createProxy",t=>new Proxy({productId:t.productId||"",productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}));this.proxy=this.createProxy(this.initialParams)}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const mr=new $v,s1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=is(),n=ha();if(!t||!n){t&&mn.clear(),mn.add({context:"pdp",payload:B({},e)});return}mr.updateProxy(e),Sf("pdp-context",e)},Vv=e=>{mr.proxy.productId=e,is()||mn.add({context:"pdp",payload:B({},mr.state)})},qv=e=>{mr.proxy.pdpLink=e};class Yv{constructor(){Te(this,"initialState",tg);Te(this,"promptsStateProxy");Te(this,"promptsParamsProxy");Te(this,"_fullGet",(t,n)=>Reflect.get(t,n));Te(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return ya(n,r),Reflect.set(t,n,r)});Te(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Te(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Te(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 Bt=new Yv,Wv=e=>{window.addEventListener(ef,e)},Gv=e=>{window.removeEventListener(ef,e)},ya=(e,t)=>{const n=new CustomEvent(ef,{detail:{property:e,value:t}});window.dispatchEvent(n)},o1=e=>{const t=Bt.isOpen,n=typeof e=="boolean"?e:!t;Bt.promptsStateProxy.isOpen=n},a1=e=>{const t=Bt.isInline,n=typeof e=="boolean"?e:!t;Bt.promptsStateProxy.isInline=n},Xv=e=>{Bt.promptsParamsProxy=Bt.updatePromptsParamsProxy(e),ya("params",e),Bt.promptsStateProxy.entryType="ask_cim"},Kv=e=>{Bt.promptsParamsProxy=Bt.updatePromptsParamsProxy(e),ya("params",e),Bt.promptsStateProxy.entryType="search"},Qv=e=>{Bt.promptsParamsProxy=Bt.updatePromptsParamsProxy(e),ya("params",e),Bt.promptsStateProxy.entryType="browse"},Jv=e=>{Bt.promptsParamsProxy=Bt.updatePromptsParamsProxy(e),ya("params",e),Bt.promptsStateProxy.entryType="pdp"},Zv=({elementId:e,entryType:t,params:n,isInline:r})=>{Bt.promptsStateProxy.elementId=e,t&&(Bt.promptsStateProxy.entryType=t),typeof r=="boolean"&&a1(r),n&&Bt.updatePromptsParamsProxy(n),Bt.isOpen||o1(!0)},eN=Object.freeze(Object.defineProperty({__proto__:null,endConversation:()=>{Ea("endConversation",!0,ti.END_CONVERSATION)},getConversationMessages:({payload:e,callback:t})=>{Ea("getConversationMessages",{payload:e,callback:t},ti.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{Ea("getSessionInformation",{callback:e},ti.GET_SESSION_INFORMATION)},loadConversation:e=>{Ea("loadConversation",e,ti.LOAD_CONVERSATION)},resetConversation:()=>{Ea("resetConversation",!0,ti.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class tN{constructor(){Te(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Te(this,"queryProxy");Te(this,"facetFiltersProxy");Te(this,"rangeFiltersProxy");Te(this,"catalogSegmentProxy");Te(this,"pricebooksProxy");Te(this,"_fullGet",(t,n)=>Reflect.get(t,n));Te(this,"_fullSet",(t,n,r)=>{const s=pA[n];return Rv(s,n,r),Reflect.set(t,n,r)});Te(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Te(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Te(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get query(){return this.queryProxy.query||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{query:this.query,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const Tt=new tN,nN=e=>{const t=ha(),n=is();if(!n||!t){n&&mn.clear(),mn.add({context:"search",payload:fe(B({},Tt.state),{query:e})});return}Tt.queryProxy.query=e},u1=e=>{Xg(e,Tt)},rN=(e,t)=>{Kg(e,t,Tt)},l1=e=>{Qg(e,Tt)},iN=({field:e,value:t})=>{Jg({field:e,value:t},Tt)},sN=e=>{Zg(e,Tt)},c1=e=>{e1(e,Tt)},d1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=ha(),n=is();if(!n||!t){n&&mn.clear(),mn.add({context:"search",payload:B({},e)});return}"facetFilters"in e&&u1(e.facetFilters||{}),"rangeFilters"in e&&l1(e.rangeFilters||[]),"catalogSegment"in e&&(Tt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&c1(e.pricebooks||[]),Tt.queryProxy.query=e.query},oN=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:d1,updateCatalogSegment:sN,updateFacetFilter:rN,updateFacetFilters:u1,updatePricebooks:c1,updateRangeFilter:iN,updateRangeFilters:l1,updateSearchQuery:nN},Symbol.toStringTag,{value:"Module"})),aN={categoryId:at.categoryId,categoryName:at.categoryIdProxy.categoryName||"",facetFilters:at.facetFilters,rangeFilters:at.rangeFilters,catalogSegment:at.catalogSegment,pricebooks:at.pricebooks},f1=F.createContext(aN),uN=({children:e})=>{const[t,n]=F.useState(at.categoryId),[r,s]=F.useState(at.categoryIdProxy.categoryName||""),[a,u]=F.useState(at.facetFilters||{}),[c,d]=F.useState(at.rangeFilters||[]),[f,p]=F.useState(at.catalogSegment||null),[m,T]=F.useState(at.pricebooks||null);F.useEffect(()=>{const _=({detail:w})=>{(w==null?void 0:w.property)==="categoryId"&&n(w.value),(w==null?void 0:w.property)==="categoryName"&&s(w.value),(w==null?void 0:w.property)==="facetFilters"&&u(w.value),(w==null?void 0:w.property)==="rangeFilters"&&d(w.value),(w==null?void 0:w.property)==="catalogSegment"&&p(w.value),(w==null?void 0:w.property)==="pricebooks"&&T(w.value)};return qg(_),()=>{Yg(_)}},[]);const y=F.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:m}),[t,r,a,c,f,m]);return S.jsx(f1.Provider,{value:y,children:e})},lN=()=>{const e=F.useContext(f1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},cN={searchQuery:Tt.query,facetFilters:Tt.facetFilters,rangeFilters:Tt.rangeFilters,catalogSegment:Tt.catalogSegment,pricebooks:Tt.pricebooks},h1=F.createContext(cN),dN=({children:e})=>{const[t,n]=F.useState(Tt.query),[r,s]=F.useState(Tt.facetFilters),[a,u]=F.useState(Tt.rangeFilters),[c,d]=F.useState(Tt.catalogSegment),[f,p]=F.useState(Tt.pricebooks);F.useEffect(()=>{const T=({detail:y})=>{(y==null?void 0:y.property)==="query"&&n(y.value),(y==null?void 0:y.property)==="facetFilters"&&s(y.value),(y==null?void 0:y.property)==="rangeFilters"&&u(y.value),(y==null?void 0:y.property)==="catalogSegment"&&d(y.value),(y==null?void 0:y.property)==="pricebooks"&&p(y.value)};return $g(T),()=>{Vg(T)}},[]);const m=F.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return S.jsx(h1.Provider,{value:m,children:e})},fN=()=>{const e=F.useContext(h1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},hN={productId:mr.productId,pdpLink:mr.pdpLink},p1=F.createContext(hN),pN=({children:e})=>{const[t,n]=F.useState(mr.productId),[r,s]=F.useState(mr.pdpLink);F.useEffect(()=>{const u=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const d=c.value;n(d.productId),s(d.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&s(c.value)};return Wg(u),()=>{Gg(u)}},[]);const a=F.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return S.jsx(p1.Provider,{value:a,children:e})},mN=()=>{const e=F.useContext(p1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},m1=F.createContext({mode:Je.modeProxy.mode,entryType:Je.entryType,status:Je.statusProxy,dialogPosition:Je.dialogProxy.position,isDialogFullHeight:Je.dialogProxy.isFullHeight,dialogWidth:Je.dialogProxy.width,isModalFullscreen:Je.modalProxy.isFullscreen,previousComponentType:Je.statusProxy.type}),gN=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=F.useState(e!=null?e:Je.entryTypeProxy.entryType),[u,c]=F.useState(Je.modeProxy.mode),[d,f]=F.useState({type:n||Je.statusProxy.type,isOpen:t&&"isOpen"in t?!!t.isOpen:Je.statusProxy.isOpen,isMinimized:t&&"isMinimized"in t?!!t.isMinimized:Je.statusProxy.isMinimized}),[p,m]=F.useState(Je.dialogProxy.position),[T,y]=F.useState(Je.dialogProxy.isFullHeight),[_,w]=F.useState(Je.dialogProxy.width),[v,A]=F.useState(Je.modalProxy.isFullscreen),N=F.useRef(!1),C=Pv(d.type);F.useEffect(()=>{const Y=D=>{const{property:q,value:ne}=D.detail||{};if(!(!q||ne===void 0)){if(q==="mode"){c(ne);return}if(q==="entryType"){a(ne);return}if(q==="isMinimized"){f(ue=>fe(B({},ue),{isMinimized:ne}));return}if(q==="isOpen"){f(ue=>fe(B({},ue),{isOpen:ne}));return}if(q==="type"){f(ue=>fe(B({},ue),{type:ne}));return}if(q==="position"){m(ne);return}if(q==="isFullHeight"){y(ne);return}if(q==="width"){w(ne);return}if(q==="isFullscreen"){A(ne);return}}};return gv(Y),()=>{Ev(Y)}},[]),ga(()=>{e&&pa(e)}),ga(()=>{if(N.current)return;N.current=!0;const Y=n||(t==null?void 0:t.type);Y&&fl(Y);const D=pv();t&&"isOpen"in t&&ni(!!t.isOpen),t&&"isMinimized"in t&&ma(!!t.isMinimized),D&&ma(!0)}),ga(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:Y}=t.options;Y&&Tf(Y),"dialogFullHeight"in t.options&&Tv(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&w(t.options.dialogWidth),"isModalFullscreen"in t.options&&bf(!!t.options.isModalFullscreen)});const z=F.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:C||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:_,isModalFullscreen:v}),[u,s,d,C,p,T,_,v]);return S.jsx(m1.Provider,{value:z,children:r})},tr=()=>{const e=F.useContext(m1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},g1=F.createContext(null),E1=F.createContext(null),xf=()=>{const e=F.useContext(E1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},ri=()=>{const e=F.useContext(g1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},Ks=()=>{const e=F.useContext(eg);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Vn=()=>{const e=F.useContext(Z0);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},EN=({copilot:e})=>{const{logger:t,conversationHistory:n}=tt(),{isInline:r}=ri(),{addCopilotEvent:s,setConversationHistoryLoaded:a}=Ks(),{activeConversationId:u}=Vn(),c=F.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=F.useCallback((f,p)=>{e&&f.conversationId&&e.getConversationEvents(f,m=>{t==null||t.log("Retrieved conversation messages: ",m),p==null||p(m)})},[e,t]);return F.useEffect(()=>{if(r||!u)return;if(n.sinceHours===0||(n==null?void 0:n.limit)===0){a(!0);return}const f=3600*1e3*n.sinceHours,p=new Date(Date.now()-f).toISOString(),m={conversationId:u,since:p,excludeEvents:["done","error","connection_error","refined_browse","refined_search","conversation_reset"]};typeof n.limit=="number"&&(m.limit=n.limit),d(m,T=>{const y=[];[...T.reverse()||[]].forEach(w=>{var A;const v=T.find(N=>N.id===w.eventSourceId);(A=v==null?void 0:v.name)!=null&&A.endsWith("_suggestions")||(w.bypassHandlers=!0,y.unshift(w))}),y.forEach(w=>{s(w)}),a(!0)})},[t,r,u,d,s,a,n]),{getSessionInformation:c,getConversationMessages:d}},y1=F.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),yN=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>{const{logger:p,clientContext:m,baseCatalogParams:T}=tt(),an=fN(),{searchQuery:y}=an,_=fn(an,["searchQuery"]),Fn=lN(),{categoryId:w}=Fn,v=fn(Fn,["categoryId"]),{productId:A,pdpLink:N}=mN(),{setCopilot:C,setConnected:z,resetCopilot:Y,resetCopilotState:D,addCopilotEvent:q,removeLoadingMessage:ne,handleCopilotRequestAck:ue,setActiveConversationId:V,setConversationIds:se,setAskCimPrompts:pe}=Ks(),{connected:ve,copilot:re,messages:ae,groupedMessages:xe,loadingMessages:oe,askCimPrompts:Q}=Vn(),{status:ie,entryType:k}=tr(),{isInline:R}=ri(),{getConversationMessages:ee,getSessionInformation:O}=EN({copilot:re}),Se=F.useMemo(()=>oe.size>0,[oe]),Ue=F.useCallback(we=>oe.has(we),[oe]),ye=F.useCallback(({query:we,facetFilters:Pe,rangeFilters:Me,catalogSegment:rt,pricebooks:pt,userPrompt:J,imageFile:ge})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Ce={searchParams:{query:we}};J&&(Ce.userPrompt=J),ge&&(Ce.attachments={image:ge}),Pe&&Object.keys(Pe).length>0&&(Ce.searchParams.facetFilters=Pe),Me&&Me.length>0&&(Ce.searchParams.rangeFilters=Me),rt&&(Ce.searchParams.catalogSegment=rt),pt&&(Ce.searchParams.pricebooks=pt),m&&(Ce.clientContext=m),pa("search"),re.search(Ce,qe=>{const Ie=B({},qe);ue(Ie)})},[p,ue,re,m]),Le=F.useCallback(({categoryId:we,categoryName:Pe,facetFilters:Me,rangeFilters:rt,catalogSegment:pt,pricebooks:J,userPrompt:ge,imageFile:Ce})=>{if(!re){p==null||p.error("Copilot is not initialized");return}const qe=Me&&Object.keys(Me).length>0;if(we===""&&!qe){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const Ie={browseParams:{categoryId:we||""}};ge&&(Ie.userPrompt=ge),Ce&&(Ie.attachments={image:Ce}),qe&&(Ie.browseParams.facetFilters=Me),rt&&rt.length>0&&(Ie.browseParams.rangeFilters=rt),pt&&(Ie.browseParams.catalogSegment=pt),Array.isArray(J)&&J.length>0&&(Ie.browseParams.pricebooks=J),(m||Pe)&&(Ie.clientContext={},m&&(Ie.clientContext=B({},m)),Pe&&(Ie.clientContext.cimLabel=Pe)),pa("browse"),re.browse(Ie,ut=>{var Vr;const qt=B({},ut),Ht=((Vr=qt.request)==null?void 0:Vr.clientContext)||{},un=(Ht==null?void 0:Ht.cimLabel)||Pe;un&&qt.request&&(qt.request.label=un),ue(qt)})},[p,ue,re,m]),He=F.useCallback(({productId:we,productName:Pe,pdpLink:Me,userPrompt:rt,imageFile:pt})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const J={productId:we};rt&&(J.userPrompt=rt),Me&&(J.pdpLink=Me),pt&&(J.attachments={image:pt}),(m||Pe)&&(J.clientContext={},m&&(J.clientContext=B({},m)),Pe&&(J.clientContext.cimLabel=Pe)),T&&(J.baseCatalogParams=T),pa("pdp"),re.productView(J,ge=>{var ut;const Ce=B({},ge),qe=((ut=Ce.request)==null?void 0:ut.clientContext)||{},Ie=(qe==null?void 0:qe.cimLabel)||Pe;Ie&&Ce.request&&(Ce.request.label=Ie),ue(Ce)})},[p,re,ue,m,T]),Ye=F.useCallback(({userPrompt:we,imageFile:Pe})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Me={userPrompt:we};Pe&&(Me.attachments={image:Pe}),m&&(Me.clientContext=m),T&&(Me.baseCatalogParams=T),re.askCim(Me,rt=>{const pt=B({},rt);ue(pt)})},[p,re,ue,m,T]),ht=F.useCallback(we=>{q(we),c==null||c(we)},[q,c]),Vt=F.useCallback(we=>{q(we),d==null||d(we)},[q,d]),on=F.useCallback(we=>{u==null||u(we),z(!0)},[u,z]);F.useEffect(()=>{!re||!ve||!ie.isOpen||mn.size>0&&mn.processQueue(we=>{if(we.context==="search"){const Pe=B({},we.payload);d1(Pe)}if(we.context==="browse"){const Pe=B({},we.payload);i1(Pe)}if(we.context==="pdp"){const Pe=B({},we.payload);s1(Pe)}})},[ie.isOpen,re,ve]);const _r=F.useCallback(we=>{const Pe=Me=>{const rt=fe(B({},Me),{id:Me.inquiryLinkId||Me.id});q(rt)};we.on("connect_ack",on),we.on("partial_inquiry",Pe),we.on("display_products",q),we.on("progress",q),we.on("refined_search",ht),we.on("refined_browse",Vt),we.on("done",Me=>{ne(Me.eventSourceId)}),we.on("error",Me=>{q(Me),ne(Me.eventSourceId)}),we.onDisconnect(Me=>{const rt=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Me),!rt.includes(Me)){z(!1);return}p==null||p.log("De-registering event listeners");const pt=new Date().toISOString();q({name:"error",message:"Connection was lost. Please try again.",createdAt:pt,id:`error-${pt}`,sessionId:"session"}),we.off()})},[p,z,ne,ht,Vt,q,on]);F.useEffect(()=>{if(!re)return;const we=Pe=>{if(!R){if(!Pe.message&&Pe.eventSourceId&&Pe.eventSourceId===Q.requestId){pe({requestId:Pe.eventSourceId,message:Pe});return}q(Pe)}};return re.on("follow_up",we),()=>{re.off("follow_up",we)}},[re,ae,Q.requestId,R,q,pe]),F.useEffect(()=>{if(!re)return;const we=Pe=>{if(R)return;const Me=fe(B({},Pe),{id:Pe.inquiryLinkId||Pe.id});q(Me)};return re.on("inquiry",we),()=>{re.off("inquiry",we)}},[re,R,q]),ga(()=>{let we;n?we=n:we=a?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Pe={baseUrl:we};e?Pe.apiKey=e:t&&(Pe.apiToken=t),r&&(Pe.customerId=r),s&&(Pe.tenantId=s);const Me=new Qw(Pe);return C(Me),_r(Me),Me.connect(),Me.requestSessionInformation(rt=>{p==null||p.log("Session Information: ",rt);const{activeConversationId:pt,conversationIds:J}=rt.data||{};pt&&V(pt),J!=null&&J.length&&se(J)}),()=>{Me.disconnect(),Me.off(),Y()}});const sr=F.useCallback(we=>{if(!re)return;const Pe={eventId:we,reason:"User cancelled the request"};re.cancelRequest(Pe,Me=>{q(Me),ne(we)})},[q,ne,re]),Zt=F.useCallback(()=>{re&&re.conversationReset({},we=>{D(),q(we),re.requestSessionInformation(Pe=>{p==null||p.log("Session Information: ",Pe);const{activeConversationId:Me,conversationIds:rt}=Pe.data||{};Me&&V(Me),rt!=null&&rt.length&&se(rt)})})},[re,p,q,D,V,se]),Ve=F.useCallback((we,Pe)=>{if(!we)return;const Me={userPrompt:we};switch(Pe&&(Me.imageFile=Pe),k){case"ask_cim":Ye(Me);return;case"search":y?ye(B(B({query:y},_),Me)):Ye(Me);return;case"browse":Le(B(B({categoryId:w},v),Me));return;case"pdp":A?He(B({productId:A,pdpLink:N||""},Me)):Ye(Me);return}},[k,y,_,ye,Ye,w,v,Le,He,A,N]),Nt=F.useCallback((we,Pe)=>{var ge,Ce,qe;const rt=we.params.userPrompt||"";if(!rt)return;const pt=ae.find(Ie=>Ie.id===Pe);if(!pt)return;const J=pt.name.replace("_suggestions","");if(J==="ask_cim"){Ye({userPrompt:rt});return}if(J==="copilot_search"){const Ie=((ge=pt.request)==null?void 0:ge.searchParams)||{},qt=Ie.query===y;ye(fe(B({query:Ie.query||y},qt?_:{}),{userPrompt:rt}));return}if(J==="copilot_browse"){const Ie=pt.request,ut=Ie.browseParams||{},Ht=ut.categoryId===w,un=((Ce=Ie.clientContext)==null?void 0:Ce.cimLabel)||"";Le(fe(B({categoryId:ut.categoryId||w||""},Ht?v:{}),{categoryName:un,userPrompt:rt}));return}if(J==="product_view"){const Ie=pt.request||{},ut=Ie.productId,qt=ut===A,Ht=((qe=Ie.clientContext)==null?void 0:qe.cimLabel)||"";let un="";qt?un=N||"":un=Ie.pdpLink||"",He({productId:ut||A,pdpLink:un,productName:Ht,userPrompt:rt})}},[ae,y,_,ye,Ye,w,v,Le,He,A,N]),vn=F.useMemo(()=>({copilot:re,messages:ae,groupedMessages:xe,isLoading:Se,isResponseLoading:Ue,handleAskCim:Ye,handleSearch:ye,handleBrowse:Le,handlePdp:He,handleUserInput:Ve,handleSuggestion:Nt,handleCancel:sr,resetConversation:Zt,getSessionInformation:O,getConversationMessages:ee}),[re,ae,xe,Se,Ue,Ye,ye,Le,He,Ve,Nt,sr,Zt,O,ee]);return S.jsx(y1.Provider,{value:vn,children:f})},b1=()=>{const{copilot:e}=Vn(),{addCopilotEvent:t}=Ks();return{getCopilotSuggestions:F.useCallback((r,s,a)=>{if(!e||!s||!r)return;const u=c=>{t(c),a(c)};switch(s){case"ask_cim":e.askCimSuggestions(r,u);break;case"search":e.searchSuggestions({searchParams:r},u);break;case"browse":e.browseSuggestions({browseParams:r},u);break;case"pdp":e.productViewSuggestions({productId:r.productId},u);break}},[e,t])}},Ir=()=>{const e=F.useContext(y1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},bN=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=Vn(),{entryType:s}=tr(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:c}=Ks(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:T,getConversationMessages:y}=Ir(),{getCopilotSuggestions:_}=b1();F.useEffect(()=>{!e||!s||!t||!r||n.requestId||s==="ask_cim"&&_({},s,N=>{c({requestId:N.id,message:null})})},[e,t,n.requestId,s,r,_,c]);const w=F.useCallback(({query:N})=>{if(!e||!N)return;const{facetFilters:C}=Tt.facetFiltersProxy,{rangeFilters:z}=Tt.rangeFiltersProxy,{catalogSegment:Y}=Tt.catalogSegmentProxy,{pricebooks:D}=Tt.pricebooksProxy,q={query:N};q.facetFilters=C||{},q.rangeFilters=z||[],q.catalogSegment=Y||"",q.pricebooks=D||[],d(B({},q))},[e,d]),v=F.useCallback(({categoryId:N})=>{if(!e)return;const C=at.categoryIdProxy.categoryName,{facetFilters:z}=at.facetFiltersProxy,{rangeFilters:Y}=at.rangeFiltersProxy,{catalogSegment:D}=at.catalogSegmentProxy,{pricebooks:q}=at.pricebooksProxy,ne={categoryId:N};ne.categoryName=C||"",ne.facetFilters=z||{},ne.rangeFilters=Y||[],ne.catalogSegment=D||"",ne.pricebooks=q||[],f(B({},ne))},[e,f]),A=F.useCallback(({productId:N})=>{if(!e||!N)return;const C={productId:N,pdpLink:mr.pdpLink,productName:mr.proxy.productName||""};p(C)},[e,p]);return F.useEffect(()=>{const N=({detail:C})=>{(C==null?void 0:C.property)==="query"&&w({query:C.value})};return $g(N),()=>{Vg(N)}},[w]),F.useEffect(()=>{const N=({detail:C})=>{if((C==null?void 0:C.property)==="pdp-context"){const z=C.value;A({productId:z.productId});return}(C==null?void 0:C.property)==="productId"&&A({productId:C.value})};return Wg(N),()=>{Gg(N)}},[A]),F.useEffect(()=>{const N=({detail:C})=>{(C==null?void 0:C.property)==="categoryId"&&v({categoryId:C.value})};return qg(N),()=>{Yg(N)}},[v]),F.useEffect(()=>{const N=({detail:C})=>{if((C==null?void 0:C.event)==ti.RESET_CONVERSATION&&m(),(C==null?void 0:C.event)==ti.GET_SESSION_INFORMATION){const z=C.value.callback;T(z)}if((C==null?void 0:C.event)==ti.GET_CONVERSATION_MESSAGES){const{payload:z,callback:Y}=C.value;if(!z.conversationId||typeof Y!="function")return;y(z,Y)}if((C==null?void 0:C.event)==ti.LOAD_CONVERSATION){const z=C.value;if(!z.conversationId)return;y(z,D=>{a(),D.forEach(q=>{u(q)})})}};return Dv(N),()=>{Mv(N)}},[m,T,y,a,u]),null},TN=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>S.jsxs(yN,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:[S.jsx(bN,{}),f]}),_N=({children:e,dispatch:t})=>{const n=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),s=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),c=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),m=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),T=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),y=F.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:T}),[n,r,s,a,u,c,d,f,p,m,T]);return S.jsx(E1.Provider,{value:y,children:e})},SN=(e,t)=>{const{type:n,payload:r}=t;switch(n){case gt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case gt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case gt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case gt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case gt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case gt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case gt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case gt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},xN=({promptsConfig:e,children:t})=>{const[n,r]=X0(SN,fe(B(B({},tg),e||{}),{staticQuestions:F0((e==null?void 0:e.staticQuestions)||[])}));return S.jsx(g1.Provider,{value:n,children:S.jsx(_N,{dispatch:r,children:t})})},T1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,customerId:s,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,theme:f,openLinksInNewTab:p,globalClassName:m,isDevelopment:T=!1,componentType:y,componentConfig:_,entryType:w,initialEntry:v,entryMessage:A,disclaimerText:N,disclaimerMarkdown:C,clientContext:z,baseCatalogParams:Y,searchPlaceholder:D,searchButtonLabel:q,searchConfig:ne,suggestionButtonConfig:ue,messageAlignment:V,autoScroll:se,promptsConfig:pe,resetConversationMessage:ve,conversationHistory:re,onConnect:ae,onCopilotEvent:xe,onRefinedSearch:oe,onRefinedBrowse:Q,__features:ie,children:k})=>{const R=v==null?void 0:v.params;return S.jsx(fv,{mode:e,baseUrl:r,apiKey:t,apiToken:n,customerId:s,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,entryMessage:A,staticQuestions:F0(R==null?void 0:R.staticQuestions),staticQuestionsStrategy:R==null?void 0:R.staticQuestionsStrategy,theme:f,globalClassName:m,openLinksInNewTab:p,searchPlaceholder:D,searchButtonLabel:q,searchConfig:ne,suggestionButtonConfig:ue,messageAlignment:V,autoScroll:se,componentConfig:_,clientContext:z,baseCatalogParams:Y,disclaimerMarkdown:C,disclaimerText:N,resetConversationMessage:ve,conversationHistory:re,isDevelopment:T,__features:ie,children:S.jsx(gN,{entryType:w!=null?w:v==null?void 0:v.type,componentConfig:_,componentType:y,children:S.jsx(xv,{onCopilotEvent:xe,children:S.jsx(pN,{children:S.jsx(uN,{children:S.jsx(dN,{children:S.jsx(xN,{promptsConfig:pe,children:S.jsx(TN,{apiKey:t,apiToken:n,baseUrl:r,customerId:s,tenantId:a,isDevelopment:T,entryType:w,onConnect:ae,onRefinedSearch:oe,onRefinedBrowse:Q,onCopilotEvent:xe,children:k})})})})})})})})};var wf={exports:{}},In={},Af={exports:{}},Cf={};var _1;function wN(){return _1||(_1=1,(function(e){function t(Q,ie){var k=Q.length;Q.push(ie);e:for(;0<k;){var R=k-1>>>1,ee=Q[R];if(0<s(ee,ie))Q[R]=ie,Q[k]=ee,k=R;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var ie=Q[0],k=Q.pop();if(k!==ie){Q[0]=k;e:for(var R=0,ee=Q.length,O=ee>>>1;R<O;){var Se=2*(R+1)-1,Ue=Q[Se],ye=Se+1,Le=Q[ye];if(0>s(Ue,k))ye<ee&&0>s(Le,Ue)?(Q[R]=Le,Q[ye]=k,R=ye):(Q[R]=Ue,Q[Se]=k,R=Se);else if(ye<ee&&0>s(Le,k))Q[R]=Le,Q[ye]=k,R=ye;else break e}}return ie}function s(Q,ie){var k=Q.sortIndex-ie.sortIndex;return k!==0?k:Q.id-ie.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],f=[],p=1,m=null,T=3,y=!1,_=!1,w=!1,v=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(Q){for(var ie=n(f);ie!==null;){if(ie.callback===null)r(f);else if(ie.startTime<=Q)r(f),ie.sortIndex=ie.expirationTime,t(d,ie);else break;ie=n(f)}}function z(Q){if(w=!1,C(Q),!_)if(n(d)!==null)_=!0,xe(Y);else{var ie=n(f);ie!==null&&oe(z,ie.startTime-Q)}}function Y(Q,ie){_=!1,w&&(w=!1,A(ne),ne=-1),y=!0;var k=T;try{for(C(ie),m=n(d);m!==null&&(!(m.expirationTime>ie)||Q&&!se());){var R=m.callback;if(typeof R=="function"){m.callback=null,T=m.priorityLevel;var ee=R(m.expirationTime<=ie);ie=e.unstable_now(),typeof ee=="function"?m.callback=ee:m===n(d)&&r(d),C(ie)}else r(d);m=n(d)}if(m!==null)var O=!0;else{var Se=n(f);Se!==null&&oe(z,Se.startTime-ie),O=!1}return O}finally{m=null,T=k,y=!1}}var D=!1,q=null,ne=-1,ue=5,V=-1;function se(){return!(e.unstable_now()-V<ue)}function pe(){if(q!==null){var Q=e.unstable_now();V=Q;var ie=!0;try{ie=q(!0,Q)}finally{ie?ve():(D=!1,q=null)}}else D=!1}var ve;if(typeof N=="function")ve=function(){N(pe)};else if(typeof MessageChannel!="undefined"){var re=new MessageChannel,ae=re.port2;re.port1.onmessage=pe,ve=function(){ae.postMessage(null)}}else ve=function(){v(pe,0)};function xe(Q){q=Q,D||(D=!0,ve())}function oe(Q,ie){ne=v(function(){Q(e.unstable_now())},ie)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){_||y||(_=!0,xe(Y))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ue=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(Q){switch(T){case 1:case 2:case 3:var ie=3;break;default:ie=T}var k=T;T=ie;try{return Q()}finally{T=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,ie){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var k=T;T=Q;try{return ie()}finally{T=k}},e.unstable_scheduleCallback=function(Q,ie,k){var R=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?R+k:R):k=R,Q){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=k+ee,Q={id:p++,callback:ie,priorityLevel:Q,startTime:k,expirationTime:ee,sortIndex:-1},k>R?(Q.sortIndex=k,t(f,Q),n(d)===null&&Q===n(f)&&(w?(A(ne),ne=-1):w=!0,oe(z,k-R))):(Q.sortIndex=ee,t(d,Q),_||y||(_=!0,xe(Y))),Q},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(Q){var ie=T;return function(){var k=T;T=ie;try{return Q.apply(this,arguments)}finally{T=k}}}})(Cf)),Cf}var S1;function AN(){return S1||(S1=1,Af.exports=wN()),Af.exports}var x1;function CN(){if(x1)return In;x1=1;var e=fr(),t=AN();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function a(i,o){u(i,o),u(i+"Capture",o)}function u(i,o){for(s[i]=o,i=0;i<o.length;i++)r.add(o[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function T(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,o,l,h){if(l!==null&&l.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return h?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function _(i,o,l,h){if(o===null||typeof o=="undefined"||y(i,o,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function w(i,o,l,h,E,b,x){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=o,this.sanitizeURL=b,this.removeEmptyString=x}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){v[i]=new w(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];v[o]=new w(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){v[i]=new w(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){v[i]=new w(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){v[i]=new w(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){v[i]=new w(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){v[i]=new w(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){v[i]=new w(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){v[i]=new w(i,5,!1,i.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function N(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var o=i.replace(A,N);v[o]=new w(o,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var o=i.replace(A,N);v[o]=new w(o,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var o=i.replace(A,N);v[o]=new w(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){v[i]=new w(i,1,!1,i.toLowerCase(),null,!1,!1)}),v.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){v[i]=new w(i,1,!1,i.toLowerCase(),null,!0,!0)});function C(i,o,l,h){var E=v.hasOwnProperty(o)?v[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(_(o,l,E,h)&&(l=null),h||E===null?T(o)&&(l===null?i.removeAttribute(o):i.setAttribute(o,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(o=E.attributeName,h=E.attributeNamespace,l===null?i.removeAttribute(o):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,h?i.setAttributeNS(h,o,l):i.setAttribute(o,l))))}var z=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),D=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),ne=Symbol.for("react.strict_mode"),ue=Symbol.for("react.profiler"),V=Symbol.for("react.provider"),se=Symbol.for("react.context"),pe=Symbol.for("react.forward_ref"),ve=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),Q=Symbol.iterator;function ie(i){return i===null||typeof i!="object"?null:(i=Q&&i[Q]||i["@@iterator"],typeof i=="function"?i:null)}var k=Object.assign,R;function ee(i){if(R===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);R=o&&o[1]||""}return`
11
- `+R+i}var O=!1;function Se(i,o){if(!i||O)return"";O=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(Z){var h=Z}Reflect.construct(i,[],o)}else{try{o.call()}catch(Z){h=Z}i.call(o.prototype)}else{try{throw Error()}catch(Z){h=Z}i()}}catch(Z){if(Z&&h&&typeof Z.stack=="string"){for(var E=Z.stack.split(`
10
+ `+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ns(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&dl.assertOptions(r,{silentJSONParsing:pn.transitional(pn.boolean),forcedJSONParsing:pn.transitional(pn.boolean),clarifyTimeoutError:pn.transitional(pn.boolean),legacyInterceptorReqResOrdering:pn.transitional(pn.boolean),advertiseZstdAcceptEncoding:pn.transitional(pn.boolean),validateStatusUndefinedResolves:pn.transitional(pn.boolean)},!1),s!=null&&($.isFunction(s)?n.paramsSerializer={serialize:s}:dl.assertOptions(s,{encode:pn.function,serialize:pn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),dl.assertOptions(n,{baseUrl:pn.spelling("baseURL"),withXsrfToken:pn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&$.merge(a.common,a[n.method]);a&&$.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete a[_]}),n.headers=hn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(w){if(typeof w.runWhen=="function"&&w.runWhen(n)===!1)return;d=d&&w.synchronous;const v=n.transitional||cf;v&&v.legacyInterceptorReqResOrdering?c.unshift(w.fulfilled,w.rejected):c.push(w.fulfilled,w.rejected)});const f=[];this.interceptors.response.forEach(function(w){f.push(w.fulfilled,w.rejected)});let p,m=0,T;if(!d){const _=[Ug.bind(this),void 0];for(_.unshift(...c),_.push(...f),T=_.length,p=Promise.resolve(n);m<T;)p=p.then(_[m++],_[m++]);return p}T=c.length;let y=n;for(;m<T;){const _=c[m++],w=c[m++];try{y=_(y)}catch(v){w.call(this,v);break}}try{p=Ug.call(this,y)}catch(_){return Promise.reject(_)}for(m=0,T=f.length;m<T;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=ns(this.defaults,t);const n=kg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return bg(n,t.params,t.paramsSerializer)}};$.forEach(["delete","get","head","options"],function(t){rs.prototype[t]=function(n,r){return this.request(ns(r||{},{method:t,url:n,data:r&&$.hasOwnProp(r,"data")?r.data:void 0}))}}),$.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(ns(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}rs.prototype[t]=n(),t!=="query"&&(rs.prototype[t+"Form"]=n(!0))});let sv=class B2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(s);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new fa(a,u,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new B2(function(s){t=s}),cancel:t}}};function ov(e){return function(n){return e.apply(null,n)}}function av(e){return $.isObject(e)&&e.isAxiosError===!0}const Ef={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ef).forEach(([e,t])=>{Ef[t]=e});function zg(e){const t=new rs(e),n=ng(rs.prototype.request,t);return $.extend(n,rs.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return zg(ns(e,s))},n}const Rt=zg(da);Rt.Axios=rs,Rt.CanceledError=fa,Rt.CancelToken=sv,Rt.isCancel=wg,Rt.VERSION=pf,Rt.toFormData=ol,Rt.AxiosError=Se,Rt.Cancel=Rt.CanceledError,Rt.all=function(t){return Promise.all(t)},Rt.spread=ov,Rt.isAxiosError=av,Rt.mergeConfig=ns,Rt.AxiosHeaders=hn,Rt.formToJSON=e=>xg($.isHTMLForm(e)?new FormData(e):e),Rt.getAdapter=Bg.getAdapter,Rt.HttpStatusCode=Ef,Rt.default=Rt;const{Axios:Q7,AxiosError:J7,CanceledError:Z7,isCancel:eU,CancelToken:tU,VERSION:nU,all:rU,Cancel:iU,isAxiosError:sU,spread:oU,toFormData:aU,AxiosHeaders:uU,HttpStatusCode:lU,formToJSON:cU,getAdapter:dU,mergeConfig:fU,create:hU}=Rt;class uv{constructor(t,n,r,s=!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",()=>Ke(this,null,function*(){try{const t=yield Rt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));_e(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const s=new URL(t);return s.hostname=s.hostname.replace(/^copilot\./,"api."),s.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,s)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class lv{constructor(t,n,r,s=!1,a,u){_e(this,"apiService");_e(this,"config",null);_e(this,"getConfig",()=>Ke(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));_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 uv(t,n,r,s,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Xs=(e,t,n,...r)=>{if(!e)return;const s=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",s,n,...r)};class cv{constructor(t=!1){_e(this,"isDevelopment");_e(this,"_log",(t,n,...r)=>{Xs(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 dv={copilot:"Your Search Assistant",messaging:"Commerce Client"},jg=F.createContext(null),fv=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:T,searchConfig:y,suggestionButtonConfig:_,progressStepsLimit:w=3,messageAlignment:v="start",autoScroll:A=!0,showProductDescription:k=!1,componentConfig:C,conversationHistory:z,resetConversationMessage:Y="",apiKey:D,apiToken:q,baseUrl:ne,customerId:ue,tenantId:V,theme:se,isDevelopment:pe,__features:ve,routingAttributes:re,enableDownloadTranscript:ae=!0,enablePageContext:xe=!1,enableEscalationToAgent:oe=!1,showProductCaptions:Q=!1,staticQuestions:ie,staticQuestionsStrategy:N="append",children:L})=>{const J=e==="messaging",I=F.useMemo(()=>{const at=re==null?void 0:re.isCartMgmtSupported;return at===!0||at==="true"},[re]),Te=F.useMemo(()=>J?{config:null}:new lv(ne,D,q,pe,ue,V),[J,ne,D,q,pe,ue,V]),He=F.useMemo(()=>new cv(pe),[pe]);F.useEffect(()=>{J||!Te||Te.config||Te.getConfig()},[Te,J]);const ye=F.useMemo(()=>mA(se),[se]),Le=F.useMemo(()=>{const at=(y==null?void 0:y.placeholder)||m,on=(y==null?void 0:y.buttonLabel)||T;let Dt="icon";return y!=null&&y.buttonType?Dt=y.buttonType:T&&(Dt="text"),fe(B({},y||{}),{placeholder:at,buttonLabel:on,buttonType:Dt})},[y,m,T]),Be=F.useMemo(()=>fe(B({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||dv[e!=null?e:"copilot"]}),[r,t,n,e]),Ge=F.useMemo(()=>({configModule:Te,mode:e!=null?e:"copilot",headerConfig:Be,entryMessage:a,staticQuestions:ie||[],staticQuestionsStrategy:N,globalClassName:s,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:ye,logger:He,searchConfig:Le,suggestionButtonConfig:_,progressStepsLimit:w,messageAlignment:v,autoScroll:A,showProductDescription:!!k,enableMinimize:!!(C!=null&&C.enableMinimize),launcherAriaLabel:C==null?void 0:C.launcherAriaLabel,enableDownloadTranscript:ae,enablePageContext:xe,enableEscalationToAgent:oe,showProductCaptions:!!Q,resetConversationMessage:Y,conversationHistory:{sinceHours:typeof(z==null?void 0:z.sinceHours)=="number"?z.sinceHours:J?24:1,limit:z==null?void 0:z.limit},features:ve,isCartMgmtSupported:I}),[Te,e,Be,a,ie,N,s,f,p,c,d,u,Le,_,v,A,k,C,ae,xe,oe,w,Q,Y,He,ye,z,ve,I,J]);return S.jsx(jg.Provider,{value:Ge,children:L})},tt=()=>{const e=F.useContext(jg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class hv{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 yv(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position,isFullHeight:this.initialState.dialog.isFullHeight,width:this.initialState.dialog.width},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position,isFullHeight:this.dialogProxy.isFullHeight,width:this.dialogProxy.width},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const Je=new hv,is=()=>Je.connected,ha=()=>Je.isOpen,yf="cimulate.widget.minimizedOnNav";function pv(){try{const e=sessionStorage.getItem(yf)==="1";return sessionStorage.removeItem(yf),e}catch(e){return!1}}function mv(){try{sessionStorage.removeItem(yf)}catch(e){return}}const gv=e=>{window.addEventListener(Zd,e)},Ev=e=>{window.removeEventListener(Zd,e)},yv=(e,t)=>{const n=new CustomEvent(Zd,{detail:{property:e,value:t}});window.dispatchEvent(n)},bv=e=>{Je.connectedProxy.connected=e},pa=e=>{if(!cA(e)){const t=Q0.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}Je.entryTypeProxy.entryType=e},ni=e=>{const t=Je.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;Je.statusProxy.isOpen=n,n&&(Je.statusProxy.isMinimized=!1,mv())},ma=e=>{const t=Je.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Je.statusProxy.isMinimized=n,n&&(Je.statusProxy.isOpen=!1)},bf=e=>{Je.modalProxy.isFullscreen=e},fl=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);Je.statusProxy.type=e,e==="dialog"||e==="chat"?Je.modeProxy.mode="embedded":Je.modeProxy.mode="standalone"},Tf=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);Je.dialogProxy.position=e},Tv=e=>{const t=Je.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Je.dialogProxy.isFullHeight=n},_v=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=tt(),s=F.useCallback(C=>{n({type:mt.SET_COPILOT,payload:C})},[n]),a=F.useCallback(C=>{bv(C),n({type:mt.SET_CONNECTED,payload:C})},[n]),u=F.useCallback(()=>{n({type:mt.RESET_COPILOT,payload:{}})},[n]),c=F.useCallback(()=>{n({type:mt.RESET_STATE,payload:{}})},[n]),d=F.useCallback(C=>{r==null||r.log(`${C.name} event received`,C),n({type:mt.ADD_MESSAGE,payload:C}),C.bypassHandlers||e==null||e(C)},[e,r,n]),f=F.useCallback(C=>{n({type:mt.ADD_LOADING_MESSAGE,payload:C})},[n]),p=F.useCallback(C=>{n({type:mt.REMOVE_LOADING_MESSAGE,payload:C})},[n]),m=F.useCallback(C=>{d(C),f(C.id)},[d,f]),T=F.useCallback(C=>{n({type:mt.SET_ACTIVE_CONVERSATION_ID,payload:C})},[n]),y=F.useCallback(C=>{n({type:mt.ADD_CONVERSATION_ID,payload:C})},[n]),_=F.useCallback(C=>{n({type:mt.SET_CONVERSATION_IDS,payload:C})},[n]),w=F.useCallback(C=>{n({type:mt.SET_IMAGE_FILE,payload:C})},[n]),v=F.useCallback(C=>{n({type:mt.SET_ASK_CIM_PROMPTS,payload:C})},[n]),A=F.useCallback(C=>{n({type:mt.SET_CONVERSATION_HISTORY_LOADED,payload:C})},[n]),k=F.useMemo(()=>({setCopilot:s,setConnected:a,resetCopilot:u,resetCopilotState:c,addCopilotEvent:d,addLoadingMessage:f,removeLoadingMessage:p,handleCopilotRequestAck:m,setActiveConversationId:T,addConversationId:y,setConversationIds:_,setImageFile:w,setAskCimPrompts:v,setConversationHistoryLoaded:A}),[s,a,u,c,d,f,p,m,T,y,_,w,v,A]);return S.jsx(eg.Provider,{value:k,children:t})};aA();const Sv=(e,t)=>{const{type:n,payload:r}=t;if(n===mt.ADD_MESSAGE){const s=r;if(e.messages.push(s),s.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===s.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const c=u.findIndex(d=>d.id===s.id);if(c!==-1){u[c]=s;return}u.push(s);return}else{e.groupedMessages.push({type:"group",eventSourceId:s.eventSourceId,messages:[s],createdAt:new Date(s.createdAt)});return}}e.groupedMessages.push({type:"individual",message:s,createdAt:new Date(s.createdAt)});return}switch(n){case mt.RESET_STATE:e.messages=Zi.messages,e.groupedMessages=Zi.groupedMessages,e.loadingMessages=Zi.loadingMessages,e.imageFile=Zi.imageFile,e.askCimPrompts=Zi.askCimPrompts,e.conversationHistoryLoaded=Zi.conversationHistoryLoaded;break;case mt.RESET_COPILOT:e.copilot=null;break;case mt.SET_COPILOT:e.copilot=r;break;case mt.SET_CONNECTED:e.connected=r;break;case mt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case mt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case mt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case mt.ADD_CONVERSATION_ID:{const s=r;e.conversationIds.includes(s)||e.conversationIds.push(s)}break;case mt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case mt.SET_IMAGE_FILE:e.imageFile=r;break;case mt.SET_ASK_CIM_PROMPTS:e.askCimPrompts.requestId=(r==null?void 0:r.requestId)||null,e.askCimPrompts.message=(r==null?void 0:r.message)||null;break;case mt.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},xv=({onCopilotEvent:e,children:t})=>{const[n,r]=X0(Sv,Zi);return S.jsx(Z0.Provider,{value:n,children:S.jsx(_v,{onCopilotEvent:e,dispatch:r,children:t})})};function wv(){var e=F.useRef(!0);return e.current?(e.current=!1,!0):e.current}function Av(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function Cv(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var _f=typeof window!="undefined",ga=function(e){F.useEffect(e,[])},vv=function(e){var t=F.useRef(e);t.current=e,ga(function(){return function(){return t.current()}})},Nv=function(e){var t=F.useRef(0),n=F.useState(e),r=n[0],s=n[1],a=F.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return vv(function(){cancelAnimationFrame(t.current)}),[r,a]},kv=function(e,t){return e===t};function Pv(e,t){t===void 0&&(t=kv);var n=F.useRef(),r=F.useRef(e),s=wv();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var Ov=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,s=t.initialHeight,a=s===void 0?1/0:s,u=t.onChange,c=Nv({width:_f?window.innerWidth:r,height:_f?window.innerHeight:a}),d=c[0],f=c[1];return F.useEffect(function(){if(_f){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return Av(window,"resize",p),function(){Cv(window,"resize",p)}}},[]),d};class Iv{constructor(){_e(this,"items",[]);_e(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});_e(this,"remove",()=>this.items.shift());_e(this,"first",()=>this.items.length>0?this.items[0]:null);_e(this,"clear",()=>{this.items.length=0});_e(this,"processQueue",t=>{new Array(mn.size).fill(1).forEach(()=>{const r=mn.first();r&&(t(r),mn.remove())})})}get size(){return this.items.length}}const mn=new Iv,$g=e=>{window.addEventListener(Jd,e)},Vg=e=>{window.removeEventListener(Jd,e)},Rv=(e,t,n)=>{const r=new CustomEvent(Jd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},qg=e=>{window.addEventListener(Qd,e)},Yg=e=>{window.removeEventListener(Qd,e)},Lv=(e,t,n)=>{const r=new CustomEvent(Qd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Wg=e=>{window.addEventListener(Kd,e)},Gg=e=>{window.removeEventListener(Kd,e)},Sf=(e,t,n)=>{const r=new CustomEvent(Kd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},Dv=e=>{window.addEventListener(tf,e)},Mv=e=>{window.removeEventListener(tf,e)},Ea=(e,t,n)=>{const r=new CustomEvent(tf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class Fv{constructor(){_e(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});_e(this,"categoryIdProxy");_e(this,"facetFiltersProxy");_e(this,"rangeFiltersProxy");_e(this,"catalogSegmentProxy");_e(this,"pricebooksProxy");_e(this,"_fullGet",(t,n)=>Reflect.get(t,n));_e(this,"_fullSet",(t,n,r)=>{const s=hA[n];return Lv(s,n,r),Reflect.set(t,n,r)});_e(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));_e(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));_e(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId,categoryName:this.initialParams.categoryName},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get categoryId(){return this.categoryIdProxy.categoryId||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{categoryId:this.categoryId,categoryName:this.categoryIdProxy.categoryName,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const ut=new Fv,Xg=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},Kg=(e,t,n)=>{var u,c;const r=B({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((c=r[e])!=null&&c.includes(t))){const d=r[e].filter(f=>f!==t);d.length>0?r[e]=d:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];const a=n.updateFacetFiltersProxy(r);n.facetFiltersProxy.facetFilters=a.facetFilters},Qg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},Jg=({field:e,value:t},n)=>{const[r,s]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof s=="undefined")throw new Error("Range values must be an array with two numbers for min and max");const a=[...n.rangeFiltersProxy.rangeFilters||[]],u=a.findIndex(d=>d.field===e);if(u!==-1){a[u]={field:e,min:r,max:s},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:s});const c=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=c.rangeFilters},Zg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},e1=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},Bv=e=>{if(!is()||!ha()){is()&&mn.clear(),mn.add({context:"browse",payload:fe(B({},ut.state),{categoryId:e})});return}ut.categoryIdProxy.categoryId=e},t1=e=>{Xg(e,ut)},Uv=(e,t)=>{Kg(e,t,ut)},n1=e=>{Qg(e,ut)},Hv=({field:e,value:t})=>{Jg({field:e,value:t},ut)},zv=e=>{Zg(e,ut)},r1=e=>{e1(e,ut)},i1=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=is(),n=ha();if(!t||!n){t&&mn.clear(),mn.add({context:"browse",payload:B({},e)});return}"facetFilters"in e&&t1(e.facetFilters||{}),"rangeFilters"in e&&n1(e.rangeFilters||[]),"catalogSegment"in e&&(ut.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&r1(e.pricebooks||[]),"categoryName"in e&&(ut.categoryIdProxy.categoryName=e.categoryName||""),ut.categoryIdProxy.categoryId=e.categoryId},jv=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:i1,updateBrowseCategoryId:Bv,updateCatalogSegment:zv,updateFacetFilter:Uv,updateFacetFilters:t1,updatePricebooks:r1,updateRangeFilter:Hv,updateRangeFilters:n1},Symbol.toStringTag,{value:"Module"}));class $v{constructor(){_e(this,"initialParams",{productId:"",productName:"",pdpLink:""});_e(this,"proxy");_e(this,"_fullGet",(t,n)=>Reflect.get(t,n));_e(this,"_fullSet",(t,n,r)=>(Sf(n,r),Reflect.set(t,n,r)));_e(this,"updateProxy",t=>{t.productId&&(this.proxy=this.createProxy(t))});_e(this,"clear",()=>{this.proxy=this.createProxy(this.initialParams)});_e(this,"dispatchContextUpdate",()=>{Sf("pdp-context",this.state)});_e(this,"createProxy",t=>new Proxy({productId:t.productId||"",productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}));this.proxy=this.createProxy(this.initialParams)}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const mr=new $v,s1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=is(),n=ha();if(!t||!n){t&&mn.clear(),mn.add({context:"pdp",payload:B({},e)});return}mr.updateProxy(e),Sf("pdp-context",e)},Vv=e=>{mr.proxy.productId=e,is()||mn.add({context:"pdp",payload:B({},mr.state)})},qv=e=>{mr.proxy.pdpLink=e};class Yv{constructor(){_e(this,"initialState",tg);_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 ya(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 Ut=new Yv,Wv=e=>{window.addEventListener(ef,e)},Gv=e=>{window.removeEventListener(ef,e)},ya=(e,t)=>{const n=new CustomEvent(ef,{detail:{property:e,value:t}});window.dispatchEvent(n)},o1=e=>{const t=Ut.isOpen,n=typeof e=="boolean"?e:!t;Ut.promptsStateProxy.isOpen=n},a1=e=>{const t=Ut.isInline,n=typeof e=="boolean"?e:!t;Ut.promptsStateProxy.isInline=n},Xv=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ya("params",e),Ut.promptsStateProxy.entryType="ask_cim"},Kv=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ya("params",e),Ut.promptsStateProxy.entryType="search"},Qv=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ya("params",e),Ut.promptsStateProxy.entryType="browse"},Jv=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),ya("params",e),Ut.promptsStateProxy.entryType="pdp"},Zv=({elementId:e,entryType:t,params:n,isInline:r})=>{Ut.promptsStateProxy.elementId=e,t&&(Ut.promptsStateProxy.entryType=t),typeof r=="boolean"&&a1(r),n&&Ut.updatePromptsParamsProxy(n),Ut.isOpen||o1(!0)},eN=Object.freeze(Object.defineProperty({__proto__:null,endConversation:()=>{Ea("endConversation",!0,ti.END_CONVERSATION)},getConversationMessages:({payload:e,callback:t})=>{Ea("getConversationMessages",{payload:e,callback:t},ti.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{Ea("getSessionInformation",{callback:e},ti.GET_SESSION_INFORMATION)},loadConversation:e=>{Ea("loadConversation",e,ti.LOAD_CONVERSATION)},resetConversation:()=>{Ea("resetConversation",!0,ti.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class tN{constructor(){_e(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});_e(this,"queryProxy");_e(this,"facetFiltersProxy");_e(this,"rangeFiltersProxy");_e(this,"catalogSegmentProxy");_e(this,"pricebooksProxy");_e(this,"_fullGet",(t,n)=>Reflect.get(t,n));_e(this,"_fullSet",(t,n,r)=>{const s=pA[n];return Rv(s,n,r),Reflect.set(t,n,r)});_e(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));_e(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));_e(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get query(){return this.queryProxy.query||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{query:this.query,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const Tt=new tN,nN=e=>{const t=ha(),n=is();if(!n||!t){n&&mn.clear(),mn.add({context:"search",payload:fe(B({},Tt.state),{query:e})});return}Tt.queryProxy.query=e},u1=e=>{Xg(e,Tt)},rN=(e,t)=>{Kg(e,t,Tt)},l1=e=>{Qg(e,Tt)},iN=({field:e,value:t})=>{Jg({field:e,value:t},Tt)},sN=e=>{Zg(e,Tt)},c1=e=>{e1(e,Tt)},d1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=ha(),n=is();if(!n||!t){n&&mn.clear(),mn.add({context:"search",payload:B({},e)});return}"facetFilters"in e&&u1(e.facetFilters||{}),"rangeFilters"in e&&l1(e.rangeFilters||[]),"catalogSegment"in e&&(Tt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&c1(e.pricebooks||[]),Tt.queryProxy.query=e.query},oN=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:d1,updateCatalogSegment:sN,updateFacetFilter:rN,updateFacetFilters:u1,updatePricebooks:c1,updateRangeFilter:iN,updateRangeFilters:l1,updateSearchQuery:nN},Symbol.toStringTag,{value:"Module"})),aN={categoryId:ut.categoryId,categoryName:ut.categoryIdProxy.categoryName||"",facetFilters:ut.facetFilters,rangeFilters:ut.rangeFilters,catalogSegment:ut.catalogSegment,pricebooks:ut.pricebooks},f1=F.createContext(aN),uN=({children:e})=>{const[t,n]=F.useState(ut.categoryId),[r,s]=F.useState(ut.categoryIdProxy.categoryName||""),[a,u]=F.useState(ut.facetFilters||{}),[c,d]=F.useState(ut.rangeFilters||[]),[f,p]=F.useState(ut.catalogSegment||null),[m,T]=F.useState(ut.pricebooks||null);F.useEffect(()=>{const _=({detail:w})=>{(w==null?void 0:w.property)==="categoryId"&&n(w.value),(w==null?void 0:w.property)==="categoryName"&&s(w.value),(w==null?void 0:w.property)==="facetFilters"&&u(w.value),(w==null?void 0:w.property)==="rangeFilters"&&d(w.value),(w==null?void 0:w.property)==="catalogSegment"&&p(w.value),(w==null?void 0:w.property)==="pricebooks"&&T(w.value)};return qg(_),()=>{Yg(_)}},[]);const y=F.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:m}),[t,r,a,c,f,m]);return S.jsx(f1.Provider,{value:y,children:e})},lN=()=>{const e=F.useContext(f1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},cN={searchQuery:Tt.query,facetFilters:Tt.facetFilters,rangeFilters:Tt.rangeFilters,catalogSegment:Tt.catalogSegment,pricebooks:Tt.pricebooks},h1=F.createContext(cN),dN=({children:e})=>{const[t,n]=F.useState(Tt.query),[r,s]=F.useState(Tt.facetFilters),[a,u]=F.useState(Tt.rangeFilters),[c,d]=F.useState(Tt.catalogSegment),[f,p]=F.useState(Tt.pricebooks);F.useEffect(()=>{const T=({detail:y})=>{(y==null?void 0:y.property)==="query"&&n(y.value),(y==null?void 0:y.property)==="facetFilters"&&s(y.value),(y==null?void 0:y.property)==="rangeFilters"&&u(y.value),(y==null?void 0:y.property)==="catalogSegment"&&d(y.value),(y==null?void 0:y.property)==="pricebooks"&&p(y.value)};return $g(T),()=>{Vg(T)}},[]);const m=F.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return S.jsx(h1.Provider,{value:m,children:e})},fN=()=>{const e=F.useContext(h1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},hN={productId:mr.productId,pdpLink:mr.pdpLink},p1=F.createContext(hN),pN=({children:e})=>{const[t,n]=F.useState(mr.productId),[r,s]=F.useState(mr.pdpLink);F.useEffect(()=>{const u=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const d=c.value;n(d.productId),s(d.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&s(c.value)};return Wg(u),()=>{Gg(u)}},[]);const a=F.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return S.jsx(p1.Provider,{value:a,children:e})},mN=()=>{const e=F.useContext(p1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},m1=F.createContext({mode:Je.modeProxy.mode,entryType:Je.entryType,status:Je.statusProxy,dialogPosition:Je.dialogProxy.position,isDialogFullHeight:Je.dialogProxy.isFullHeight,dialogWidth:Je.dialogProxy.width,isModalFullscreen:Je.modalProxy.isFullscreen,previousComponentType:Je.statusProxy.type}),gN=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=F.useState(e!=null?e:Je.entryTypeProxy.entryType),[u,c]=F.useState(Je.modeProxy.mode),[d,f]=F.useState({type:n||Je.statusProxy.type,isOpen:t&&"isOpen"in t?!!t.isOpen:Je.statusProxy.isOpen,isMinimized:t&&"isMinimized"in t?!!t.isMinimized:Je.statusProxy.isMinimized}),[p,m]=F.useState(Je.dialogProxy.position),[T,y]=F.useState(Je.dialogProxy.isFullHeight),[_,w]=F.useState(Je.dialogProxy.width),[v,A]=F.useState(Je.modalProxy.isFullscreen),k=F.useRef(!1),C=Pv(d.type);F.useEffect(()=>{const Y=D=>{const{property:q,value:ne}=D.detail||{};if(!(!q||ne===void 0)){if(q==="mode"){c(ne);return}if(q==="entryType"){a(ne);return}if(q==="isMinimized"){f(ue=>fe(B({},ue),{isMinimized:ne}));return}if(q==="isOpen"){f(ue=>fe(B({},ue),{isOpen:ne}));return}if(q==="type"){f(ue=>fe(B({},ue),{type:ne}));return}if(q==="position"){m(ne);return}if(q==="isFullHeight"){y(ne);return}if(q==="width"){w(ne);return}if(q==="isFullscreen"){A(ne);return}}};return gv(Y),()=>{Ev(Y)}},[]),ga(()=>{e&&pa(e)}),ga(()=>{if(k.current)return;k.current=!0;const Y=n||(t==null?void 0:t.type);Y&&fl(Y);const D=pv();t&&"isOpen"in t&&ni(!!t.isOpen),t&&"isMinimized"in t&&ma(!!t.isMinimized),D&&ma(!0)}),ga(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:Y}=t.options;Y&&Tf(Y),"dialogFullHeight"in t.options&&Tv(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&w(t.options.dialogWidth),"isModalFullscreen"in t.options&&bf(!!t.options.isModalFullscreen)});const z=F.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:C||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:_,isModalFullscreen:v}),[u,s,d,C,p,T,_,v]);return S.jsx(m1.Provider,{value:z,children:r})},tr=()=>{const e=F.useContext(m1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},g1=F.createContext(null),E1=F.createContext(null),xf=()=>{const e=F.useContext(E1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},ri=()=>{const e=F.useContext(g1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},Ks=()=>{const e=F.useContext(eg);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Vn=()=>{const e=F.useContext(Z0);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},EN=({copilot:e})=>{const{logger:t,conversationHistory:n}=tt(),{isInline:r}=ri(),{addCopilotEvent:s,setConversationHistoryLoaded:a}=Ks(),{activeConversationId:u}=Vn(),c=F.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=F.useCallback((f,p)=>{e&&f.conversationId&&e.getConversationEvents(f,m=>{t==null||t.log("Retrieved conversation messages: ",m),p==null||p(m)})},[e,t]);return F.useEffect(()=>{if(r||!u)return;if(n.sinceHours===0||(n==null?void 0:n.limit)===0){a(!0);return}const f=3600*1e3*n.sinceHours,p=new Date(Date.now()-f).toISOString(),m={conversationId:u,since:p,excludeEvents:["done","error","connection_error","refined_browse","refined_search","conversation_reset"]};typeof n.limit=="number"&&(m.limit=n.limit),d(m,T=>{const y=[];[...T.reverse()||[]].forEach(w=>{var A;const v=T.find(k=>k.id===w.eventSourceId);(A=v==null?void 0:v.name)!=null&&A.endsWith("_suggestions")||(w.bypassHandlers=!0,y.unshift(w))}),y.forEach(w=>{s(w)}),a(!0)})},[t,r,u,d,s,a,n]),{getSessionInformation:c,getConversationMessages:d}},y1=F.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),yN=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>{const{logger:p,clientContext:m,baseCatalogParams:T}=tt(),an=fN(),{searchQuery:y}=an,_=fn(an,["searchQuery"]),Fn=lN(),{categoryId:w}=Fn,v=fn(Fn,["categoryId"]),{productId:A,pdpLink:k}=mN(),{setCopilot:C,setConnected:z,resetCopilot:Y,resetCopilotState:D,addCopilotEvent:q,removeLoadingMessage:ne,handleCopilotRequestAck:ue,setActiveConversationId:V,setConversationIds:se,setAskCimPrompts:pe}=Ks(),{connected:ve,copilot:re,messages:ae,groupedMessages:xe,loadingMessages:oe,askCimPrompts:Q}=Vn(),{status:ie,entryType:N}=tr(),{isInline:L}=ri(),{getConversationMessages:J,getSessionInformation:I}=EN({copilot:re}),Te=F.useMemo(()=>oe.size>0,[oe]),He=F.useCallback(we=>oe.has(we),[oe]),ye=F.useCallback(({query:we,facetFilters:Pe,rangeFilters:Me,catalogSegment:rt,pricebooks:pt,userPrompt:Z,imageFile:ge})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Ce={searchParams:{query:we}};Z&&(Ce.userPrompt=Z),ge&&(Ce.attachments={image:ge}),Pe&&Object.keys(Pe).length>0&&(Ce.searchParams.facetFilters=Pe),Me&&Me.length>0&&(Ce.searchParams.rangeFilters=Me),rt&&(Ce.searchParams.catalogSegment=rt),pt&&(Ce.searchParams.pricebooks=pt),m&&(Ce.clientContext=m),pa("search"),re.search(Ce,qe=>{const Ie=B({},qe);ue(Ie)})},[p,ue,re,m]),Le=F.useCallback(({categoryId:we,categoryName:Pe,facetFilters:Me,rangeFilters:rt,catalogSegment:pt,pricebooks:Z,userPrompt:ge,imageFile:Ce})=>{if(!re){p==null||p.error("Copilot is not initialized");return}const qe=Me&&Object.keys(Me).length>0;if(we===""&&!qe){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const Ie={browseParams:{categoryId:we||""}};ge&&(Ie.userPrompt=ge),Ce&&(Ie.attachments={image:Ce}),qe&&(Ie.browseParams.facetFilters=Me),rt&&rt.length>0&&(Ie.browseParams.rangeFilters=rt),pt&&(Ie.browseParams.catalogSegment=pt),Array.isArray(Z)&&Z.length>0&&(Ie.browseParams.pricebooks=Z),(m||Pe)&&(Ie.clientContext={},m&&(Ie.clientContext=B({},m)),Pe&&(Ie.clientContext.cimLabel=Pe)),pa("browse"),re.browse(Ie,lt=>{var Vr;const qt=B({},lt),zt=((Vr=qt.request)==null?void 0:Vr.clientContext)||{},un=(zt==null?void 0:zt.cimLabel)||Pe;un&&qt.request&&(qt.request.label=un),ue(qt)})},[p,ue,re,m]),Be=F.useCallback(({productId:we,productName:Pe,pdpLink:Me,userPrompt:rt,imageFile:pt})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Z={productId:we};rt&&(Z.userPrompt=rt),Me&&(Z.pdpLink=Me),pt&&(Z.attachments={image:pt}),(m||Pe)&&(Z.clientContext={},m&&(Z.clientContext=B({},m)),Pe&&(Z.clientContext.cimLabel=Pe)),T&&(Z.baseCatalogParams=T),pa("pdp"),re.productView(Z,ge=>{var lt;const Ce=B({},ge),qe=((lt=Ce.request)==null?void 0:lt.clientContext)||{},Ie=(qe==null?void 0:qe.cimLabel)||Pe;Ie&&Ce.request&&(Ce.request.label=Ie),ue(Ce)})},[p,re,ue,m,T]),Ge=F.useCallback(({userPrompt:we,imageFile:Pe})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Me={userPrompt:we};Pe&&(Me.attachments={image:Pe}),m&&(Me.clientContext=m),T&&(Me.baseCatalogParams=T),re.askCim(Me,rt=>{const pt=B({},rt);ue(pt)})},[p,re,ue,m,T]),at=F.useCallback(we=>{q(we),c==null||c(we)},[q,c]),on=F.useCallback(we=>{q(we),d==null||d(we)},[q,d]),Dt=F.useCallback(we=>{u==null||u(we),z(!0)},[u,z]);F.useEffect(()=>{!re||!ve||!ie.isOpen||mn.size>0&&mn.processQueue(we=>{if(we.context==="search"){const Pe=B({},we.payload);d1(Pe)}if(we.context==="browse"){const Pe=B({},we.payload);i1(Pe)}if(we.context==="pdp"){const Pe=B({},we.payload);s1(Pe)}})},[ie.isOpen,re,ve]);const _r=F.useCallback(we=>{const Pe=Me=>{const rt=fe(B({},Me),{id:Me.inquiryLinkId||Me.id});q(rt)};we.on("connect_ack",Dt),we.on("partial_inquiry",Pe),we.on("display_products",q),we.on("progress",q),we.on("refined_search",at),we.on("refined_browse",on),we.on("done",Me=>{ne(Me.eventSourceId)}),we.on("error",Me=>{q(Me),ne(Me.eventSourceId)}),we.onDisconnect(Me=>{const rt=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Me),!rt.includes(Me)){z(!1);return}p==null||p.log("De-registering event listeners");const pt=new Date().toISOString();q({name:"error",message:"Connection was lost. Please try again.",createdAt:pt,id:`error-${pt}`,sessionId:"session"}),we.off()})},[p,z,ne,at,on,q,Dt]);F.useEffect(()=>{if(!re)return;const we=Pe=>{if(!L){if(!Pe.message&&Pe.eventSourceId&&Pe.eventSourceId===Q.requestId){pe({requestId:Pe.eventSourceId,message:Pe});return}q(Pe)}};return re.on("follow_up",we),()=>{re.off("follow_up",we)}},[re,ae,Q.requestId,L,q,pe]),F.useEffect(()=>{if(!re)return;const we=Pe=>{if(L)return;const Me=fe(B({},Pe),{id:Pe.inquiryLinkId||Pe.id});q(Me)};return re.on("inquiry",we),()=>{re.off("inquiry",we)}},[re,L,q]),ga(()=>{let we;n?we=n:we=a?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Pe={baseUrl:we};e?Pe.apiKey=e:t&&(Pe.apiToken=t),r&&(Pe.customerId=r),s&&(Pe.tenantId=s);const Me=new Qw(Pe);return C(Me),_r(Me),Me.connect(),Me.requestSessionInformation(rt=>{p==null||p.log("Session Information: ",rt);const{activeConversationId:pt,conversationIds:Z}=rt.data||{};pt&&V(pt),Z!=null&&Z.length&&se(Z)}),()=>{Me.disconnect(),Me.off(),Y()}});const sr=F.useCallback(we=>{if(!re)return;const Pe={eventId:we,reason:"User cancelled the request"};re.cancelRequest(Pe,Me=>{q(Me),ne(we)})},[q,ne,re]),Zt=F.useCallback(()=>{re&&re.conversationReset({},we=>{D(),q(we),re.requestSessionInformation(Pe=>{p==null||p.log("Session Information: ",Pe);const{activeConversationId:Me,conversationIds:rt}=Pe.data||{};Me&&V(Me),rt!=null&&rt.length&&se(rt)})})},[re,p,q,D,V,se]),Ve=F.useCallback((we,Pe)=>{if(!we)return;const Me={userPrompt:we};switch(Pe&&(Me.imageFile=Pe),N){case"ask_cim":Ge(Me);return;case"search":y?ye(B(B({query:y},_),Me)):Ge(Me);return;case"browse":Le(B(B({categoryId:w},v),Me));return;case"pdp":A?Be(B({productId:A,pdpLink:k||""},Me)):Ge(Me);return}},[N,y,_,ye,Ge,w,v,Le,Be,A,k]),Nt=F.useCallback((we,Pe)=>{var ge,Ce,qe;const rt=we.params.userPrompt||"";if(!rt)return;const pt=ae.find(Ie=>Ie.id===Pe);if(!pt)return;const Z=pt.name.replace("_suggestions","");if(Z==="ask_cim"){Ge({userPrompt:rt});return}if(Z==="copilot_search"){const Ie=((ge=pt.request)==null?void 0:ge.searchParams)||{},qt=Ie.query===y;ye(fe(B({query:Ie.query||y},qt?_:{}),{userPrompt:rt}));return}if(Z==="copilot_browse"){const Ie=pt.request,lt=Ie.browseParams||{},zt=lt.categoryId===w,un=((Ce=Ie.clientContext)==null?void 0:Ce.cimLabel)||"";Le(fe(B({categoryId:lt.categoryId||w||""},zt?v:{}),{categoryName:un,userPrompt:rt}));return}if(Z==="product_view"){const Ie=pt.request||{},lt=Ie.productId,qt=lt===A,zt=((qe=Ie.clientContext)==null?void 0:qe.cimLabel)||"";let un="";qt?un=k||"":un=Ie.pdpLink||"",Be({productId:lt||A,pdpLink:un,productName:zt,userPrompt:rt})}},[ae,y,_,ye,Ge,w,v,Le,Be,A,k]),vn=F.useMemo(()=>({copilot:re,messages:ae,groupedMessages:xe,isLoading:Te,isResponseLoading:He,handleAskCim:Ge,handleSearch:ye,handleBrowse:Le,handlePdp:Be,handleUserInput:Ve,handleSuggestion:Nt,handleCancel:sr,resetConversation:Zt,getSessionInformation:I,getConversationMessages:J}),[re,ae,xe,Te,He,Ge,ye,Le,Be,Ve,Nt,sr,Zt,I,J]);return S.jsx(y1.Provider,{value:vn,children:f})},b1=()=>{const{copilot:e}=Vn(),{addCopilotEvent:t}=Ks();return{getCopilotSuggestions:F.useCallback((r,s,a)=>{if(!e||!s||!r)return;const u=c=>{t(c),a(c)};switch(s){case"ask_cim":e.askCimSuggestions(r,u);break;case"search":e.searchSuggestions({searchParams:r},u);break;case"browse":e.browseSuggestions({browseParams:r},u);break;case"pdp":e.productViewSuggestions({productId:r.productId},u);break}},[e,t])}},Ir=()=>{const e=F.useContext(y1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},bN=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=Vn(),{entryType:s}=tr(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:c}=Ks(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:T,getConversationMessages:y}=Ir(),{getCopilotSuggestions:_}=b1();F.useEffect(()=>{!e||!s||!t||!r||n.requestId||s==="ask_cim"&&_({},s,k=>{c({requestId:k.id,message:null})})},[e,t,n.requestId,s,r,_,c]);const w=F.useCallback(({query:k})=>{if(!e||!k)return;const{facetFilters:C}=Tt.facetFiltersProxy,{rangeFilters:z}=Tt.rangeFiltersProxy,{catalogSegment:Y}=Tt.catalogSegmentProxy,{pricebooks:D}=Tt.pricebooksProxy,q={query:k};q.facetFilters=C||{},q.rangeFilters=z||[],q.catalogSegment=Y||"",q.pricebooks=D||[],d(B({},q))},[e,d]),v=F.useCallback(({categoryId:k})=>{if(!e)return;const C=ut.categoryIdProxy.categoryName,{facetFilters:z}=ut.facetFiltersProxy,{rangeFilters:Y}=ut.rangeFiltersProxy,{catalogSegment:D}=ut.catalogSegmentProxy,{pricebooks:q}=ut.pricebooksProxy,ne={categoryId:k};ne.categoryName=C||"",ne.facetFilters=z||{},ne.rangeFilters=Y||[],ne.catalogSegment=D||"",ne.pricebooks=q||[],f(B({},ne))},[e,f]),A=F.useCallback(({productId:k})=>{if(!e||!k)return;const C={productId:k,pdpLink:mr.pdpLink,productName:mr.proxy.productName||""};p(C)},[e,p]);return F.useEffect(()=>{const k=({detail:C})=>{(C==null?void 0:C.property)==="query"&&w({query:C.value})};return $g(k),()=>{Vg(k)}},[w]),F.useEffect(()=>{const k=({detail:C})=>{if((C==null?void 0:C.property)==="pdp-context"){const z=C.value;A({productId:z.productId});return}(C==null?void 0:C.property)==="productId"&&A({productId:C.value})};return Wg(k),()=>{Gg(k)}},[A]),F.useEffect(()=>{const k=({detail:C})=>{(C==null?void 0:C.property)==="categoryId"&&v({categoryId:C.value})};return qg(k),()=>{Yg(k)}},[v]),F.useEffect(()=>{const k=({detail:C})=>{if((C==null?void 0:C.event)==ti.RESET_CONVERSATION&&m(),(C==null?void 0:C.event)==ti.GET_SESSION_INFORMATION){const z=C.value.callback;T(z)}if((C==null?void 0:C.event)==ti.GET_CONVERSATION_MESSAGES){const{payload:z,callback:Y}=C.value;if(!z.conversationId||typeof Y!="function")return;y(z,Y)}if((C==null?void 0:C.event)==ti.LOAD_CONVERSATION){const z=C.value;if(!z.conversationId)return;y(z,D=>{a(),D.forEach(q=>{u(q)})})}};return Dv(k),()=>{Mv(k)}},[m,T,y,a,u]),null},TN=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>S.jsxs(yN,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:[S.jsx(bN,{}),f]}),_N=({children:e,dispatch:t})=>{const n=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),s=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),c=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),m=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),T=F.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),y=F.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:T}),[n,r,s,a,u,c,d,f,p,m,T]);return S.jsx(E1.Provider,{value:y,children:e})},SN=(e,t)=>{const{type:n,payload:r}=t;switch(n){case gt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case gt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case gt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case gt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case gt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case gt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case gt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case gt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},xN=({promptsConfig:e,children:t})=>{const[n,r]=X0(SN,fe(B(B({},tg),e||{}),{staticQuestions:F0((e==null?void 0:e.staticQuestions)||[])}));return S.jsx(g1.Provider,{value:n,children:S.jsx(_N,{dispatch:r,children:t})})},T1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,customerId:s,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,theme:f,openLinksInNewTab:p,globalClassName:m,isDevelopment:T=!1,componentType:y,componentConfig:_,entryType:w,initialEntry:v,entryMessage:A,disclaimerText:k,disclaimerMarkdown:C,clientContext:z,baseCatalogParams:Y,searchPlaceholder:D,searchButtonLabel:q,searchConfig:ne,suggestionButtonConfig:ue,messageAlignment:V,autoScroll:se,promptsConfig:pe,resetConversationMessage:ve,conversationHistory:re,onConnect:ae,onCopilotEvent:xe,onRefinedSearch:oe,onRefinedBrowse:Q,__features:ie,children:N})=>{const L=v==null?void 0:v.params;return S.jsx(fv,{mode:e,baseUrl:r,apiKey:t,apiToken:n,customerId:s,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,entryMessage:A,staticQuestions:F0(L==null?void 0:L.staticQuestions),staticQuestionsStrategy:L==null?void 0:L.staticQuestionsStrategy,theme:f,globalClassName:m,openLinksInNewTab:p,searchPlaceholder:D,searchButtonLabel:q,searchConfig:ne,suggestionButtonConfig:ue,messageAlignment:V,autoScroll:se,componentConfig:_,clientContext:z,baseCatalogParams:Y,disclaimerMarkdown:C,disclaimerText:k,resetConversationMessage:ve,conversationHistory:re,isDevelopment:T,__features:ie,children:S.jsx(gN,{entryType:w!=null?w:v==null?void 0:v.type,componentConfig:_,componentType:y,children:S.jsx(xv,{onCopilotEvent:xe,children:S.jsx(pN,{children:S.jsx(uN,{children:S.jsx(dN,{children:S.jsx(xN,{promptsConfig:pe,children:S.jsx(TN,{apiKey:t,apiToken:n,baseUrl:r,customerId:s,tenantId:a,isDevelopment:T,entryType:w,onConnect:ae,onRefinedSearch:oe,onRefinedBrowse:Q,onCopilotEvent:xe,children:N})})})})})})})})};var wf={exports:{}},In={},Af={exports:{}},Cf={};var _1;function wN(){return _1||(_1=1,(function(e){function t(Q,ie){var N=Q.length;Q.push(ie);e:for(;0<N;){var L=N-1>>>1,J=Q[L];if(0<s(J,ie))Q[L]=ie,Q[N]=J,N=L;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var ie=Q[0],N=Q.pop();if(N!==ie){Q[0]=N;e:for(var L=0,J=Q.length,I=J>>>1;L<I;){var Te=2*(L+1)-1,He=Q[Te],ye=Te+1,Le=Q[ye];if(0>s(He,N))ye<J&&0>s(Le,He)?(Q[L]=Le,Q[ye]=N,L=ye):(Q[L]=He,Q[Te]=N,L=Te);else if(ye<J&&0>s(Le,N))Q[L]=Le,Q[ye]=N,L=ye;else break e}}return ie}function s(Q,ie){var N=Q.sortIndex-ie.sortIndex;return N!==0?N:Q.id-ie.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],f=[],p=1,m=null,T=3,y=!1,_=!1,w=!1,v=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(Q){for(var ie=n(f);ie!==null;){if(ie.callback===null)r(f);else if(ie.startTime<=Q)r(f),ie.sortIndex=ie.expirationTime,t(d,ie);else break;ie=n(f)}}function z(Q){if(w=!1,C(Q),!_)if(n(d)!==null)_=!0,xe(Y);else{var ie=n(f);ie!==null&&oe(z,ie.startTime-Q)}}function Y(Q,ie){_=!1,w&&(w=!1,A(ne),ne=-1),y=!0;var N=T;try{for(C(ie),m=n(d);m!==null&&(!(m.expirationTime>ie)||Q&&!se());){var L=m.callback;if(typeof L=="function"){m.callback=null,T=m.priorityLevel;var J=L(m.expirationTime<=ie);ie=e.unstable_now(),typeof J=="function"?m.callback=J:m===n(d)&&r(d),C(ie)}else r(d);m=n(d)}if(m!==null)var I=!0;else{var Te=n(f);Te!==null&&oe(z,Te.startTime-ie),I=!1}return I}finally{m=null,T=N,y=!1}}var D=!1,q=null,ne=-1,ue=5,V=-1;function se(){return!(e.unstable_now()-V<ue)}function pe(){if(q!==null){var Q=e.unstable_now();V=Q;var ie=!0;try{ie=q(!0,Q)}finally{ie?ve():(D=!1,q=null)}}else D=!1}var ve;if(typeof k=="function")ve=function(){k(pe)};else if(typeof MessageChannel!="undefined"){var re=new MessageChannel,ae=re.port2;re.port1.onmessage=pe,ve=function(){ae.postMessage(null)}}else ve=function(){v(pe,0)};function xe(Q){q=Q,D||(D=!0,ve())}function oe(Q,ie){ne=v(function(){Q(e.unstable_now())},ie)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){_||y||(_=!0,xe(Y))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ue=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(Q){switch(T){case 1:case 2:case 3:var ie=3;break;default:ie=T}var N=T;T=ie;try{return Q()}finally{T=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,ie){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var N=T;T=Q;try{return ie()}finally{T=N}},e.unstable_scheduleCallback=function(Q,ie,N){var L=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?L+N:L):N=L,Q){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=N+J,Q={id:p++,callback:ie,priorityLevel:Q,startTime:N,expirationTime:J,sortIndex:-1},N>L?(Q.sortIndex=N,t(f,Q),n(d)===null&&Q===n(f)&&(w?(A(ne),ne=-1):w=!0,oe(z,N-L))):(Q.sortIndex=J,t(d,Q),_||y||(_=!0,xe(Y))),Q},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(Q){var ie=T;return function(){var N=T;T=ie;try{return Q.apply(this,arguments)}finally{T=N}}}})(Cf)),Cf}var S1;function AN(){return S1||(S1=1,Af.exports=wN()),Af.exports}var x1;function CN(){if(x1)return In;x1=1;var e=fr(),t=AN();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function a(i,o){u(i,o),u(i+"Capture",o)}function u(i,o){for(s[i]=o,i=0;i<o.length;i++)r.add(o[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function T(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,o,l,h){if(l!==null&&l.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return h?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function _(i,o,l,h){if(o===null||typeof o=="undefined"||y(i,o,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function w(i,o,l,h,E,b,x){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=o,this.sanitizeURL=b,this.removeEmptyString=x}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){v[i]=new w(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];v[o]=new w(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){v[i]=new w(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){v[i]=new w(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){v[i]=new w(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){v[i]=new w(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){v[i]=new w(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){v[i]=new w(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){v[i]=new w(i,5,!1,i.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function k(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var o=i.replace(A,k);v[o]=new w(o,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var o=i.replace(A,k);v[o]=new w(o,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var o=i.replace(A,k);v[o]=new w(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){v[i]=new w(i,1,!1,i.toLowerCase(),null,!1,!1)}),v.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){v[i]=new w(i,1,!1,i.toLowerCase(),null,!0,!0)});function C(i,o,l,h){var E=v.hasOwnProperty(o)?v[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(_(o,l,E,h)&&(l=null),h||E===null?T(o)&&(l===null?i.removeAttribute(o):i.setAttribute(o,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(o=E.attributeName,h=E.attributeNamespace,l===null?i.removeAttribute(o):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,h?i.setAttributeNS(h,o,l):i.setAttribute(o,l))))}var z=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),D=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),ne=Symbol.for("react.strict_mode"),ue=Symbol.for("react.profiler"),V=Symbol.for("react.provider"),se=Symbol.for("react.context"),pe=Symbol.for("react.forward_ref"),ve=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),Q=Symbol.iterator;function ie(i){return i===null||typeof i!="object"?null:(i=Q&&i[Q]||i["@@iterator"],typeof i=="function"?i:null)}var N=Object.assign,L;function J(i){if(L===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);L=o&&o[1]||""}return`
11
+ `+L+i}var I=!1;function Te(i,o){if(!i||I)return"";I=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(ee){var h=ee}Reflect.construct(i,[],o)}else{try{o.call()}catch(ee){h=ee}i.call(o.prototype)}else{try{throw Error()}catch(ee){h=ee}i()}}catch(ee){if(ee&&h&&typeof ee.stack=="string"){for(var E=ee.stack.split(`
12
12
  `),b=h.stack.split(`
13
- `),x=E.length-1,L=b.length-1;1<=x&&0<=L&&E[x]!==b[L];)L--;for(;1<=x&&0<=L;x--,L--)if(E[x]!==b[L]){if(x!==1||L!==1)do if(x--,L--,0>L||E[x]!==b[L]){var U=`
14
- `+E[x].replace(" at new "," at ");return i.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",i.displayName)),U}while(1<=x&&0<=L);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?ee(i):""}function Ue(i){switch(i.tag){case 5:return ee(i.type);case 16:return ee("Lazy");case 13:return ee("Suspense");case 19:return ee("SuspenseList");case 0:case 2:case 15:return i=Se(i.type,!1),i;case 11:return i=Se(i.type.render,!1),i;case 1:return i=Se(i.type,!0),i;default:return""}}function ye(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case q:return"Fragment";case D:return"Portal";case ue:return"Profiler";case ne:return"StrictMode";case ve:return"Suspense";case re:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case se:return(i.displayName||"Context")+".Consumer";case V:return(i._context.displayName||"Context")+".Provider";case pe:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ae:return o=i.displayName||null,o!==null?o:ye(i.type)||"Memo";case xe:o=i._payload,i=i._init;try{return ye(i(o))}catch(l){}}return null}function Le(i){var o=i.type;switch(i.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(o);case 8:return o===ne?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function He(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ye(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function ht(i){var o=Ye(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),h=""+i[o];if(!i.hasOwnProperty(o)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,b=l.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(x){h=""+x,b.call(this,x)}}),Object.defineProperty(i,o,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(x){h=""+x},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Vt(i){i._valueTracker||(i._valueTracker=ht(i))}function on(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var l=o.getValue(),h="";return i&&(h=Ye(i)?i.checked?"true":"false":i.value),i=h,i!==l?(o.setValue(i),!0):!1}function _r(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(o){return i.body}}function sr(i,o){var l=o.checked;return k({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function Zt(i,o){var l=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;l=He(o.value!=null?o.value:l),i._wrapperState={initialChecked:h,initialValue:l,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Ve(i,o){o=o.checked,o!=null&&C(i,"checked",o,!1)}function Nt(i,o){Ve(i,o);var l=He(o.value),h=o.type;if(l!=null)h==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}o.hasOwnProperty("value")?an(i,o.type,l):o.hasOwnProperty("defaultValue")&&an(i,o.type,He(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function vn(i,o,l){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+i._wrapperState.initialValue,l||o===i.value||(i.value=o),i.defaultValue=o}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function an(i,o,l){(o!=="number"||_r(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var Fn=Array.isArray;function we(i,o,l,h){if(i=i.options,o){o={};for(var E=0;E<l.length;E++)o["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=o.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&h&&(i[l].defaultSelected=!0)}else{for(l=""+He(l),o=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}o!==null||i[E].disabled||(o=i[E])}o!==null&&(o.selected=!0)}}function Pe(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Me(i,o){var l=o.value;if(l==null){if(l=o.children,o=o.defaultValue,l!=null){if(o!=null)throw Error(n(92));if(Fn(l)){if(1<l.length)throw Error(n(93));l=l[0]}o=l}o==null&&(o=""),l=o}i._wrapperState={initialValue:He(l)}}function rt(i,o){var l=He(o.value),h=He(o.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),o.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),h!=null&&(i.defaultValue=""+h)}function pt(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function J(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ge(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?J(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ce,qe=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(o,l,h,E){MSApp.execUnsafeLocalFunction(function(){return i(o,l,h,E)})}:i})(function(i,o){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=o;else{for(Ce=Ce||document.createElement("div"),Ce.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Ce.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function Ie(i,o){if(o){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=o;return}}i.textContent=o}var ut={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qt=["Webkit","ms","Moz","O"];Object.keys(ut).forEach(function(i){qt.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),ut[o]=ut[i]})});function Ht(i,o,l){return o==null||typeof o=="boolean"||o===""?"":l||typeof o!="number"||o===0||ut.hasOwnProperty(i)&&ut[i]?(""+o).trim():o+"px"}function un(i,o){i=i.style;for(var l in o)if(o.hasOwnProperty(l)){var h=l.indexOf("--")===0,E=Ht(l,o[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,E):i[l]=E}}var Vr=k({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ln(i,o){if(o){if(Vr[i]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function qr(i,o){if(i.indexOf("-")===-1)return typeof o.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Gn=null;function wp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ap=null,No=null,ko=null;function Q_(i){if(i=xu(i)){if(typeof Ap!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Fc(o),Ap(i.stateNode,i.type,o))}}function J_(i){No?ko?ko.push(i):ko=[i]:No=i}function Z_(){if(No){var i=No,o=ko;if(ko=No=null,Q_(i),o)for(i=0;i<o.length;i++)Q_(o[i])}}function eS(i,o){return i(o)}function tS(){}var Cp=!1;function nS(i,o,l){if(Cp)return i(o,l);Cp=!0;try{return eS(i,o,l)}finally{Cp=!1,(No!==null||ko!==null)&&(tS(),Z_())}}function nu(i,o){var l=i.stateNode;if(l===null)return null;var h=Fc(l);if(h===null)return null;l=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,o,typeof l));return l}var vp=!1;if(c)try{var ru={};Object.defineProperty(ru,"passive",{get:function(){vp=!0}}),window.addEventListener("test",ru,ru),window.removeEventListener("test",ru,ru)}catch(i){vp=!1}function Y9(i,o,l,h,E,b,x,L,U){var Z=Array.prototype.slice.call(arguments,3);try{o.apply(l,Z)}catch(de){this.onError(de)}}var iu=!1,mc=null,gc=!1,Np=null,W9={onError:function(i){iu=!0,mc=i}};function G9(i,o,l,h,E,b,x,L,U){iu=!1,mc=null,Y9.apply(W9,arguments)}function X9(i,o,l,h,E,b,x,L,U){if(G9.apply(this,arguments),iu){if(iu){var Z=mc;iu=!1,mc=null}else throw Error(n(198));gc||(gc=!0,Np=Z)}}function ws(i){var o=i,l=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(l=o.return),i=o.return;while(i)}return o.tag===3?l:null}function rS(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function iS(i){if(ws(i)!==i)throw Error(n(188))}function K9(i){var o=i.alternate;if(!o){if(o=ws(i),o===null)throw Error(n(188));return o!==i?null:i}for(var l=i,h=o;;){var E=l.return;if(E===null)break;var b=E.alternate;if(b===null){if(h=E.return,h!==null){l=h;continue}break}if(E.child===b.child){for(b=E.child;b;){if(b===l)return iS(E),i;if(b===h)return iS(E),o;b=b.sibling}throw Error(n(188))}if(l.return!==h.return)l=E,h=b;else{for(var x=!1,L=E.child;L;){if(L===l){x=!0,l=E,h=b;break}if(L===h){x=!0,h=E,l=b;break}L=L.sibling}if(!x){for(L=b.child;L;){if(L===l){x=!0,l=b,h=E;break}if(L===h){x=!0,h=b,l=E;break}L=L.sibling}if(!x)throw Error(n(189))}}if(l.alternate!==h)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:o}function sS(i){return i=K9(i),i!==null?oS(i):null}function oS(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=oS(i);if(o!==null)return o;i=i.sibling}return null}var aS=t.unstable_scheduleCallback,uS=t.unstable_cancelCallback,Q9=t.unstable_shouldYield,J9=t.unstable_requestPaint,Dt=t.unstable_now,Z9=t.unstable_getCurrentPriorityLevel,kp=t.unstable_ImmediatePriority,lS=t.unstable_UserBlockingPriority,Ec=t.unstable_NormalPriority,eB=t.unstable_LowPriority,cS=t.unstable_IdlePriority,yc=null,Yr=null;function tB(i){if(Yr&&typeof Yr.onCommitFiberRoot=="function")try{Yr.onCommitFiberRoot(yc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var Sr=Math.clz32?Math.clz32:iB,nB=Math.log,rB=Math.LN2;function iB(i){return i>>>=0,i===0?32:31-(nB(i)/rB|0)|0}var bc=64,Tc=4194304;function su(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function _c(i,o){var l=i.pendingLanes;if(l===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,x=l&268435455;if(x!==0){var L=x&~E;L!==0?h=su(L):(b&=x,b!==0&&(h=su(b)))}else x=l&~E,x!==0?h=su(x):b!==0&&(h=su(b));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,b=o&-o,E>=b||E===16&&(b&4194240)!==0))return o;if((h&4)!==0&&(h|=l&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)l=31-Sr(o),E=1<<l,h|=i[l],o&=~E;return h}function sB(i,o){switch(i){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function oB(i,o){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var x=31-Sr(b),L=1<<x,U=E[x];U===-1?((L&l)===0||(L&h)!==0)&&(E[x]=sB(L,o)):U<=o&&(i.expiredLanes|=L),b&=~L}}function Pp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function dS(){var i=bc;return bc<<=1,(bc&4194240)===0&&(bc=64),i}function Op(i){for(var o=[],l=0;31>l;l++)o.push(i);return o}function ou(i,o,l){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-Sr(o),i[o]=l}function aB(i,o){var l=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-Sr(l),b=1<<E;o[E]=0,h[E]=-1,i[E]=-1,l&=~b}}function Ip(i,o){var l=i.entangledLanes|=o;for(i=i.entanglements;l;){var h=31-Sr(l),E=1<<h;E&o|i[h]&o&&(i[h]|=o),l&=~E}}var lt=0;function fS(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var hS,Rp,pS,mS,gS,Lp=!1,Sc=[],Oi=null,Ii=null,Ri=null,au=new Map,uu=new Map,Li=[],uB="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 ES(i,o){switch(i){case"focusin":case"focusout":Oi=null;break;case"dragenter":case"dragleave":Ii=null;break;case"mouseover":case"mouseout":Ri=null;break;case"pointerover":case"pointerout":au.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":uu.delete(o.pointerId)}}function lu(i,o,l,h,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:o,domEventName:l,eventSystemFlags:h,nativeEvent:b,targetContainers:[E]},o!==null&&(o=xu(o),o!==null&&Rp(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function lB(i,o,l,h,E){switch(o){case"focusin":return Oi=lu(Oi,i,o,l,h,E),!0;case"dragenter":return Ii=lu(Ii,i,o,l,h,E),!0;case"mouseover":return Ri=lu(Ri,i,o,l,h,E),!0;case"pointerover":var b=E.pointerId;return au.set(b,lu(au.get(b)||null,i,o,l,h,E)),!0;case"gotpointercapture":return b=E.pointerId,uu.set(b,lu(uu.get(b)||null,i,o,l,h,E)),!0}return!1}function yS(i){var o=As(i.target);if(o!==null){var l=ws(o);if(l!==null){if(o=l.tag,o===13){if(o=rS(l),o!==null){i.blockedOn=o,gS(i.priority,function(){pS(l)});return}}else if(o===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function xc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var l=Mp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Gn=h,l.target.dispatchEvent(h),Gn=null}else return o=xu(l),o!==null&&Rp(o),i.blockedOn=l,!1;o.shift()}return!0}function bS(i,o,l){xc(i)&&l.delete(o)}function cB(){Lp=!1,Oi!==null&&xc(Oi)&&(Oi=null),Ii!==null&&xc(Ii)&&(Ii=null),Ri!==null&&xc(Ri)&&(Ri=null),au.forEach(bS),uu.forEach(bS)}function cu(i,o){i.blockedOn===o&&(i.blockedOn=null,Lp||(Lp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,cB)))}function du(i){function o(E){return cu(E,i)}if(0<Sc.length){cu(Sc[0],i);for(var l=1;l<Sc.length;l++){var h=Sc[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Oi!==null&&cu(Oi,i),Ii!==null&&cu(Ii,i),Ri!==null&&cu(Ri,i),au.forEach(o),uu.forEach(o),l=0;l<Li.length;l++)h=Li[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Li.length&&(l=Li[0],l.blockedOn===null);)yS(l),l.blockedOn===null&&Li.shift()}var Po=z.ReactCurrentBatchConfig,wc=!0;function dB(i,o,l,h){var E=lt,b=Po.transition;Po.transition=null;try{lt=1,Dp(i,o,l,h)}finally{lt=E,Po.transition=b}}function fB(i,o,l,h){var E=lt,b=Po.transition;Po.transition=null;try{lt=4,Dp(i,o,l,h)}finally{lt=E,Po.transition=b}}function Dp(i,o,l,h){if(wc){var E=Mp(i,o,l,h);if(E===null)Zp(i,o,h,Ac,l),ES(i,h);else if(lB(E,i,o,l,h))h.stopPropagation();else if(ES(i,h),o&4&&-1<uB.indexOf(i)){for(;E!==null;){var b=xu(E);if(b!==null&&hS(b),b=Mp(i,o,l,h),b===null&&Zp(i,o,h,Ac,l),b===E)break;E=b}E!==null&&h.stopPropagation()}else Zp(i,o,h,null,l)}}var Ac=null;function Mp(i,o,l,h){if(Ac=null,i=wp(h),i=As(i),i!==null)if(o=ws(i),o===null)i=null;else if(l=o.tag,l===13){if(i=rS(o),i!==null)return i;i=null}else if(l===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null);return Ac=i,null}function TS(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(Z9()){case kp:return 1;case lS:return 4;case Ec:case eB:return 16;case cS:return 536870912;default:return 16}default:return 16}}var Di=null,Fp=null,Cc=null;function _S(){if(Cc)return Cc;var i,o=Fp,l=o.length,h,E="value"in Di?Di.value:Di.textContent,b=E.length;for(i=0;i<l&&o[i]===E[i];i++);var x=l-i;for(h=1;h<=x&&o[l-h]===E[b-h];h++);return Cc=E.slice(i,1<h?1-h:void 0)}function vc(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function Nc(){return!0}function SS(){return!1}function Xn(i){function o(l,h,E,b,x){this._reactName=l,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=x,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)?Nc:SS,this.isPropagationStopped=SS,this}return k(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Nc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Nc)},persist:function(){},isPersistent:Nc}),o}var Oo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bp=Xn(Oo),fu=k({},Oo,{view:0,detail:0}),hB=Xn(fu),Up,Hp,hu,kc=k({},fu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jp,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!==hu&&(hu&&i.type==="mousemove"?(Up=i.screenX-hu.screenX,Hp=i.screenY-hu.screenY):Hp=Up=0,hu=i),Up)},movementY:function(i){return"movementY"in i?i.movementY:Hp}}),xS=Xn(kc),pB=k({},kc,{dataTransfer:0}),mB=Xn(pB),gB=k({},fu,{relatedTarget:0}),zp=Xn(gB),EB=k({},Oo,{animationName:0,elapsedTime:0,pseudoElement:0}),yB=Xn(EB),bB=k({},Oo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),TB=Xn(bB),_B=k({},Oo,{data:0}),wS=Xn(_B),SB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xB={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},wB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function AB(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=wB[i])?!!o[i]:!1}function jp(){return AB}var CB=k({},fu,{key:function(i){if(i.key){var o=SB[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=vc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?xB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jp,charCode:function(i){return i.type==="keypress"?vc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?vc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),vB=Xn(CB),NB=k({},kc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),AS=Xn(NB),kB=k({},fu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jp}),PB=Xn(kB),OB=k({},Oo,{propertyName:0,elapsedTime:0,pseudoElement:0}),IB=Xn(OB),RB=k({},kc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),LB=Xn(RB),DB=[9,13,27,32],$p=c&&"CompositionEvent"in window,pu=null;c&&"documentMode"in document&&(pu=document.documentMode);var MB=c&&"TextEvent"in window&&!pu,CS=c&&(!$p||pu&&8<pu&&11>=pu),vS=" ",NS=!1;function kS(i,o){switch(i){case"keyup":return DB.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function PS(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Io=!1;function FB(i,o){switch(i){case"compositionend":return PS(o);case"keypress":return o.which!==32?null:(NS=!0,vS);case"textInput":return i=o.data,i===vS&&NS?null:i;default:return null}}function BB(i,o){if(Io)return i==="compositionend"||!$p&&kS(i,o)?(i=_S(),Cc=Fp=Di=null,Io=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return CS&&o.locale!=="ko"?null:o.data;default:return null}}var UB={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 OS(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!UB[i.type]:o==="textarea"}function IS(i,o,l,h){J_(h),o=Lc(o,"onChange"),0<o.length&&(l=new Bp("onChange","change",null,l,h),i.push({event:l,listeners:o}))}var mu=null,gu=null;function HB(i){KS(i,0)}function Pc(i){var o=Fo(i);if(on(o))return i}function zB(i,o){if(i==="change")return o}var RS=!1;if(c){var Vp;if(c){var qp="oninput"in document;if(!qp){var LS=document.createElement("div");LS.setAttribute("oninput","return;"),qp=typeof LS.oninput=="function"}Vp=qp}else Vp=!1;RS=Vp&&(!document.documentMode||9<document.documentMode)}function DS(){mu&&(mu.detachEvent("onpropertychange",MS),gu=mu=null)}function MS(i){if(i.propertyName==="value"&&Pc(gu)){var o=[];IS(o,gu,i,wp(i)),nS(HB,o)}}function jB(i,o,l){i==="focusin"?(DS(),mu=o,gu=l,mu.attachEvent("onpropertychange",MS)):i==="focusout"&&DS()}function $B(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Pc(gu)}function VB(i,o){if(i==="click")return Pc(o)}function qB(i,o){if(i==="input"||i==="change")return Pc(o)}function YB(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var xr=typeof Object.is=="function"?Object.is:YB;function Eu(i,o){if(xr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var l=Object.keys(i),h=Object.keys(o);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var E=l[h];if(!d.call(o,E)||!xr(i[E],o[E]))return!1}return!0}function FS(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function BS(i,o){var l=FS(i);i=0;for(var h;l;){if(l.nodeType===3){if(h=i+l.textContent.length,i<=o&&h>=o)return{node:l,offset:o-i};i=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=FS(l)}}function US(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?US(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function HS(){for(var i=window,o=_r();o instanceof i.HTMLIFrameElement;){try{var l=typeof o.contentWindow.location.href=="string"}catch(h){l=!1}if(l)i=o.contentWindow;else break;o=_r(i.document)}return o}function Yp(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function WB(i){var o=HS(),l=i.focusedElem,h=i.selectionRange;if(o!==l&&l&&l.ownerDocument&&US(l.ownerDocument.documentElement,l)){if(h!==null&&Yp(l)){if(o=h.start,i=h.end,i===void 0&&(i=o),"selectionStart"in l)l.selectionStart=o,l.selectionEnd=Math.min(i,l.value.length);else if(i=(o=l.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,b=Math.min(h.start,E);h=h.end===void 0?b:Math.min(h.end,E),!i.extend&&b>h&&(E=h,h=b,b=E),E=BS(l,b);var x=BS(l,h);E&&x&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(o),i.extend(x.node,x.offset)):(o.setEnd(x.node,x.offset),i.addRange(o)))}}for(o=[],i=l;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<o.length;l++)i=o[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var GB=c&&"documentMode"in document&&11>=document.documentMode,Ro=null,Wp=null,yu=null,Gp=!1;function zS(i,o,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Gp||Ro==null||Ro!==_r(h)||(h=Ro,"selectionStart"in h&&Yp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),yu&&Eu(yu,h)||(yu=h,h=Lc(Wp,"onSelect"),0<h.length&&(o=new Bp("onSelect","select",null,o,l),i.push({event:o,listeners:h}),o.target=Ro)))}function Oc(i,o){var l={};return l[i.toLowerCase()]=o.toLowerCase(),l["Webkit"+i]="webkit"+o,l["Moz"+i]="moz"+o,l}var Lo={animationend:Oc("Animation","AnimationEnd"),animationiteration:Oc("Animation","AnimationIteration"),animationstart:Oc("Animation","AnimationStart"),transitionend:Oc("Transition","TransitionEnd")},Xp={},jS={};c&&(jS=document.createElement("div").style,"AnimationEvent"in window||(delete Lo.animationend.animation,delete Lo.animationiteration.animation,delete Lo.animationstart.animation),"TransitionEvent"in window||delete Lo.transitionend.transition);function Ic(i){if(Xp[i])return Xp[i];if(!Lo[i])return i;var o=Lo[i],l;for(l in o)if(o.hasOwnProperty(l)&&l in jS)return Xp[i]=o[l];return i}var $S=Ic("animationend"),VS=Ic("animationiteration"),qS=Ic("animationstart"),YS=Ic("transitionend"),WS=new Map,GS="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Mi(i,o){WS.set(i,o),a(o,[i])}for(var Kp=0;Kp<GS.length;Kp++){var Qp=GS[Kp],XB=Qp.toLowerCase(),KB=Qp[0].toUpperCase()+Qp.slice(1);Mi(XB,"on"+KB)}Mi($S,"onAnimationEnd"),Mi(VS,"onAnimationIteration"),Mi(qS,"onAnimationStart"),Mi("dblclick","onDoubleClick"),Mi("focusin","onFocus"),Mi("focusout","onBlur"),Mi(YS,"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 bu="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(" "),QB=new Set("cancel close invalid load scroll toggle".split(" ").concat(bu));function XS(i,o,l){var h=i.type||"unknown-event";i.currentTarget=l,X9(h,o,void 0,i),i.currentTarget=null}function KS(i,o){o=(o&4)!==0;for(var l=0;l<i.length;l++){var h=i[l],E=h.event;h=h.listeners;e:{var b=void 0;if(o)for(var x=h.length-1;0<=x;x--){var L=h[x],U=L.instance,Z=L.currentTarget;if(L=L.listener,U!==b&&E.isPropagationStopped())break e;XS(E,L,Z),b=U}else for(x=0;x<h.length;x++){if(L=h[x],U=L.instance,Z=L.currentTarget,L=L.listener,U!==b&&E.isPropagationStopped())break e;XS(E,L,Z),b=U}}}if(gc)throw i=Np,gc=!1,Np=null,i}function St(i,o){var l=o[sm];l===void 0&&(l=o[sm]=new Set);var h=i+"__bubble";l.has(h)||(QS(o,i,2,!1),l.add(h))}function Jp(i,o,l){var h=0;o&&(h|=4),QS(l,i,h,o)}var Rc="_reactListening"+Math.random().toString(36).slice(2);function Tu(i){if(!i[Rc]){i[Rc]=!0,r.forEach(function(l){l!=="selectionchange"&&(QB.has(l)||Jp(l,!1,i),Jp(l,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Rc]||(o[Rc]=!0,Jp("selectionchange",!1,o))}}function QS(i,o,l,h){switch(TS(o)){case 1:var E=dB;break;case 4:E=fB;break;default:E=Dp}l=E.bind(null,o,l,i),E=void 0,!vp||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(o,l,{capture:!0,passive:E}):i.addEventListener(o,l,!0):E!==void 0?i.addEventListener(o,l,{passive:E}):i.addEventListener(o,l,!1)}function Zp(i,o,l,h,E){var b=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var x=h.tag;if(x===3||x===4){var L=h.stateNode.containerInfo;if(L===E||L.nodeType===8&&L.parentNode===E)break;if(x===4)for(x=h.return;x!==null;){var U=x.tag;if((U===3||U===4)&&(U=x.stateNode.containerInfo,U===E||U.nodeType===8&&U.parentNode===E))return;x=x.return}for(;L!==null;){if(x=As(L),x===null)return;if(U=x.tag,U===5||U===6){h=b=x;continue e}L=L.parentNode}}h=h.return}nS(function(){var Z=b,de=wp(l),me=[];e:{var le=WS.get(i);if(le!==void 0){var Ae=Bp,ke=i;switch(i){case"keypress":if(vc(l)===0)break e;case"keydown":case"keyup":Ae=vB;break;case"focusin":ke="focus",Ae=zp;break;case"focusout":ke="blur",Ae=zp;break;case"beforeblur":case"afterblur":Ae=zp;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ae=xS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ae=mB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ae=PB;break;case $S:case VS:case qS:Ae=yB;break;case YS:Ae=IB;break;case"scroll":Ae=hB;break;case"wheel":Ae=LB;break;case"copy":case"cut":case"paste":Ae=TB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ae=AS}var Oe=(o&4)!==0,Mt=!Oe&&i==="scroll",G=Oe?le!==null?le+"Capture":null:le;Oe=[];for(var j=Z,K;j!==null;){K=j;var be=K.stateNode;if(K.tag===5&&be!==null&&(K=be,G!==null&&(be=nu(j,G),be!=null&&Oe.push(_u(j,be,K)))),Mt)break;j=j.return}0<Oe.length&&(le=new Ae(le,ke,null,l,de),me.push({event:le,listeners:Oe}))}}if((o&7)===0){e:{if(le=i==="mouseover"||i==="pointerover",Ae=i==="mouseout"||i==="pointerout",le&&l!==Gn&&(ke=l.relatedTarget||l.fromElement)&&(As(ke)||ke[di]))break e;if((Ae||le)&&(le=de.window===de?de:(le=de.ownerDocument)?le.defaultView||le.parentWindow:window,Ae?(ke=l.relatedTarget||l.toElement,Ae=Z,ke=ke?As(ke):null,ke!==null&&(Mt=ws(ke),ke!==Mt||ke.tag!==5&&ke.tag!==6)&&(ke=null)):(Ae=null,ke=Z),Ae!==ke)){if(Oe=xS,be="onMouseLeave",G="onMouseEnter",j="mouse",(i==="pointerout"||i==="pointerover")&&(Oe=AS,be="onPointerLeave",G="onPointerEnter",j="pointer"),Mt=Ae==null?le:Fo(Ae),K=ke==null?le:Fo(ke),le=new Oe(be,j+"leave",Ae,l,de),le.target=Mt,le.relatedTarget=K,be=null,As(de)===Z&&(Oe=new Oe(G,j+"enter",ke,l,de),Oe.target=K,Oe.relatedTarget=Mt,be=Oe),Mt=be,Ae&&ke)t:{for(Oe=Ae,G=ke,j=0,K=Oe;K;K=Do(K))j++;for(K=0,be=G;be;be=Do(be))K++;for(;0<j-K;)Oe=Do(Oe),j--;for(;0<K-j;)G=Do(G),K--;for(;j--;){if(Oe===G||G!==null&&Oe===G.alternate)break t;Oe=Do(Oe),G=Do(G)}Oe=null}else Oe=null;Ae!==null&&JS(me,le,Ae,Oe,!1),ke!==null&&Mt!==null&&JS(me,Mt,ke,Oe,!0)}}e:{if(le=Z?Fo(Z):window,Ae=le.nodeName&&le.nodeName.toLowerCase(),Ae==="select"||Ae==="input"&&le.type==="file")var Re=zB;else if(OS(le))if(RS)Re=qB;else{Re=$B;var ze=jB}else(Ae=le.nodeName)&&Ae.toLowerCase()==="input"&&(le.type==="checkbox"||le.type==="radio")&&(Re=VB);if(Re&&(Re=Re(i,Z))){IS(me,Re,l,de);break e}ze&&ze(i,le,Z),i==="focusout"&&(ze=le._wrapperState)&&ze.controlled&&le.type==="number"&&an(le,"number",le.value)}switch(ze=Z?Fo(Z):window,i){case"focusin":(OS(ze)||ze.contentEditable==="true")&&(Ro=ze,Wp=Z,yu=null);break;case"focusout":yu=Wp=Ro=null;break;case"mousedown":Gp=!0;break;case"contextmenu":case"mouseup":case"dragend":Gp=!1,zS(me,l,de);break;case"selectionchange":if(GB)break;case"keydown":case"keyup":zS(me,l,de)}var je;if($p)e:{switch(i){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else Io?kS(i,l)&&(We="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(We="onCompositionStart");We&&(CS&&l.locale!=="ko"&&(Io||We!=="onCompositionStart"?We==="onCompositionEnd"&&Io&&(je=_S()):(Di=de,Fp="value"in Di?Di.value:Di.textContent,Io=!0)),ze=Lc(Z,We),0<ze.length&&(We=new wS(We,i,null,l,de),me.push({event:We,listeners:ze}),je?We.data=je:(je=PS(l),je!==null&&(We.data=je)))),(je=MB?FB(i,l):BB(i,l))&&(Z=Lc(Z,"onBeforeInput"),0<Z.length&&(de=new wS("onBeforeInput","beforeinput",null,l,de),me.push({event:de,listeners:Z}),de.data=je))}KS(me,o)})}function _u(i,o,l){return{instance:i,listener:o,currentTarget:l}}function Lc(i,o){for(var l=o+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=nu(i,l),b!=null&&h.unshift(_u(i,b,E)),b=nu(i,o),b!=null&&h.push(_u(i,b,E))),i=i.return}return h}function Do(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function JS(i,o,l,h,E){for(var b=o._reactName,x=[];l!==null&&l!==h;){var L=l,U=L.alternate,Z=L.stateNode;if(U!==null&&U===h)break;L.tag===5&&Z!==null&&(L=Z,E?(U=nu(l,b),U!=null&&x.unshift(_u(l,U,L))):E||(U=nu(l,b),U!=null&&x.push(_u(l,U,L)))),l=l.return}x.length!==0&&i.push({event:o,listeners:x})}var JB=/\r\n?/g,ZB=/\u0000|\uFFFD/g;function ZS(i){return(typeof i=="string"?i:""+i).replace(JB,`
15
- `).replace(ZB,"")}function Dc(i,o,l){if(o=ZS(o),ZS(i)!==o&&l)throw Error(n(425))}function Mc(){}var em=null,tm=null;function nm(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var rm=typeof setTimeout=="function"?setTimeout:void 0,e7=typeof clearTimeout=="function"?clearTimeout:void 0,ex=typeof Promise=="function"?Promise:void 0,t7=typeof queueMicrotask=="function"?queueMicrotask:typeof ex!="undefined"?function(i){return ex.resolve(null).then(i).catch(n7)}:rm;function n7(i){setTimeout(function(){throw i})}function im(i,o){var l=o,h=0;do{var E=l.nextSibling;if(i.removeChild(l),E&&E.nodeType===8)if(l=E.data,l==="/$"){if(h===0){i.removeChild(E),du(o);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);du(o)}function Fi(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return i}function tx(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(o===0)return i;o--}else l==="/$"&&o++}i=i.previousSibling}return null}var Mo=Math.random().toString(36).slice(2),Wr="__reactFiber$"+Mo,Su="__reactProps$"+Mo,di="__reactContainer$"+Mo,sm="__reactEvents$"+Mo,r7="__reactListeners$"+Mo,i7="__reactHandles$"+Mo;function As(i){var o=i[Wr];if(o)return o;for(var l=i.parentNode;l;){if(o=l[di]||l[Wr]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(i=tx(i);i!==null;){if(l=i[Wr])return l;i=tx(i)}return o}i=l,l=i.parentNode}return null}function xu(i){return i=i[Wr]||i[di],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Fo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Fc(i){return i[Su]||null}var om=[],Bo=-1;function Bi(i){return{current:i}}function xt(i){0>Bo||(i.current=om[Bo],om[Bo]=null,Bo--)}function Et(i,o){Bo++,om[Bo]=i.current,i.current=o}var Ui={},Tn=Bi(Ui),Bn=Bi(!1),Cs=Ui;function Uo(i,o){var l=i.type.contextTypes;if(!l)return Ui;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in l)E[b]=o[b];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function Un(i){return i=i.childContextTypes,i!=null}function Bc(){xt(Bn),xt(Tn)}function nx(i,o,l){if(Tn.current!==Ui)throw Error(n(168));Et(Tn,o),Et(Bn,l)}function rx(i,o,l){var h=i.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var E in h)if(!(E in o))throw Error(n(108,Le(i)||"Unknown",E));return k({},l,h)}function Uc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Ui,Cs=Tn.current,Et(Tn,i),Et(Bn,Bn.current),!0}function ix(i,o,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=rx(i,o,Cs),h.__reactInternalMemoizedMergedChildContext=i,xt(Bn),xt(Tn),Et(Tn,i)):xt(Bn),Et(Bn,l)}var fi=null,Hc=!1,am=!1;function sx(i){fi===null?fi=[i]:fi.push(i)}function s7(i){Hc=!0,sx(i)}function Hi(){if(!am&&fi!==null){am=!0;var i=0,o=lt;try{var l=fi;for(lt=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}fi=null,Hc=!1}catch(E){throw fi!==null&&(fi=fi.slice(i+1)),aS(kp,Hi),E}finally{lt=o,am=!1}}return null}var Ho=[],zo=0,zc=null,jc=0,or=[],ar=0,vs=null,hi=1,pi="";function Ns(i,o){Ho[zo++]=jc,Ho[zo++]=zc,zc=i,jc=o}function ox(i,o,l){or[ar++]=hi,or[ar++]=pi,or[ar++]=vs,vs=i;var h=hi;i=pi;var E=32-Sr(h)-1;h&=~(1<<E),l+=1;var b=32-Sr(o)+E;if(30<b){var x=E-E%5;b=(h&(1<<x)-1).toString(32),h>>=x,E-=x,hi=1<<32-Sr(o)+E|l<<E|h,pi=b+i}else hi=1<<b|l<<E|h,pi=i}function um(i){i.return!==null&&(Ns(i,1),ox(i,1,0))}function lm(i){for(;i===zc;)zc=Ho[--zo],Ho[zo]=null,jc=Ho[--zo],Ho[zo]=null;for(;i===vs;)vs=or[--ar],or[ar]=null,pi=or[--ar],or[ar]=null,hi=or[--ar],or[ar]=null}var Kn=null,Qn=null,Ct=!1,wr=null;function ax(i,o){var l=dr(5,null,null,0);l.elementType="DELETED",l.stateNode=o,l.return=i,o=i.deletions,o===null?(i.deletions=[l],i.flags|=16):o.push(l)}function ux(i,o){switch(i.tag){case 5:var l=i.type;return o=o.nodeType!==1||l.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(i.stateNode=o,Kn=i,Qn=Fi(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Kn=i,Qn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(l=vs!==null?{id:hi,overflow:pi}:null,i.memoizedState={dehydrated:o,treeContext:l,retryLane:1073741824},l=dr(18,null,null,0),l.stateNode=o,l.return=i,i.child=l,Kn=i,Qn=null,!0):!1;default:return!1}}function cm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function dm(i){if(Ct){var o=Qn;if(o){var l=o;if(!ux(i,o)){if(cm(i))throw Error(n(418));o=Fi(l.nextSibling);var h=Kn;o&&ux(i,o)?ax(h,l):(i.flags=i.flags&-4097|2,Ct=!1,Kn=i)}}else{if(cm(i))throw Error(n(418));i.flags=i.flags&-4097|2,Ct=!1,Kn=i}}}function lx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Kn=i}function $c(i){if(i!==Kn)return!1;if(!Ct)return lx(i),Ct=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!nm(i.type,i.memoizedProps)),o&&(o=Qn)){if(cm(i))throw cx(),Error(n(418));for(;o;)ax(i,o),o=Fi(o.nextSibling)}if(lx(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(o===0){Qn=Fi(i.nextSibling);break e}o--}else l!=="$"&&l!=="$!"&&l!=="$?"||o++}i=i.nextSibling}Qn=null}}else Qn=Kn?Fi(i.stateNode.nextSibling):null;return!0}function cx(){for(var i=Qn;i;)i=Fi(i.nextSibling)}function jo(){Qn=Kn=null,Ct=!1}function fm(i){wr===null?wr=[i]:wr.push(i)}var o7=z.ReactCurrentBatchConfig;function wu(i,o,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var h=l.stateNode}if(!h)throw Error(n(147,i));var E=h,b=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===b?o.ref:(o=function(x){var L=E.refs;x===null?delete L[b]:L[b]=x},o._stringRef=b,o)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Vc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function dx(i){var o=i._init;return o(i._payload)}function fx(i){function o(G,j){if(i){var K=G.deletions;K===null?(G.deletions=[j],G.flags|=16):K.push(j)}}function l(G,j){if(!i)return null;for(;j!==null;)o(G,j),j=j.sibling;return null}function h(G,j){for(G=new Map;j!==null;)j.key!==null?G.set(j.key,j):G.set(j.index,j),j=j.sibling;return G}function E(G,j){return G=Gi(G,j),G.index=0,G.sibling=null,G}function b(G,j,K){return G.index=K,i?(K=G.alternate,K!==null?(K=K.index,K<j?(G.flags|=2,j):K):(G.flags|=2,j)):(G.flags|=1048576,j)}function x(G){return i&&G.alternate===null&&(G.flags|=2),G}function L(G,j,K,be){return j===null||j.tag!==6?(j=r0(K,G.mode,be),j.return=G,j):(j=E(j,K),j.return=G,j)}function U(G,j,K,be){var Re=K.type;return Re===q?de(G,j,K.props.children,be,K.key):j!==null&&(j.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===xe&&dx(Re)===j.type)?(be=E(j,K.props),be.ref=wu(G,j,K),be.return=G,be):(be=pd(K.type,K.key,K.props,null,G.mode,be),be.ref=wu(G,j,K),be.return=G,be)}function Z(G,j,K,be){return j===null||j.tag!==4||j.stateNode.containerInfo!==K.containerInfo||j.stateNode.implementation!==K.implementation?(j=i0(K,G.mode,be),j.return=G,j):(j=E(j,K.children||[]),j.return=G,j)}function de(G,j,K,be,Re){return j===null||j.tag!==7?(j=Ms(K,G.mode,be,Re),j.return=G,j):(j=E(j,K),j.return=G,j)}function me(G,j,K){if(typeof j=="string"&&j!==""||typeof j=="number")return j=r0(""+j,G.mode,K),j.return=G,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Y:return K=pd(j.type,j.key,j.props,null,G.mode,K),K.ref=wu(G,null,j),K.return=G,K;case D:return j=i0(j,G.mode,K),j.return=G,j;case xe:var be=j._init;return me(G,be(j._payload),K)}if(Fn(j)||ie(j))return j=Ms(j,G.mode,K,null),j.return=G,j;Vc(G,j)}return null}function le(G,j,K,be){var Re=j!==null?j.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return Re!==null?null:L(G,j,""+K,be);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case Y:return K.key===Re?U(G,j,K,be):null;case D:return K.key===Re?Z(G,j,K,be):null;case xe:return Re=K._init,le(G,j,Re(K._payload),be)}if(Fn(K)||ie(K))return Re!==null?null:de(G,j,K,be,null);Vc(G,K)}return null}function Ae(G,j,K,be,Re){if(typeof be=="string"&&be!==""||typeof be=="number")return G=G.get(K)||null,L(j,G,""+be,Re);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case Y:return G=G.get(be.key===null?K:be.key)||null,U(j,G,be,Re);case D:return G=G.get(be.key===null?K:be.key)||null,Z(j,G,be,Re);case xe:var ze=be._init;return Ae(G,j,K,ze(be._payload),Re)}if(Fn(be)||ie(be))return G=G.get(K)||null,de(j,G,be,Re,null);Vc(j,be)}return null}function ke(G,j,K,be){for(var Re=null,ze=null,je=j,We=j=0,nn=null;je!==null&&We<K.length;We++){je.index>We?(nn=je,je=null):nn=je.sibling;var st=le(G,je,K[We],be);if(st===null){je===null&&(je=nn);break}i&&je&&st.alternate===null&&o(G,je),j=b(st,j,We),ze===null?Re=st:ze.sibling=st,ze=st,je=nn}if(We===K.length)return l(G,je),Ct&&Ns(G,We),Re;if(je===null){for(;We<K.length;We++)je=me(G,K[We],be),je!==null&&(j=b(je,j,We),ze===null?Re=je:ze.sibling=je,ze=je);return Ct&&Ns(G,We),Re}for(je=h(G,je);We<K.length;We++)nn=Ae(je,G,We,K[We],be),nn!==null&&(i&&nn.alternate!==null&&je.delete(nn.key===null?We:nn.key),j=b(nn,j,We),ze===null?Re=nn:ze.sibling=nn,ze=nn);return i&&je.forEach(function(Xi){return o(G,Xi)}),Ct&&Ns(G,We),Re}function Oe(G,j,K,be){var Re=ie(K);if(typeof Re!="function")throw Error(n(150));if(K=Re.call(K),K==null)throw Error(n(151));for(var ze=Re=null,je=j,We=j=0,nn=null,st=K.next();je!==null&&!st.done;We++,st=K.next()){je.index>We?(nn=je,je=null):nn=je.sibling;var Xi=le(G,je,st.value,be);if(Xi===null){je===null&&(je=nn);break}i&&je&&Xi.alternate===null&&o(G,je),j=b(Xi,j,We),ze===null?Re=Xi:ze.sibling=Xi,ze=Xi,je=nn}if(st.done)return l(G,je),Ct&&Ns(G,We),Re;if(je===null){for(;!st.done;We++,st=K.next())st=me(G,st.value,be),st!==null&&(j=b(st,j,We),ze===null?Re=st:ze.sibling=st,ze=st);return Ct&&Ns(G,We),Re}for(je=h(G,je);!st.done;We++,st=K.next())st=Ae(je,G,We,st.value,be),st!==null&&(i&&st.alternate!==null&&je.delete(st.key===null?We:st.key),j=b(st,j,We),ze===null?Re=st:ze.sibling=st,ze=st);return i&&je.forEach(function(U7){return o(G,U7)}),Ct&&Ns(G,We),Re}function Mt(G,j,K,be){if(typeof K=="object"&&K!==null&&K.type===q&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case Y:e:{for(var Re=K.key,ze=j;ze!==null;){if(ze.key===Re){if(Re=K.type,Re===q){if(ze.tag===7){l(G,ze.sibling),j=E(ze,K.props.children),j.return=G,G=j;break e}}else if(ze.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===xe&&dx(Re)===ze.type){l(G,ze.sibling),j=E(ze,K.props),j.ref=wu(G,ze,K),j.return=G,G=j;break e}l(G,ze);break}else o(G,ze);ze=ze.sibling}K.type===q?(j=Ms(K.props.children,G.mode,be,K.key),j.return=G,G=j):(be=pd(K.type,K.key,K.props,null,G.mode,be),be.ref=wu(G,j,K),be.return=G,G=be)}return x(G);case D:e:{for(ze=K.key;j!==null;){if(j.key===ze)if(j.tag===4&&j.stateNode.containerInfo===K.containerInfo&&j.stateNode.implementation===K.implementation){l(G,j.sibling),j=E(j,K.children||[]),j.return=G,G=j;break e}else{l(G,j);break}else o(G,j);j=j.sibling}j=i0(K,G.mode,be),j.return=G,G=j}return x(G);case xe:return ze=K._init,Mt(G,j,ze(K._payload),be)}if(Fn(K))return ke(G,j,K,be);if(ie(K))return Oe(G,j,K,be);Vc(G,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,j!==null&&j.tag===6?(l(G,j.sibling),j=E(j,K),j.return=G,G=j):(l(G,j),j=r0(K,G.mode,be),j.return=G,G=j),x(G)):l(G,j)}return Mt}var $o=fx(!0),hx=fx(!1),qc=Bi(null),Yc=null,Vo=null,hm=null;function pm(){hm=Vo=Yc=null}function mm(i){var o=qc.current;xt(qc),i._currentValue=o}function gm(i,o,l){for(;i!==null;){var h=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),i===l)break;i=i.return}}function qo(i,o){Yc=i,hm=Vo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(Hn=!0),i.firstContext=null)}function ur(i){var o=i._currentValue;if(hm!==i)if(i={context:i,memoizedValue:o,next:null},Vo===null){if(Yc===null)throw Error(n(308));Vo=i,Yc.dependencies={lanes:0,firstContext:i}}else Vo=Vo.next=i;return o}var ks=null;function Em(i){ks===null?ks=[i]:ks.push(i)}function px(i,o,l,h){var E=o.interleaved;return E===null?(l.next=l,Em(o)):(l.next=E.next,E.next=l),o.interleaved=l,mi(i,h)}function mi(i,o){i.lanes|=o;var l=i.alternate;for(l!==null&&(l.lanes|=o),l=i,i=i.return;i!==null;)i.childLanes|=o,l=i.alternate,l!==null&&(l.childLanes|=o),l=i,i=i.return;return l.tag===3?l.stateNode:null}var zi=!1;function ym(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function mx(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function gi(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function ji(i,o,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(it&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,mi(i,l)}return E=h.interleaved,E===null?(o.next=o,Em(h)):(o.next=E.next,E.next=o),h.interleaved=o,mi(i,l)}function Wc(i,o,l){if(o=o.updateQueue,o!==null&&(o=o.shared,(l&4194240)!==0)){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,Ip(i,l)}}function gx(i,o){var l=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var E=null,b=null;if(l=l.firstBaseUpdate,l!==null){do{var x={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};b===null?E=b=x:b=b.next=x,l=l.next}while(l!==null);b===null?E=b=o:b=b.next=o}else E=b=o;l={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:b,shared:h.shared,effects:h.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=o:i.next=o,l.lastBaseUpdate=o}function Gc(i,o,l,h){var E=i.updateQueue;zi=!1;var b=E.firstBaseUpdate,x=E.lastBaseUpdate,L=E.shared.pending;if(L!==null){E.shared.pending=null;var U=L,Z=U.next;U.next=null,x===null?b=Z:x.next=Z,x=U;var de=i.alternate;de!==null&&(de=de.updateQueue,L=de.lastBaseUpdate,L!==x&&(L===null?de.firstBaseUpdate=Z:L.next=Z,de.lastBaseUpdate=U))}if(b!==null){var me=E.baseState;x=0,de=Z=U=null,L=b;do{var le=L.lane,Ae=L.eventTime;if((h&le)===le){de!==null&&(de=de.next={eventTime:Ae,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var ke=i,Oe=L;switch(le=o,Ae=l,Oe.tag){case 1:if(ke=Oe.payload,typeof ke=="function"){me=ke.call(Ae,me,le);break e}me=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Oe.payload,le=typeof ke=="function"?ke.call(Ae,me,le):ke,le==null)break e;me=k({},me,le);break e;case 2:zi=!0}}L.callback!==null&&L.lane!==0&&(i.flags|=64,le=E.effects,le===null?E.effects=[L]:le.push(L))}else Ae={eventTime:Ae,lane:le,tag:L.tag,payload:L.payload,callback:L.callback,next:null},de===null?(Z=de=Ae,U=me):de=de.next=Ae,x|=le;if(L=L.next,L===null){if(L=E.shared.pending,L===null)break;le=L,L=le.next,le.next=null,E.lastBaseUpdate=le,E.shared.pending=null}}while(!0);if(de===null&&(U=me),E.baseState=U,E.firstBaseUpdate=Z,E.lastBaseUpdate=de,o=E.shared.interleaved,o!==null){E=o;do x|=E.lane,E=E.next;while(E!==o)}else b===null&&(E.shared.lanes=0);Is|=x,i.lanes=x,i.memoizedState=me}}function Ex(i,o,l){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var h=i[o],E=h.callback;if(E!==null){if(h.callback=null,h=l,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var Au={},Gr=Bi(Au),Cu=Bi(Au),vu=Bi(Au);function Ps(i){if(i===Au)throw Error(n(174));return i}function bm(i,o){switch(Et(vu,o),Et(Cu,i),Et(Gr,Au),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:ge(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=ge(o,i)}xt(Gr),Et(Gr,o)}function Yo(){xt(Gr),xt(Cu),xt(vu)}function yx(i){Ps(vu.current);var o=Ps(Gr.current),l=ge(o,i.type);o!==l&&(Et(Cu,i),Et(Gr,l))}function Tm(i){Cu.current===i&&(xt(Gr),xt(Cu))}var kt=Bi(0);function Xc(i){for(var o=i;o!==null;){if(o.tag===13){var l=o.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var _m=[];function Sm(){for(var i=0;i<_m.length;i++)_m[i]._workInProgressVersionPrimary=null;_m.length=0}var Kc=z.ReactCurrentDispatcher,xm=z.ReactCurrentBatchConfig,Os=0,Pt=null,Yt=null,en=null,Qc=!1,Nu=!1,ku=0,a7=0;function _n(){throw Error(n(321))}function wm(i,o){if(o===null)return!1;for(var l=0;l<o.length&&l<i.length;l++)if(!xr(i[l],o[l]))return!1;return!0}function Am(i,o,l,h,E,b){if(Os=b,Pt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Kc.current=i===null||i.memoizedState===null?d7:f7,i=l(h,E),Nu){b=0;do{if(Nu=!1,ku=0,25<=b)throw Error(n(301));b+=1,en=Yt=null,o.updateQueue=null,Kc.current=h7,i=l(h,E)}while(Nu)}if(Kc.current=ed,o=Yt!==null&&Yt.next!==null,Os=0,en=Yt=Pt=null,Qc=!1,o)throw Error(n(300));return i}function Cm(){var i=ku!==0;return ku=0,i}function Xr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return en===null?Pt.memoizedState=en=i:en=en.next=i,en}function lr(){if(Yt===null){var i=Pt.alternate;i=i!==null?i.memoizedState:null}else i=Yt.next;var o=en===null?Pt.memoizedState:en.next;if(o!==null)en=o,Yt=i;else{if(i===null)throw Error(n(310));Yt=i,i={memoizedState:Yt.memoizedState,baseState:Yt.baseState,baseQueue:Yt.baseQueue,queue:Yt.queue,next:null},en===null?Pt.memoizedState=en=i:en=en.next=i}return en}function Pu(i,o){return typeof o=="function"?o(i):o}function vm(i){var o=lr(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=Yt,E=h.baseQueue,b=l.pending;if(b!==null){if(E!==null){var x=E.next;E.next=b.next,b.next=x}h.baseQueue=E=b,l.pending=null}if(E!==null){b=E.next,h=h.baseState;var L=x=null,U=null,Z=b;do{var de=Z.lane;if((Os&de)===de)U!==null&&(U=U.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),h=Z.hasEagerState?Z.eagerState:i(h,Z.action);else{var me={lane:de,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};U===null?(L=U=me,x=h):U=U.next=me,Pt.lanes|=de,Is|=de}Z=Z.next}while(Z!==null&&Z!==b);U===null?x=h:U.next=L,xr(h,o.memoizedState)||(Hn=!0),o.memoizedState=h,o.baseState=x,o.baseQueue=U,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do b=E.lane,Pt.lanes|=b,Is|=b,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[o.memoizedState,l.dispatch]}function Nm(i){var o=lr(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,E=l.pending,b=o.memoizedState;if(E!==null){l.pending=null;var x=E=E.next;do b=i(b,x.action),x=x.next;while(x!==E);xr(b,o.memoizedState)||(Hn=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),l.lastRenderedState=b}return[b,h]}function bx(){}function Tx(i,o){var l=Pt,h=lr(),E=o(),b=!xr(h.memoizedState,E);if(b&&(h.memoizedState=E,Hn=!0),h=h.queue,km(xx.bind(null,l,h,i),[i]),h.getSnapshot!==o||b||en!==null&&en.memoizedState.tag&1){if(l.flags|=2048,Ou(9,Sx.bind(null,l,h,E,o),void 0,null),tn===null)throw Error(n(349));(Os&30)!==0||_x(l,o,E)}return E}function _x(i,o,l){i.flags|=16384,i={getSnapshot:o,value:l},o=Pt.updateQueue,o===null?(o={lastEffect:null,stores:null},Pt.updateQueue=o,o.stores=[i]):(l=o.stores,l===null?o.stores=[i]:l.push(i))}function Sx(i,o,l,h){o.value=l,o.getSnapshot=h,wx(o)&&Ax(i)}function xx(i,o,l){return l(function(){wx(o)&&Ax(i)})}function wx(i){var o=i.getSnapshot;i=i.value;try{var l=o();return!xr(i,l)}catch(h){return!0}}function Ax(i){var o=mi(i,1);o!==null&&Nr(o,i,1,-1)}function Cx(i){var o=Xr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Pu,lastRenderedState:i},o.queue=i,i=i.dispatch=c7.bind(null,Pt,i),[o.memoizedState,i]}function Ou(i,o,l,h){return i={tag:i,create:o,destroy:l,deps:h,next:null},o=Pt.updateQueue,o===null?(o={lastEffect:null,stores:null},Pt.updateQueue=o,o.lastEffect=i.next=i):(l=o.lastEffect,l===null?o.lastEffect=i.next=i:(h=l.next,l.next=i,i.next=h,o.lastEffect=i)),i}function vx(){return lr().memoizedState}function Jc(i,o,l,h){var E=Xr();Pt.flags|=i,E.memoizedState=Ou(1|o,l,void 0,h===void 0?null:h)}function Zc(i,o,l,h){var E=lr();h=h===void 0?null:h;var b=void 0;if(Yt!==null){var x=Yt.memoizedState;if(b=x.destroy,h!==null&&wm(h,x.deps)){E.memoizedState=Ou(o,l,b,h);return}}Pt.flags|=i,E.memoizedState=Ou(1|o,l,b,h)}function Nx(i,o){return Jc(8390656,8,i,o)}function km(i,o){return Zc(2048,8,i,o)}function kx(i,o){return Zc(4,2,i,o)}function Px(i,o){return Zc(4,4,i,o)}function Ox(i,o){if(typeof o=="function")return i=i(),o(i),function(){o(null)};if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function Ix(i,o,l){return l=l!=null?l.concat([i]):null,Zc(4,4,Ox.bind(null,o,i),l)}function Pm(){}function Rx(i,o){var l=lr();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&wm(o,h[1])?h[0]:(l.memoizedState=[i,o],i)}function Lx(i,o){var l=lr();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&wm(o,h[1])?h[0]:(i=i(),l.memoizedState=[i,o],i)}function Dx(i,o,l){return(Os&21)===0?(i.baseState&&(i.baseState=!1,Hn=!0),i.memoizedState=l):(xr(l,o)||(l=dS(),Pt.lanes|=l,Is|=l,i.baseState=!0),o)}function u7(i,o){var l=lt;lt=l!==0&&4>l?l:4,i(!0);var h=xm.transition;xm.transition={};try{i(!1),o()}finally{lt=l,xm.transition=h}}function Mx(){return lr().memoizedState}function l7(i,o,l){var h=Yi(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},Fx(i))Bx(o,l);else if(l=px(i,o,l,h),l!==null){var E=kn();Nr(l,i,h,E),Ux(l,o,h)}}function c7(i,o,l){var h=Yi(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(Fx(i))Bx(o,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=o.lastRenderedReducer,b!==null))try{var x=o.lastRenderedState,L=b(x,l);if(E.hasEagerState=!0,E.eagerState=L,xr(L,x)){var U=o.interleaved;U===null?(E.next=E,Em(o)):(E.next=U.next,U.next=E),o.interleaved=E;return}}catch(Z){}l=px(i,o,E,h),l!==null&&(E=kn(),Nr(l,i,h,E),Ux(l,o,h))}}function Fx(i){var o=i.alternate;return i===Pt||o!==null&&o===Pt}function Bx(i,o){Nu=Qc=!0;var l=i.pending;l===null?o.next=o:(o.next=l.next,l.next=o),i.pending=o}function Ux(i,o,l){if((l&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,Ip(i,l)}}var ed={readContext:ur,useCallback:_n,useContext:_n,useEffect:_n,useImperativeHandle:_n,useInsertionEffect:_n,useLayoutEffect:_n,useMemo:_n,useReducer:_n,useRef:_n,useState:_n,useDebugValue:_n,useDeferredValue:_n,useTransition:_n,useMutableSource:_n,useSyncExternalStore:_n,useId:_n,unstable_isNewReconciler:!1},d7={readContext:ur,useCallback:function(i,o){return Xr().memoizedState=[i,o===void 0?null:o],i},useContext:ur,useEffect:Nx,useImperativeHandle:function(i,o,l){return l=l!=null?l.concat([i]):null,Jc(4194308,4,Ox.bind(null,o,i),l)},useLayoutEffect:function(i,o){return Jc(4194308,4,i,o)},useInsertionEffect:function(i,o){return Jc(4,2,i,o)},useMemo:function(i,o){var l=Xr();return o=o===void 0?null:o,i=i(),l.memoizedState=[i,o],i},useReducer:function(i,o,l){var h=Xr();return o=l!==void 0?l(o):o,h.memoizedState=h.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},h.queue=i,i=i.dispatch=l7.bind(null,Pt,i),[h.memoizedState,i]},useRef:function(i){var o=Xr();return i={current:i},o.memoizedState=i},useState:Cx,useDebugValue:Pm,useDeferredValue:function(i){return Xr().memoizedState=i},useTransition:function(){var i=Cx(!1),o=i[0];return i=u7.bind(null,i[1]),Xr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,l){var h=Pt,E=Xr();if(Ct){if(l===void 0)throw Error(n(407));l=l()}else{if(l=o(),tn===null)throw Error(n(349));(Os&30)!==0||_x(h,o,l)}E.memoizedState=l;var b={value:l,getSnapshot:o};return E.queue=b,Nx(xx.bind(null,h,b,i),[i]),h.flags|=2048,Ou(9,Sx.bind(null,h,b,l,o),void 0,null),l},useId:function(){var i=Xr(),o=tn.identifierPrefix;if(Ct){var l=pi,h=hi;l=(h&~(1<<32-Sr(h)-1)).toString(32)+l,o=":"+o+"R"+l,l=ku++,0<l&&(o+="H"+l.toString(32)),o+=":"}else l=a7++,o=":"+o+"r"+l.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},f7={readContext:ur,useCallback:Rx,useContext:ur,useEffect:km,useImperativeHandle:Ix,useInsertionEffect:kx,useLayoutEffect:Px,useMemo:Lx,useReducer:vm,useRef:vx,useState:function(){return vm(Pu)},useDebugValue:Pm,useDeferredValue:function(i){var o=lr();return Dx(o,Yt.memoizedState,i)},useTransition:function(){var i=vm(Pu)[0],o=lr().memoizedState;return[i,o]},useMutableSource:bx,useSyncExternalStore:Tx,useId:Mx,unstable_isNewReconciler:!1},h7={readContext:ur,useCallback:Rx,useContext:ur,useEffect:km,useImperativeHandle:Ix,useInsertionEffect:kx,useLayoutEffect:Px,useMemo:Lx,useReducer:Nm,useRef:vx,useState:function(){return Nm(Pu)},useDebugValue:Pm,useDeferredValue:function(i){var o=lr();return Yt===null?o.memoizedState=i:Dx(o,Yt.memoizedState,i)},useTransition:function(){var i=Nm(Pu)[0],o=lr().memoizedState;return[i,o]},useMutableSource:bx,useSyncExternalStore:Tx,useId:Mx,unstable_isNewReconciler:!1};function Ar(i,o){if(i&&i.defaultProps){o=k({},o),i=i.defaultProps;for(var l in i)o[l]===void 0&&(o[l]=i[l]);return o}return o}function Om(i,o,l,h){o=i.memoizedState,l=l(h,o),l=l==null?o:k({},o,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var td={isMounted:function(i){return(i=i._reactInternals)?ws(i)===i:!1},enqueueSetState:function(i,o,l){i=i._reactInternals;var h=kn(),E=Yi(i),b=gi(h,E);b.payload=o,l!=null&&(b.callback=l),o=ji(i,b,E),o!==null&&(Nr(o,i,E,h),Wc(o,i,E))},enqueueReplaceState:function(i,o,l){i=i._reactInternals;var h=kn(),E=Yi(i),b=gi(h,E);b.tag=1,b.payload=o,l!=null&&(b.callback=l),o=ji(i,b,E),o!==null&&(Nr(o,i,E,h),Wc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var l=kn(),h=Yi(i),E=gi(l,h);E.tag=2,o!=null&&(E.callback=o),o=ji(i,E,h),o!==null&&(Nr(o,i,h,l),Wc(o,i,h))}};function Hx(i,o,l,h,E,b,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,x):o.prototype&&o.prototype.isPureReactComponent?!Eu(l,h)||!Eu(E,b):!0}function zx(i,o,l){var h=!1,E=Ui,b=o.contextType;return typeof b=="object"&&b!==null?b=ur(b):(E=Un(o)?Cs:Tn.current,h=o.contextTypes,b=(h=h!=null)?Uo(i,E):Ui),o=new o(l,b),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=td,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),o}function jx(i,o,l,h){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(l,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(l,h),o.state!==i&&td.enqueueReplaceState(o,o.state,null)}function Im(i,o,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},ym(i);var b=o.contextType;typeof b=="object"&&b!==null?E.context=ur(b):(b=Un(o)?Cs:Tn.current,E.context=Uo(i,b)),E.state=i.memoizedState,b=o.getDerivedStateFromProps,typeof b=="function"&&(Om(i,o,b,l),E.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(o=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),o!==E.state&&td.enqueueReplaceState(E,E.state,null),Gc(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Wo(i,o){try{var l="",h=o;do l+=Ue(h),h=h.return;while(h);var E=l}catch(b){E=`
13
+ `),x=E.length-1,R=b.length-1;1<=x&&0<=R&&E[x]!==b[R];)R--;for(;1<=x&&0<=R;x--,R--)if(E[x]!==b[R]){if(x!==1||R!==1)do if(x--,R--,0>R||E[x]!==b[R]){var U=`
14
+ `+E[x].replace(" at new "," at ");return i.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",i.displayName)),U}while(1<=x&&0<=R);break}}}finally{I=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?J(i):""}function He(i){switch(i.tag){case 5:return J(i.type);case 16:return J("Lazy");case 13:return J("Suspense");case 19:return J("SuspenseList");case 0:case 2:case 15:return i=Te(i.type,!1),i;case 11:return i=Te(i.type.render,!1),i;case 1:return i=Te(i.type,!0),i;default:return""}}function ye(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case q:return"Fragment";case D:return"Portal";case ue:return"Profiler";case ne:return"StrictMode";case ve:return"Suspense";case re:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case se:return(i.displayName||"Context")+".Consumer";case V:return(i._context.displayName||"Context")+".Provider";case pe:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ae:return o=i.displayName||null,o!==null?o:ye(i.type)||"Memo";case xe:o=i._payload,i=i._init;try{return ye(i(o))}catch(l){}}return null}function Le(i){var o=i.type;switch(i.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(o);case 8:return o===ne?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function Be(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ge(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function at(i){var o=Ge(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),h=""+i[o];if(!i.hasOwnProperty(o)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,b=l.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(x){h=""+x,b.call(this,x)}}),Object.defineProperty(i,o,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(x){h=""+x},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function on(i){i._valueTracker||(i._valueTracker=at(i))}function Dt(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var l=o.getValue(),h="";return i&&(h=Ge(i)?i.checked?"true":"false":i.value),i=h,i!==l?(o.setValue(i),!0):!1}function _r(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(o){return i.body}}function sr(i,o){var l=o.checked;return N({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function Zt(i,o){var l=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;l=Be(o.value!=null?o.value:l),i._wrapperState={initialChecked:h,initialValue:l,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Ve(i,o){o=o.checked,o!=null&&C(i,"checked",o,!1)}function Nt(i,o){Ve(i,o);var l=Be(o.value),h=o.type;if(l!=null)h==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}o.hasOwnProperty("value")?an(i,o.type,l):o.hasOwnProperty("defaultValue")&&an(i,o.type,Be(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function vn(i,o,l){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+i._wrapperState.initialValue,l||o===i.value||(i.value=o),i.defaultValue=o}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function an(i,o,l){(o!=="number"||_r(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var Fn=Array.isArray;function we(i,o,l,h){if(i=i.options,o){o={};for(var E=0;E<l.length;E++)o["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=o.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&h&&(i[l].defaultSelected=!0)}else{for(l=""+Be(l),o=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}o!==null||i[E].disabled||(o=i[E])}o!==null&&(o.selected=!0)}}function Pe(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return N({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Me(i,o){var l=o.value;if(l==null){if(l=o.children,o=o.defaultValue,l!=null){if(o!=null)throw Error(n(92));if(Fn(l)){if(1<l.length)throw Error(n(93));l=l[0]}o=l}o==null&&(o=""),l=o}i._wrapperState={initialValue:Be(l)}}function rt(i,o){var l=Be(o.value),h=Be(o.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),o.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),h!=null&&(i.defaultValue=""+h)}function pt(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function Z(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ge(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?Z(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ce,qe=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(o,l,h,E){MSApp.execUnsafeLocalFunction(function(){return i(o,l,h,E)})}:i})(function(i,o){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=o;else{for(Ce=Ce||document.createElement("div"),Ce.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Ce.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function Ie(i,o){if(o){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=o;return}}i.textContent=o}var lt={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},qt=["Webkit","ms","Moz","O"];Object.keys(lt).forEach(function(i){qt.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),lt[o]=lt[i]})});function zt(i,o,l){return o==null||typeof o=="boolean"||o===""?"":l||typeof o!="number"||o===0||lt.hasOwnProperty(i)&&lt[i]?(""+o).trim():o+"px"}function un(i,o){i=i.style;for(var l in o)if(o.hasOwnProperty(l)){var h=l.indexOf("--")===0,E=zt(l,o[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,E):i[l]=E}}var Vr=N({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ln(i,o){if(o){if(Vr[i]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function qr(i,o){if(i.indexOf("-")===-1)return typeof o.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Gn=null;function wp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ap=null,No=null,ko=null;function Q_(i){if(i=xu(i)){if(typeof Ap!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Fc(o),Ap(i.stateNode,i.type,o))}}function J_(i){No?ko?ko.push(i):ko=[i]:No=i}function Z_(){if(No){var i=No,o=ko;if(ko=No=null,Q_(i),o)for(i=0;i<o.length;i++)Q_(o[i])}}function eS(i,o){return i(o)}function tS(){}var Cp=!1;function nS(i,o,l){if(Cp)return i(o,l);Cp=!0;try{return eS(i,o,l)}finally{Cp=!1,(No!==null||ko!==null)&&(tS(),Z_())}}function nu(i,o){var l=i.stateNode;if(l===null)return null;var h=Fc(l);if(h===null)return null;l=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,o,typeof l));return l}var vp=!1;if(c)try{var ru={};Object.defineProperty(ru,"passive",{get:function(){vp=!0}}),window.addEventListener("test",ru,ru),window.removeEventListener("test",ru,ru)}catch(i){vp=!1}function Y9(i,o,l,h,E,b,x,R,U){var ee=Array.prototype.slice.call(arguments,3);try{o.apply(l,ee)}catch(de){this.onError(de)}}var iu=!1,mc=null,gc=!1,Np=null,W9={onError:function(i){iu=!0,mc=i}};function G9(i,o,l,h,E,b,x,R,U){iu=!1,mc=null,Y9.apply(W9,arguments)}function X9(i,o,l,h,E,b,x,R,U){if(G9.apply(this,arguments),iu){if(iu){var ee=mc;iu=!1,mc=null}else throw Error(n(198));gc||(gc=!0,Np=ee)}}function ws(i){var o=i,l=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(l=o.return),i=o.return;while(i)}return o.tag===3?l:null}function rS(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function iS(i){if(ws(i)!==i)throw Error(n(188))}function K9(i){var o=i.alternate;if(!o){if(o=ws(i),o===null)throw Error(n(188));return o!==i?null:i}for(var l=i,h=o;;){var E=l.return;if(E===null)break;var b=E.alternate;if(b===null){if(h=E.return,h!==null){l=h;continue}break}if(E.child===b.child){for(b=E.child;b;){if(b===l)return iS(E),i;if(b===h)return iS(E),o;b=b.sibling}throw Error(n(188))}if(l.return!==h.return)l=E,h=b;else{for(var x=!1,R=E.child;R;){if(R===l){x=!0,l=E,h=b;break}if(R===h){x=!0,h=E,l=b;break}R=R.sibling}if(!x){for(R=b.child;R;){if(R===l){x=!0,l=b,h=E;break}if(R===h){x=!0,h=b,l=E;break}R=R.sibling}if(!x)throw Error(n(189))}}if(l.alternate!==h)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:o}function sS(i){return i=K9(i),i!==null?oS(i):null}function oS(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=oS(i);if(o!==null)return o;i=i.sibling}return null}var aS=t.unstable_scheduleCallback,uS=t.unstable_cancelCallback,Q9=t.unstable_shouldYield,J9=t.unstable_requestPaint,Mt=t.unstable_now,Z9=t.unstable_getCurrentPriorityLevel,kp=t.unstable_ImmediatePriority,lS=t.unstable_UserBlockingPriority,Ec=t.unstable_NormalPriority,eB=t.unstable_LowPriority,cS=t.unstable_IdlePriority,yc=null,Yr=null;function tB(i){if(Yr&&typeof Yr.onCommitFiberRoot=="function")try{Yr.onCommitFiberRoot(yc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var Sr=Math.clz32?Math.clz32:iB,nB=Math.log,rB=Math.LN2;function iB(i){return i>>>=0,i===0?32:31-(nB(i)/rB|0)|0}var bc=64,Tc=4194304;function su(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function _c(i,o){var l=i.pendingLanes;if(l===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,x=l&268435455;if(x!==0){var R=x&~E;R!==0?h=su(R):(b&=x,b!==0&&(h=su(b)))}else x=l&~E,x!==0?h=su(x):b!==0&&(h=su(b));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,b=o&-o,E>=b||E===16&&(b&4194240)!==0))return o;if((h&4)!==0&&(h|=l&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)l=31-Sr(o),E=1<<l,h|=i[l],o&=~E;return h}function sB(i,o){switch(i){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function oB(i,o){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var x=31-Sr(b),R=1<<x,U=E[x];U===-1?((R&l)===0||(R&h)!==0)&&(E[x]=sB(R,o)):U<=o&&(i.expiredLanes|=R),b&=~R}}function Pp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function dS(){var i=bc;return bc<<=1,(bc&4194240)===0&&(bc=64),i}function Op(i){for(var o=[],l=0;31>l;l++)o.push(i);return o}function ou(i,o,l){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-Sr(o),i[o]=l}function aB(i,o){var l=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-Sr(l),b=1<<E;o[E]=0,h[E]=-1,i[E]=-1,l&=~b}}function Ip(i,o){var l=i.entangledLanes|=o;for(i=i.entanglements;l;){var h=31-Sr(l),E=1<<h;E&o|i[h]&o&&(i[h]|=o),l&=~E}}var ct=0;function fS(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var hS,Rp,pS,mS,gS,Lp=!1,Sc=[],Oi=null,Ii=null,Ri=null,au=new Map,uu=new Map,Li=[],uB="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 ES(i,o){switch(i){case"focusin":case"focusout":Oi=null;break;case"dragenter":case"dragleave":Ii=null;break;case"mouseover":case"mouseout":Ri=null;break;case"pointerover":case"pointerout":au.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":uu.delete(o.pointerId)}}function lu(i,o,l,h,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:o,domEventName:l,eventSystemFlags:h,nativeEvent:b,targetContainers:[E]},o!==null&&(o=xu(o),o!==null&&Rp(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function lB(i,o,l,h,E){switch(o){case"focusin":return Oi=lu(Oi,i,o,l,h,E),!0;case"dragenter":return Ii=lu(Ii,i,o,l,h,E),!0;case"mouseover":return Ri=lu(Ri,i,o,l,h,E),!0;case"pointerover":var b=E.pointerId;return au.set(b,lu(au.get(b)||null,i,o,l,h,E)),!0;case"gotpointercapture":return b=E.pointerId,uu.set(b,lu(uu.get(b)||null,i,o,l,h,E)),!0}return!1}function yS(i){var o=As(i.target);if(o!==null){var l=ws(o);if(l!==null){if(o=l.tag,o===13){if(o=rS(l),o!==null){i.blockedOn=o,gS(i.priority,function(){pS(l)});return}}else if(o===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function xc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var l=Mp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Gn=h,l.target.dispatchEvent(h),Gn=null}else return o=xu(l),o!==null&&Rp(o),i.blockedOn=l,!1;o.shift()}return!0}function bS(i,o,l){xc(i)&&l.delete(o)}function cB(){Lp=!1,Oi!==null&&xc(Oi)&&(Oi=null),Ii!==null&&xc(Ii)&&(Ii=null),Ri!==null&&xc(Ri)&&(Ri=null),au.forEach(bS),uu.forEach(bS)}function cu(i,o){i.blockedOn===o&&(i.blockedOn=null,Lp||(Lp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,cB)))}function du(i){function o(E){return cu(E,i)}if(0<Sc.length){cu(Sc[0],i);for(var l=1;l<Sc.length;l++){var h=Sc[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Oi!==null&&cu(Oi,i),Ii!==null&&cu(Ii,i),Ri!==null&&cu(Ri,i),au.forEach(o),uu.forEach(o),l=0;l<Li.length;l++)h=Li[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Li.length&&(l=Li[0],l.blockedOn===null);)yS(l),l.blockedOn===null&&Li.shift()}var Po=z.ReactCurrentBatchConfig,wc=!0;function dB(i,o,l,h){var E=ct,b=Po.transition;Po.transition=null;try{ct=1,Dp(i,o,l,h)}finally{ct=E,Po.transition=b}}function fB(i,o,l,h){var E=ct,b=Po.transition;Po.transition=null;try{ct=4,Dp(i,o,l,h)}finally{ct=E,Po.transition=b}}function Dp(i,o,l,h){if(wc){var E=Mp(i,o,l,h);if(E===null)Zp(i,o,h,Ac,l),ES(i,h);else if(lB(E,i,o,l,h))h.stopPropagation();else if(ES(i,h),o&4&&-1<uB.indexOf(i)){for(;E!==null;){var b=xu(E);if(b!==null&&hS(b),b=Mp(i,o,l,h),b===null&&Zp(i,o,h,Ac,l),b===E)break;E=b}E!==null&&h.stopPropagation()}else Zp(i,o,h,null,l)}}var Ac=null;function Mp(i,o,l,h){if(Ac=null,i=wp(h),i=As(i),i!==null)if(o=ws(i),o===null)i=null;else if(l=o.tag,l===13){if(i=rS(o),i!==null)return i;i=null}else if(l===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null);return Ac=i,null}function TS(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(Z9()){case kp:return 1;case lS:return 4;case Ec:case eB:return 16;case cS:return 536870912;default:return 16}default:return 16}}var Di=null,Fp=null,Cc=null;function _S(){if(Cc)return Cc;var i,o=Fp,l=o.length,h,E="value"in Di?Di.value:Di.textContent,b=E.length;for(i=0;i<l&&o[i]===E[i];i++);var x=l-i;for(h=1;h<=x&&o[l-h]===E[b-h];h++);return Cc=E.slice(i,1<h?1-h:void 0)}function vc(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function Nc(){return!0}function SS(){return!1}function Xn(i){function o(l,h,E,b,x){this._reactName=l,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=x,this.currentTarget=null;for(var R in i)i.hasOwnProperty(R)&&(l=i[R],this[R]=l?l(b):b[R]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Nc:SS,this.isPropagationStopped=SS,this}return N(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Nc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Nc)},persist:function(){},isPersistent:Nc}),o}var Oo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bp=Xn(Oo),fu=N({},Oo,{view:0,detail:0}),hB=Xn(fu),Up,Hp,hu,kc=N({},fu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jp,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!==hu&&(hu&&i.type==="mousemove"?(Up=i.screenX-hu.screenX,Hp=i.screenY-hu.screenY):Hp=Up=0,hu=i),Up)},movementY:function(i){return"movementY"in i?i.movementY:Hp}}),xS=Xn(kc),pB=N({},kc,{dataTransfer:0}),mB=Xn(pB),gB=N({},fu,{relatedTarget:0}),zp=Xn(gB),EB=N({},Oo,{animationName:0,elapsedTime:0,pseudoElement:0}),yB=Xn(EB),bB=N({},Oo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),TB=Xn(bB),_B=N({},Oo,{data:0}),wS=Xn(_B),SB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xB={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},wB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function AB(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=wB[i])?!!o[i]:!1}function jp(){return AB}var CB=N({},fu,{key:function(i){if(i.key){var o=SB[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=vc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?xB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jp,charCode:function(i){return i.type==="keypress"?vc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?vc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),vB=Xn(CB),NB=N({},kc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),AS=Xn(NB),kB=N({},fu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jp}),PB=Xn(kB),OB=N({},Oo,{propertyName:0,elapsedTime:0,pseudoElement:0}),IB=Xn(OB),RB=N({},kc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),LB=Xn(RB),DB=[9,13,27,32],$p=c&&"CompositionEvent"in window,pu=null;c&&"documentMode"in document&&(pu=document.documentMode);var MB=c&&"TextEvent"in window&&!pu,CS=c&&(!$p||pu&&8<pu&&11>=pu),vS=" ",NS=!1;function kS(i,o){switch(i){case"keyup":return DB.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function PS(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Io=!1;function FB(i,o){switch(i){case"compositionend":return PS(o);case"keypress":return o.which!==32?null:(NS=!0,vS);case"textInput":return i=o.data,i===vS&&NS?null:i;default:return null}}function BB(i,o){if(Io)return i==="compositionend"||!$p&&kS(i,o)?(i=_S(),Cc=Fp=Di=null,Io=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return CS&&o.locale!=="ko"?null:o.data;default:return null}}var UB={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 OS(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!UB[i.type]:o==="textarea"}function IS(i,o,l,h){J_(h),o=Lc(o,"onChange"),0<o.length&&(l=new Bp("onChange","change",null,l,h),i.push({event:l,listeners:o}))}var mu=null,gu=null;function HB(i){KS(i,0)}function Pc(i){var o=Fo(i);if(Dt(o))return i}function zB(i,o){if(i==="change")return o}var RS=!1;if(c){var Vp;if(c){var qp="oninput"in document;if(!qp){var LS=document.createElement("div");LS.setAttribute("oninput","return;"),qp=typeof LS.oninput=="function"}Vp=qp}else Vp=!1;RS=Vp&&(!document.documentMode||9<document.documentMode)}function DS(){mu&&(mu.detachEvent("onpropertychange",MS),gu=mu=null)}function MS(i){if(i.propertyName==="value"&&Pc(gu)){var o=[];IS(o,gu,i,wp(i)),nS(HB,o)}}function jB(i,o,l){i==="focusin"?(DS(),mu=o,gu=l,mu.attachEvent("onpropertychange",MS)):i==="focusout"&&DS()}function $B(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Pc(gu)}function VB(i,o){if(i==="click")return Pc(o)}function qB(i,o){if(i==="input"||i==="change")return Pc(o)}function YB(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var xr=typeof Object.is=="function"?Object.is:YB;function Eu(i,o){if(xr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var l=Object.keys(i),h=Object.keys(o);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var E=l[h];if(!d.call(o,E)||!xr(i[E],o[E]))return!1}return!0}function FS(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function BS(i,o){var l=FS(i);i=0;for(var h;l;){if(l.nodeType===3){if(h=i+l.textContent.length,i<=o&&h>=o)return{node:l,offset:o-i};i=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=FS(l)}}function US(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?US(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function HS(){for(var i=window,o=_r();o instanceof i.HTMLIFrameElement;){try{var l=typeof o.contentWindow.location.href=="string"}catch(h){l=!1}if(l)i=o.contentWindow;else break;o=_r(i.document)}return o}function Yp(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function WB(i){var o=HS(),l=i.focusedElem,h=i.selectionRange;if(o!==l&&l&&l.ownerDocument&&US(l.ownerDocument.documentElement,l)){if(h!==null&&Yp(l)){if(o=h.start,i=h.end,i===void 0&&(i=o),"selectionStart"in l)l.selectionStart=o,l.selectionEnd=Math.min(i,l.value.length);else if(i=(o=l.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,b=Math.min(h.start,E);h=h.end===void 0?b:Math.min(h.end,E),!i.extend&&b>h&&(E=h,h=b,b=E),E=BS(l,b);var x=BS(l,h);E&&x&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(o),i.extend(x.node,x.offset)):(o.setEnd(x.node,x.offset),i.addRange(o)))}}for(o=[],i=l;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<o.length;l++)i=o[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var GB=c&&"documentMode"in document&&11>=document.documentMode,Ro=null,Wp=null,yu=null,Gp=!1;function zS(i,o,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Gp||Ro==null||Ro!==_r(h)||(h=Ro,"selectionStart"in h&&Yp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),yu&&Eu(yu,h)||(yu=h,h=Lc(Wp,"onSelect"),0<h.length&&(o=new Bp("onSelect","select",null,o,l),i.push({event:o,listeners:h}),o.target=Ro)))}function Oc(i,o){var l={};return l[i.toLowerCase()]=o.toLowerCase(),l["Webkit"+i]="webkit"+o,l["Moz"+i]="moz"+o,l}var Lo={animationend:Oc("Animation","AnimationEnd"),animationiteration:Oc("Animation","AnimationIteration"),animationstart:Oc("Animation","AnimationStart"),transitionend:Oc("Transition","TransitionEnd")},Xp={},jS={};c&&(jS=document.createElement("div").style,"AnimationEvent"in window||(delete Lo.animationend.animation,delete Lo.animationiteration.animation,delete Lo.animationstart.animation),"TransitionEvent"in window||delete Lo.transitionend.transition);function Ic(i){if(Xp[i])return Xp[i];if(!Lo[i])return i;var o=Lo[i],l;for(l in o)if(o.hasOwnProperty(l)&&l in jS)return Xp[i]=o[l];return i}var $S=Ic("animationend"),VS=Ic("animationiteration"),qS=Ic("animationstart"),YS=Ic("transitionend"),WS=new Map,GS="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Mi(i,o){WS.set(i,o),a(o,[i])}for(var Kp=0;Kp<GS.length;Kp++){var Qp=GS[Kp],XB=Qp.toLowerCase(),KB=Qp[0].toUpperCase()+Qp.slice(1);Mi(XB,"on"+KB)}Mi($S,"onAnimationEnd"),Mi(VS,"onAnimationIteration"),Mi(qS,"onAnimationStart"),Mi("dblclick","onDoubleClick"),Mi("focusin","onFocus"),Mi("focusout","onBlur"),Mi(YS,"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 bu="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(" "),QB=new Set("cancel close invalid load scroll toggle".split(" ").concat(bu));function XS(i,o,l){var h=i.type||"unknown-event";i.currentTarget=l,X9(h,o,void 0,i),i.currentTarget=null}function KS(i,o){o=(o&4)!==0;for(var l=0;l<i.length;l++){var h=i[l],E=h.event;h=h.listeners;e:{var b=void 0;if(o)for(var x=h.length-1;0<=x;x--){var R=h[x],U=R.instance,ee=R.currentTarget;if(R=R.listener,U!==b&&E.isPropagationStopped())break e;XS(E,R,ee),b=U}else for(x=0;x<h.length;x++){if(R=h[x],U=R.instance,ee=R.currentTarget,R=R.listener,U!==b&&E.isPropagationStopped())break e;XS(E,R,ee),b=U}}}if(gc)throw i=Np,gc=!1,Np=null,i}function St(i,o){var l=o[sm];l===void 0&&(l=o[sm]=new Set);var h=i+"__bubble";l.has(h)||(QS(o,i,2,!1),l.add(h))}function Jp(i,o,l){var h=0;o&&(h|=4),QS(l,i,h,o)}var Rc="_reactListening"+Math.random().toString(36).slice(2);function Tu(i){if(!i[Rc]){i[Rc]=!0,r.forEach(function(l){l!=="selectionchange"&&(QB.has(l)||Jp(l,!1,i),Jp(l,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Rc]||(o[Rc]=!0,Jp("selectionchange",!1,o))}}function QS(i,o,l,h){switch(TS(o)){case 1:var E=dB;break;case 4:E=fB;break;default:E=Dp}l=E.bind(null,o,l,i),E=void 0,!vp||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(o,l,{capture:!0,passive:E}):i.addEventListener(o,l,!0):E!==void 0?i.addEventListener(o,l,{passive:E}):i.addEventListener(o,l,!1)}function Zp(i,o,l,h,E){var b=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var x=h.tag;if(x===3||x===4){var R=h.stateNode.containerInfo;if(R===E||R.nodeType===8&&R.parentNode===E)break;if(x===4)for(x=h.return;x!==null;){var U=x.tag;if((U===3||U===4)&&(U=x.stateNode.containerInfo,U===E||U.nodeType===8&&U.parentNode===E))return;x=x.return}for(;R!==null;){if(x=As(R),x===null)return;if(U=x.tag,U===5||U===6){h=b=x;continue e}R=R.parentNode}}h=h.return}nS(function(){var ee=b,de=wp(l),me=[];e:{var le=WS.get(i);if(le!==void 0){var Ae=Bp,ke=i;switch(i){case"keypress":if(vc(l)===0)break e;case"keydown":case"keyup":Ae=vB;break;case"focusin":ke="focus",Ae=zp;break;case"focusout":ke="blur",Ae=zp;break;case"beforeblur":case"afterblur":Ae=zp;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ae=xS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ae=mB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ae=PB;break;case $S:case VS:case qS:Ae=yB;break;case YS:Ae=IB;break;case"scroll":Ae=hB;break;case"wheel":Ae=LB;break;case"copy":case"cut":case"paste":Ae=TB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ae=AS}var Oe=(o&4)!==0,Ft=!Oe&&i==="scroll",G=Oe?le!==null?le+"Capture":null:le;Oe=[];for(var j=ee,K;j!==null;){K=j;var be=K.stateNode;if(K.tag===5&&be!==null&&(K=be,G!==null&&(be=nu(j,G),be!=null&&Oe.push(_u(j,be,K)))),Ft)break;j=j.return}0<Oe.length&&(le=new Ae(le,ke,null,l,de),me.push({event:le,listeners:Oe}))}}if((o&7)===0){e:{if(le=i==="mouseover"||i==="pointerover",Ae=i==="mouseout"||i==="pointerout",le&&l!==Gn&&(ke=l.relatedTarget||l.fromElement)&&(As(ke)||ke[di]))break e;if((Ae||le)&&(le=de.window===de?de:(le=de.ownerDocument)?le.defaultView||le.parentWindow:window,Ae?(ke=l.relatedTarget||l.toElement,Ae=ee,ke=ke?As(ke):null,ke!==null&&(Ft=ws(ke),ke!==Ft||ke.tag!==5&&ke.tag!==6)&&(ke=null)):(Ae=null,ke=ee),Ae!==ke)){if(Oe=xS,be="onMouseLeave",G="onMouseEnter",j="mouse",(i==="pointerout"||i==="pointerover")&&(Oe=AS,be="onPointerLeave",G="onPointerEnter",j="pointer"),Ft=Ae==null?le:Fo(Ae),K=ke==null?le:Fo(ke),le=new Oe(be,j+"leave",Ae,l,de),le.target=Ft,le.relatedTarget=K,be=null,As(de)===ee&&(Oe=new Oe(G,j+"enter",ke,l,de),Oe.target=K,Oe.relatedTarget=Ft,be=Oe),Ft=be,Ae&&ke)t:{for(Oe=Ae,G=ke,j=0,K=Oe;K;K=Do(K))j++;for(K=0,be=G;be;be=Do(be))K++;for(;0<j-K;)Oe=Do(Oe),j--;for(;0<K-j;)G=Do(G),K--;for(;j--;){if(Oe===G||G!==null&&Oe===G.alternate)break t;Oe=Do(Oe),G=Do(G)}Oe=null}else Oe=null;Ae!==null&&JS(me,le,Ae,Oe,!1),ke!==null&&Ft!==null&&JS(me,Ft,ke,Oe,!0)}}e:{if(le=ee?Fo(ee):window,Ae=le.nodeName&&le.nodeName.toLowerCase(),Ae==="select"||Ae==="input"&&le.type==="file")var Re=zB;else if(OS(le))if(RS)Re=qB;else{Re=$B;var ze=jB}else(Ae=le.nodeName)&&Ae.toLowerCase()==="input"&&(le.type==="checkbox"||le.type==="radio")&&(Re=VB);if(Re&&(Re=Re(i,ee))){IS(me,Re,l,de);break e}ze&&ze(i,le,ee),i==="focusout"&&(ze=le._wrapperState)&&ze.controlled&&le.type==="number"&&an(le,"number",le.value)}switch(ze=ee?Fo(ee):window,i){case"focusin":(OS(ze)||ze.contentEditable==="true")&&(Ro=ze,Wp=ee,yu=null);break;case"focusout":yu=Wp=Ro=null;break;case"mousedown":Gp=!0;break;case"contextmenu":case"mouseup":case"dragend":Gp=!1,zS(me,l,de);break;case"selectionchange":if(GB)break;case"keydown":case"keyup":zS(me,l,de)}var je;if($p)e:{switch(i){case"compositionstart":var Ye="onCompositionStart";break e;case"compositionend":Ye="onCompositionEnd";break e;case"compositionupdate":Ye="onCompositionUpdate";break e}Ye=void 0}else Io?kS(i,l)&&(Ye="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ye="onCompositionStart");Ye&&(CS&&l.locale!=="ko"&&(Io||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&Io&&(je=_S()):(Di=de,Fp="value"in Di?Di.value:Di.textContent,Io=!0)),ze=Lc(ee,Ye),0<ze.length&&(Ye=new wS(Ye,i,null,l,de),me.push({event:Ye,listeners:ze}),je?Ye.data=je:(je=PS(l),je!==null&&(Ye.data=je)))),(je=MB?FB(i,l):BB(i,l))&&(ee=Lc(ee,"onBeforeInput"),0<ee.length&&(de=new wS("onBeforeInput","beforeinput",null,l,de),me.push({event:de,listeners:ee}),de.data=je))}KS(me,o)})}function _u(i,o,l){return{instance:i,listener:o,currentTarget:l}}function Lc(i,o){for(var l=o+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=nu(i,l),b!=null&&h.unshift(_u(i,b,E)),b=nu(i,o),b!=null&&h.push(_u(i,b,E))),i=i.return}return h}function Do(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function JS(i,o,l,h,E){for(var b=o._reactName,x=[];l!==null&&l!==h;){var R=l,U=R.alternate,ee=R.stateNode;if(U!==null&&U===h)break;R.tag===5&&ee!==null&&(R=ee,E?(U=nu(l,b),U!=null&&x.unshift(_u(l,U,R))):E||(U=nu(l,b),U!=null&&x.push(_u(l,U,R)))),l=l.return}x.length!==0&&i.push({event:o,listeners:x})}var JB=/\r\n?/g,ZB=/\u0000|\uFFFD/g;function ZS(i){return(typeof i=="string"?i:""+i).replace(JB,`
15
+ `).replace(ZB,"")}function Dc(i,o,l){if(o=ZS(o),ZS(i)!==o&&l)throw Error(n(425))}function Mc(){}var em=null,tm=null;function nm(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var rm=typeof setTimeout=="function"?setTimeout:void 0,e7=typeof clearTimeout=="function"?clearTimeout:void 0,ex=typeof Promise=="function"?Promise:void 0,t7=typeof queueMicrotask=="function"?queueMicrotask:typeof ex!="undefined"?function(i){return ex.resolve(null).then(i).catch(n7)}:rm;function n7(i){setTimeout(function(){throw i})}function im(i,o){var l=o,h=0;do{var E=l.nextSibling;if(i.removeChild(l),E&&E.nodeType===8)if(l=E.data,l==="/$"){if(h===0){i.removeChild(E),du(o);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);du(o)}function Fi(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return i}function tx(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(o===0)return i;o--}else l==="/$"&&o++}i=i.previousSibling}return null}var Mo=Math.random().toString(36).slice(2),Wr="__reactFiber$"+Mo,Su="__reactProps$"+Mo,di="__reactContainer$"+Mo,sm="__reactEvents$"+Mo,r7="__reactListeners$"+Mo,i7="__reactHandles$"+Mo;function As(i){var o=i[Wr];if(o)return o;for(var l=i.parentNode;l;){if(o=l[di]||l[Wr]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(i=tx(i);i!==null;){if(l=i[Wr])return l;i=tx(i)}return o}i=l,l=i.parentNode}return null}function xu(i){return i=i[Wr]||i[di],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Fo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Fc(i){return i[Su]||null}var om=[],Bo=-1;function Bi(i){return{current:i}}function xt(i){0>Bo||(i.current=om[Bo],om[Bo]=null,Bo--)}function Et(i,o){Bo++,om[Bo]=i.current,i.current=o}var Ui={},Tn=Bi(Ui),Bn=Bi(!1),Cs=Ui;function Uo(i,o){var l=i.type.contextTypes;if(!l)return Ui;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in l)E[b]=o[b];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function Un(i){return i=i.childContextTypes,i!=null}function Bc(){xt(Bn),xt(Tn)}function nx(i,o,l){if(Tn.current!==Ui)throw Error(n(168));Et(Tn,o),Et(Bn,l)}function rx(i,o,l){var h=i.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var E in h)if(!(E in o))throw Error(n(108,Le(i)||"Unknown",E));return N({},l,h)}function Uc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Ui,Cs=Tn.current,Et(Tn,i),Et(Bn,Bn.current),!0}function ix(i,o,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=rx(i,o,Cs),h.__reactInternalMemoizedMergedChildContext=i,xt(Bn),xt(Tn),Et(Tn,i)):xt(Bn),Et(Bn,l)}var fi=null,Hc=!1,am=!1;function sx(i){fi===null?fi=[i]:fi.push(i)}function s7(i){Hc=!0,sx(i)}function Hi(){if(!am&&fi!==null){am=!0;var i=0,o=ct;try{var l=fi;for(ct=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}fi=null,Hc=!1}catch(E){throw fi!==null&&(fi=fi.slice(i+1)),aS(kp,Hi),E}finally{ct=o,am=!1}}return null}var Ho=[],zo=0,zc=null,jc=0,or=[],ar=0,vs=null,hi=1,pi="";function Ns(i,o){Ho[zo++]=jc,Ho[zo++]=zc,zc=i,jc=o}function ox(i,o,l){or[ar++]=hi,or[ar++]=pi,or[ar++]=vs,vs=i;var h=hi;i=pi;var E=32-Sr(h)-1;h&=~(1<<E),l+=1;var b=32-Sr(o)+E;if(30<b){var x=E-E%5;b=(h&(1<<x)-1).toString(32),h>>=x,E-=x,hi=1<<32-Sr(o)+E|l<<E|h,pi=b+i}else hi=1<<b|l<<E|h,pi=i}function um(i){i.return!==null&&(Ns(i,1),ox(i,1,0))}function lm(i){for(;i===zc;)zc=Ho[--zo],Ho[zo]=null,jc=Ho[--zo],Ho[zo]=null;for(;i===vs;)vs=or[--ar],or[ar]=null,pi=or[--ar],or[ar]=null,hi=or[--ar],or[ar]=null}var Kn=null,Qn=null,Ct=!1,wr=null;function ax(i,o){var l=dr(5,null,null,0);l.elementType="DELETED",l.stateNode=o,l.return=i,o=i.deletions,o===null?(i.deletions=[l],i.flags|=16):o.push(l)}function ux(i,o){switch(i.tag){case 5:var l=i.type;return o=o.nodeType!==1||l.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(i.stateNode=o,Kn=i,Qn=Fi(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Kn=i,Qn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(l=vs!==null?{id:hi,overflow:pi}:null,i.memoizedState={dehydrated:o,treeContext:l,retryLane:1073741824},l=dr(18,null,null,0),l.stateNode=o,l.return=i,i.child=l,Kn=i,Qn=null,!0):!1;default:return!1}}function cm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function dm(i){if(Ct){var o=Qn;if(o){var l=o;if(!ux(i,o)){if(cm(i))throw Error(n(418));o=Fi(l.nextSibling);var h=Kn;o&&ux(i,o)?ax(h,l):(i.flags=i.flags&-4097|2,Ct=!1,Kn=i)}}else{if(cm(i))throw Error(n(418));i.flags=i.flags&-4097|2,Ct=!1,Kn=i}}}function lx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Kn=i}function $c(i){if(i!==Kn)return!1;if(!Ct)return lx(i),Ct=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!nm(i.type,i.memoizedProps)),o&&(o=Qn)){if(cm(i))throw cx(),Error(n(418));for(;o;)ax(i,o),o=Fi(o.nextSibling)}if(lx(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(o===0){Qn=Fi(i.nextSibling);break e}o--}else l!=="$"&&l!=="$!"&&l!=="$?"||o++}i=i.nextSibling}Qn=null}}else Qn=Kn?Fi(i.stateNode.nextSibling):null;return!0}function cx(){for(var i=Qn;i;)i=Fi(i.nextSibling)}function jo(){Qn=Kn=null,Ct=!1}function fm(i){wr===null?wr=[i]:wr.push(i)}var o7=z.ReactCurrentBatchConfig;function wu(i,o,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var h=l.stateNode}if(!h)throw Error(n(147,i));var E=h,b=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===b?o.ref:(o=function(x){var R=E.refs;x===null?delete R[b]:R[b]=x},o._stringRef=b,o)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Vc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function dx(i){var o=i._init;return o(i._payload)}function fx(i){function o(G,j){if(i){var K=G.deletions;K===null?(G.deletions=[j],G.flags|=16):K.push(j)}}function l(G,j){if(!i)return null;for(;j!==null;)o(G,j),j=j.sibling;return null}function h(G,j){for(G=new Map;j!==null;)j.key!==null?G.set(j.key,j):G.set(j.index,j),j=j.sibling;return G}function E(G,j){return G=Gi(G,j),G.index=0,G.sibling=null,G}function b(G,j,K){return G.index=K,i?(K=G.alternate,K!==null?(K=K.index,K<j?(G.flags|=2,j):K):(G.flags|=2,j)):(G.flags|=1048576,j)}function x(G){return i&&G.alternate===null&&(G.flags|=2),G}function R(G,j,K,be){return j===null||j.tag!==6?(j=r0(K,G.mode,be),j.return=G,j):(j=E(j,K),j.return=G,j)}function U(G,j,K,be){var Re=K.type;return Re===q?de(G,j,K.props.children,be,K.key):j!==null&&(j.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===xe&&dx(Re)===j.type)?(be=E(j,K.props),be.ref=wu(G,j,K),be.return=G,be):(be=pd(K.type,K.key,K.props,null,G.mode,be),be.ref=wu(G,j,K),be.return=G,be)}function ee(G,j,K,be){return j===null||j.tag!==4||j.stateNode.containerInfo!==K.containerInfo||j.stateNode.implementation!==K.implementation?(j=i0(K,G.mode,be),j.return=G,j):(j=E(j,K.children||[]),j.return=G,j)}function de(G,j,K,be,Re){return j===null||j.tag!==7?(j=Ms(K,G.mode,be,Re),j.return=G,j):(j=E(j,K),j.return=G,j)}function me(G,j,K){if(typeof j=="string"&&j!==""||typeof j=="number")return j=r0(""+j,G.mode,K),j.return=G,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Y:return K=pd(j.type,j.key,j.props,null,G.mode,K),K.ref=wu(G,null,j),K.return=G,K;case D:return j=i0(j,G.mode,K),j.return=G,j;case xe:var be=j._init;return me(G,be(j._payload),K)}if(Fn(j)||ie(j))return j=Ms(j,G.mode,K,null),j.return=G,j;Vc(G,j)}return null}function le(G,j,K,be){var Re=j!==null?j.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return Re!==null?null:R(G,j,""+K,be);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case Y:return K.key===Re?U(G,j,K,be):null;case D:return K.key===Re?ee(G,j,K,be):null;case xe:return Re=K._init,le(G,j,Re(K._payload),be)}if(Fn(K)||ie(K))return Re!==null?null:de(G,j,K,be,null);Vc(G,K)}return null}function Ae(G,j,K,be,Re){if(typeof be=="string"&&be!==""||typeof be=="number")return G=G.get(K)||null,R(j,G,""+be,Re);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case Y:return G=G.get(be.key===null?K:be.key)||null,U(j,G,be,Re);case D:return G=G.get(be.key===null?K:be.key)||null,ee(j,G,be,Re);case xe:var ze=be._init;return Ae(G,j,K,ze(be._payload),Re)}if(Fn(be)||ie(be))return G=G.get(K)||null,de(j,G,be,Re,null);Vc(j,be)}return null}function ke(G,j,K,be){for(var Re=null,ze=null,je=j,Ye=j=0,nn=null;je!==null&&Ye<K.length;Ye++){je.index>Ye?(nn=je,je=null):nn=je.sibling;var st=le(G,je,K[Ye],be);if(st===null){je===null&&(je=nn);break}i&&je&&st.alternate===null&&o(G,je),j=b(st,j,Ye),ze===null?Re=st:ze.sibling=st,ze=st,je=nn}if(Ye===K.length)return l(G,je),Ct&&Ns(G,Ye),Re;if(je===null){for(;Ye<K.length;Ye++)je=me(G,K[Ye],be),je!==null&&(j=b(je,j,Ye),ze===null?Re=je:ze.sibling=je,ze=je);return Ct&&Ns(G,Ye),Re}for(je=h(G,je);Ye<K.length;Ye++)nn=Ae(je,G,Ye,K[Ye],be),nn!==null&&(i&&nn.alternate!==null&&je.delete(nn.key===null?Ye:nn.key),j=b(nn,j,Ye),ze===null?Re=nn:ze.sibling=nn,ze=nn);return i&&je.forEach(function(Xi){return o(G,Xi)}),Ct&&Ns(G,Ye),Re}function Oe(G,j,K,be){var Re=ie(K);if(typeof Re!="function")throw Error(n(150));if(K=Re.call(K),K==null)throw Error(n(151));for(var ze=Re=null,je=j,Ye=j=0,nn=null,st=K.next();je!==null&&!st.done;Ye++,st=K.next()){je.index>Ye?(nn=je,je=null):nn=je.sibling;var Xi=le(G,je,st.value,be);if(Xi===null){je===null&&(je=nn);break}i&&je&&Xi.alternate===null&&o(G,je),j=b(Xi,j,Ye),ze===null?Re=Xi:ze.sibling=Xi,ze=Xi,je=nn}if(st.done)return l(G,je),Ct&&Ns(G,Ye),Re;if(je===null){for(;!st.done;Ye++,st=K.next())st=me(G,st.value,be),st!==null&&(j=b(st,j,Ye),ze===null?Re=st:ze.sibling=st,ze=st);return Ct&&Ns(G,Ye),Re}for(je=h(G,je);!st.done;Ye++,st=K.next())st=Ae(je,G,Ye,st.value,be),st!==null&&(i&&st.alternate!==null&&je.delete(st.key===null?Ye:st.key),j=b(st,j,Ye),ze===null?Re=st:ze.sibling=st,ze=st);return i&&je.forEach(function(U7){return o(G,U7)}),Ct&&Ns(G,Ye),Re}function Ft(G,j,K,be){if(typeof K=="object"&&K!==null&&K.type===q&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case Y:e:{for(var Re=K.key,ze=j;ze!==null;){if(ze.key===Re){if(Re=K.type,Re===q){if(ze.tag===7){l(G,ze.sibling),j=E(ze,K.props.children),j.return=G,G=j;break e}}else if(ze.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===xe&&dx(Re)===ze.type){l(G,ze.sibling),j=E(ze,K.props),j.ref=wu(G,ze,K),j.return=G,G=j;break e}l(G,ze);break}else o(G,ze);ze=ze.sibling}K.type===q?(j=Ms(K.props.children,G.mode,be,K.key),j.return=G,G=j):(be=pd(K.type,K.key,K.props,null,G.mode,be),be.ref=wu(G,j,K),be.return=G,G=be)}return x(G);case D:e:{for(ze=K.key;j!==null;){if(j.key===ze)if(j.tag===4&&j.stateNode.containerInfo===K.containerInfo&&j.stateNode.implementation===K.implementation){l(G,j.sibling),j=E(j,K.children||[]),j.return=G,G=j;break e}else{l(G,j);break}else o(G,j);j=j.sibling}j=i0(K,G.mode,be),j.return=G,G=j}return x(G);case xe:return ze=K._init,Ft(G,j,ze(K._payload),be)}if(Fn(K))return ke(G,j,K,be);if(ie(K))return Oe(G,j,K,be);Vc(G,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,j!==null&&j.tag===6?(l(G,j.sibling),j=E(j,K),j.return=G,G=j):(l(G,j),j=r0(K,G.mode,be),j.return=G,G=j),x(G)):l(G,j)}return Ft}var $o=fx(!0),hx=fx(!1),qc=Bi(null),Yc=null,Vo=null,hm=null;function pm(){hm=Vo=Yc=null}function mm(i){var o=qc.current;xt(qc),i._currentValue=o}function gm(i,o,l){for(;i!==null;){var h=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),i===l)break;i=i.return}}function qo(i,o){Yc=i,hm=Vo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(Hn=!0),i.firstContext=null)}function ur(i){var o=i._currentValue;if(hm!==i)if(i={context:i,memoizedValue:o,next:null},Vo===null){if(Yc===null)throw Error(n(308));Vo=i,Yc.dependencies={lanes:0,firstContext:i}}else Vo=Vo.next=i;return o}var ks=null;function Em(i){ks===null?ks=[i]:ks.push(i)}function px(i,o,l,h){var E=o.interleaved;return E===null?(l.next=l,Em(o)):(l.next=E.next,E.next=l),o.interleaved=l,mi(i,h)}function mi(i,o){i.lanes|=o;var l=i.alternate;for(l!==null&&(l.lanes|=o),l=i,i=i.return;i!==null;)i.childLanes|=o,l=i.alternate,l!==null&&(l.childLanes|=o),l=i,i=i.return;return l.tag===3?l.stateNode:null}var zi=!1;function ym(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function mx(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function gi(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function ji(i,o,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(it&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,mi(i,l)}return E=h.interleaved,E===null?(o.next=o,Em(h)):(o.next=E.next,E.next=o),h.interleaved=o,mi(i,l)}function Wc(i,o,l){if(o=o.updateQueue,o!==null&&(o=o.shared,(l&4194240)!==0)){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,Ip(i,l)}}function gx(i,o){var l=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var E=null,b=null;if(l=l.firstBaseUpdate,l!==null){do{var x={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};b===null?E=b=x:b=b.next=x,l=l.next}while(l!==null);b===null?E=b=o:b=b.next=o}else E=b=o;l={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:b,shared:h.shared,effects:h.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=o:i.next=o,l.lastBaseUpdate=o}function Gc(i,o,l,h){var E=i.updateQueue;zi=!1;var b=E.firstBaseUpdate,x=E.lastBaseUpdate,R=E.shared.pending;if(R!==null){E.shared.pending=null;var U=R,ee=U.next;U.next=null,x===null?b=ee:x.next=ee,x=U;var de=i.alternate;de!==null&&(de=de.updateQueue,R=de.lastBaseUpdate,R!==x&&(R===null?de.firstBaseUpdate=ee:R.next=ee,de.lastBaseUpdate=U))}if(b!==null){var me=E.baseState;x=0,de=ee=U=null,R=b;do{var le=R.lane,Ae=R.eventTime;if((h&le)===le){de!==null&&(de=de.next={eventTime:Ae,lane:0,tag:R.tag,payload:R.payload,callback:R.callback,next:null});e:{var ke=i,Oe=R;switch(le=o,Ae=l,Oe.tag){case 1:if(ke=Oe.payload,typeof ke=="function"){me=ke.call(Ae,me,le);break e}me=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Oe.payload,le=typeof ke=="function"?ke.call(Ae,me,le):ke,le==null)break e;me=N({},me,le);break e;case 2:zi=!0}}R.callback!==null&&R.lane!==0&&(i.flags|=64,le=E.effects,le===null?E.effects=[R]:le.push(R))}else Ae={eventTime:Ae,lane:le,tag:R.tag,payload:R.payload,callback:R.callback,next:null},de===null?(ee=de=Ae,U=me):de=de.next=Ae,x|=le;if(R=R.next,R===null){if(R=E.shared.pending,R===null)break;le=R,R=le.next,le.next=null,E.lastBaseUpdate=le,E.shared.pending=null}}while(!0);if(de===null&&(U=me),E.baseState=U,E.firstBaseUpdate=ee,E.lastBaseUpdate=de,o=E.shared.interleaved,o!==null){E=o;do x|=E.lane,E=E.next;while(E!==o)}else b===null&&(E.shared.lanes=0);Is|=x,i.lanes=x,i.memoizedState=me}}function Ex(i,o,l){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var h=i[o],E=h.callback;if(E!==null){if(h.callback=null,h=l,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var Au={},Gr=Bi(Au),Cu=Bi(Au),vu=Bi(Au);function Ps(i){if(i===Au)throw Error(n(174));return i}function bm(i,o){switch(Et(vu,o),Et(Cu,i),Et(Gr,Au),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:ge(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=ge(o,i)}xt(Gr),Et(Gr,o)}function Yo(){xt(Gr),xt(Cu),xt(vu)}function yx(i){Ps(vu.current);var o=Ps(Gr.current),l=ge(o,i.type);o!==l&&(Et(Cu,i),Et(Gr,l))}function Tm(i){Cu.current===i&&(xt(Gr),xt(Cu))}var kt=Bi(0);function Xc(i){for(var o=i;o!==null;){if(o.tag===13){var l=o.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var _m=[];function Sm(){for(var i=0;i<_m.length;i++)_m[i]._workInProgressVersionPrimary=null;_m.length=0}var Kc=z.ReactCurrentDispatcher,xm=z.ReactCurrentBatchConfig,Os=0,Pt=null,Yt=null,en=null,Qc=!1,Nu=!1,ku=0,a7=0;function _n(){throw Error(n(321))}function wm(i,o){if(o===null)return!1;for(var l=0;l<o.length&&l<i.length;l++)if(!xr(i[l],o[l]))return!1;return!0}function Am(i,o,l,h,E,b){if(Os=b,Pt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Kc.current=i===null||i.memoizedState===null?d7:f7,i=l(h,E),Nu){b=0;do{if(Nu=!1,ku=0,25<=b)throw Error(n(301));b+=1,en=Yt=null,o.updateQueue=null,Kc.current=h7,i=l(h,E)}while(Nu)}if(Kc.current=ed,o=Yt!==null&&Yt.next!==null,Os=0,en=Yt=Pt=null,Qc=!1,o)throw Error(n(300));return i}function Cm(){var i=ku!==0;return ku=0,i}function Xr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return en===null?Pt.memoizedState=en=i:en=en.next=i,en}function lr(){if(Yt===null){var i=Pt.alternate;i=i!==null?i.memoizedState:null}else i=Yt.next;var o=en===null?Pt.memoizedState:en.next;if(o!==null)en=o,Yt=i;else{if(i===null)throw Error(n(310));Yt=i,i={memoizedState:Yt.memoizedState,baseState:Yt.baseState,baseQueue:Yt.baseQueue,queue:Yt.queue,next:null},en===null?Pt.memoizedState=en=i:en=en.next=i}return en}function Pu(i,o){return typeof o=="function"?o(i):o}function vm(i){var o=lr(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=Yt,E=h.baseQueue,b=l.pending;if(b!==null){if(E!==null){var x=E.next;E.next=b.next,b.next=x}h.baseQueue=E=b,l.pending=null}if(E!==null){b=E.next,h=h.baseState;var R=x=null,U=null,ee=b;do{var de=ee.lane;if((Os&de)===de)U!==null&&(U=U.next={lane:0,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),h=ee.hasEagerState?ee.eagerState:i(h,ee.action);else{var me={lane:de,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null};U===null?(R=U=me,x=h):U=U.next=me,Pt.lanes|=de,Is|=de}ee=ee.next}while(ee!==null&&ee!==b);U===null?x=h:U.next=R,xr(h,o.memoizedState)||(Hn=!0),o.memoizedState=h,o.baseState=x,o.baseQueue=U,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do b=E.lane,Pt.lanes|=b,Is|=b,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[o.memoizedState,l.dispatch]}function Nm(i){var o=lr(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,E=l.pending,b=o.memoizedState;if(E!==null){l.pending=null;var x=E=E.next;do b=i(b,x.action),x=x.next;while(x!==E);xr(b,o.memoizedState)||(Hn=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),l.lastRenderedState=b}return[b,h]}function bx(){}function Tx(i,o){var l=Pt,h=lr(),E=o(),b=!xr(h.memoizedState,E);if(b&&(h.memoizedState=E,Hn=!0),h=h.queue,km(xx.bind(null,l,h,i),[i]),h.getSnapshot!==o||b||en!==null&&en.memoizedState.tag&1){if(l.flags|=2048,Ou(9,Sx.bind(null,l,h,E,o),void 0,null),tn===null)throw Error(n(349));(Os&30)!==0||_x(l,o,E)}return E}function _x(i,o,l){i.flags|=16384,i={getSnapshot:o,value:l},o=Pt.updateQueue,o===null?(o={lastEffect:null,stores:null},Pt.updateQueue=o,o.stores=[i]):(l=o.stores,l===null?o.stores=[i]:l.push(i))}function Sx(i,o,l,h){o.value=l,o.getSnapshot=h,wx(o)&&Ax(i)}function xx(i,o,l){return l(function(){wx(o)&&Ax(i)})}function wx(i){var o=i.getSnapshot;i=i.value;try{var l=o();return!xr(i,l)}catch(h){return!0}}function Ax(i){var o=mi(i,1);o!==null&&Nr(o,i,1,-1)}function Cx(i){var o=Xr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Pu,lastRenderedState:i},o.queue=i,i=i.dispatch=c7.bind(null,Pt,i),[o.memoizedState,i]}function Ou(i,o,l,h){return i={tag:i,create:o,destroy:l,deps:h,next:null},o=Pt.updateQueue,o===null?(o={lastEffect:null,stores:null},Pt.updateQueue=o,o.lastEffect=i.next=i):(l=o.lastEffect,l===null?o.lastEffect=i.next=i:(h=l.next,l.next=i,i.next=h,o.lastEffect=i)),i}function vx(){return lr().memoizedState}function Jc(i,o,l,h){var E=Xr();Pt.flags|=i,E.memoizedState=Ou(1|o,l,void 0,h===void 0?null:h)}function Zc(i,o,l,h){var E=lr();h=h===void 0?null:h;var b=void 0;if(Yt!==null){var x=Yt.memoizedState;if(b=x.destroy,h!==null&&wm(h,x.deps)){E.memoizedState=Ou(o,l,b,h);return}}Pt.flags|=i,E.memoizedState=Ou(1|o,l,b,h)}function Nx(i,o){return Jc(8390656,8,i,o)}function km(i,o){return Zc(2048,8,i,o)}function kx(i,o){return Zc(4,2,i,o)}function Px(i,o){return Zc(4,4,i,o)}function Ox(i,o){if(typeof o=="function")return i=i(),o(i),function(){o(null)};if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function Ix(i,o,l){return l=l!=null?l.concat([i]):null,Zc(4,4,Ox.bind(null,o,i),l)}function Pm(){}function Rx(i,o){var l=lr();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&wm(o,h[1])?h[0]:(l.memoizedState=[i,o],i)}function Lx(i,o){var l=lr();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&wm(o,h[1])?h[0]:(i=i(),l.memoizedState=[i,o],i)}function Dx(i,o,l){return(Os&21)===0?(i.baseState&&(i.baseState=!1,Hn=!0),i.memoizedState=l):(xr(l,o)||(l=dS(),Pt.lanes|=l,Is|=l,i.baseState=!0),o)}function u7(i,o){var l=ct;ct=l!==0&&4>l?l:4,i(!0);var h=xm.transition;xm.transition={};try{i(!1),o()}finally{ct=l,xm.transition=h}}function Mx(){return lr().memoizedState}function l7(i,o,l){var h=Yi(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},Fx(i))Bx(o,l);else if(l=px(i,o,l,h),l!==null){var E=kn();Nr(l,i,h,E),Ux(l,o,h)}}function c7(i,o,l){var h=Yi(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(Fx(i))Bx(o,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=o.lastRenderedReducer,b!==null))try{var x=o.lastRenderedState,R=b(x,l);if(E.hasEagerState=!0,E.eagerState=R,xr(R,x)){var U=o.interleaved;U===null?(E.next=E,Em(o)):(E.next=U.next,U.next=E),o.interleaved=E;return}}catch(ee){}l=px(i,o,E,h),l!==null&&(E=kn(),Nr(l,i,h,E),Ux(l,o,h))}}function Fx(i){var o=i.alternate;return i===Pt||o!==null&&o===Pt}function Bx(i,o){Nu=Qc=!0;var l=i.pending;l===null?o.next=o:(o.next=l.next,l.next=o),i.pending=o}function Ux(i,o,l){if((l&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,Ip(i,l)}}var ed={readContext:ur,useCallback:_n,useContext:_n,useEffect:_n,useImperativeHandle:_n,useInsertionEffect:_n,useLayoutEffect:_n,useMemo:_n,useReducer:_n,useRef:_n,useState:_n,useDebugValue:_n,useDeferredValue:_n,useTransition:_n,useMutableSource:_n,useSyncExternalStore:_n,useId:_n,unstable_isNewReconciler:!1},d7={readContext:ur,useCallback:function(i,o){return Xr().memoizedState=[i,o===void 0?null:o],i},useContext:ur,useEffect:Nx,useImperativeHandle:function(i,o,l){return l=l!=null?l.concat([i]):null,Jc(4194308,4,Ox.bind(null,o,i),l)},useLayoutEffect:function(i,o){return Jc(4194308,4,i,o)},useInsertionEffect:function(i,o){return Jc(4,2,i,o)},useMemo:function(i,o){var l=Xr();return o=o===void 0?null:o,i=i(),l.memoizedState=[i,o],i},useReducer:function(i,o,l){var h=Xr();return o=l!==void 0?l(o):o,h.memoizedState=h.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},h.queue=i,i=i.dispatch=l7.bind(null,Pt,i),[h.memoizedState,i]},useRef:function(i){var o=Xr();return i={current:i},o.memoizedState=i},useState:Cx,useDebugValue:Pm,useDeferredValue:function(i){return Xr().memoizedState=i},useTransition:function(){var i=Cx(!1),o=i[0];return i=u7.bind(null,i[1]),Xr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,l){var h=Pt,E=Xr();if(Ct){if(l===void 0)throw Error(n(407));l=l()}else{if(l=o(),tn===null)throw Error(n(349));(Os&30)!==0||_x(h,o,l)}E.memoizedState=l;var b={value:l,getSnapshot:o};return E.queue=b,Nx(xx.bind(null,h,b,i),[i]),h.flags|=2048,Ou(9,Sx.bind(null,h,b,l,o),void 0,null),l},useId:function(){var i=Xr(),o=tn.identifierPrefix;if(Ct){var l=pi,h=hi;l=(h&~(1<<32-Sr(h)-1)).toString(32)+l,o=":"+o+"R"+l,l=ku++,0<l&&(o+="H"+l.toString(32)),o+=":"}else l=a7++,o=":"+o+"r"+l.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},f7={readContext:ur,useCallback:Rx,useContext:ur,useEffect:km,useImperativeHandle:Ix,useInsertionEffect:kx,useLayoutEffect:Px,useMemo:Lx,useReducer:vm,useRef:vx,useState:function(){return vm(Pu)},useDebugValue:Pm,useDeferredValue:function(i){var o=lr();return Dx(o,Yt.memoizedState,i)},useTransition:function(){var i=vm(Pu)[0],o=lr().memoizedState;return[i,o]},useMutableSource:bx,useSyncExternalStore:Tx,useId:Mx,unstable_isNewReconciler:!1},h7={readContext:ur,useCallback:Rx,useContext:ur,useEffect:km,useImperativeHandle:Ix,useInsertionEffect:kx,useLayoutEffect:Px,useMemo:Lx,useReducer:Nm,useRef:vx,useState:function(){return Nm(Pu)},useDebugValue:Pm,useDeferredValue:function(i){var o=lr();return Yt===null?o.memoizedState=i:Dx(o,Yt.memoizedState,i)},useTransition:function(){var i=Nm(Pu)[0],o=lr().memoizedState;return[i,o]},useMutableSource:bx,useSyncExternalStore:Tx,useId:Mx,unstable_isNewReconciler:!1};function Ar(i,o){if(i&&i.defaultProps){o=N({},o),i=i.defaultProps;for(var l in i)o[l]===void 0&&(o[l]=i[l]);return o}return o}function Om(i,o,l,h){o=i.memoizedState,l=l(h,o),l=l==null?o:N({},o,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var td={isMounted:function(i){return(i=i._reactInternals)?ws(i)===i:!1},enqueueSetState:function(i,o,l){i=i._reactInternals;var h=kn(),E=Yi(i),b=gi(h,E);b.payload=o,l!=null&&(b.callback=l),o=ji(i,b,E),o!==null&&(Nr(o,i,E,h),Wc(o,i,E))},enqueueReplaceState:function(i,o,l){i=i._reactInternals;var h=kn(),E=Yi(i),b=gi(h,E);b.tag=1,b.payload=o,l!=null&&(b.callback=l),o=ji(i,b,E),o!==null&&(Nr(o,i,E,h),Wc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var l=kn(),h=Yi(i),E=gi(l,h);E.tag=2,o!=null&&(E.callback=o),o=ji(i,E,h),o!==null&&(Nr(o,i,h,l),Wc(o,i,h))}};function Hx(i,o,l,h,E,b,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,x):o.prototype&&o.prototype.isPureReactComponent?!Eu(l,h)||!Eu(E,b):!0}function zx(i,o,l){var h=!1,E=Ui,b=o.contextType;return typeof b=="object"&&b!==null?b=ur(b):(E=Un(o)?Cs:Tn.current,h=o.contextTypes,b=(h=h!=null)?Uo(i,E):Ui),o=new o(l,b),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=td,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),o}function jx(i,o,l,h){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(l,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(l,h),o.state!==i&&td.enqueueReplaceState(o,o.state,null)}function Im(i,o,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},ym(i);var b=o.contextType;typeof b=="object"&&b!==null?E.context=ur(b):(b=Un(o)?Cs:Tn.current,E.context=Uo(i,b)),E.state=i.memoizedState,b=o.getDerivedStateFromProps,typeof b=="function"&&(Om(i,o,b,l),E.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(o=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),o!==E.state&&td.enqueueReplaceState(E,E.state,null),Gc(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Wo(i,o){try{var l="",h=o;do l+=He(h),h=h.return;while(h);var E=l}catch(b){E=`
16
16
  Error generating stack: `+b.message+`
17
- `+b.stack}return{value:i,source:o,stack:E,digest:null}}function Rm(i,o,l){return{value:i,source:null,stack:l!=null?l:null,digest:o!=null?o:null}}function Lm(i,o){try{console.error(o.value)}catch(l){setTimeout(function(){throw l})}}var p7=typeof WeakMap=="function"?WeakMap:Map;function $x(i,o,l){l=gi(-1,l),l.tag=3,l.payload={element:null};var h=o.value;return l.callback=function(){ud||(ud=!0,Xm=h),Lm(i,o)},l}function Vx(i,o,l){l=gi(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=o.value;l.payload=function(){return h(E)},l.callback=function(){Lm(i,o)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(l.callback=function(){Lm(i,o),typeof h!="function"&&(Vi===null?Vi=new Set([this]):Vi.add(this));var x=o.stack;this.componentDidCatch(o.value,{componentStack:x!==null?x:""})}),l}function qx(i,o,l){var h=i.pingCache;if(h===null){h=i.pingCache=new p7;var E=new Set;h.set(o,E)}else E=h.get(o),E===void 0&&(E=new Set,h.set(o,E));E.has(l)||(E.add(l),i=N7.bind(null,i,o,l),o.then(i,i))}function Yx(i){do{var o;if((o=i.tag===13)&&(o=i.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return i;i=i.return}while(i!==null);return null}function Wx(i,o,l,h,E){return(i.mode&1)===0?(i===o?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(o=gi(-1,1),o.tag=2,ji(l,o,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var m7=z.ReactCurrentOwner,Hn=!1;function Nn(i,o,l,h){o.child=i===null?hx(o,null,l,h):$o(o,i.child,l,h)}function Gx(i,o,l,h,E){l=l.render;var b=o.ref;return qo(o,E),h=Am(i,o,l,h,b,E),l=Cm(),i!==null&&!Hn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,Ei(i,o,E)):(Ct&&l&&um(o),o.flags|=1,Nn(i,o,h,E),o.child)}function Xx(i,o,l,h,E){if(i===null){var b=l.type;return typeof b=="function"&&!n0(b)&&b.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(o.tag=15,o.type=b,Kx(i,o,b,h,E)):(i=pd(l.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(b=i.child,(i.lanes&E)===0){var x=b.memoizedProps;if(l=l.compare,l=l!==null?l:Eu,l(x,h)&&i.ref===o.ref)return Ei(i,o,E)}return o.flags|=1,i=Gi(b,h),i.ref=o.ref,i.return=o,o.child=i}function Kx(i,o,l,h,E){if(i!==null){var b=i.memoizedProps;if(Eu(b,h)&&i.ref===o.ref)if(Hn=!1,o.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Hn=!0);else return o.lanes=i.lanes,Ei(i,o,E)}return Dm(i,o,l,h,E)}function Qx(i,o,l){var h=o.pendingProps,E=h.children,b=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},Et(Xo,Jn),Jn|=l;else{if((l&1073741824)===0)return i=b!==null?b.baseLanes|l:l,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,Et(Xo,Jn),Jn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:l,Et(Xo,Jn),Jn|=h}else b!==null?(h=b.baseLanes|l,o.memoizedState=null):h=l,Et(Xo,Jn),Jn|=h;return Nn(i,o,E,l),o.child}function Jx(i,o){var l=o.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(o.flags|=512,o.flags|=2097152)}function Dm(i,o,l,h,E){var b=Un(l)?Cs:Tn.current;return b=Uo(o,b),qo(o,E),l=Am(i,o,l,h,b,E),h=Cm(),i!==null&&!Hn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,Ei(i,o,E)):(Ct&&h&&um(o),o.flags|=1,Nn(i,o,l,E),o.child)}function Zx(i,o,l,h,E){if(Un(l)){var b=!0;Uc(o)}else b=!1;if(qo(o,E),o.stateNode===null)rd(i,o),zx(o,l,h),Im(o,l,h,E),h=!0;else if(i===null){var x=o.stateNode,L=o.memoizedProps;x.props=L;var U=x.context,Z=l.contextType;typeof Z=="object"&&Z!==null?Z=ur(Z):(Z=Un(l)?Cs:Tn.current,Z=Uo(o,Z));var de=l.getDerivedStateFromProps,me=typeof de=="function"||typeof x.getSnapshotBeforeUpdate=="function";me||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(L!==h||U!==Z)&&jx(o,x,h,Z),zi=!1;var le=o.memoizedState;x.state=le,Gc(o,h,x,E),U=o.memoizedState,L!==h||le!==U||Bn.current||zi?(typeof de=="function"&&(Om(o,l,de,h),U=o.memoizedState),(L=zi||Hx(o,l,L,h,le,U,Z))?(me||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(o.flags|=4194308)):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=U),x.props=h,x.state=U,x.context=Z,h=L):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{x=o.stateNode,mx(i,o),L=o.memoizedProps,Z=o.type===o.elementType?L:Ar(o.type,L),x.props=Z,me=o.pendingProps,le=x.context,U=l.contextType,typeof U=="object"&&U!==null?U=ur(U):(U=Un(l)?Cs:Tn.current,U=Uo(o,U));var Ae=l.getDerivedStateFromProps;(de=typeof Ae=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(L!==me||le!==U)&&jx(o,x,h,U),zi=!1,le=o.memoizedState,x.state=le,Gc(o,h,x,E);var ke=o.memoizedState;L!==me||le!==ke||Bn.current||zi?(typeof Ae=="function"&&(Om(o,l,Ae,h),ke=o.memoizedState),(Z=zi||Hx(o,l,Z,h,le,ke,U)||!1)?(de||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,ke,U),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,ke,U)),typeof x.componentDidUpdate=="function"&&(o.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof x.componentDidUpdate!="function"||L===i.memoizedProps&&le===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&le===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=ke),x.props=h,x.state=ke,x.context=U,h=Z):(typeof x.componentDidUpdate!="function"||L===i.memoizedProps&&le===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&le===i.memoizedState||(o.flags|=1024),h=!1)}return Mm(i,o,l,h,b,E)}function Mm(i,o,l,h,E,b){Jx(i,o);var x=(o.flags&128)!==0;if(!h&&!x)return E&&ix(o,l,!1),Ei(i,o,b);h=o.stateNode,m7.current=o;var L=x&&typeof l.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&x?(o.child=$o(o,i.child,null,b),o.child=$o(o,null,L,b)):Nn(i,o,L,b),o.memoizedState=h.state,E&&ix(o,l,!0),o.child}function e2(i){var o=i.stateNode;o.pendingContext?nx(i,o.pendingContext,o.pendingContext!==o.context):o.context&&nx(i,o.context,!1),bm(i,o.containerInfo)}function t2(i,o,l,h,E){return jo(),fm(E),o.flags|=256,Nn(i,o,l,h),o.child}var Fm={dehydrated:null,treeContext:null,retryLane:0};function Bm(i){return{baseLanes:i,cachePool:null,transitions:null}}function n2(i,o,l){var h=o.pendingProps,E=kt.current,b=!1,x=(o.flags&128)!==0,L;if((L=x)||(L=i!==null&&i.memoizedState===null?!1:(E&2)!==0),L?(b=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),Et(kt,E&1),i===null)return dm(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((o.mode&1)===0?o.lanes=1:i.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(x=h.children,i=h.fallback,b?(h=o.mode,b=o.child,x={mode:"hidden",children:x},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=x):b=md(x,h,0,null),i=Ms(i,h,l,null),b.return=o,i.return=o,b.sibling=i,o.child=b,o.child.memoizedState=Bm(l),o.memoizedState=Fm,i):Um(o,x));if(E=i.memoizedState,E!==null&&(L=E.dehydrated,L!==null))return g7(i,o,x,h,L,E,l);if(b){b=h.fallback,x=o.mode,E=i.child,L=E.sibling;var U={mode:"hidden",children:h.children};return(x&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=U,o.deletions=null):(h=Gi(E,U),h.subtreeFlags=E.subtreeFlags&14680064),L!==null?b=Gi(L,b):(b=Ms(b,x,l,null),b.flags|=2),b.return=o,h.return=o,h.sibling=b,o.child=h,h=b,b=o.child,x=i.child.memoizedState,x=x===null?Bm(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},b.memoizedState=x,b.childLanes=i.childLanes&~l,o.memoizedState=Fm,h}return b=i.child,i=b.sibling,h=Gi(b,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=l),h.return=o,h.sibling=null,i!==null&&(l=o.deletions,l===null?(o.deletions=[i],o.flags|=16):l.push(i)),o.child=h,o.memoizedState=null,h}function Um(i,o){return o=md({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function nd(i,o,l,h){return h!==null&&fm(h),$o(o,i.child,null,l),i=Um(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function g7(i,o,l,h,E,b,x){if(l)return o.flags&256?(o.flags&=-257,h=Rm(Error(n(422))),nd(i,o,x,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(b=h.fallback,E=o.mode,h=md({mode:"visible",children:h.children},E,0,null),b=Ms(b,E,x,null),b.flags|=2,h.return=o,b.return=o,h.sibling=b,o.child=h,(o.mode&1)!==0&&$o(o,i.child,null,x),o.child.memoizedState=Bm(x),o.memoizedState=Fm,b);if((o.mode&1)===0)return nd(i,o,x,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var L=h.dgst;return h=L,b=Error(n(419)),h=Rm(b,h,void 0),nd(i,o,x,h)}if(L=(x&i.childLanes)!==0,Hn||L){if(h=tn,h!==null){switch(x&-x){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|x))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,mi(i,E),Nr(h,i,E,-1))}return t0(),h=Rm(Error(n(421))),nd(i,o,x,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=k7.bind(null,i),E._reactRetry=o,null):(i=b.treeContext,Qn=Fi(E.nextSibling),Kn=o,Ct=!0,wr=null,i!==null&&(or[ar++]=hi,or[ar++]=pi,or[ar++]=vs,hi=i.id,pi=i.overflow,vs=o),o=Um(o,h.children),o.flags|=4096,o)}function r2(i,o,l){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),gm(i.return,o,l)}function Hm(i,o,l,h,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:E}:(b.isBackwards=o,b.rendering=null,b.renderingStartTime=0,b.last=h,b.tail=l,b.tailMode=E)}function i2(i,o,l){var h=o.pendingProps,E=h.revealOrder,b=h.tail;if(Nn(i,o,h.children,l),h=kt.current,(h&2)!==0)h=h&1|2,o.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&r2(i,l,o);else if(i.tag===19)r2(i,l,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(Et(kt,h),(o.mode&1)===0)o.memoizedState=null;else switch(E){case"forwards":for(l=o.child,E=null;l!==null;)i=l.alternate,i!==null&&Xc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=o.child,o.child=null):(E=l.sibling,l.sibling=null),Hm(o,!1,E,l,b);break;case"backwards":for(l=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Xc(i)===null){o.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Hm(o,!0,l,null,b);break;case"together":Hm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function rd(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function Ei(i,o,l){if(i!==null&&(o.dependencies=i.dependencies),Is|=o.lanes,(l&o.childLanes)===0)return null;if(i!==null&&o.child!==i.child)throw Error(n(153));if(o.child!==null){for(i=o.child,l=Gi(i,i.pendingProps),o.child=l,l.return=o;i.sibling!==null;)i=i.sibling,l=l.sibling=Gi(i,i.pendingProps),l.return=o;l.sibling=null}return o.child}function E7(i,o,l){switch(o.tag){case 3:e2(o),jo();break;case 5:yx(o);break;case 1:Un(o.type)&&Uc(o);break;case 4:bm(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;Et(qc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(Et(kt,kt.current&1),o.flags|=128,null):(l&o.child.childLanes)!==0?n2(i,o,l):(Et(kt,kt.current&1),i=Ei(i,o,l),i!==null?i.sibling:null);Et(kt,kt.current&1);break;case 19:if(h=(l&o.childLanes)!==0,(i.flags&128)!==0){if(h)return i2(i,o,l);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),Et(kt,kt.current),h)break;return null;case 22:case 23:return o.lanes=0,Qx(i,o,l)}return Ei(i,o,l)}var s2,zm,o2,a2;s2=function(i,o){for(var l=o.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},zm=function(){},o2=function(i,o,l,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,Ps(Gr.current);var b=null;switch(l){case"input":E=sr(i,E),h=sr(i,h),b=[];break;case"select":E=k({},E,{value:void 0}),h=k({},h,{value:void 0}),b=[];break;case"textarea":E=Pe(i,E),h=Pe(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Mc)}ln(l,h);var x;l=null;for(Z in E)if(!h.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var L=E[Z];for(x in L)L.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(s.hasOwnProperty(Z)?b||(b=[]):(b=b||[]).push(Z,null));for(Z in h){var U=h[Z];if(L=E!=null?E[Z]:void 0,h.hasOwnProperty(Z)&&U!==L&&(U!=null||L!=null))if(Z==="style")if(L){for(x in L)!L.hasOwnProperty(x)||U&&U.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in U)U.hasOwnProperty(x)&&L[x]!==U[x]&&(l||(l={}),l[x]=U[x])}else l||(b||(b=[]),b.push(Z,l)),l=U;else Z==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,L=L?L.__html:void 0,U!=null&&L!==U&&(b=b||[]).push(Z,U)):Z==="children"?typeof U!="string"&&typeof U!="number"||(b=b||[]).push(Z,""+U):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(s.hasOwnProperty(Z)?(U!=null&&Z==="onScroll"&&St("scroll",i),b||L===U||(b=[])):(b=b||[]).push(Z,U))}l&&(b=b||[]).push("style",l);var Z=b;(o.updateQueue=Z)&&(o.flags|=4)}},a2=function(i,o,l,h){l!==h&&(o.flags|=4)};function Iu(i,o){if(!Ct)switch(i.tailMode){case"hidden":o=i.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function Sn(i){var o=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(o)for(var E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=l,o}function y7(i,o,l){var h=o.pendingProps;switch(lm(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Sn(o),null;case 1:return Un(o.type)&&Bc(),Sn(o),null;case 3:return h=o.stateNode,Yo(),xt(Bn),xt(Tn),Sm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&($c(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,wr!==null&&(Jm(wr),wr=null))),zm(i,o),Sn(o),null;case 5:Tm(o);var E=Ps(vu.current);if(l=o.type,i!==null&&o.stateNode!=null)o2(i,o,l,h,E),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return Sn(o),null}if(i=Ps(Gr.current),$c(o)){h=o.stateNode,l=o.type;var b=o.memoizedProps;switch(h[Wr]=o,h[Su]=b,i=(o.mode&1)!==0,l){case"dialog":St("cancel",h),St("close",h);break;case"iframe":case"object":case"embed":St("load",h);break;case"video":case"audio":for(E=0;E<bu.length;E++)St(bu[E],h);break;case"source":St("error",h);break;case"img":case"image":case"link":St("error",h),St("load",h);break;case"details":St("toggle",h);break;case"input":Zt(h,b),St("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},St("invalid",h);break;case"textarea":Me(h,b),St("invalid",h)}ln(l,b),E=null;for(var x in b)if(b.hasOwnProperty(x)){var L=b[x];x==="children"?typeof L=="string"?h.textContent!==L&&(b.suppressHydrationWarning!==!0&&Dc(h.textContent,L,i),E=["children",L]):typeof L=="number"&&h.textContent!==""+L&&(b.suppressHydrationWarning!==!0&&Dc(h.textContent,L,i),E=["children",""+L]):s.hasOwnProperty(x)&&L!=null&&x==="onScroll"&&St("scroll",h)}switch(l){case"input":Vt(h),vn(h,b,!0);break;case"textarea":Vt(h),pt(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=Mc)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{x=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=J(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=x.createElement(l,{is:h.is}):(i=x.createElement(l),l==="select"&&(x=i,h.multiple?x.multiple=!0:h.size&&(x.size=h.size))):i=x.createElementNS(i,l),i[Wr]=o,i[Su]=h,s2(i,o,!1,!1),o.stateNode=i;e:{switch(x=qr(l,h),l){case"dialog":St("cancel",i),St("close",i),E=h;break;case"iframe":case"object":case"embed":St("load",i),E=h;break;case"video":case"audio":for(E=0;E<bu.length;E++)St(bu[E],i);E=h;break;case"source":St("error",i),E=h;break;case"img":case"image":case"link":St("error",i),St("load",i),E=h;break;case"details":St("toggle",i),E=h;break;case"input":Zt(i,h),E=sr(i,h),St("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),St("invalid",i);break;case"textarea":Me(i,h),E=Pe(i,h),St("invalid",i);break;default:E=h}ln(l,E),L=E;for(b in L)if(L.hasOwnProperty(b)){var U=L[b];b==="style"?un(i,U):b==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&qe(i,U)):b==="children"?typeof U=="string"?(l!=="textarea"||U!=="")&&Ie(i,U):typeof U=="number"&&Ie(i,""+U):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(s.hasOwnProperty(b)?U!=null&&b==="onScroll"&&St("scroll",i):U!=null&&C(i,b,U,x))}switch(l){case"input":Vt(i),vn(i,h,!1);break;case"textarea":Vt(i),pt(i);break;case"option":h.value!=null&&i.setAttribute("value",""+He(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?we(i,!!h.multiple,b,!1):h.defaultValue!=null&&we(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Mc)}switch(l){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return Sn(o),null;case 6:if(i&&o.stateNode!=null)a2(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(l=Ps(vu.current),Ps(Gr.current),$c(o)){if(h=o.stateNode,l=o.memoizedProps,h[Wr]=o,(b=h.nodeValue!==l)&&(i=Kn,i!==null))switch(i.tag){case 3:Dc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Dc(h.nodeValue,l,(i.mode&1)!==0)}b&&(o.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Wr]=o,o.stateNode=h}return Sn(o),null;case 13:if(xt(kt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Ct&&Qn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)cx(),jo(),o.flags|=98560,b=!1;else if(b=$c(o),h!==null&&h.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=o.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[Wr]=o}else jo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Sn(o),b=!1}else wr!==null&&(Jm(wr),wr=null),b=!0;if(!b)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=l,o):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(kt.current&1)!==0?Wt===0&&(Wt=3):t0())),o.updateQueue!==null&&(o.flags|=4),Sn(o),null);case 4:return Yo(),zm(i,o),i===null&&Tu(o.stateNode.containerInfo),Sn(o),null;case 10:return mm(o.type._context),Sn(o),null;case 17:return Un(o.type)&&Bc(),Sn(o),null;case 19:if(xt(kt),b=o.memoizedState,b===null)return Sn(o),null;if(h=(o.flags&128)!==0,x=b.rendering,x===null)if(h)Iu(b,!1);else{if(Wt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(x=Xc(i),x!==null){for(o.flags|=128,Iu(b,!1),h=x.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=l,l=o.child;l!==null;)b=l,i=h,b.flags&=14680066,x=b.alternate,x===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=x.childLanes,b.lanes=x.lanes,b.child=x.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=x.memoizedProps,b.memoizedState=x.memoizedState,b.updateQueue=x.updateQueue,b.type=x.type,i=x.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return Et(kt,kt.current&1|2),o.child}i=i.sibling}b.tail!==null&&Dt()>Ko&&(o.flags|=128,h=!0,Iu(b,!1),o.lanes=4194304)}else{if(!h)if(i=Xc(x),i!==null){if(o.flags|=128,h=!0,l=i.updateQueue,l!==null&&(o.updateQueue=l,o.flags|=4),Iu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!x.alternate&&!Ct)return Sn(o),null}else 2*Dt()-b.renderingStartTime>Ko&&l!==1073741824&&(o.flags|=128,h=!0,Iu(b,!1),o.lanes=4194304);b.isBackwards?(x.sibling=o.child,o.child=x):(l=b.last,l!==null?l.sibling=x:o.child=x,b.last=x)}return b.tail!==null?(o=b.tail,b.rendering=o,b.tail=o.sibling,b.renderingStartTime=Dt(),o.sibling=null,l=kt.current,Et(kt,h?l&1|2:l&1),o):(Sn(o),null);case 22:case 23:return e0(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Jn&1073741824)!==0&&(Sn(o),o.subtreeFlags&6&&(o.flags|=8192)):Sn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function b7(i,o){switch(lm(o),o.tag){case 1:return Un(o.type)&&Bc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Yo(),xt(Bn),xt(Tn),Sm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return Tm(o),null;case 13:if(xt(kt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));jo()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return xt(kt),null;case 4:return Yo(),null;case 10:return mm(o.type._context),null;case 22:case 23:return e0(),null;case 24:return null;default:return null}}var id=!1,xn=!1,T7=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function Go(i,o){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){It(i,o,h)}else l.current=null}function jm(i,o,l){try{l()}catch(h){It(i,o,h)}}var u2=!1;function _7(i,o){if(em=wc,i=HS(),Yp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var E=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{l.nodeType,b.nodeType}catch(be){l=null;break e}var x=0,L=-1,U=-1,Z=0,de=0,me=i,le=null;t:for(;;){for(var Ae;me!==l||E!==0&&me.nodeType!==3||(L=x+E),me!==b||h!==0&&me.nodeType!==3||(U=x+h),me.nodeType===3&&(x+=me.nodeValue.length),(Ae=me.firstChild)!==null;)le=me,me=Ae;for(;;){if(me===i)break t;if(le===l&&++Z===E&&(L=x),le===b&&++de===h&&(U=x),(Ae=me.nextSibling)!==null)break;me=le,le=me.parentNode}me=Ae}l=L===-1||U===-1?null:{start:L,end:U}}else l=null}l=l||{start:0,end:0}}else l=null;for(tm={focusedElem:i,selectionRange:l},wc=!1,Ne=o;Ne!==null;)if(o=Ne,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Ne=i;else for(;Ne!==null;){o=Ne;try{var ke=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(ke!==null){var Oe=ke.memoizedProps,Mt=ke.memoizedState,G=o.stateNode,j=G.getSnapshotBeforeUpdate(o.elementType===o.type?Oe:Ar(o.type,Oe),Mt);G.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var K=o.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(be){It(o,o.return,be)}if(i=o.sibling,i!==null){i.return=o.return,Ne=i;break}Ne=o.return}return ke=u2,u2=!1,ke}function Ru(i,o,l){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var b=E.destroy;E.destroy=void 0,b!==void 0&&jm(o,l,b)}E=E.next}while(E!==h)}}function sd(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var l=o=o.next;do{if((l.tag&i)===i){var h=l.create;l.destroy=h()}l=l.next}while(l!==o)}}function $m(i){var o=i.ref;if(o!==null){var l=i.stateNode;i.tag,i=l,typeof o=="function"?o(i):o.current=i}}function l2(i){var o=i.alternate;o!==null&&(i.alternate=null,l2(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Wr],delete o[Su],delete o[sm],delete o[r7],delete o[i7])),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 c2(i){return i.tag===5||i.tag===3||i.tag===4}function d2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||c2(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 Vm(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.nodeType===8?l.parentNode.insertBefore(i,o):l.insertBefore(i,o):(l.nodeType===8?(o=l.parentNode,o.insertBefore(i,l)):(o=l,o.appendChild(i)),l=l._reactRootContainer,l!=null||o.onclick!==null||(o.onclick=Mc));else if(h!==4&&(i=i.child,i!==null))for(Vm(i,o,l),i=i.sibling;i!==null;)Vm(i,o,l),i=i.sibling}function qm(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.insertBefore(i,o):l.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(qm(i,o,l),i=i.sibling;i!==null;)qm(i,o,l),i=i.sibling}var cn=null,Cr=!1;function $i(i,o,l){for(l=l.child;l!==null;)f2(i,o,l),l=l.sibling}function f2(i,o,l){if(Yr&&typeof Yr.onCommitFiberUnmount=="function")try{Yr.onCommitFiberUnmount(yc,l)}catch(L){}switch(l.tag){case 5:xn||Go(l,o);case 6:var h=cn,E=Cr;cn=null,$i(i,o,l),cn=h,Cr=E,cn!==null&&(Cr?(i=cn,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):cn.removeChild(l.stateNode));break;case 18:cn!==null&&(Cr?(i=cn,l=l.stateNode,i.nodeType===8?im(i.parentNode,l):i.nodeType===1&&im(i,l),du(i)):im(cn,l.stateNode));break;case 4:h=cn,E=Cr,cn=l.stateNode.containerInfo,Cr=!0,$i(i,o,l),cn=h,Cr=E;break;case 0:case 11:case 14:case 15:if(!xn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,x=b.destroy;b=b.tag,x!==void 0&&((b&2)!==0||(b&4)!==0)&&jm(l,o,x),E=E.next}while(E!==h)}$i(i,o,l);break;case 1:if(!xn&&(Go(l,o),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(L){It(l,o,L)}$i(i,o,l);break;case 21:$i(i,o,l);break;case 22:l.mode&1?(xn=(h=xn)||l.memoizedState!==null,$i(i,o,l),xn=h):$i(i,o,l);break;default:$i(i,o,l)}}function h2(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new T7),o.forEach(function(h){var E=P7.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function vr(i,o){var l=o.deletions;if(l!==null)for(var h=0;h<l.length;h++){var E=l[h];try{var b=i,x=o,L=x;e:for(;L!==null;){switch(L.tag){case 5:cn=L.stateNode,Cr=!1;break e;case 3:cn=L.stateNode.containerInfo,Cr=!0;break e;case 4:cn=L.stateNode.containerInfo,Cr=!0;break e}L=L.return}if(cn===null)throw Error(n(160));f2(b,x,E),cn=null,Cr=!1;var U=E.alternate;U!==null&&(U.return=null),E.return=null}catch(Z){It(E,o,Z)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)p2(o,i),o=o.sibling}function p2(i,o){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(vr(o,i),Kr(i),h&4){try{Ru(3,i,i.return),sd(3,i)}catch(Oe){It(i,i.return,Oe)}try{Ru(5,i,i.return)}catch(Oe){It(i,i.return,Oe)}}break;case 1:vr(o,i),Kr(i),h&512&&l!==null&&Go(l,l.return);break;case 5:if(vr(o,i),Kr(i),h&512&&l!==null&&Go(l,l.return),i.flags&32){var E=i.stateNode;try{Ie(E,"")}catch(Oe){It(i,i.return,Oe)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,x=l!==null?l.memoizedProps:b,L=i.type,U=i.updateQueue;if(i.updateQueue=null,U!==null)try{L==="input"&&b.type==="radio"&&b.name!=null&&Ve(E,b),qr(L,x);var Z=qr(L,b);for(x=0;x<U.length;x+=2){var de=U[x],me=U[x+1];de==="style"?un(E,me):de==="dangerouslySetInnerHTML"?qe(E,me):de==="children"?Ie(E,me):C(E,de,me,Z)}switch(L){case"input":Nt(E,b);break;case"textarea":rt(E,b);break;case"select":var le=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var Ae=b.value;Ae!=null?we(E,!!b.multiple,Ae,!1):le!==!!b.multiple&&(b.defaultValue!=null?we(E,!!b.multiple,b.defaultValue,!0):we(E,!!b.multiple,b.multiple?[]:"",!1))}E[Su]=b}catch(Oe){It(i,i.return,Oe)}}break;case 6:if(vr(o,i),Kr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Oe){It(i,i.return,Oe)}}break;case 3:if(vr(o,i),Kr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{du(o.containerInfo)}catch(Oe){It(i,i.return,Oe)}break;case 4:vr(o,i),Kr(i);break;case 13:vr(o,i),Kr(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(Gm=Dt())),h&4&&h2(i);break;case 22:if(de=l!==null&&l.memoizedState!==null,i.mode&1?(xn=(Z=xn)||de,vr(o,i),xn=Z):vr(o,i),Kr(i),h&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!de&&(i.mode&1)!==0)for(Ne=i,de=i.child;de!==null;){for(me=Ne=de;Ne!==null;){switch(le=Ne,Ae=le.child,le.tag){case 0:case 11:case 14:case 15:Ru(4,le,le.return);break;case 1:Go(le,le.return);var ke=le.stateNode;if(typeof ke.componentWillUnmount=="function"){h=le,l=le.return;try{o=h,ke.props=o.memoizedProps,ke.state=o.memoizedState,ke.componentWillUnmount()}catch(Oe){It(h,l,Oe)}}break;case 5:Go(le,le.return);break;case 22:if(le.memoizedState!==null){E2(me);continue}}Ae!==null?(Ae.return=le,Ne=Ae):E2(me)}de=de.sibling}e:for(de=null,me=i;;){if(me.tag===5){if(de===null){de=me;try{E=me.stateNode,Z?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(L=me.stateNode,U=me.memoizedProps.style,x=U!=null&&U.hasOwnProperty("display")?U.display:null,L.style.display=Ht("display",x))}catch(Oe){It(i,i.return,Oe)}}}else if(me.tag===6){if(de===null)try{me.stateNode.nodeValue=Z?"":me.memoizedProps}catch(Oe){It(i,i.return,Oe)}}else if((me.tag!==22&&me.tag!==23||me.memoizedState===null||me===i)&&me.child!==null){me.child.return=me,me=me.child;continue}if(me===i)break e;for(;me.sibling===null;){if(me.return===null||me.return===i)break e;de===me&&(de=null),me=me.return}de===me&&(de=null),me.sibling.return=me.return,me=me.sibling}}break;case 19:vr(o,i),Kr(i),h&4&&h2(i);break;case 21:break;default:vr(o,i),Kr(i)}}function Kr(i){var o=i.flags;if(o&2){try{e:{for(var l=i.return;l!==null;){if(c2(l)){var h=l;break e}l=l.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(Ie(E,""),h.flags&=-33);var b=d2(i);qm(i,b,E);break;case 3:case 4:var x=h.stateNode.containerInfo,L=d2(i);Vm(i,L,x);break;default:throw Error(n(161))}}catch(U){It(i,i.return,U)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function S7(i,o,l){Ne=i,m2(i)}function m2(i,o,l){for(var h=(i.mode&1)!==0;Ne!==null;){var E=Ne,b=E.child;if(E.tag===22&&h){var x=E.memoizedState!==null||id;if(!x){var L=E.alternate,U=L!==null&&L.memoizedState!==null||xn;L=id;var Z=xn;if(id=x,(xn=U)&&!Z)for(Ne=E;Ne!==null;)x=Ne,U=x.child,x.tag===22&&x.memoizedState!==null?y2(E):U!==null?(U.return=x,Ne=U):y2(E);for(;b!==null;)Ne=b,m2(b),b=b.sibling;Ne=E,id=L,xn=Z}g2(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,Ne=b):g2(i)}}function g2(i){for(;Ne!==null;){var o=Ne;if((o.flags&8772)!==0){var l=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:xn||sd(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!xn)if(l===null)h.componentDidMount();else{var E=o.elementType===o.type?l.memoizedProps:Ar(o.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=o.updateQueue;b!==null&&Ex(o,b,h);break;case 3:var x=o.updateQueue;if(x!==null){if(l=null,o.child!==null)switch(o.child.tag){case 5:l=o.child.stateNode;break;case 1:l=o.child.stateNode}Ex(o,x,l)}break;case 5:var L=o.stateNode;if(l===null&&o.flags&4){l=L;var U=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":U.autoFocus&&l.focus();break;case"img":U.src&&(l.src=U.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var Z=o.alternate;if(Z!==null){var de=Z.memoizedState;if(de!==null){var me=de.dehydrated;me!==null&&du(me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}xn||o.flags&512&&$m(o)}catch(le){It(o,o.return,le)}}if(o===i){Ne=null;break}if(l=o.sibling,l!==null){l.return=o.return,Ne=l;break}Ne=o.return}}function E2(i){for(;Ne!==null;){var o=Ne;if(o===i){Ne=null;break}var l=o.sibling;if(l!==null){l.return=o.return,Ne=l;break}Ne=o.return}}function y2(i){for(;Ne!==null;){var o=Ne;try{switch(o.tag){case 0:case 11:case 15:var l=o.return;try{sd(4,o)}catch(U){It(o,l,U)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(U){It(o,E,U)}}var b=o.return;try{$m(o)}catch(U){It(o,b,U)}break;case 5:var x=o.return;try{$m(o)}catch(U){It(o,x,U)}}}catch(U){It(o,o.return,U)}if(o===i){Ne=null;break}var L=o.sibling;if(L!==null){L.return=o.return,Ne=L;break}Ne=o.return}}var x7=Math.ceil,od=z.ReactCurrentDispatcher,Ym=z.ReactCurrentOwner,cr=z.ReactCurrentBatchConfig,it=0,tn=null,zt=null,dn=0,Jn=0,Xo=Bi(0),Wt=0,Lu=null,Is=0,ad=0,Wm=0,Du=null,zn=null,Gm=0,Ko=1/0,yi=null,ud=!1,Xm=null,Vi=null,ld=!1,qi=null,cd=0,Mu=0,Km=null,dd=-1,fd=0;function kn(){return(it&6)!==0?Dt():dd!==-1?dd:dd=Dt()}function Yi(i){return(i.mode&1)===0?1:(it&2)!==0&&dn!==0?dn&-dn:o7.transition!==null?(fd===0&&(fd=dS()),fd):(i=lt,i!==0||(i=window.event,i=i===void 0?16:TS(i.type)),i)}function Nr(i,o,l,h){if(50<Mu)throw Mu=0,Km=null,Error(n(185));ou(i,l,h),((it&2)===0||i!==tn)&&(i===tn&&((it&2)===0&&(ad|=l),Wt===4&&Wi(i,dn)),jn(i,h),l===1&&it===0&&(o.mode&1)===0&&(Ko=Dt()+500,Hc&&Hi()))}function jn(i,o){var l=i.callbackNode;oB(i,o);var h=_c(i,i===tn?dn:0);if(h===0)l!==null&&uS(l),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(l!=null&&uS(l),o===1)i.tag===0?s7(T2.bind(null,i)):sx(T2.bind(null,i)),t7(function(){(it&6)===0&&Hi()}),l=null;else{switch(fS(h)){case 1:l=kp;break;case 4:l=lS;break;case 16:l=Ec;break;case 536870912:l=cS;break;default:l=Ec}l=N2(l,b2.bind(null,i))}i.callbackPriority=o,i.callbackNode=l}}function b2(i,o){if(dd=-1,fd=0,(it&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Qo()&&i.callbackNode!==l)return null;var h=_c(i,i===tn?dn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=hd(i,h);else{o=h;var E=it;it|=2;var b=S2();(tn!==i||dn!==o)&&(yi=null,Ko=Dt()+500,Ls(i,o));do try{C7();break}catch(L){_2(i,L)}while(!0);pm(),od.current=b,it=E,zt!==null?o=0:(tn=null,dn=0,o=Wt)}if(o!==0){if(o===2&&(E=Pp(i),E!==0&&(h=E,o=Qm(i,E))),o===1)throw l=Lu,Ls(i,0),Wi(i,h),jn(i,Dt()),l;if(o===6)Wi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!w7(E)&&(o=hd(i,h),o===2&&(b=Pp(i),b!==0&&(h=b,o=Qm(i,b))),o===1))throw l=Lu,Ls(i,0),Wi(i,h),jn(i,Dt()),l;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:Ds(i,zn,yi);break;case 3:if(Wi(i,h),(h&130023424)===h&&(o=Gm+500-Dt(),10<o)){if(_c(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){kn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=rm(Ds.bind(null,i,zn,yi),o);break}Ds(i,zn,yi);break;case 4:if(Wi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var x=31-Sr(h);b=1<<x,x=o[x],x>E&&(E=x),h&=~b}if(h=E,h=Dt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*x7(h/1960))-h,10<h){i.timeoutHandle=rm(Ds.bind(null,i,zn,yi),h);break}Ds(i,zn,yi);break;case 5:Ds(i,zn,yi);break;default:throw Error(n(329))}}}return jn(i,Dt()),i.callbackNode===l?b2.bind(null,i):null}function Qm(i,o){var l=Du;return i.current.memoizedState.isDehydrated&&(Ls(i,o).flags|=256),i=hd(i,o),i!==2&&(o=zn,zn=l,o!==null&&Jm(o)),i}function Jm(i){zn===null?zn=i:zn.push.apply(zn,i)}function w7(i){for(var o=i;;){if(o.flags&16384){var l=o.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var h=0;h<l.length;h++){var E=l[h],b=E.getSnapshot;E=E.value;try{if(!xr(b(),E))return!1}catch(x){return!1}}}if(l=o.child,o.subtreeFlags&16384&&l!==null)l.return=o,o=l;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Wi(i,o){for(o&=~Wm,o&=~ad,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var l=31-Sr(o),h=1<<l;i[l]=-1,o&=~h}}function T2(i){if((it&6)!==0)throw Error(n(327));Qo();var o=_c(i,0);if((o&1)===0)return jn(i,Dt()),null;var l=hd(i,o);if(i.tag!==0&&l===2){var h=Pp(i);h!==0&&(o=h,l=Qm(i,h))}if(l===1)throw l=Lu,Ls(i,0),Wi(i,o),jn(i,Dt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,Ds(i,zn,yi),jn(i,Dt()),null}function Zm(i,o){var l=it;it|=1;try{return i(o)}finally{it=l,it===0&&(Ko=Dt()+500,Hc&&Hi())}}function Rs(i){qi!==null&&qi.tag===0&&(it&6)===0&&Qo();var o=it;it|=1;var l=cr.transition,h=lt;try{if(cr.transition=null,lt=1,i)return i()}finally{lt=h,cr.transition=l,it=o,(it&6)===0&&Hi()}}function e0(){Jn=Xo.current,xt(Xo)}function Ls(i,o){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,e7(l)),zt!==null)for(l=zt.return;l!==null;){var h=l;switch(lm(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Bc();break;case 3:Yo(),xt(Bn),xt(Tn),Sm();break;case 5:Tm(h);break;case 4:Yo();break;case 13:xt(kt);break;case 19:xt(kt);break;case 10:mm(h.type._context);break;case 22:case 23:e0()}l=l.return}if(tn=i,zt=i=Gi(i.current,null),dn=Jn=o,Wt=0,Lu=null,Wm=ad=Is=0,zn=Du=null,ks!==null){for(o=0;o<ks.length;o++)if(l=ks[o],h=l.interleaved,h!==null){l.interleaved=null;var E=h.next,b=l.pending;if(b!==null){var x=b.next;b.next=E,h.next=x}l.pending=h}ks=null}return i}function _2(i,o){do{var l=zt;try{if(pm(),Kc.current=ed,Qc){for(var h=Pt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Qc=!1}if(Os=0,en=Yt=Pt=null,Nu=!1,ku=0,Ym.current=null,l===null||l.return===null){Wt=1,Lu=o,zt=null;break}e:{var b=i,x=l.return,L=l,U=o;if(o=dn,L.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var Z=U,de=L,me=de.tag;if((de.mode&1)===0&&(me===0||me===11||me===15)){var le=de.alternate;le?(de.updateQueue=le.updateQueue,de.memoizedState=le.memoizedState,de.lanes=le.lanes):(de.updateQueue=null,de.memoizedState=null)}var Ae=Yx(x);if(Ae!==null){Ae.flags&=-257,Wx(Ae,x,L,b,o),Ae.mode&1&&qx(b,Z,o),o=Ae,U=Z;var ke=o.updateQueue;if(ke===null){var Oe=new Set;Oe.add(U),o.updateQueue=Oe}else ke.add(U);break e}else{if((o&1)===0){qx(b,Z,o),t0();break e}U=Error(n(426))}}else if(Ct&&L.mode&1){var Mt=Yx(x);if(Mt!==null){(Mt.flags&65536)===0&&(Mt.flags|=256),Wx(Mt,x,L,b,o),fm(Wo(U,L));break e}}b=U=Wo(U,L),Wt!==4&&(Wt=2),Du===null?Du=[b]:Du.push(b),b=x;do{switch(b.tag){case 3:b.flags|=65536,o&=-o,b.lanes|=o;var G=$x(b,U,o);gx(b,G);break e;case 1:L=U;var j=b.type,K=b.stateNode;if((b.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&(Vi===null||!Vi.has(K)))){b.flags|=65536,o&=-o,b.lanes|=o;var be=Vx(b,L,o);gx(b,be);break e}}b=b.return}while(b!==null)}w2(l)}catch(Re){o=Re,zt===l&&l!==null&&(zt=l=l.return);continue}break}while(!0)}function S2(){var i=od.current;return od.current=ed,i===null?ed:i}function t0(){(Wt===0||Wt===3||Wt===2)&&(Wt=4),tn===null||(Is&268435455)===0&&(ad&268435455)===0||Wi(tn,dn)}function hd(i,o){var l=it;it|=2;var h=S2();(tn!==i||dn!==o)&&(yi=null,Ls(i,o));do try{A7();break}catch(E){_2(i,E)}while(!0);if(pm(),it=l,od.current=h,zt!==null)throw Error(n(261));return tn=null,dn=0,Wt}function A7(){for(;zt!==null;)x2(zt)}function C7(){for(;zt!==null&&!Q9();)x2(zt)}function x2(i){var o=v2(i.alternate,i,Jn);i.memoizedProps=i.pendingProps,o===null?w2(i):zt=o,Ym.current=null}function w2(i){var o=i;do{var l=o.alternate;if(i=o.return,(o.flags&32768)===0){if(l=y7(l,o,Jn),l!==null){zt=l;return}}else{if(l=b7(l,o),l!==null){l.flags&=32767,zt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Wt=6,zt=null;return}}if(o=o.sibling,o!==null){zt=o;return}zt=o=i}while(o!==null);Wt===0&&(Wt=5)}function Ds(i,o,l){var h=lt,E=cr.transition;try{cr.transition=null,lt=1,v7(i,o,l,h)}finally{cr.transition=E,lt=h}return null}function v7(i,o,l,h){do Qo();while(qi!==null);if((it&6)!==0)throw Error(n(327));l=i.finishedWork;var E=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var b=l.lanes|l.childLanes;if(aB(i,b),i===tn&&(zt=tn=null,dn=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||ld||(ld=!0,N2(Ec,function(){return Qo(),null})),b=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||b){b=cr.transition,cr.transition=null;var x=lt;lt=1;var L=it;it|=4,Ym.current=null,_7(i,l),p2(l,i),WB(tm),wc=!!em,tm=em=null,i.current=l,S7(l),J9(),it=L,lt=x,cr.transition=b}else i.current=l;if(ld&&(ld=!1,qi=i,cd=E),b=i.pendingLanes,b===0&&(Vi=null),tB(l.stateNode),jn(i,Dt()),o!==null)for(h=i.onRecoverableError,l=0;l<o.length;l++)E=o[l],h(E.value,{componentStack:E.stack,digest:E.digest});if(ud)throw ud=!1,i=Xm,Xm=null,i;return(cd&1)!==0&&i.tag!==0&&Qo(),b=i.pendingLanes,(b&1)!==0?i===Km?Mu++:(Mu=0,Km=i):Mu=0,Hi(),null}function Qo(){if(qi!==null){var i=fS(cd),o=cr.transition,l=lt;try{if(cr.transition=null,lt=16>i?16:i,qi===null)var h=!1;else{if(i=qi,qi=null,cd=0,(it&6)!==0)throw Error(n(331));var E=it;for(it|=4,Ne=i.current;Ne!==null;){var b=Ne,x=b.child;if((Ne.flags&16)!==0){var L=b.deletions;if(L!==null){for(var U=0;U<L.length;U++){var Z=L[U];for(Ne=Z;Ne!==null;){var de=Ne;switch(de.tag){case 0:case 11:case 15:Ru(8,de,b)}var me=de.child;if(me!==null)me.return=de,Ne=me;else for(;Ne!==null;){de=Ne;var le=de.sibling,Ae=de.return;if(l2(de),de===Z){Ne=null;break}if(le!==null){le.return=Ae,Ne=le;break}Ne=Ae}}}var ke=b.alternate;if(ke!==null){var Oe=ke.child;if(Oe!==null){ke.child=null;do{var Mt=Oe.sibling;Oe.sibling=null,Oe=Mt}while(Oe!==null)}}Ne=b}}if((b.subtreeFlags&2064)!==0&&x!==null)x.return=b,Ne=x;else e:for(;Ne!==null;){if(b=Ne,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Ru(9,b,b.return)}var G=b.sibling;if(G!==null){G.return=b.return,Ne=G;break e}Ne=b.return}}var j=i.current;for(Ne=j;Ne!==null;){x=Ne;var K=x.child;if((x.subtreeFlags&2064)!==0&&K!==null)K.return=x,Ne=K;else e:for(x=j;Ne!==null;){if(L=Ne,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:sd(9,L)}}catch(Re){It(L,L.return,Re)}if(L===x){Ne=null;break e}var be=L.sibling;if(be!==null){be.return=L.return,Ne=be;break e}Ne=L.return}}if(it=E,Hi(),Yr&&typeof Yr.onPostCommitFiberRoot=="function")try{Yr.onPostCommitFiberRoot(yc,i)}catch(Re){}h=!0}return h}finally{lt=l,cr.transition=o}}return!1}function A2(i,o,l){o=Wo(l,o),o=$x(i,o,1),i=ji(i,o,1),o=kn(),i!==null&&(ou(i,1,o),jn(i,o))}function It(i,o,l){if(i.tag===3)A2(i,i,l);else for(;o!==null;){if(o.tag===3){A2(o,i,l);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Vi===null||!Vi.has(h))){i=Wo(l,i),i=Vx(o,i,1),o=ji(o,i,1),i=kn(),o!==null&&(ou(o,1,i),jn(o,i));break}}o=o.return}}function N7(i,o,l){var h=i.pingCache;h!==null&&h.delete(o),o=kn(),i.pingedLanes|=i.suspendedLanes&l,tn===i&&(dn&l)===l&&(Wt===4||Wt===3&&(dn&130023424)===dn&&500>Dt()-Gm?Ls(i,0):Wm|=l),jn(i,o)}function C2(i,o){o===0&&((i.mode&1)===0?o=1:(o=Tc,Tc<<=1,(Tc&130023424)===0&&(Tc=4194304)));var l=kn();i=mi(i,o),i!==null&&(ou(i,o,l),jn(i,l))}function k7(i){var o=i.memoizedState,l=0;o!==null&&(l=o.retryLane),C2(i,l)}function P7(i,o){var l=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(l=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),C2(i,l)}var v2;v2=function(i,o,l){if(i!==null)if(i.memoizedProps!==o.pendingProps||Bn.current)Hn=!0;else{if((i.lanes&l)===0&&(o.flags&128)===0)return Hn=!1,E7(i,o,l);Hn=(i.flags&131072)!==0}else Hn=!1,Ct&&(o.flags&1048576)!==0&&ox(o,jc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;rd(i,o),i=o.pendingProps;var E=Uo(o,Tn.current);qo(o,l),E=Am(null,o,h,i,E,l);var b=Cm();return o.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Un(h)?(b=!0,Uc(o)):b=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,ym(o),E.updater=td,o.stateNode=E,E._reactInternals=o,Im(o,h,i,l),o=Mm(null,o,h,!0,b,l)):(o.tag=0,Ct&&b&&um(o),Nn(null,o,E,l),o=o.child),o;case 16:h=o.elementType;e:{switch(rd(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=I7(h),i=Ar(h,i),E){case 0:o=Dm(null,o,h,i,l);break e;case 1:o=Zx(null,o,h,i,l);break e;case 11:o=Gx(null,o,h,i,l);break e;case 14:o=Xx(null,o,h,Ar(h.type,i),l);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),Dm(i,o,h,E,l);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),Zx(i,o,h,E,l);case 3:e:{if(e2(o),i===null)throw Error(n(387));h=o.pendingProps,b=o.memoizedState,E=b.element,mx(i,o),Gc(o,h,null,l);var x=o.memoizedState;if(h=x.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},o.updateQueue.baseState=b,o.memoizedState=b,o.flags&256){E=Wo(Error(n(423)),o),o=t2(i,o,h,l,E);break e}else if(h!==E){E=Wo(Error(n(424)),o),o=t2(i,o,h,l,E);break e}else for(Qn=Fi(o.stateNode.containerInfo.firstChild),Kn=o,Ct=!0,wr=null,l=hx(o,null,h,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(jo(),h===E){o=Ei(i,o,l);break e}Nn(i,o,h,l)}o=o.child}return o;case 5:return yx(o),i===null&&dm(o),h=o.type,E=o.pendingProps,b=i!==null?i.memoizedProps:null,x=E.children,nm(h,E)?x=null:b!==null&&nm(h,b)&&(o.flags|=32),Jx(i,o),Nn(i,o,x,l),o.child;case 6:return i===null&&dm(o),null;case 13:return n2(i,o,l);case 4:return bm(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=$o(o,null,h,l):Nn(i,o,h,l),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),Gx(i,o,h,E,l);case 7:return Nn(i,o,o.pendingProps,l),o.child;case 8:return Nn(i,o,o.pendingProps.children,l),o.child;case 12:return Nn(i,o,o.pendingProps.children,l),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,b=o.memoizedProps,x=E.value,Et(qc,h._currentValue),h._currentValue=x,b!==null)if(xr(b.value,x)){if(b.children===E.children&&!Bn.current){o=Ei(i,o,l);break e}}else for(b=o.child,b!==null&&(b.return=o);b!==null;){var L=b.dependencies;if(L!==null){x=b.child;for(var U=L.firstContext;U!==null;){if(U.context===h){if(b.tag===1){U=gi(-1,l&-l),U.tag=2;var Z=b.updateQueue;if(Z!==null){Z=Z.shared;var de=Z.pending;de===null?U.next=U:(U.next=de.next,de.next=U),Z.pending=U}}b.lanes|=l,U=b.alternate,U!==null&&(U.lanes|=l),gm(b.return,l,o),L.lanes|=l;break}U=U.next}}else if(b.tag===10)x=b.type===o.type?null:b.child;else if(b.tag===18){if(x=b.return,x===null)throw Error(n(341));x.lanes|=l,L=x.alternate,L!==null&&(L.lanes|=l),gm(x,l,o),x=b.sibling}else x=b.child;if(x!==null)x.return=b;else for(x=b;x!==null;){if(x===o){x=null;break}if(b=x.sibling,b!==null){b.return=x.return,x=b;break}x=x.return}b=x}Nn(i,o,E.children,l),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,qo(o,l),E=ur(E),h=h(E),o.flags|=1,Nn(i,o,h,l),o.child;case 14:return h=o.type,E=Ar(h,o.pendingProps),E=Ar(h.type,E),Xx(i,o,h,E,l);case 15:return Kx(i,o,o.type,o.pendingProps,l);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),rd(i,o),o.tag=1,Un(h)?(i=!0,Uc(o)):i=!1,qo(o,l),zx(o,h,E),Im(o,h,E,l),Mm(null,o,h,!0,i,l);case 19:return i2(i,o,l);case 22:return Qx(i,o,l)}throw Error(n(156,o.tag))};function N2(i,o){return aS(i,o)}function O7(i,o,l,h){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dr(i,o,l,h){return new O7(i,o,l,h)}function n0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function I7(i){if(typeof i=="function")return n0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===pe)return 11;if(i===ae)return 14}return 2}function Gi(i,o){var l=i.alternate;return l===null?(l=dr(i.tag,o,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=o,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,o=i.dependencies,l.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function pd(i,o,l,h,E,b){var x=2;if(h=i,typeof i=="function")n0(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case q:return Ms(l.children,E,b,o);case ne:x=8,E|=8;break;case ue:return i=dr(12,l,o,E|2),i.elementType=ue,i.lanes=b,i;case ve:return i=dr(13,l,o,E),i.elementType=ve,i.lanes=b,i;case re:return i=dr(19,l,o,E),i.elementType=re,i.lanes=b,i;case oe:return md(l,E,b,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case V:x=10;break e;case se:x=9;break e;case pe:x=11;break e;case ae:x=14;break e;case xe:x=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=dr(x,l,o,E),o.elementType=i,o.type=h,o.lanes=b,o}function Ms(i,o,l,h){return i=dr(7,i,h,o),i.lanes=l,i}function md(i,o,l,h){return i=dr(22,i,h,o),i.elementType=oe,i.lanes=l,i.stateNode={isHidden:!1},i}function r0(i,o,l){return i=dr(6,i,null,o),i.lanes=l,i}function i0(i,o,l){return o=dr(4,i.children!==null?i.children:[],i.key,o),o.lanes=l,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function R7(i,o,l,h,E){this.tag=o,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Op(0),this.expirationTimes=Op(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Op(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function s0(i,o,l,h,E,b,x,L,U){return i=new R7(i,o,l,L,U),o===1?(o=1,b===!0&&(o|=8)):o=0,b=dr(3,null,null,o),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},ym(b),i}function L7(i,o,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:h==null?null:""+h,children:i,containerInfo:o,implementation:l}}function k2(i){if(!i)return Ui;i=i._reactInternals;e:{if(ws(i)!==i||i.tag!==1)throw Error(n(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Un(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(Un(l))return rx(i,l,o)}return o}function P2(i,o,l,h,E,b,x,L,U){return i=s0(l,h,!0,i,E,b,x,L,U),i.context=k2(null),l=i.current,h=kn(),E=Yi(l),b=gi(h,E),b.callback=o!=null?o:null,ji(l,b,E),i.current.lanes=E,ou(i,E,h),jn(i,h),i}function gd(i,o,l,h){var E=o.current,b=kn(),x=Yi(E);return l=k2(l),o.context===null?o.context=l:o.pendingContext=l,o=gi(b,x),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=ji(E,o,x),i!==null&&(Nr(i,E,x,b),Wc(i,E,x)),x}function Ed(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function O2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<o?l:o}}function o0(i,o){O2(i,o),(i=i.alternate)&&O2(i,o)}function D7(){return null}var I2=typeof reportError=="function"?reportError:function(i){console.error(i)};function a0(i){this._internalRoot=i}yd.prototype.render=a0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));gd(i,o,null,null)},yd.prototype.unmount=a0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Rs(function(){gd(null,i,null,null)}),o[di]=null}};function yd(i){this._internalRoot=i}yd.prototype.unstable_scheduleHydration=function(i){if(i){var o=mS();i={blockedOn:null,target:i,priority:o};for(var l=0;l<Li.length&&o!==0&&o<Li[l].priority;l++);Li.splice(l,0,i),l===0&&yS(i)}};function u0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function bd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function R2(){}function M7(i,o,l,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var Z=Ed(x);b.call(Z)}}var x=P2(o,h,i,0,null,!1,!1,"",R2);return i._reactRootContainer=x,i[di]=x.current,Tu(i.nodeType===8?i.parentNode:i),Rs(),x}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var L=h;h=function(){var Z=Ed(U);L.call(Z)}}var U=s0(i,0,!1,null,null,!1,!1,"",R2);return i._reactRootContainer=U,i[di]=U.current,Tu(i.nodeType===8?i.parentNode:i),Rs(function(){gd(o,U,l,h)}),U}function Td(i,o,l,h,E){var b=l._reactRootContainer;if(b){var x=b;if(typeof E=="function"){var L=E;E=function(){var U=Ed(x);L.call(U)}}gd(o,x,i,E)}else x=M7(l,o,i,E,h);return Ed(x)}hS=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var l=su(o.pendingLanes);l!==0&&(Ip(o,l|1),jn(o,Dt()),(it&6)===0&&(Ko=Dt()+500,Hi()))}break;case 13:Rs(function(){var h=mi(i,1);if(h!==null){var E=kn();Nr(h,i,1,E)}}),o0(i,1)}},Rp=function(i){if(i.tag===13){var o=mi(i,134217728);if(o!==null){var l=kn();Nr(o,i,134217728,l)}o0(i,134217728)}},pS=function(i){if(i.tag===13){var o=Yi(i),l=mi(i,o);if(l!==null){var h=kn();Nr(l,i,o,h)}o0(i,o)}},mS=function(){return lt},gS=function(i,o){var l=lt;try{return lt=i,o()}finally{lt=l}},Ap=function(i,o,l){switch(o){case"input":if(Nt(i,l),o=l.name,l.type==="radio"&&o!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<l.length;o++){var h=l[o];if(h!==i&&h.form===i.form){var E=Fc(h);if(!E)throw Error(n(90));on(h),Nt(h,E)}}}break;case"textarea":rt(i,l);break;case"select":o=l.value,o!=null&&we(i,!!l.multiple,o,!1)}},eS=Zm,tS=Rs;var F7={usingClientEntryPoint:!1,Events:[xu,Fo,Fc,J_,Z_,Zm]},Fu={findFiberByHostInstance:As,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},B7={bundleType:Fu.bundleType,version:Fu.version,rendererPackageName:Fu.rendererPackageName,rendererConfig:Fu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:z.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=sS(i),i===null?null:i.stateNode},findFiberByHostInstance:Fu.findFiberByHostInstance||D7,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var _d=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_d.isDisabled&&_d.supportsFiber)try{yc=_d.inject(B7),Yr=_d}catch(i){}}return In.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=F7,In.createPortal=function(i,o){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u0(o))throw Error(n(200));return L7(i,o,null,l)},In.createRoot=function(i,o){if(!u0(i))throw Error(n(299));var l=!1,h="",E=I2;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=s0(i,1,!1,null,null,l,!1,h,E),i[di]=o.current,Tu(i.nodeType===8?i.parentNode:i),new a0(o)},In.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=sS(o),i=i===null?null:i.stateNode,i},In.flushSync=function(i){return Rs(i)},In.hydrate=function(i,o,l){if(!bd(o))throw Error(n(200));return Td(null,i,o,!0,l)},In.hydrateRoot=function(i,o,l){if(!u0(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,b="",x=I2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(b=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),o=P2(o,null,i,1,l!=null?l:null,E,!1,b,x),i[di]=o.current,Tu(i),h)for(i=0;i<h.length;i++)l=h[i],E=l._getVersion,E=E(l._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[l,E]:o.mutableSourceEagerHydrationData.push(l,E);return new yd(o)},In.render=function(i,o,l){if(!bd(o))throw Error(n(200));return Td(null,i,o,!1,l)},In.unmountComponentAtNode=function(i){if(!bd(i))throw Error(n(40));return i._reactRootContainer?(Rs(function(){Td(null,null,i,!1,function(){i._reactRootContainer=null,i[di]=null})}),!0):!1},In.unstable_batchedUpdates=Zm,In.unstable_renderSubtreeIntoContainer=function(i,o,l,h){if(!bd(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Td(i,o,l,!1,h)},In.version="18.3.1-next-f1338f8080-20240426",In}var w1;function A1(){if(w1)return wf.exports;w1=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(),wf.exports=CN(),wf.exports}var Qs=A1();function C1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=C1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function W(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=C1(e))&&(r&&(r+=" "),r+=t);return r}const vN=()=>document.querySelector(`input[name="${H}-user-input"]:not(:disabled)`),vf=()=>{var e;return(e=vN())!=null?e:document.querySelector(`.${H}-dialog-content, .${H}-modal-content`)},NN=()=>{var e;return(e=vf())==null?void 0:e.focus({preventScroll:!0})},Nf=()=>{const e=()=>{const n=document.querySelector(`.${H}-minimized-button:not([aria-hidden="true"])`);return n==null||n.focus({preventScroll:!0}),!!n};if(e())return;const t=new MutationObserver(()=>{e()&&t.disconnect()});t.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>t.disconnect(),1e3)};var v1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},N1=Qi.createContext&&Qi.createContext(v1),kN=["attr","size","title"];function PN(e,t){if(e==null)return{};var n=ON(e,t),r,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ON(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function hl(){return hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hl.apply(this,arguments)}function k1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function pl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k1(Object(n),!0).forEach(function(r){IN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IN(e,t,n){return t=RN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RN(e){var t=LN(e,"string");return typeof t=="symbol"?t:t+""}function LN(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 P1(e){return e&&e.map((t,n)=>Qi.createElement(t.tag,pl({key:n},t.attr),P1(t.child)))}function _t(e){return t=>Qi.createElement(DN,hl({attr:pl({},e.attr)},t),P1(e.child))}function DN(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=PN(e,kN),c=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Qi.createElement("svg",hl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:pl(pl({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&Qi.createElement("title",null,a),e.children)};return N1!==void 0?Qi.createElement(N1.Consumer,null,n=>t(n)):t(v1)}function MN(e){return _t({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 ii=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:S.jsx("button",{className:W(e,`${H}-icon-button`),type:r,"aria-label":s,title:a,onClick:c,disabled:u,children:t?S.jsx("img",{className:W(`${H}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),FN="data:image/svg+xml,%3csvg%20width='140'%20height='137'%20viewBox='0%200%20140%20137'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M140%2034.5C140%2040.8513%20135.075%2046%20129%2046C122.925%2046%20118%2040.8513%20118%2034.5C118%2028.1487%20122.925%2023%20129%2023C135.075%2023%20140%2028.1487%20140%2034.5Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%2011.3028C85%205.06042%2090.1487%200%2096.5%200C102.851%200%20108%205.06042%20108%2011.3028V21.6972C108%2027.9396%20102.851%2033%2096.5%2033C90.1487%2033%2085%2027.9396%2085%2021.6972V11.3028Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%2030.0986C36.9601%2025.6719%2036.9601%2018.4948%2041.3868%2014.0682C45.8134%209.64151%2052.9905%209.6415%2057.4172%2014.0682L71.3628%2028.0138C75.7894%2032.4404%2075.7894%2039.6175%2071.3628%2044.0442C66.9361%2048.4708%2059.759%2048.4708%2055.3324%2044.0442L41.3868%2030.0986Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M140%20101C140%2094.9249%20135.075%2090%20129%2090C122.925%2090%20118%2094.9249%20118%20101C118%20107.075%20122.925%20112%20129%20112C135.075%20112%20140%20107.075%20140%20101Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%20125.697C85%20131.94%2090.1487%20137%2096.5%20137C102.851%20137%20108%20131.94%20108%20125.697V115.303C108%20109.06%20102.851%20104%2096.5%20104C90.1487%20104%2085%20109.06%2085%20115.303V125.697Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%20106.932C36.9601%20111.359%2036.9601%20118.536%2041.3868%20122.963C45.8134%20127.389%2052.9905%20127.39%2057.4172%20122.963L71.3628%20109.017C75.7894%20104.591%2075.7894%2097.4135%2071.3628%2092.9868C66.9361%2088.5602%2059.759%2088.5602%2055.3324%2092.9868L41.3868%20106.932Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M11.259%2080C5.04084%2080%200%2074.8513%200%2068.5C0%2062.1487%205.04084%2057%2011.259%2057H49.741C55.9592%2057%2061%2062.1487%2061%2068.5C61%2074.8513%2055.9592%2080%2049.741%2080H11.259Z'%20fill='%23F3F2EB'/%3e%3c/svg%3e",BN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,launcherAriaLabel:r,mode:s}=tt(),a=s==="messaging",c=r||(a?"Open Commerce Client":"Open Copilot"),d=a?S.jsx(MN,{className:W(t,`${H}-minimized-icon`)}):S.jsx("img",{src:(n==null?void 0:n.logoUrl)||FN,alt:"Copilot",className:W(t,`${H}-minimized-icon-img`)});return S.jsx(ii,{className:W(t,`${H}-minimized-button`),ariaLabel:c,title:c,icon:d,onClick:e})},UN=()=>{const{globalClassName:e,themeVariables:t}=tt(),n=()=>{ma(!1),ni(!0),setTimeout(NN)};return Qs.createPortal(S.jsx("div",{className:W(e,`${H}-minimized-container`),style:t,children:S.jsx(BN,{onClick:n})}),document.body)};function O1(e){return _t({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"},child:[]}]})(e)}function I1(e){return _t({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 Js(e){return _t({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 HN(e){return _t({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},child:[]}]})(e)}function R1(e){return _t({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 zN(e){return _t({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 jN(e){return _t({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 $N(e){return _t({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 VN(e){return _t({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 qN(e){return _t({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M18.59 10.52c1.05.51 2.04 1.15 2.96 1.91l-1.07 1.07c-.58-.47-1.21-.89-1.88-1.27v-1.71m-13.2 0v1.7c-.65.37-1.28.79-1.87 1.27l-1.07-1.07c.91-.75 1.9-1.38 2.94-1.9M12 7C7.46 7 3.34 8.78.29 11.67c-.18.18-.29.43-.29.71s.11.53.29.7l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.1.7-.28.79-.73 1.68-1.36 2.66-1.85.33-.16.56-.51.56-.9v-3.1C8.85 9.25 10.4 9 12 9s3.15.25 4.59.73v3.1c0 .4.23.74.56.9.98.49 1.88 1.11 2.67 1.85.18.17.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.11-.53-.29-.71A16.971 16.971 0 0 0 12 7z"},child:[]}]})(e)}function YN(e){return _t({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m14.12 4 1.83 2H20v12H4V6h4.05l1.83-2h4.24M15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm-3 7c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5z"},child:[]}]})(e)}const WN=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"}),L1=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>S.jsx("button",{"aria-label":t,title:t,className:W(e,`${H}-close-button`),disabled:r,onClick:n,type:"button",children:S.jsx("svg",{"aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:S.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),ml=({className:e,children:t,type:n,disabled:r=!1,onClick:s,"aria-label":a})=>S.jsx("button",{"aria-label":a,className:W(`${H}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),GN=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?S.jsx("img",{className:W(`${H}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):S.jsx(Js,{size:"16px"})},XN=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return S.jsx(ii,{className:W(e,n,`cim-${r}-component`,`${H}-search-button-icon`),type:"submit",disabled:s,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:S.jsx(Js,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return S.jsxs(ml,{className:W(e,n,`cim-${r}-component`,`${H}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&S.jsx(GN,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function KN(e){return _t({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 9h8"},child:[]},{tag:"path",attr:{d:"M8 13h6"},child:[]},{tag:"path",attr:{d:"M13 18l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6"},child:[]},{tag:"path",attr:{d:"M17 17v5"},child:[]},{tag:"path",attr:{d:"M21 17v5"},child:[]}]})(e)}const QN=()=>{const{messages:e}=Vn(),{handleCancel:t}=Ir();return{cancelRequest:F.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],s=r.eventSourceId||r.id;t(s)},[t,e])}},JN=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=tt(),{cancelRequest:r}=QN();return n!=null&&n.enableCancelSearch?S.jsx(ii,{className:W(t,`${H}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:S.jsx(KN,{}),disabled:!e,onClick:r}):null};function bU(){}function TU(){}function D1(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(s,r).trim();(u||!a)&&t.push(u),s=r+1,r=n.indexOf(",",s)}return t}function M1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ZN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ek=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tk={};function F1(e,t){return(tk.jsx?ek:ZN).test(e)}const nk=/[ \t\n\f\r]/g;function rk(e){return typeof e=="object"?e.type==="text"?B1(e.value):!1:B1(e)}function B1(e){return e.replace(nk,"")===""}class ba{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ba.prototype.normal={},ba.prototype.property={},ba.prototype.space=void 0;function U1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new ba(n,r,t)}function Ta(e){return e.toLowerCase()}class Rn{constructor(t,n){this.attribute=n,this.property=t}}Rn.prototype.attribute="",Rn.prototype.booleanish=!1,Rn.prototype.boolean=!1,Rn.prototype.commaOrSpaceSeparated=!1,Rn.prototype.commaSeparated=!1,Rn.prototype.defined=!1,Rn.prototype.mustUseProperty=!1,Rn.prototype.number=!1,Rn.prototype.overloadedBoolean=!1,Rn.prototype.property="",Rn.prototype.spaceSeparated=!1,Rn.prototype.space=void 0;let ik=0;const Ge=os(),Ut=os(),kf=os(),Ee=os(),dt=os(),ss=os(),qn=os();function os(){return Bu(2,++ik)}const Pf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:Ut,commaOrSpaceSeparated:qn,commaSeparated:ss,number:Ee,overloadedBoolean:kf,spaceSeparated:dt},Symbol.toStringTag,{value:"Module"})),Of=Object.keys(Pf);class If extends Rn{constructor(t,n,r,s){let a=-1;if(super(t,n),H1(this,"space",s),typeof r=="number")for(;++a<Of.length;){const u=Of[a];H1(this,Of[a],(r&Pf[u])===Pf[u])}}}If.prototype.defined=!0;function H1(e,t,n){n&&(e[t]=n)}function Zs(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new If(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Ta(r)]=r,n[Ta(a.attribute)]=r}return new ba(t,n,e.space)}const z1=Zs({properties:{ariaActiveDescendant:null,ariaAtomic:Ut,ariaAutoComplete:null,ariaBusy:Ut,ariaChecked:Ut,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:dt,ariaCurrent:null,ariaDescribedBy:dt,ariaDetails:null,ariaDisabled:Ut,ariaDropEffect:dt,ariaErrorMessage:null,ariaExpanded:Ut,ariaFlowTo:dt,ariaGrabbed:Ut,ariaHasPopup:null,ariaHidden:Ut,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dt,ariaLevel:Ee,ariaLive:null,ariaModal:Ut,ariaMultiLine:Ut,ariaMultiSelectable:Ut,ariaOrientation:null,ariaOwns:dt,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:Ut,ariaReadOnly:Ut,ariaRelevant:null,ariaRequired:Ut,ariaRoleDescription:dt,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:Ut,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function j1(e,t){return t in e?e[t]:t}function $1(e,t){return j1(e,t.toLowerCase())}const sk=Zs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ss,acceptCharset:dt,accessKey:dt,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alpha:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:dt,autoFocus:Ge,autoPlay:Ge,blocking:dt,capture:null,charSet:null,checked:Ge,cite:null,className:dt,closedBy:null,colorSpace:null,cols:Ee,colSpan:Ee,command:null,commandFor:null,content:null,contentEditable:Ut,controls:Ge,controlsList:dt,coords:Ee|ss,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:kf,draggable:Ut,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:dt,height:Ee,hidden:kf,high:Ee,href:null,hrefLang:null,htmlFor:dt,httpEquiv:dt,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:dt,itemRef:dt,itemScope:Ge,itemType:dt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,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:Ge,optimum:Ee,pattern:null,ping:dt,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:dt,required:Ge,reversed:Ge,rows:Ee,rowSpan:Ee,sandbox:dt,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootCustomElementRegistry:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shadowRootSerializable:Ge,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:Ut,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:Ut,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:dt,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:Ut,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ge,disablePictureInPicture:Ge,disableRemotePlayback:Ge,exportParts:ss,part:dt,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:$1}),ok=Zs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:qn,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:dt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ss,g2:ss,glyphName:ss,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:qn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qn,rev:qn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qn,requiredFeatures:qn,requiredFonts:qn,requiredFormats:qn,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:qn,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:qn,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:qn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:j1}),V1=Zs({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()}}),q1=Zs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:$1}),Y1=Zs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ak={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"},uk=/[A-Z]/g,W1=/-[a-z]/g,lk=/^data[-\w.:]+$/i;function gl(e,t){const n=Ta(t);let r=t,s=Rn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&lk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(W1,dk);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!W1.test(a)){let u=a.replace(uk,ck);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=If}return new s(r,t)}function ck(e){return"-"+e.toLowerCase()}function dk(e){return e.charAt(1).toUpperCase()}const _a=U1([z1,sk,V1,q1,Y1],"html"),_i=U1([z1,ok,V1,q1,Y1],"svg");function G1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function X1(e){return e.join(" ").trim()}var eo={},Rf,K1;function fk(){if(K1)return Rf;K1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
18
- `,f="/",p="*",m="",T="comment",y="declaration";function _(v,A){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];A=A||{};var N=1,C=1;function z(re){var ae=re.match(t);ae&&(N+=ae.length);var xe=re.lastIndexOf(d);C=~xe?re.length-xe:C+re.length}function Y(){var re={line:N,column:C};return function(ae){return ae.position=new D(re),ue(),ae}}function D(re){this.start=re,this.end={line:N,column:C},this.source=A.source}D.prototype.content=v;function q(re){var ae=new Error(A.source+":"+N+":"+C+": "+re);if(ae.reason=re,ae.filename=A.source,ae.line=N,ae.column=C,ae.source=v,!A.silent)throw ae}function ne(re){var ae=re.exec(v);if(ae){var xe=ae[0];return z(xe),v=v.slice(xe.length),ae}}function ue(){ne(n)}function V(re){var ae;for(re=re||[];ae=se();)ae!==!1&&re.push(ae);return re}function se(){var re=Y();if(!(f!=v.charAt(0)||p!=v.charAt(1))){for(var ae=2;m!=v.charAt(ae)&&(p!=v.charAt(ae)||f!=v.charAt(ae+1));)++ae;if(ae+=2,m===v.charAt(ae-1))return q("End of comment missing");var xe=v.slice(2,ae-2);return C+=2,z(xe),v=v.slice(ae),C+=2,re({type:T,comment:xe})}}function pe(){var re=Y(),ae=ne(r);if(ae){if(se(),!ne(s))return q("property missing ':'");var xe=ne(a),oe=re({type:y,property:w(ae[0].replace(e,m)),value:xe?w(xe[0].replace(e,m)):m});return ne(u),oe}}function ve(){var re=[];V(re);for(var ae;ae=pe();)ae!==!1&&(re.push(ae),V(re));return re}return ue(),ve()}function w(v){return v?v.replace(c,m):m}return Rf=_,Rf}var Q1;function hk(){if(Q1)return eo;Q1=1;var e=eo&&eo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(eo,"__esModule",{value:!0}),eo.default=n;const t=e(fk());function n(r,s){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),c=typeof s=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;c?s(f,p,d):p&&(a=a||{},a[f]=p)}),a}return eo}var Sa={},J1;function pk(){if(J1)return Sa;J1=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,p){return p.toUpperCase()},c=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(s,c):f=f.replace(r,c),f.replace(t,u))};return Sa.camelCase=d,Sa}var xa,Z1;function mk(){if(Z1)return xa;Z1=1;var e=xa&&xa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(hk()),n=pk();function r(s,a){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,xa=r,xa}var gk=mk();const Ek=Qe(gk),El=eE("end"),Rr=eE("start");function eE(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 tE(e){const t=Rr(e),n=El(e);if(t&&n)return{start:t,end:n}}function wa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?nE(e.position):"start"in e||"end"in e?nE(e):"line"in e||"column"in e?Lf(e):""}function Lf(e){return rE(e&&e.line)+":"+rE(e&&e.column)}function nE(e){return Lf(e&&e.start)+"-"+Lf(e&&e.end)}function rE(e){return e&&typeof e=="number"?e:1}class gn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=B({},n)),typeof t=="string"?s=t:!a.cause&&t&&(u=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=c?c.line:void 0,this.name=wa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}gn.prototype.file="",gn.prototype.name="",gn.prototype.reason="",gn.prototype.message="",gn.prototype.stack="",gn.prototype.column=void 0,gn.prototype.line=void 0,gn.prototype.ancestors=void 0,gn.prototype.cause=void 0,gn.prototype.fatal=void 0,gn.prototype.place=void 0,gn.prototype.ruleId=void 0,gn.prototype.source=void 0;const Df={}.hasOwnProperty,yk=new Map,bk=/[A-Z]/g,Tk=new Set(["table","tbody","thead","tfoot","tr"]),_k=new Set(["td","th"]),iE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Sk(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Pk(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=kk(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?_i:_a,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=sE(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function sE(e,t,n){if(t.type==="element")return xk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return wk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Ck(e,t,n);if(t.type==="mdxjsEsm")return Ak(e,t);if(t.type==="root")return vk(e,t,n);if(t.type==="text")return Nk(e,t)}function xk(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=_i,e.schema=s),e.ancestors.push(t);const a=aE(e,t.tagName,!1),u=Ok(e,t);let c=Ff(e,t);return Tk.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!rk(d):!0})),oE(e,u,a,t),Mf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function wk(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)}Aa(e,t.position)}function Ak(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Aa(e,t.position)}function Ck(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=_i,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:aE(e,t.name,!0),u=Ik(e,t),c=Ff(e,t);return oE(e,u,a,t),Mf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function vk(e,t,n){const r={};return Mf(r,Ff(e,t)),e.create(t,e.Fragment,r,n)}function Nk(e,t){return t.value}function oE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Mf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function kk(e,t,n){return r;function r(s,a,u,c){const f=Array.isArray(u.children)?n:t;return c?f(a,u,c):f(a,u)}}function Pk(e,t){return n;function n(r,s,a,u){const c=Array.isArray(a.children),d=Rr(r);return t(s,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function Ok(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Df.call(t.properties,s)){const a=Rk(e,s,t.properties[s]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&_k.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 Ik(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 Aa(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Aa(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Ff(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:yk;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=s.get(d)||0;u=d+"-"+f,s.set(d,f+1)}}const c=sE(e,a,u);c!==void 0&&n.push(c)}return n}function Rk(e,t,n){const r=gl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?M1(n):X1(n)),r.property==="style"){let s=typeof n=="object"?n:Lk(e,String(n));return e.stylePropertyNameCase==="css"&&(s=Dk(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?ak[r.property]||r.property:r.attribute,n]}}function Lk(e,t){try{return Ek(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new gn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=iE+"#cannot-parse-style-attribute",s}}function aE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,u;for(;++a<s.length;){const c=F1(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=F1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Df.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Aa(e)}function Aa(e,t){const n=new gn("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=iE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Dk(e){const t={};let n;for(n in e)Df.call(e,n)&&(t[Mk(n)]=e[n]);return t}function Mk(e){let t=e.replace(bk,Fk);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Fk(e){return"-"+e.toLowerCase()}const Bf={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"]},Bk={};function Uf(e,t){const n=Bk,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return uE(e,r,s)}function uE(e,t,n){if(Uk(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return lE(e.children,t,n)}return Array.isArray(e)?lE(e,t,n):""}function lE(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=uE(e[s],t,n);return r.join("")}function Uk(e){return!!(e&&typeof e=="object")}const cE=document.createElement("i");function Hf(e){const t="&"+e+";";cE.innerHTML=t;const n=cE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Yn(e,t,n,r){const s=e.length;let a=0,u;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function nr(e,t){return e.length>0?(Yn(e,e.length,0,t),e):t}const dE={}.hasOwnProperty;function fE(e){const t={};let n=-1;for(;++n<e.length;)Hk(t,e[n]);return t}function Hk(e,t){let n;for(n in t){const s=(dE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){dE.call(s,u)||(s[u]=[]);const c=a[u];zk(s[u],Array.isArray(c)?c:c?[c]:[])}}}function zk(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Yn(e,0,0,r)}function hE(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function gr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Cn=Si(/[A-Za-z]/),En=Si(/[\dA-Za-z]/),jk=Si(/[#-'*+\--9=?A-Z^-~]/);function yl(e){return e!==null&&(e<32||e===127)}const zf=Si(/\d/),$k=Si(/[\dA-Fa-f]/),Vk=Si(/[!-/:-@[-`{-~]/);function Be(e){return e!==null&&e<-2}function ft(e){return e!==null&&(e<0||e===32)}function Ze(e){return e===-2||e===-1||e===32}const bl=Si(new RegExp("\\p{P}|\\p{S}","u")),as=Si(/\s/);function Si(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function to(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&En(e.charCodeAt(n+1))&&En(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),s=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function nt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ze(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ze(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const qk={tokenize:Yk};function Yk(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),nt(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Be(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const Wk={tokenize:Gk},pE={tokenize:Xk};function Gk(e){const t=this,n=[];let r=0,s,a,u;return c;function c(C){if(r<n.length){const z=n[r];return t.containerState=z[1],e.attempt(z[0].continuation,d,f)(C)}return f(C)}function d(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&N();const z=t.events.length;let Y=z,D;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){D=t.events[Y][1].end;break}A(r);let q=z;for(;q<t.events.length;)t.events[q][1].end=B({},D),q++;return Yn(t.events,Y+1,0,t.events.slice(z)),t.events.length=q,f(C)}return c(C)}function f(C){if(r===n.length){if(!s)return T(C);if(s.currentConstruct&&s.currentConstruct.concrete)return _(C);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(pE,p,m)(C)}function p(C){return s&&N(),A(r),T(C)}function m(C){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(C)}function T(C){return t.containerState={},e.attempt(pE,y,_)(C)}function y(C){return r++,n.push([t.currentConstruct,t.containerState]),T(C)}function _(C){if(C===null){s&&N(),A(0),e.consume(C);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),w(C)}function w(C){if(C===null){v(e.exit("chunkFlow"),!0),A(0),e.consume(C);return}return Be(C)?(e.consume(C),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(C),w)}function v(C,z){const Y=t.sliceStream(C);if(z&&Y.push(null),C.previous=a,a&&(a.next=C),a=C,s.defineSkip(C.start),s.write(Y),t.parser.lazy[C.start.line]){let D=s.events.length;for(;D--;)if(s.events[D][1].start.offset<u&&(!s.events[D][1].end||s.events[D][1].end.offset>u))return;const q=t.events.length;let ne=q,ue,V;for(;ne--;)if(t.events[ne][0]==="exit"&&t.events[ne][1].type==="chunkFlow"){if(ue){V=t.events[ne][1].end;break}ue=!0}for(A(r),D=q;D<t.events.length;)t.events[D][1].end=B({},V),D++;Yn(t.events,ne+1,0,t.events.slice(q)),t.events.length=D}}function A(C){let z=n.length;for(;z-- >C;){const Y=n[z];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=C}function N(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function Xk(e,t,n){return nt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function no(e){if(e===null||ft(e)||as(e))return 1;if(bl(e))return 2}function Tl(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const jf={name:"attention",resolveAll:Kk,tokenize:Qk};function Kk(e,t){let n=-1,r,s,a,u,c,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=B({},e[r][1].end),T=B({},e[n][1].start);mE(m,-d),mE(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,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)},s={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),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=nr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=nr(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=nr(f,Tl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=nr(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=nr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Yn(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Qk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=no(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const f=e.exit("attentionSequence"),p=no(d),m=!p||p===2&&s||n.includes(d),T=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(s||!T)),f._close=!!(a===42?T:T&&(p||!m)),t(d)}}function mE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Jk={name:"autolink",tokenize:Zk};function Zk(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return Cn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||En(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||En(y))&&r++<32?(e.consume(y),c):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||yl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):jk(y)?(e.consume(y),f):n(y)}function p(y){return En(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):T(y)}function T(y){if((y===45||En(y))&&r++<63){const _=y===45?T:m;return e.consume(y),_}return n(y)}}const Ca={partial:!0,tokenize:eP};function eP(e,t,n){return r;function r(a){return Ze(a)?nt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Be(a)?t(a):n(a)}}const gE={continuation:{tokenize:nP},exit:rP,name:"blockQuote",tokenize:tP};function tP(e,t,n){const r=this;return s;function s(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ze(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function nP(e,t,n){const r=this;return s;function s(u){return Ze(u)?nt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(gE,t,n)(u)}}function rP(e){e.exit("blockQuote")}const EE={name:"characterEscape",tokenize:iP};function iP(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return Vk(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const yE={name:"characterReference",tokenize:sP};function sP(e,t,n){const r=this;let s=0,a,u;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=En,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=$k,p):(e.enter("characterReferenceValue"),a=7,u=zf,p(m))}function p(m){if(m===59&&s){const T=e.exit("characterReferenceValue");return u===En&&!Hf(r.sliceSerialize(T))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&s++<a?(e.consume(m),p):n(m)}}const bE={partial:!0,tokenize:aP},TE={concrete:!0,name:"codeFenced",tokenize:oP};function oP(e,t,n){const r=this,s={partial:!0,tokenize:Y};let a=0,u=0,c;return d;function d(D){return f(D)}function f(D){const q=r.events[r.events.length-1];return a=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,c=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(D)}function p(D){return D===c?(u++,e.consume(D),p):u<3?n(D):(e.exit("codeFencedFenceSequence"),Ze(D)?nt(e,m,"whitespace")(D):m(D))}function m(D){return D===null||Be(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(bE,w,z)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(D))}function T(D){return D===null||Be(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(D)):Ze(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),nt(e,y,"whitespace")(D)):D===96&&D===c?n(D):(e.consume(D),T)}function y(D){return D===null||Be(D)?m(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(D))}function _(D){return D===null||Be(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(D)):D===96&&D===c?n(D):(e.consume(D),_)}function w(D){return e.attempt(s,z,v)(D)}function v(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),A}function A(D){return a>0&&Ze(D)?nt(e,N,"linePrefix",a+1)(D):N(D)}function N(D){return D===null||Be(D)?e.check(bE,w,z)(D):(e.enter("codeFlowValue"),C(D))}function C(D){return D===null||Be(D)?(e.exit("codeFlowValue"),N(D)):(e.consume(D),C)}function z(D){return e.exit("codeFenced"),t(D)}function Y(D,q,ne){let ue=0;return V;function V(ae){return D.enter("lineEnding"),D.consume(ae),D.exit("lineEnding"),se}function se(ae){return D.enter("codeFencedFence"),Ze(ae)?nt(D,pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ae):pe(ae)}function pe(ae){return ae===c?(D.enter("codeFencedFenceSequence"),ve(ae)):ne(ae)}function ve(ae){return ae===c?(ue++,D.consume(ae),ve):ue>=u?(D.exit("codeFencedFenceSequence"),Ze(ae)?nt(D,re,"whitespace")(ae):re(ae)):ne(ae)}function re(ae){return ae===null||Be(ae)?(D.exit("codeFencedFence"),q(ae)):ne(ae)}}}function aP(e,t,n){const r=this;return s;function s(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const $f={name:"codeIndented",tokenize:lP},uP={partial:!0,tokenize:cP};function lP(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),nt(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):Be(f)?e.attempt(uP,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||Be(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function cP(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):Be(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):nt(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Be(u)?s(u):n(u)}}const dP={name:"codeText",previous:hP,resolve:fP,tokenize:pP};function fP(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function hP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function pP(e,t,n){let r=0,s,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,p(m)):Be(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||Be(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),s++,p):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class mP{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&va(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),va(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),va(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);va(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);va(this.left,n.reverse())}}}function va(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 _E(e){const t={};let n=-1,r,s,a,u,c,d,f;const p=new mP(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,gP(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(r[1].end=B({},p.get(s)[1].start),c=p.slice(s,n),c.unshift(r),p.splice(s,n-s+1,c))}}return Yn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function gP(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],f={};let p,m,T=-1,y=n,_=0,w=0;const v=[w];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++T<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&&(w=T+1,v.push(w),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):v.pop(),T=v.length;T--;){const A=c.slice(v[T],v[T+1]),N=a.pop();d.push([N,N+A.length-1]),e.splice(N,2,A)}for(d.reverse(),T=-1;++T<d.length;)f[_+d[T][0]]=_+d[T][1],_+=d[T][1]-d[T][0]-1;return f}const EP={resolve:bP,tokenize:TP},yP={partial:!0,tokenize:_P};function bP(e){return _E(e),e}function TP(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?a(c):Be(c)?e.check(yP,u,a)(c):(e.consume(c),s)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function _P(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),nt(e,a,"linePrefix")}function a(u){if(u===null||Be(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function SE(e,t,n,r,s,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(A){return A===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(A),e.exit(a),T):A===null||A===32||A===41||yl(A)?n(A):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),w(A))}function T(A){return A===62?(e.enter(a),e.consume(A),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(A))}function y(A){return A===62?(e.exit("chunkString"),e.exit(c),T(A)):A===null||A===60||Be(A)?n(A):(e.consume(A),A===92?_:y)}function _(A){return A===60||A===62||A===92?(e.consume(A),y):y(A)}function w(A){return!p&&(A===null||A===41||ft(A))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(A)):p<f&&A===40?(e.consume(A),p++,w):A===41?(e.consume(A),p--,w):A===null||A===32||A===40||yl(A)?n(A):(e.consume(A),A===92?v:w)}function v(A){return A===40||A===41||A===92?(e.consume(A),w):w(A)}}function xE(e,t,n,r,s,a){const u=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):Be(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||Be(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ze(y)),y===92?T:m)}function T(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function wE(e,t,n,r,s,a){let u;return c;function c(T){return T===34||T===39||T===40?(e.enter(r),e.enter(s),e.consume(T),e.exit(s),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(s),e.consume(T),e.exit(s),e.exit(r),t):(e.enter(a),f(T))}function f(T){return T===u?(e.exit(a),d(u)):T===null?n(T):Be(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),nt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||Be(T)?(e.exit("chunkString"),f(T)):(e.consume(T),T===92?m:p)}function m(T){return T===u||T===92?(e.consume(T),p):p(T)}}function Na(e,t){let n;return r;function r(s){return Be(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Ze(s)?nt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const SP={name:"definition",tokenize:wP},xP={partial:!0,tokenize:AP};function wP(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return xE.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=gr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return ft(y)?Na(e,f)(y):f(y)}function f(y){return SE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(xP,m,m)(y)}function m(y){return Ze(y)?nt(e,T,"whitespace")(y):T(y)}function T(y){return y===null||Be(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function AP(e,t,n){return r;function r(c){return ft(c)?Na(e,s)(c):n(c)}function s(c){return wE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ze(c)?nt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Be(c)?t(c):n(c)}}const CP={name:"hardBreakEscape",tokenize:vP};function vP(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return Be(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const NP={name:"headingAtx",resolve:kP,tokenize:PP};function kP(e,t){let n=e.length-2,r=3,s,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Yn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function PP(e,t,n){let r=0;return s;function s(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||ft(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Be(p)?(e.exit("atxHeading"),t(p)):Ze(p)?nt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||ft(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const OP=["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"],AE=["pre","script","style","textarea"],IP={concrete:!0,name:"htmlFlow",resolveTo:DP,tokenize:MP},RP={partial:!0,tokenize:BP},LP={partial:!0,tokenize:FP};function DP(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 MP(e,t,n){const r=this;let s,a,u,c,d;return f;function f(O){return p(O)}function p(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),m}function m(O){return O===33?(e.consume(O),T):O===47?(e.consume(O),a=!0,w):O===63?(e.consume(O),s=3,r.interrupt?t:k):Cn(O)?(e.consume(O),u=String.fromCharCode(O),v):n(O)}function T(O){return O===45?(e.consume(O),s=2,y):O===91?(e.consume(O),s=5,c=0,_):Cn(O)?(e.consume(O),s=4,r.interrupt?t:k):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:k):n(O)}function _(O){const Se="CDATA[";return O===Se.charCodeAt(c++)?(e.consume(O),c===Se.length?r.interrupt?t:pe:_):n(O)}function w(O){return Cn(O)?(e.consume(O),u=String.fromCharCode(O),v):n(O)}function v(O){if(O===null||O===47||O===62||ft(O)){const Se=O===47,Ue=u.toLowerCase();return!Se&&!a&&AE.includes(Ue)?(s=1,r.interrupt?t(O):pe(O)):OP.includes(u.toLowerCase())?(s=6,Se?(e.consume(O),A):r.interrupt?t(O):pe(O)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?N(O):C(O))}return O===45||En(O)?(e.consume(O),u+=String.fromCharCode(O),v):n(O)}function A(O){return O===62?(e.consume(O),r.interrupt?t:pe):n(O)}function N(O){return Ze(O)?(e.consume(O),N):V(O)}function C(O){return O===47?(e.consume(O),V):O===58||O===95||Cn(O)?(e.consume(O),z):Ze(O)?(e.consume(O),C):V(O)}function z(O){return O===45||O===46||O===58||O===95||En(O)?(e.consume(O),z):Y(O)}function Y(O){return O===61?(e.consume(O),D):Ze(O)?(e.consume(O),Y):C(O)}function D(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,q):Ze(O)?(e.consume(O),D):ne(O)}function q(O){return O===d?(e.consume(O),d=null,ue):O===null||Be(O)?n(O):(e.consume(O),q)}function ne(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||ft(O)?Y(O):(e.consume(O),ne)}function ue(O){return O===47||O===62||Ze(O)?C(O):n(O)}function V(O){return O===62?(e.consume(O),se):n(O)}function se(O){return O===null||Be(O)?pe(O):Ze(O)?(e.consume(O),se):n(O)}function pe(O){return O===45&&s===2?(e.consume(O),xe):O===60&&s===1?(e.consume(O),oe):O===62&&s===4?(e.consume(O),R):O===63&&s===3?(e.consume(O),k):O===93&&s===5?(e.consume(O),ie):Be(O)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(RP,ee,ve)(O)):O===null||Be(O)?(e.exit("htmlFlowData"),ve(O)):(e.consume(O),pe)}function ve(O){return e.check(LP,re,ee)(O)}function re(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),ae}function ae(O){return O===null||Be(O)?ve(O):(e.enter("htmlFlowData"),pe(O))}function xe(O){return O===45?(e.consume(O),k):pe(O)}function oe(O){return O===47?(e.consume(O),u="",Q):pe(O)}function Q(O){if(O===62){const Se=u.toLowerCase();return AE.includes(Se)?(e.consume(O),R):pe(O)}return Cn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),Q):pe(O)}function ie(O){return O===93?(e.consume(O),k):pe(O)}function k(O){return O===62?(e.consume(O),R):O===45&&s===2?(e.consume(O),k):pe(O)}function R(O){return O===null||Be(O)?(e.exit("htmlFlowData"),ee(O)):(e.consume(O),R)}function ee(O){return e.exit("htmlFlow"),t(O)}}function FP(e,t,n){const r=this;return s;function s(u){return Be(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function BP(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Ca,t,n)}}const UP={name:"htmlText",tokenize:HP};function HP(e,t,n){const r=this;let s,a,u;return c;function c(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),Y):k===63?(e.consume(k),C):Cn(k)?(e.consume(k),ne):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,_):Cn(k)?(e.consume(k),N):n(k)}function p(k){return k===45?(e.consume(k),y):n(k)}function m(k){return k===null?n(k):k===45?(e.consume(k),T):Be(k)?(u=m,oe(k)):(e.consume(k),m)}function T(k){return k===45?(e.consume(k),y):m(k)}function y(k){return k===62?xe(k):k===45?T(k):m(k)}function _(k){const R="CDATA[";return k===R.charCodeAt(a++)?(e.consume(k),a===R.length?w:_):n(k)}function w(k){return k===null?n(k):k===93?(e.consume(k),v):Be(k)?(u=w,oe(k)):(e.consume(k),w)}function v(k){return k===93?(e.consume(k),A):w(k)}function A(k){return k===62?xe(k):k===93?(e.consume(k),A):w(k)}function N(k){return k===null||k===62?xe(k):Be(k)?(u=N,oe(k)):(e.consume(k),N)}function C(k){return k===null?n(k):k===63?(e.consume(k),z):Be(k)?(u=C,oe(k)):(e.consume(k),C)}function z(k){return k===62?xe(k):C(k)}function Y(k){return Cn(k)?(e.consume(k),D):n(k)}function D(k){return k===45||En(k)?(e.consume(k),D):q(k)}function q(k){return Be(k)?(u=q,oe(k)):Ze(k)?(e.consume(k),q):xe(k)}function ne(k){return k===45||En(k)?(e.consume(k),ne):k===47||k===62||ft(k)?ue(k):n(k)}function ue(k){return k===47?(e.consume(k),xe):k===58||k===95||Cn(k)?(e.consume(k),V):Be(k)?(u=ue,oe(k)):Ze(k)?(e.consume(k),ue):xe(k)}function V(k){return k===45||k===46||k===58||k===95||En(k)?(e.consume(k),V):se(k)}function se(k){return k===61?(e.consume(k),pe):Be(k)?(u=se,oe(k)):Ze(k)?(e.consume(k),se):ue(k)}function pe(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),s=k,ve):Be(k)?(u=pe,oe(k)):Ze(k)?(e.consume(k),pe):(e.consume(k),re)}function ve(k){return k===s?(e.consume(k),s=void 0,ae):k===null?n(k):Be(k)?(u=ve,oe(k)):(e.consume(k),ve)}function re(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||ft(k)?ue(k):(e.consume(k),re)}function ae(k){return k===47||k===62||ft(k)?ue(k):n(k)}function xe(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function oe(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),Q}function Q(k){return Ze(k)?nt(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):ie(k)}function ie(k){return e.enter("htmlTextData"),u(k)}}const Vf={name:"labelEnd",resolveAll:VP,resolveTo:qP,tokenize:YP},zP={tokenize:WP},jP={tokenize:GP},$P={tokenize:XP};function VP(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Yn(e,0,e.length,n),e}function qP(e,t){let n=e.length,r=0,s,a,u,c;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:B({},e[a][1].start),end:B({},e[e.length-1][1].end)},f={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",f,t]],c=nr(c,e.slice(a+1,a+r+3)),c=nr(c,[["enter",p,t]]),c=nr(c,Tl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=nr(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=nr(c,e.slice(u+1)),c=nr(c,[["exit",d,t]]),Yn(e,a,e.length,c),e}function YP(e,t,n){const r=this;let s=r.events.length,a,u;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return c;function c(T){return a?a._inactive?m(T):(u=r.parser.defined.includes(gr(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(zP,p,u?p:m)(T):T===91?e.attempt(jP,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt($P,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function WP(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return ft(m)?Na(e,a)(m):a(m)}function a(m){return m===41?p(m):SE(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return ft(m)?Na(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?wE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return ft(m)?Na(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function GP(e,t,n){const r=this;return s;function s(c){return xE.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(gr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function XP(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const KP={name:"labelStartImage",resolveAll:Vf.resolveAll,tokenize:QP};function QP(e,t,n){const r=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const JP={name:"labelStartLink",resolveAll:Vf.resolveAll,tokenize:ZP};function ZP(e,t,n){const r=this;return s;function s(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const qf={name:"lineEnding",tokenize:eO};function eO(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),nt(e,t,"linePrefix")}}const _l={name:"thematicBreak",tokenize:tO};function tO(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return s=f,c(f)}function c(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||Be(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ze(f)?nt(e,c,"whitespace")(f):c(f))}}const Ln={continuation:{tokenize:sO},exit:aO,name:"list",tokenize:iO},nO={partial:!0,tokenize:uO},rO={partial:!0,tokenize:oO};function iO(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return c;function c(y){const _=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:zf(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(_l,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return zf(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Ca,r.interrupt?n:p,e.attempt(nO,T,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function m(y){return Ze(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 sO(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ca,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,nt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ze(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(rO,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,nt(e,e.attempt(Ln,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function oO(e,t,n){const r=this;return nt(e,s,"listItemIndent",r.containerState.size+1);function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function aO(e){e.exit(this.containerState.type)}function uO(e,t,n){const r=this;return nt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const u=r.events[r.events.length-1];return!Ze(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const CE={name:"setextUnderline",resolveTo:lO,tokenize:cO};function lO(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:B({},e[r][1].start),end:B({},e[e.length-1][1].end)};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=B({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function cO(e,t,n){const r=this;let s;return a;function a(f){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===s?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Ze(f)?nt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Be(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const dO={tokenize:fO};function fO(e){const t=this,n=e.attempt(Ca,r,e.attempt(this.parser.constructs.flowInitial,s,nt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(EP,s)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const hO={resolveAll:NE()},pO=vE("string"),mO=vE("text");function vE(e){return{resolveAll:NE(e==="text"?gO:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,u,c);return u;function u(p){return f(p)?a(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=s[p];let T=-1;if(m)for(;++T<m.length;){const y=m[T];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function NE(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function gO(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let a=s.length,u=-1,c=0,d;for(;a--;){const f=s[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(f===-2)d=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:B({},r.end)};r.end=B({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const EO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:SP},disable:{null:[]},document:{42:Ln,43:Ln,45:Ln,48:Ln,49:Ln,50:Ln,51:Ln,52:Ln,53:Ln,54:Ln,55:Ln,56:Ln,57:Ln,62:gE},flow:{35:NP,42:_l,45:[CE,_l],60:IP,61:CE,95:_l,96:TE,126:TE},flowInitial:{[-2]:$f,[-1]:$f,32:$f},insideSpan:{null:[jf,hO]},string:{38:yE,92:EE},text:{[-5]:qf,[-4]:qf,[-3]:qf,33:KP,38:yE,42:jf,60:[Jk,UP],91:JP,92:[CP,EE],93:Vf,95:jf,96:dP}},Symbol.toStringTag,{value:"Module"}));function yO(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},a=[];let u=[],c=[];const d={attempt:q(Y),check:q(D),consume:N,enter:C,exit:z,interrupt:q(D,{interrupt:!0})},f={code:null,containerState:{},defineSkip:w,events:[],now:_,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(se){return u=nr(u,se),v(),u[u.length-1]!==null?[]:(ne(t,0),f.events=Tl(a,f.events,f),f.events)}function T(se,pe){return TO(y(se),pe)}function y(se){return bO(u,se)}function _(){const{_bufferIndex:se,_index:pe,line:ve,column:re,offset:ae}=r;return{_bufferIndex:se,_index:pe,line:ve,column:re,offset:ae}}function w(se){s[se.line]=se.column,V()}function v(){let se;for(;r._index<u.length;){const pe=u[r._index];if(typeof pe=="string")for(se=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===se&&r._bufferIndex<pe.length;)A(pe.charCodeAt(r._bufferIndex));else A(pe)}}function A(se){p=p(se)}function N(se){Be(se)?(r.line++,r.column=1,r.offset+=se===-3?2:1,V()):se!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=se}function C(se,pe){const ve=pe||{};return ve.type=se,ve.start=_(),f.events.push(["enter",ve,f]),c.push(ve),ve}function z(se){const pe=c.pop();return pe.end=_(),f.events.push(["exit",pe,f]),pe}function Y(se,pe){ne(se,pe.from)}function D(se,pe){pe.restore()}function q(se,pe){return ve;function ve(re,ae,xe){let oe,Q,ie,k;return Array.isArray(re)?ee(re):"tokenize"in re?ee([re]):R(re);function R(ye){return Le;function Le(He){const Ye=He!==null&&ye[He],ht=He!==null&&ye.null,Vt=[...Array.isArray(Ye)?Ye:Ye?[Ye]:[],...Array.isArray(ht)?ht:ht?[ht]:[]];return ee(Vt)(He)}}function ee(ye){return oe=ye,Q=0,ye.length===0?xe:O(ye[Q])}function O(ye){return Le;function Le(He){return k=ue(),ie=ye,ye.partial||(f.currentConstruct=ye),ye.name&&f.parser.constructs.disable.null.includes(ye.name)?Ue():ye.tokenize.call(pe?Object.assign(Object.create(f),pe):f,d,Se,Ue)(He)}}function Se(ye){return se(ie,k),ae}function Ue(ye){return k.restore(),++Q<oe.length?O(oe[Q]):xe}}}function ne(se,pe){se.resolveAll&&!a.includes(se)&&a.push(se),se.resolve&&Yn(f.events,pe,f.events.length-pe,se.resolve(f.events.slice(pe),f)),se.resolveTo&&(f.events=se.resolveTo(f.events,f))}function ue(){const se=_(),pe=f.previous,ve=f.currentConstruct,re=f.events.length,ae=Array.from(c);return{from:re,restore:xe};function xe(){r=se,f.previous=pe,f.currentConstruct=ve,f.events.length=re,c=ae,V()}}function V(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function bO(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(r,a)];else{if(u=e.slice(n,s),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[s].slice(0,a))}return u}function TO(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
17
+ `+b.stack}return{value:i,source:o,stack:E,digest:null}}function Rm(i,o,l){return{value:i,source:null,stack:l!=null?l:null,digest:o!=null?o:null}}function Lm(i,o){try{console.error(o.value)}catch(l){setTimeout(function(){throw l})}}var p7=typeof WeakMap=="function"?WeakMap:Map;function $x(i,o,l){l=gi(-1,l),l.tag=3,l.payload={element:null};var h=o.value;return l.callback=function(){ud||(ud=!0,Xm=h),Lm(i,o)},l}function Vx(i,o,l){l=gi(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=o.value;l.payload=function(){return h(E)},l.callback=function(){Lm(i,o)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(l.callback=function(){Lm(i,o),typeof h!="function"&&(Vi===null?Vi=new Set([this]):Vi.add(this));var x=o.stack;this.componentDidCatch(o.value,{componentStack:x!==null?x:""})}),l}function qx(i,o,l){var h=i.pingCache;if(h===null){h=i.pingCache=new p7;var E=new Set;h.set(o,E)}else E=h.get(o),E===void 0&&(E=new Set,h.set(o,E));E.has(l)||(E.add(l),i=N7.bind(null,i,o,l),o.then(i,i))}function Yx(i){do{var o;if((o=i.tag===13)&&(o=i.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return i;i=i.return}while(i!==null);return null}function Wx(i,o,l,h,E){return(i.mode&1)===0?(i===o?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(o=gi(-1,1),o.tag=2,ji(l,o,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var m7=z.ReactCurrentOwner,Hn=!1;function Nn(i,o,l,h){o.child=i===null?hx(o,null,l,h):$o(o,i.child,l,h)}function Gx(i,o,l,h,E){l=l.render;var b=o.ref;return qo(o,E),h=Am(i,o,l,h,b,E),l=Cm(),i!==null&&!Hn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,Ei(i,o,E)):(Ct&&l&&um(o),o.flags|=1,Nn(i,o,h,E),o.child)}function Xx(i,o,l,h,E){if(i===null){var b=l.type;return typeof b=="function"&&!n0(b)&&b.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(o.tag=15,o.type=b,Kx(i,o,b,h,E)):(i=pd(l.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(b=i.child,(i.lanes&E)===0){var x=b.memoizedProps;if(l=l.compare,l=l!==null?l:Eu,l(x,h)&&i.ref===o.ref)return Ei(i,o,E)}return o.flags|=1,i=Gi(b,h),i.ref=o.ref,i.return=o,o.child=i}function Kx(i,o,l,h,E){if(i!==null){var b=i.memoizedProps;if(Eu(b,h)&&i.ref===o.ref)if(Hn=!1,o.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Hn=!0);else return o.lanes=i.lanes,Ei(i,o,E)}return Dm(i,o,l,h,E)}function Qx(i,o,l){var h=o.pendingProps,E=h.children,b=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},Et(Xo,Jn),Jn|=l;else{if((l&1073741824)===0)return i=b!==null?b.baseLanes|l:l,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,Et(Xo,Jn),Jn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:l,Et(Xo,Jn),Jn|=h}else b!==null?(h=b.baseLanes|l,o.memoizedState=null):h=l,Et(Xo,Jn),Jn|=h;return Nn(i,o,E,l),o.child}function Jx(i,o){var l=o.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(o.flags|=512,o.flags|=2097152)}function Dm(i,o,l,h,E){var b=Un(l)?Cs:Tn.current;return b=Uo(o,b),qo(o,E),l=Am(i,o,l,h,b,E),h=Cm(),i!==null&&!Hn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,Ei(i,o,E)):(Ct&&h&&um(o),o.flags|=1,Nn(i,o,l,E),o.child)}function Zx(i,o,l,h,E){if(Un(l)){var b=!0;Uc(o)}else b=!1;if(qo(o,E),o.stateNode===null)rd(i,o),zx(o,l,h),Im(o,l,h,E),h=!0;else if(i===null){var x=o.stateNode,R=o.memoizedProps;x.props=R;var U=x.context,ee=l.contextType;typeof ee=="object"&&ee!==null?ee=ur(ee):(ee=Un(l)?Cs:Tn.current,ee=Uo(o,ee));var de=l.getDerivedStateFromProps,me=typeof de=="function"||typeof x.getSnapshotBeforeUpdate=="function";me||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R!==h||U!==ee)&&jx(o,x,h,ee),zi=!1;var le=o.memoizedState;x.state=le,Gc(o,h,x,E),U=o.memoizedState,R!==h||le!==U||Bn.current||zi?(typeof de=="function"&&(Om(o,l,de,h),U=o.memoizedState),(R=zi||Hx(o,l,R,h,le,U,ee))?(me||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(o.flags|=4194308)):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=U),x.props=h,x.state=U,x.context=ee,h=R):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{x=o.stateNode,mx(i,o),R=o.memoizedProps,ee=o.type===o.elementType?R:Ar(o.type,R),x.props=ee,me=o.pendingProps,le=x.context,U=l.contextType,typeof U=="object"&&U!==null?U=ur(U):(U=Un(l)?Cs:Tn.current,U=Uo(o,U));var Ae=l.getDerivedStateFromProps;(de=typeof Ae=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R!==me||le!==U)&&jx(o,x,h,U),zi=!1,le=o.memoizedState,x.state=le,Gc(o,h,x,E);var ke=o.memoizedState;R!==me||le!==ke||Bn.current||zi?(typeof Ae=="function"&&(Om(o,l,Ae,h),ke=o.memoizedState),(ee=zi||Hx(o,l,ee,h,le,ke,U)||!1)?(de||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,ke,U),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,ke,U)),typeof x.componentDidUpdate=="function"&&(o.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof x.componentDidUpdate!="function"||R===i.memoizedProps&&le===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&le===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=ke),x.props=h,x.state=ke,x.context=U,h=ee):(typeof x.componentDidUpdate!="function"||R===i.memoizedProps&&le===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&le===i.memoizedState||(o.flags|=1024),h=!1)}return Mm(i,o,l,h,b,E)}function Mm(i,o,l,h,E,b){Jx(i,o);var x=(o.flags&128)!==0;if(!h&&!x)return E&&ix(o,l,!1),Ei(i,o,b);h=o.stateNode,m7.current=o;var R=x&&typeof l.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&x?(o.child=$o(o,i.child,null,b),o.child=$o(o,null,R,b)):Nn(i,o,R,b),o.memoizedState=h.state,E&&ix(o,l,!0),o.child}function e2(i){var o=i.stateNode;o.pendingContext?nx(i,o.pendingContext,o.pendingContext!==o.context):o.context&&nx(i,o.context,!1),bm(i,o.containerInfo)}function t2(i,o,l,h,E){return jo(),fm(E),o.flags|=256,Nn(i,o,l,h),o.child}var Fm={dehydrated:null,treeContext:null,retryLane:0};function Bm(i){return{baseLanes:i,cachePool:null,transitions:null}}function n2(i,o,l){var h=o.pendingProps,E=kt.current,b=!1,x=(o.flags&128)!==0,R;if((R=x)||(R=i!==null&&i.memoizedState===null?!1:(E&2)!==0),R?(b=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),Et(kt,E&1),i===null)return dm(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((o.mode&1)===0?o.lanes=1:i.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(x=h.children,i=h.fallback,b?(h=o.mode,b=o.child,x={mode:"hidden",children:x},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=x):b=md(x,h,0,null),i=Ms(i,h,l,null),b.return=o,i.return=o,b.sibling=i,o.child=b,o.child.memoizedState=Bm(l),o.memoizedState=Fm,i):Um(o,x));if(E=i.memoizedState,E!==null&&(R=E.dehydrated,R!==null))return g7(i,o,x,h,R,E,l);if(b){b=h.fallback,x=o.mode,E=i.child,R=E.sibling;var U={mode:"hidden",children:h.children};return(x&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=U,o.deletions=null):(h=Gi(E,U),h.subtreeFlags=E.subtreeFlags&14680064),R!==null?b=Gi(R,b):(b=Ms(b,x,l,null),b.flags|=2),b.return=o,h.return=o,h.sibling=b,o.child=h,h=b,b=o.child,x=i.child.memoizedState,x=x===null?Bm(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},b.memoizedState=x,b.childLanes=i.childLanes&~l,o.memoizedState=Fm,h}return b=i.child,i=b.sibling,h=Gi(b,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=l),h.return=o,h.sibling=null,i!==null&&(l=o.deletions,l===null?(o.deletions=[i],o.flags|=16):l.push(i)),o.child=h,o.memoizedState=null,h}function Um(i,o){return o=md({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function nd(i,o,l,h){return h!==null&&fm(h),$o(o,i.child,null,l),i=Um(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function g7(i,o,l,h,E,b,x){if(l)return o.flags&256?(o.flags&=-257,h=Rm(Error(n(422))),nd(i,o,x,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(b=h.fallback,E=o.mode,h=md({mode:"visible",children:h.children},E,0,null),b=Ms(b,E,x,null),b.flags|=2,h.return=o,b.return=o,h.sibling=b,o.child=h,(o.mode&1)!==0&&$o(o,i.child,null,x),o.child.memoizedState=Bm(x),o.memoizedState=Fm,b);if((o.mode&1)===0)return nd(i,o,x,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var R=h.dgst;return h=R,b=Error(n(419)),h=Rm(b,h,void 0),nd(i,o,x,h)}if(R=(x&i.childLanes)!==0,Hn||R){if(h=tn,h!==null){switch(x&-x){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|x))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,mi(i,E),Nr(h,i,E,-1))}return t0(),h=Rm(Error(n(421))),nd(i,o,x,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=k7.bind(null,i),E._reactRetry=o,null):(i=b.treeContext,Qn=Fi(E.nextSibling),Kn=o,Ct=!0,wr=null,i!==null&&(or[ar++]=hi,or[ar++]=pi,or[ar++]=vs,hi=i.id,pi=i.overflow,vs=o),o=Um(o,h.children),o.flags|=4096,o)}function r2(i,o,l){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),gm(i.return,o,l)}function Hm(i,o,l,h,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:E}:(b.isBackwards=o,b.rendering=null,b.renderingStartTime=0,b.last=h,b.tail=l,b.tailMode=E)}function i2(i,o,l){var h=o.pendingProps,E=h.revealOrder,b=h.tail;if(Nn(i,o,h.children,l),h=kt.current,(h&2)!==0)h=h&1|2,o.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&r2(i,l,o);else if(i.tag===19)r2(i,l,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(Et(kt,h),(o.mode&1)===0)o.memoizedState=null;else switch(E){case"forwards":for(l=o.child,E=null;l!==null;)i=l.alternate,i!==null&&Xc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=o.child,o.child=null):(E=l.sibling,l.sibling=null),Hm(o,!1,E,l,b);break;case"backwards":for(l=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Xc(i)===null){o.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Hm(o,!0,l,null,b);break;case"together":Hm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function rd(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function Ei(i,o,l){if(i!==null&&(o.dependencies=i.dependencies),Is|=o.lanes,(l&o.childLanes)===0)return null;if(i!==null&&o.child!==i.child)throw Error(n(153));if(o.child!==null){for(i=o.child,l=Gi(i,i.pendingProps),o.child=l,l.return=o;i.sibling!==null;)i=i.sibling,l=l.sibling=Gi(i,i.pendingProps),l.return=o;l.sibling=null}return o.child}function E7(i,o,l){switch(o.tag){case 3:e2(o),jo();break;case 5:yx(o);break;case 1:Un(o.type)&&Uc(o);break;case 4:bm(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;Et(qc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(Et(kt,kt.current&1),o.flags|=128,null):(l&o.child.childLanes)!==0?n2(i,o,l):(Et(kt,kt.current&1),i=Ei(i,o,l),i!==null?i.sibling:null);Et(kt,kt.current&1);break;case 19:if(h=(l&o.childLanes)!==0,(i.flags&128)!==0){if(h)return i2(i,o,l);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),Et(kt,kt.current),h)break;return null;case 22:case 23:return o.lanes=0,Qx(i,o,l)}return Ei(i,o,l)}var s2,zm,o2,a2;s2=function(i,o){for(var l=o.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},zm=function(){},o2=function(i,o,l,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,Ps(Gr.current);var b=null;switch(l){case"input":E=sr(i,E),h=sr(i,h),b=[];break;case"select":E=N({},E,{value:void 0}),h=N({},h,{value:void 0}),b=[];break;case"textarea":E=Pe(i,E),h=Pe(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Mc)}ln(l,h);var x;l=null;for(ee in E)if(!h.hasOwnProperty(ee)&&E.hasOwnProperty(ee)&&E[ee]!=null)if(ee==="style"){var R=E[ee];for(x in R)R.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else ee!=="dangerouslySetInnerHTML"&&ee!=="children"&&ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&ee!=="autoFocus"&&(s.hasOwnProperty(ee)?b||(b=[]):(b=b||[]).push(ee,null));for(ee in h){var U=h[ee];if(R=E!=null?E[ee]:void 0,h.hasOwnProperty(ee)&&U!==R&&(U!=null||R!=null))if(ee==="style")if(R){for(x in R)!R.hasOwnProperty(x)||U&&U.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in U)U.hasOwnProperty(x)&&R[x]!==U[x]&&(l||(l={}),l[x]=U[x])}else l||(b||(b=[]),b.push(ee,l)),l=U;else ee==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,R=R?R.__html:void 0,U!=null&&R!==U&&(b=b||[]).push(ee,U)):ee==="children"?typeof U!="string"&&typeof U!="number"||(b=b||[]).push(ee,""+U):ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&(s.hasOwnProperty(ee)?(U!=null&&ee==="onScroll"&&St("scroll",i),b||R===U||(b=[])):(b=b||[]).push(ee,U))}l&&(b=b||[]).push("style",l);var ee=b;(o.updateQueue=ee)&&(o.flags|=4)}},a2=function(i,o,l,h){l!==h&&(o.flags|=4)};function Iu(i,o){if(!Ct)switch(i.tailMode){case"hidden":o=i.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function Sn(i){var o=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(o)for(var E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=l,o}function y7(i,o,l){var h=o.pendingProps;switch(lm(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Sn(o),null;case 1:return Un(o.type)&&Bc(),Sn(o),null;case 3:return h=o.stateNode,Yo(),xt(Bn),xt(Tn),Sm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&($c(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,wr!==null&&(Jm(wr),wr=null))),zm(i,o),Sn(o),null;case 5:Tm(o);var E=Ps(vu.current);if(l=o.type,i!==null&&o.stateNode!=null)o2(i,o,l,h,E),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return Sn(o),null}if(i=Ps(Gr.current),$c(o)){h=o.stateNode,l=o.type;var b=o.memoizedProps;switch(h[Wr]=o,h[Su]=b,i=(o.mode&1)!==0,l){case"dialog":St("cancel",h),St("close",h);break;case"iframe":case"object":case"embed":St("load",h);break;case"video":case"audio":for(E=0;E<bu.length;E++)St(bu[E],h);break;case"source":St("error",h);break;case"img":case"image":case"link":St("error",h),St("load",h);break;case"details":St("toggle",h);break;case"input":Zt(h,b),St("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},St("invalid",h);break;case"textarea":Me(h,b),St("invalid",h)}ln(l,b),E=null;for(var x in b)if(b.hasOwnProperty(x)){var R=b[x];x==="children"?typeof R=="string"?h.textContent!==R&&(b.suppressHydrationWarning!==!0&&Dc(h.textContent,R,i),E=["children",R]):typeof R=="number"&&h.textContent!==""+R&&(b.suppressHydrationWarning!==!0&&Dc(h.textContent,R,i),E=["children",""+R]):s.hasOwnProperty(x)&&R!=null&&x==="onScroll"&&St("scroll",h)}switch(l){case"input":on(h),vn(h,b,!0);break;case"textarea":on(h),pt(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=Mc)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{x=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=Z(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=x.createElement(l,{is:h.is}):(i=x.createElement(l),l==="select"&&(x=i,h.multiple?x.multiple=!0:h.size&&(x.size=h.size))):i=x.createElementNS(i,l),i[Wr]=o,i[Su]=h,s2(i,o,!1,!1),o.stateNode=i;e:{switch(x=qr(l,h),l){case"dialog":St("cancel",i),St("close",i),E=h;break;case"iframe":case"object":case"embed":St("load",i),E=h;break;case"video":case"audio":for(E=0;E<bu.length;E++)St(bu[E],i);E=h;break;case"source":St("error",i),E=h;break;case"img":case"image":case"link":St("error",i),St("load",i),E=h;break;case"details":St("toggle",i),E=h;break;case"input":Zt(i,h),E=sr(i,h),St("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=N({},h,{value:void 0}),St("invalid",i);break;case"textarea":Me(i,h),E=Pe(i,h),St("invalid",i);break;default:E=h}ln(l,E),R=E;for(b in R)if(R.hasOwnProperty(b)){var U=R[b];b==="style"?un(i,U):b==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&qe(i,U)):b==="children"?typeof U=="string"?(l!=="textarea"||U!=="")&&Ie(i,U):typeof U=="number"&&Ie(i,""+U):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(s.hasOwnProperty(b)?U!=null&&b==="onScroll"&&St("scroll",i):U!=null&&C(i,b,U,x))}switch(l){case"input":on(i),vn(i,h,!1);break;case"textarea":on(i),pt(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Be(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?we(i,!!h.multiple,b,!1):h.defaultValue!=null&&we(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Mc)}switch(l){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return Sn(o),null;case 6:if(i&&o.stateNode!=null)a2(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(l=Ps(vu.current),Ps(Gr.current),$c(o)){if(h=o.stateNode,l=o.memoizedProps,h[Wr]=o,(b=h.nodeValue!==l)&&(i=Kn,i!==null))switch(i.tag){case 3:Dc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Dc(h.nodeValue,l,(i.mode&1)!==0)}b&&(o.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Wr]=o,o.stateNode=h}return Sn(o),null;case 13:if(xt(kt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Ct&&Qn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)cx(),jo(),o.flags|=98560,b=!1;else if(b=$c(o),h!==null&&h.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=o.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[Wr]=o}else jo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Sn(o),b=!1}else wr!==null&&(Jm(wr),wr=null),b=!0;if(!b)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=l,o):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(kt.current&1)!==0?Wt===0&&(Wt=3):t0())),o.updateQueue!==null&&(o.flags|=4),Sn(o),null);case 4:return Yo(),zm(i,o),i===null&&Tu(o.stateNode.containerInfo),Sn(o),null;case 10:return mm(o.type._context),Sn(o),null;case 17:return Un(o.type)&&Bc(),Sn(o),null;case 19:if(xt(kt),b=o.memoizedState,b===null)return Sn(o),null;if(h=(o.flags&128)!==0,x=b.rendering,x===null)if(h)Iu(b,!1);else{if(Wt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(x=Xc(i),x!==null){for(o.flags|=128,Iu(b,!1),h=x.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=l,l=o.child;l!==null;)b=l,i=h,b.flags&=14680066,x=b.alternate,x===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=x.childLanes,b.lanes=x.lanes,b.child=x.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=x.memoizedProps,b.memoizedState=x.memoizedState,b.updateQueue=x.updateQueue,b.type=x.type,i=x.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return Et(kt,kt.current&1|2),o.child}i=i.sibling}b.tail!==null&&Mt()>Ko&&(o.flags|=128,h=!0,Iu(b,!1),o.lanes=4194304)}else{if(!h)if(i=Xc(x),i!==null){if(o.flags|=128,h=!0,l=i.updateQueue,l!==null&&(o.updateQueue=l,o.flags|=4),Iu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!x.alternate&&!Ct)return Sn(o),null}else 2*Mt()-b.renderingStartTime>Ko&&l!==1073741824&&(o.flags|=128,h=!0,Iu(b,!1),o.lanes=4194304);b.isBackwards?(x.sibling=o.child,o.child=x):(l=b.last,l!==null?l.sibling=x:o.child=x,b.last=x)}return b.tail!==null?(o=b.tail,b.rendering=o,b.tail=o.sibling,b.renderingStartTime=Mt(),o.sibling=null,l=kt.current,Et(kt,h?l&1|2:l&1),o):(Sn(o),null);case 22:case 23:return e0(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Jn&1073741824)!==0&&(Sn(o),o.subtreeFlags&6&&(o.flags|=8192)):Sn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function b7(i,o){switch(lm(o),o.tag){case 1:return Un(o.type)&&Bc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Yo(),xt(Bn),xt(Tn),Sm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return Tm(o),null;case 13:if(xt(kt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));jo()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return xt(kt),null;case 4:return Yo(),null;case 10:return mm(o.type._context),null;case 22:case 23:return e0(),null;case 24:return null;default:return null}}var id=!1,xn=!1,T7=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function Go(i,o){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){It(i,o,h)}else l.current=null}function jm(i,o,l){try{l()}catch(h){It(i,o,h)}}var u2=!1;function _7(i,o){if(em=wc,i=HS(),Yp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var E=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{l.nodeType,b.nodeType}catch(be){l=null;break e}var x=0,R=-1,U=-1,ee=0,de=0,me=i,le=null;t:for(;;){for(var Ae;me!==l||E!==0&&me.nodeType!==3||(R=x+E),me!==b||h!==0&&me.nodeType!==3||(U=x+h),me.nodeType===3&&(x+=me.nodeValue.length),(Ae=me.firstChild)!==null;)le=me,me=Ae;for(;;){if(me===i)break t;if(le===l&&++ee===E&&(R=x),le===b&&++de===h&&(U=x),(Ae=me.nextSibling)!==null)break;me=le,le=me.parentNode}me=Ae}l=R===-1||U===-1?null:{start:R,end:U}}else l=null}l=l||{start:0,end:0}}else l=null;for(tm={focusedElem:i,selectionRange:l},wc=!1,Ne=o;Ne!==null;)if(o=Ne,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Ne=i;else for(;Ne!==null;){o=Ne;try{var ke=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(ke!==null){var Oe=ke.memoizedProps,Ft=ke.memoizedState,G=o.stateNode,j=G.getSnapshotBeforeUpdate(o.elementType===o.type?Oe:Ar(o.type,Oe),Ft);G.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var K=o.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(be){It(o,o.return,be)}if(i=o.sibling,i!==null){i.return=o.return,Ne=i;break}Ne=o.return}return ke=u2,u2=!1,ke}function Ru(i,o,l){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var b=E.destroy;E.destroy=void 0,b!==void 0&&jm(o,l,b)}E=E.next}while(E!==h)}}function sd(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var l=o=o.next;do{if((l.tag&i)===i){var h=l.create;l.destroy=h()}l=l.next}while(l!==o)}}function $m(i){var o=i.ref;if(o!==null){var l=i.stateNode;i.tag,i=l,typeof o=="function"?o(i):o.current=i}}function l2(i){var o=i.alternate;o!==null&&(i.alternate=null,l2(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Wr],delete o[Su],delete o[sm],delete o[r7],delete o[i7])),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 c2(i){return i.tag===5||i.tag===3||i.tag===4}function d2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||c2(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 Vm(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.nodeType===8?l.parentNode.insertBefore(i,o):l.insertBefore(i,o):(l.nodeType===8?(o=l.parentNode,o.insertBefore(i,l)):(o=l,o.appendChild(i)),l=l._reactRootContainer,l!=null||o.onclick!==null||(o.onclick=Mc));else if(h!==4&&(i=i.child,i!==null))for(Vm(i,o,l),i=i.sibling;i!==null;)Vm(i,o,l),i=i.sibling}function qm(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.insertBefore(i,o):l.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(qm(i,o,l),i=i.sibling;i!==null;)qm(i,o,l),i=i.sibling}var cn=null,Cr=!1;function $i(i,o,l){for(l=l.child;l!==null;)f2(i,o,l),l=l.sibling}function f2(i,o,l){if(Yr&&typeof Yr.onCommitFiberUnmount=="function")try{Yr.onCommitFiberUnmount(yc,l)}catch(R){}switch(l.tag){case 5:xn||Go(l,o);case 6:var h=cn,E=Cr;cn=null,$i(i,o,l),cn=h,Cr=E,cn!==null&&(Cr?(i=cn,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):cn.removeChild(l.stateNode));break;case 18:cn!==null&&(Cr?(i=cn,l=l.stateNode,i.nodeType===8?im(i.parentNode,l):i.nodeType===1&&im(i,l),du(i)):im(cn,l.stateNode));break;case 4:h=cn,E=Cr,cn=l.stateNode.containerInfo,Cr=!0,$i(i,o,l),cn=h,Cr=E;break;case 0:case 11:case 14:case 15:if(!xn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,x=b.destroy;b=b.tag,x!==void 0&&((b&2)!==0||(b&4)!==0)&&jm(l,o,x),E=E.next}while(E!==h)}$i(i,o,l);break;case 1:if(!xn&&(Go(l,o),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(R){It(l,o,R)}$i(i,o,l);break;case 21:$i(i,o,l);break;case 22:l.mode&1?(xn=(h=xn)||l.memoizedState!==null,$i(i,o,l),xn=h):$i(i,o,l);break;default:$i(i,o,l)}}function h2(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new T7),o.forEach(function(h){var E=P7.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function vr(i,o){var l=o.deletions;if(l!==null)for(var h=0;h<l.length;h++){var E=l[h];try{var b=i,x=o,R=x;e:for(;R!==null;){switch(R.tag){case 5:cn=R.stateNode,Cr=!1;break e;case 3:cn=R.stateNode.containerInfo,Cr=!0;break e;case 4:cn=R.stateNode.containerInfo,Cr=!0;break e}R=R.return}if(cn===null)throw Error(n(160));f2(b,x,E),cn=null,Cr=!1;var U=E.alternate;U!==null&&(U.return=null),E.return=null}catch(ee){It(E,o,ee)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)p2(o,i),o=o.sibling}function p2(i,o){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(vr(o,i),Kr(i),h&4){try{Ru(3,i,i.return),sd(3,i)}catch(Oe){It(i,i.return,Oe)}try{Ru(5,i,i.return)}catch(Oe){It(i,i.return,Oe)}}break;case 1:vr(o,i),Kr(i),h&512&&l!==null&&Go(l,l.return);break;case 5:if(vr(o,i),Kr(i),h&512&&l!==null&&Go(l,l.return),i.flags&32){var E=i.stateNode;try{Ie(E,"")}catch(Oe){It(i,i.return,Oe)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,x=l!==null?l.memoizedProps:b,R=i.type,U=i.updateQueue;if(i.updateQueue=null,U!==null)try{R==="input"&&b.type==="radio"&&b.name!=null&&Ve(E,b),qr(R,x);var ee=qr(R,b);for(x=0;x<U.length;x+=2){var de=U[x],me=U[x+1];de==="style"?un(E,me):de==="dangerouslySetInnerHTML"?qe(E,me):de==="children"?Ie(E,me):C(E,de,me,ee)}switch(R){case"input":Nt(E,b);break;case"textarea":rt(E,b);break;case"select":var le=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var Ae=b.value;Ae!=null?we(E,!!b.multiple,Ae,!1):le!==!!b.multiple&&(b.defaultValue!=null?we(E,!!b.multiple,b.defaultValue,!0):we(E,!!b.multiple,b.multiple?[]:"",!1))}E[Su]=b}catch(Oe){It(i,i.return,Oe)}}break;case 6:if(vr(o,i),Kr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Oe){It(i,i.return,Oe)}}break;case 3:if(vr(o,i),Kr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{du(o.containerInfo)}catch(Oe){It(i,i.return,Oe)}break;case 4:vr(o,i),Kr(i);break;case 13:vr(o,i),Kr(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(Gm=Mt())),h&4&&h2(i);break;case 22:if(de=l!==null&&l.memoizedState!==null,i.mode&1?(xn=(ee=xn)||de,vr(o,i),xn=ee):vr(o,i),Kr(i),h&8192){if(ee=i.memoizedState!==null,(i.stateNode.isHidden=ee)&&!de&&(i.mode&1)!==0)for(Ne=i,de=i.child;de!==null;){for(me=Ne=de;Ne!==null;){switch(le=Ne,Ae=le.child,le.tag){case 0:case 11:case 14:case 15:Ru(4,le,le.return);break;case 1:Go(le,le.return);var ke=le.stateNode;if(typeof ke.componentWillUnmount=="function"){h=le,l=le.return;try{o=h,ke.props=o.memoizedProps,ke.state=o.memoizedState,ke.componentWillUnmount()}catch(Oe){It(h,l,Oe)}}break;case 5:Go(le,le.return);break;case 22:if(le.memoizedState!==null){E2(me);continue}}Ae!==null?(Ae.return=le,Ne=Ae):E2(me)}de=de.sibling}e:for(de=null,me=i;;){if(me.tag===5){if(de===null){de=me;try{E=me.stateNode,ee?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(R=me.stateNode,U=me.memoizedProps.style,x=U!=null&&U.hasOwnProperty("display")?U.display:null,R.style.display=zt("display",x))}catch(Oe){It(i,i.return,Oe)}}}else if(me.tag===6){if(de===null)try{me.stateNode.nodeValue=ee?"":me.memoizedProps}catch(Oe){It(i,i.return,Oe)}}else if((me.tag!==22&&me.tag!==23||me.memoizedState===null||me===i)&&me.child!==null){me.child.return=me,me=me.child;continue}if(me===i)break e;for(;me.sibling===null;){if(me.return===null||me.return===i)break e;de===me&&(de=null),me=me.return}de===me&&(de=null),me.sibling.return=me.return,me=me.sibling}}break;case 19:vr(o,i),Kr(i),h&4&&h2(i);break;case 21:break;default:vr(o,i),Kr(i)}}function Kr(i){var o=i.flags;if(o&2){try{e:{for(var l=i.return;l!==null;){if(c2(l)){var h=l;break e}l=l.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(Ie(E,""),h.flags&=-33);var b=d2(i);qm(i,b,E);break;case 3:case 4:var x=h.stateNode.containerInfo,R=d2(i);Vm(i,R,x);break;default:throw Error(n(161))}}catch(U){It(i,i.return,U)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function S7(i,o,l){Ne=i,m2(i)}function m2(i,o,l){for(var h=(i.mode&1)!==0;Ne!==null;){var E=Ne,b=E.child;if(E.tag===22&&h){var x=E.memoizedState!==null||id;if(!x){var R=E.alternate,U=R!==null&&R.memoizedState!==null||xn;R=id;var ee=xn;if(id=x,(xn=U)&&!ee)for(Ne=E;Ne!==null;)x=Ne,U=x.child,x.tag===22&&x.memoizedState!==null?y2(E):U!==null?(U.return=x,Ne=U):y2(E);for(;b!==null;)Ne=b,m2(b),b=b.sibling;Ne=E,id=R,xn=ee}g2(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,Ne=b):g2(i)}}function g2(i){for(;Ne!==null;){var o=Ne;if((o.flags&8772)!==0){var l=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:xn||sd(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!xn)if(l===null)h.componentDidMount();else{var E=o.elementType===o.type?l.memoizedProps:Ar(o.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=o.updateQueue;b!==null&&Ex(o,b,h);break;case 3:var x=o.updateQueue;if(x!==null){if(l=null,o.child!==null)switch(o.child.tag){case 5:l=o.child.stateNode;break;case 1:l=o.child.stateNode}Ex(o,x,l)}break;case 5:var R=o.stateNode;if(l===null&&o.flags&4){l=R;var U=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":U.autoFocus&&l.focus();break;case"img":U.src&&(l.src=U.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var ee=o.alternate;if(ee!==null){var de=ee.memoizedState;if(de!==null){var me=de.dehydrated;me!==null&&du(me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}xn||o.flags&512&&$m(o)}catch(le){It(o,o.return,le)}}if(o===i){Ne=null;break}if(l=o.sibling,l!==null){l.return=o.return,Ne=l;break}Ne=o.return}}function E2(i){for(;Ne!==null;){var o=Ne;if(o===i){Ne=null;break}var l=o.sibling;if(l!==null){l.return=o.return,Ne=l;break}Ne=o.return}}function y2(i){for(;Ne!==null;){var o=Ne;try{switch(o.tag){case 0:case 11:case 15:var l=o.return;try{sd(4,o)}catch(U){It(o,l,U)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(U){It(o,E,U)}}var b=o.return;try{$m(o)}catch(U){It(o,b,U)}break;case 5:var x=o.return;try{$m(o)}catch(U){It(o,x,U)}}}catch(U){It(o,o.return,U)}if(o===i){Ne=null;break}var R=o.sibling;if(R!==null){R.return=o.return,Ne=R;break}Ne=o.return}}var x7=Math.ceil,od=z.ReactCurrentDispatcher,Ym=z.ReactCurrentOwner,cr=z.ReactCurrentBatchConfig,it=0,tn=null,jt=null,dn=0,Jn=0,Xo=Bi(0),Wt=0,Lu=null,Is=0,ad=0,Wm=0,Du=null,zn=null,Gm=0,Ko=1/0,yi=null,ud=!1,Xm=null,Vi=null,ld=!1,qi=null,cd=0,Mu=0,Km=null,dd=-1,fd=0;function kn(){return(it&6)!==0?Mt():dd!==-1?dd:dd=Mt()}function Yi(i){return(i.mode&1)===0?1:(it&2)!==0&&dn!==0?dn&-dn:o7.transition!==null?(fd===0&&(fd=dS()),fd):(i=ct,i!==0||(i=window.event,i=i===void 0?16:TS(i.type)),i)}function Nr(i,o,l,h){if(50<Mu)throw Mu=0,Km=null,Error(n(185));ou(i,l,h),((it&2)===0||i!==tn)&&(i===tn&&((it&2)===0&&(ad|=l),Wt===4&&Wi(i,dn)),jn(i,h),l===1&&it===0&&(o.mode&1)===0&&(Ko=Mt()+500,Hc&&Hi()))}function jn(i,o){var l=i.callbackNode;oB(i,o);var h=_c(i,i===tn?dn:0);if(h===0)l!==null&&uS(l),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(l!=null&&uS(l),o===1)i.tag===0?s7(T2.bind(null,i)):sx(T2.bind(null,i)),t7(function(){(it&6)===0&&Hi()}),l=null;else{switch(fS(h)){case 1:l=kp;break;case 4:l=lS;break;case 16:l=Ec;break;case 536870912:l=cS;break;default:l=Ec}l=N2(l,b2.bind(null,i))}i.callbackPriority=o,i.callbackNode=l}}function b2(i,o){if(dd=-1,fd=0,(it&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Qo()&&i.callbackNode!==l)return null;var h=_c(i,i===tn?dn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=hd(i,h);else{o=h;var E=it;it|=2;var b=S2();(tn!==i||dn!==o)&&(yi=null,Ko=Mt()+500,Ls(i,o));do try{C7();break}catch(R){_2(i,R)}while(!0);pm(),od.current=b,it=E,jt!==null?o=0:(tn=null,dn=0,o=Wt)}if(o!==0){if(o===2&&(E=Pp(i),E!==0&&(h=E,o=Qm(i,E))),o===1)throw l=Lu,Ls(i,0),Wi(i,h),jn(i,Mt()),l;if(o===6)Wi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!w7(E)&&(o=hd(i,h),o===2&&(b=Pp(i),b!==0&&(h=b,o=Qm(i,b))),o===1))throw l=Lu,Ls(i,0),Wi(i,h),jn(i,Mt()),l;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:Ds(i,zn,yi);break;case 3:if(Wi(i,h),(h&130023424)===h&&(o=Gm+500-Mt(),10<o)){if(_c(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){kn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=rm(Ds.bind(null,i,zn,yi),o);break}Ds(i,zn,yi);break;case 4:if(Wi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var x=31-Sr(h);b=1<<x,x=o[x],x>E&&(E=x),h&=~b}if(h=E,h=Mt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*x7(h/1960))-h,10<h){i.timeoutHandle=rm(Ds.bind(null,i,zn,yi),h);break}Ds(i,zn,yi);break;case 5:Ds(i,zn,yi);break;default:throw Error(n(329))}}}return jn(i,Mt()),i.callbackNode===l?b2.bind(null,i):null}function Qm(i,o){var l=Du;return i.current.memoizedState.isDehydrated&&(Ls(i,o).flags|=256),i=hd(i,o),i!==2&&(o=zn,zn=l,o!==null&&Jm(o)),i}function Jm(i){zn===null?zn=i:zn.push.apply(zn,i)}function w7(i){for(var o=i;;){if(o.flags&16384){var l=o.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var h=0;h<l.length;h++){var E=l[h],b=E.getSnapshot;E=E.value;try{if(!xr(b(),E))return!1}catch(x){return!1}}}if(l=o.child,o.subtreeFlags&16384&&l!==null)l.return=o,o=l;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Wi(i,o){for(o&=~Wm,o&=~ad,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var l=31-Sr(o),h=1<<l;i[l]=-1,o&=~h}}function T2(i){if((it&6)!==0)throw Error(n(327));Qo();var o=_c(i,0);if((o&1)===0)return jn(i,Mt()),null;var l=hd(i,o);if(i.tag!==0&&l===2){var h=Pp(i);h!==0&&(o=h,l=Qm(i,h))}if(l===1)throw l=Lu,Ls(i,0),Wi(i,o),jn(i,Mt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,Ds(i,zn,yi),jn(i,Mt()),null}function Zm(i,o){var l=it;it|=1;try{return i(o)}finally{it=l,it===0&&(Ko=Mt()+500,Hc&&Hi())}}function Rs(i){qi!==null&&qi.tag===0&&(it&6)===0&&Qo();var o=it;it|=1;var l=cr.transition,h=ct;try{if(cr.transition=null,ct=1,i)return i()}finally{ct=h,cr.transition=l,it=o,(it&6)===0&&Hi()}}function e0(){Jn=Xo.current,xt(Xo)}function Ls(i,o){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,e7(l)),jt!==null)for(l=jt.return;l!==null;){var h=l;switch(lm(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Bc();break;case 3:Yo(),xt(Bn),xt(Tn),Sm();break;case 5:Tm(h);break;case 4:Yo();break;case 13:xt(kt);break;case 19:xt(kt);break;case 10:mm(h.type._context);break;case 22:case 23:e0()}l=l.return}if(tn=i,jt=i=Gi(i.current,null),dn=Jn=o,Wt=0,Lu=null,Wm=ad=Is=0,zn=Du=null,ks!==null){for(o=0;o<ks.length;o++)if(l=ks[o],h=l.interleaved,h!==null){l.interleaved=null;var E=h.next,b=l.pending;if(b!==null){var x=b.next;b.next=E,h.next=x}l.pending=h}ks=null}return i}function _2(i,o){do{var l=jt;try{if(pm(),Kc.current=ed,Qc){for(var h=Pt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Qc=!1}if(Os=0,en=Yt=Pt=null,Nu=!1,ku=0,Ym.current=null,l===null||l.return===null){Wt=1,Lu=o,jt=null;break}e:{var b=i,x=l.return,R=l,U=o;if(o=dn,R.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var ee=U,de=R,me=de.tag;if((de.mode&1)===0&&(me===0||me===11||me===15)){var le=de.alternate;le?(de.updateQueue=le.updateQueue,de.memoizedState=le.memoizedState,de.lanes=le.lanes):(de.updateQueue=null,de.memoizedState=null)}var Ae=Yx(x);if(Ae!==null){Ae.flags&=-257,Wx(Ae,x,R,b,o),Ae.mode&1&&qx(b,ee,o),o=Ae,U=ee;var ke=o.updateQueue;if(ke===null){var Oe=new Set;Oe.add(U),o.updateQueue=Oe}else ke.add(U);break e}else{if((o&1)===0){qx(b,ee,o),t0();break e}U=Error(n(426))}}else if(Ct&&R.mode&1){var Ft=Yx(x);if(Ft!==null){(Ft.flags&65536)===0&&(Ft.flags|=256),Wx(Ft,x,R,b,o),fm(Wo(U,R));break e}}b=U=Wo(U,R),Wt!==4&&(Wt=2),Du===null?Du=[b]:Du.push(b),b=x;do{switch(b.tag){case 3:b.flags|=65536,o&=-o,b.lanes|=o;var G=$x(b,U,o);gx(b,G);break e;case 1:R=U;var j=b.type,K=b.stateNode;if((b.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&(Vi===null||!Vi.has(K)))){b.flags|=65536,o&=-o,b.lanes|=o;var be=Vx(b,R,o);gx(b,be);break e}}b=b.return}while(b!==null)}w2(l)}catch(Re){o=Re,jt===l&&l!==null&&(jt=l=l.return);continue}break}while(!0)}function S2(){var i=od.current;return od.current=ed,i===null?ed:i}function t0(){(Wt===0||Wt===3||Wt===2)&&(Wt=4),tn===null||(Is&268435455)===0&&(ad&268435455)===0||Wi(tn,dn)}function hd(i,o){var l=it;it|=2;var h=S2();(tn!==i||dn!==o)&&(yi=null,Ls(i,o));do try{A7();break}catch(E){_2(i,E)}while(!0);if(pm(),it=l,od.current=h,jt!==null)throw Error(n(261));return tn=null,dn=0,Wt}function A7(){for(;jt!==null;)x2(jt)}function C7(){for(;jt!==null&&!Q9();)x2(jt)}function x2(i){var o=v2(i.alternate,i,Jn);i.memoizedProps=i.pendingProps,o===null?w2(i):jt=o,Ym.current=null}function w2(i){var o=i;do{var l=o.alternate;if(i=o.return,(o.flags&32768)===0){if(l=y7(l,o,Jn),l!==null){jt=l;return}}else{if(l=b7(l,o),l!==null){l.flags&=32767,jt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Wt=6,jt=null;return}}if(o=o.sibling,o!==null){jt=o;return}jt=o=i}while(o!==null);Wt===0&&(Wt=5)}function Ds(i,o,l){var h=ct,E=cr.transition;try{cr.transition=null,ct=1,v7(i,o,l,h)}finally{cr.transition=E,ct=h}return null}function v7(i,o,l,h){do Qo();while(qi!==null);if((it&6)!==0)throw Error(n(327));l=i.finishedWork;var E=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var b=l.lanes|l.childLanes;if(aB(i,b),i===tn&&(jt=tn=null,dn=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||ld||(ld=!0,N2(Ec,function(){return Qo(),null})),b=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||b){b=cr.transition,cr.transition=null;var x=ct;ct=1;var R=it;it|=4,Ym.current=null,_7(i,l),p2(l,i),WB(tm),wc=!!em,tm=em=null,i.current=l,S7(l),J9(),it=R,ct=x,cr.transition=b}else i.current=l;if(ld&&(ld=!1,qi=i,cd=E),b=i.pendingLanes,b===0&&(Vi=null),tB(l.stateNode),jn(i,Mt()),o!==null)for(h=i.onRecoverableError,l=0;l<o.length;l++)E=o[l],h(E.value,{componentStack:E.stack,digest:E.digest});if(ud)throw ud=!1,i=Xm,Xm=null,i;return(cd&1)!==0&&i.tag!==0&&Qo(),b=i.pendingLanes,(b&1)!==0?i===Km?Mu++:(Mu=0,Km=i):Mu=0,Hi(),null}function Qo(){if(qi!==null){var i=fS(cd),o=cr.transition,l=ct;try{if(cr.transition=null,ct=16>i?16:i,qi===null)var h=!1;else{if(i=qi,qi=null,cd=0,(it&6)!==0)throw Error(n(331));var E=it;for(it|=4,Ne=i.current;Ne!==null;){var b=Ne,x=b.child;if((Ne.flags&16)!==0){var R=b.deletions;if(R!==null){for(var U=0;U<R.length;U++){var ee=R[U];for(Ne=ee;Ne!==null;){var de=Ne;switch(de.tag){case 0:case 11:case 15:Ru(8,de,b)}var me=de.child;if(me!==null)me.return=de,Ne=me;else for(;Ne!==null;){de=Ne;var le=de.sibling,Ae=de.return;if(l2(de),de===ee){Ne=null;break}if(le!==null){le.return=Ae,Ne=le;break}Ne=Ae}}}var ke=b.alternate;if(ke!==null){var Oe=ke.child;if(Oe!==null){ke.child=null;do{var Ft=Oe.sibling;Oe.sibling=null,Oe=Ft}while(Oe!==null)}}Ne=b}}if((b.subtreeFlags&2064)!==0&&x!==null)x.return=b,Ne=x;else e:for(;Ne!==null;){if(b=Ne,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Ru(9,b,b.return)}var G=b.sibling;if(G!==null){G.return=b.return,Ne=G;break e}Ne=b.return}}var j=i.current;for(Ne=j;Ne!==null;){x=Ne;var K=x.child;if((x.subtreeFlags&2064)!==0&&K!==null)K.return=x,Ne=K;else e:for(x=j;Ne!==null;){if(R=Ne,(R.flags&2048)!==0)try{switch(R.tag){case 0:case 11:case 15:sd(9,R)}}catch(Re){It(R,R.return,Re)}if(R===x){Ne=null;break e}var be=R.sibling;if(be!==null){be.return=R.return,Ne=be;break e}Ne=R.return}}if(it=E,Hi(),Yr&&typeof Yr.onPostCommitFiberRoot=="function")try{Yr.onPostCommitFiberRoot(yc,i)}catch(Re){}h=!0}return h}finally{ct=l,cr.transition=o}}return!1}function A2(i,o,l){o=Wo(l,o),o=$x(i,o,1),i=ji(i,o,1),o=kn(),i!==null&&(ou(i,1,o),jn(i,o))}function It(i,o,l){if(i.tag===3)A2(i,i,l);else for(;o!==null;){if(o.tag===3){A2(o,i,l);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Vi===null||!Vi.has(h))){i=Wo(l,i),i=Vx(o,i,1),o=ji(o,i,1),i=kn(),o!==null&&(ou(o,1,i),jn(o,i));break}}o=o.return}}function N7(i,o,l){var h=i.pingCache;h!==null&&h.delete(o),o=kn(),i.pingedLanes|=i.suspendedLanes&l,tn===i&&(dn&l)===l&&(Wt===4||Wt===3&&(dn&130023424)===dn&&500>Mt()-Gm?Ls(i,0):Wm|=l),jn(i,o)}function C2(i,o){o===0&&((i.mode&1)===0?o=1:(o=Tc,Tc<<=1,(Tc&130023424)===0&&(Tc=4194304)));var l=kn();i=mi(i,o),i!==null&&(ou(i,o,l),jn(i,l))}function k7(i){var o=i.memoizedState,l=0;o!==null&&(l=o.retryLane),C2(i,l)}function P7(i,o){var l=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(l=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),C2(i,l)}var v2;v2=function(i,o,l){if(i!==null)if(i.memoizedProps!==o.pendingProps||Bn.current)Hn=!0;else{if((i.lanes&l)===0&&(o.flags&128)===0)return Hn=!1,E7(i,o,l);Hn=(i.flags&131072)!==0}else Hn=!1,Ct&&(o.flags&1048576)!==0&&ox(o,jc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;rd(i,o),i=o.pendingProps;var E=Uo(o,Tn.current);qo(o,l),E=Am(null,o,h,i,E,l);var b=Cm();return o.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Un(h)?(b=!0,Uc(o)):b=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,ym(o),E.updater=td,o.stateNode=E,E._reactInternals=o,Im(o,h,i,l),o=Mm(null,o,h,!0,b,l)):(o.tag=0,Ct&&b&&um(o),Nn(null,o,E,l),o=o.child),o;case 16:h=o.elementType;e:{switch(rd(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=I7(h),i=Ar(h,i),E){case 0:o=Dm(null,o,h,i,l);break e;case 1:o=Zx(null,o,h,i,l);break e;case 11:o=Gx(null,o,h,i,l);break e;case 14:o=Xx(null,o,h,Ar(h.type,i),l);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),Dm(i,o,h,E,l);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),Zx(i,o,h,E,l);case 3:e:{if(e2(o),i===null)throw Error(n(387));h=o.pendingProps,b=o.memoizedState,E=b.element,mx(i,o),Gc(o,h,null,l);var x=o.memoizedState;if(h=x.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},o.updateQueue.baseState=b,o.memoizedState=b,o.flags&256){E=Wo(Error(n(423)),o),o=t2(i,o,h,l,E);break e}else if(h!==E){E=Wo(Error(n(424)),o),o=t2(i,o,h,l,E);break e}else for(Qn=Fi(o.stateNode.containerInfo.firstChild),Kn=o,Ct=!0,wr=null,l=hx(o,null,h,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(jo(),h===E){o=Ei(i,o,l);break e}Nn(i,o,h,l)}o=o.child}return o;case 5:return yx(o),i===null&&dm(o),h=o.type,E=o.pendingProps,b=i!==null?i.memoizedProps:null,x=E.children,nm(h,E)?x=null:b!==null&&nm(h,b)&&(o.flags|=32),Jx(i,o),Nn(i,o,x,l),o.child;case 6:return i===null&&dm(o),null;case 13:return n2(i,o,l);case 4:return bm(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=$o(o,null,h,l):Nn(i,o,h,l),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),Gx(i,o,h,E,l);case 7:return Nn(i,o,o.pendingProps,l),o.child;case 8:return Nn(i,o,o.pendingProps.children,l),o.child;case 12:return Nn(i,o,o.pendingProps.children,l),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,b=o.memoizedProps,x=E.value,Et(qc,h._currentValue),h._currentValue=x,b!==null)if(xr(b.value,x)){if(b.children===E.children&&!Bn.current){o=Ei(i,o,l);break e}}else for(b=o.child,b!==null&&(b.return=o);b!==null;){var R=b.dependencies;if(R!==null){x=b.child;for(var U=R.firstContext;U!==null;){if(U.context===h){if(b.tag===1){U=gi(-1,l&-l),U.tag=2;var ee=b.updateQueue;if(ee!==null){ee=ee.shared;var de=ee.pending;de===null?U.next=U:(U.next=de.next,de.next=U),ee.pending=U}}b.lanes|=l,U=b.alternate,U!==null&&(U.lanes|=l),gm(b.return,l,o),R.lanes|=l;break}U=U.next}}else if(b.tag===10)x=b.type===o.type?null:b.child;else if(b.tag===18){if(x=b.return,x===null)throw Error(n(341));x.lanes|=l,R=x.alternate,R!==null&&(R.lanes|=l),gm(x,l,o),x=b.sibling}else x=b.child;if(x!==null)x.return=b;else for(x=b;x!==null;){if(x===o){x=null;break}if(b=x.sibling,b!==null){b.return=x.return,x=b;break}x=x.return}b=x}Nn(i,o,E.children,l),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,qo(o,l),E=ur(E),h=h(E),o.flags|=1,Nn(i,o,h,l),o.child;case 14:return h=o.type,E=Ar(h,o.pendingProps),E=Ar(h.type,E),Xx(i,o,h,E,l);case 15:return Kx(i,o,o.type,o.pendingProps,l);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),rd(i,o),o.tag=1,Un(h)?(i=!0,Uc(o)):i=!1,qo(o,l),zx(o,h,E),Im(o,h,E,l),Mm(null,o,h,!0,i,l);case 19:return i2(i,o,l);case 22:return Qx(i,o,l)}throw Error(n(156,o.tag))};function N2(i,o){return aS(i,o)}function O7(i,o,l,h){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dr(i,o,l,h){return new O7(i,o,l,h)}function n0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function I7(i){if(typeof i=="function")return n0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===pe)return 11;if(i===ae)return 14}return 2}function Gi(i,o){var l=i.alternate;return l===null?(l=dr(i.tag,o,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=o,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,o=i.dependencies,l.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function pd(i,o,l,h,E,b){var x=2;if(h=i,typeof i=="function")n0(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case q:return Ms(l.children,E,b,o);case ne:x=8,E|=8;break;case ue:return i=dr(12,l,o,E|2),i.elementType=ue,i.lanes=b,i;case ve:return i=dr(13,l,o,E),i.elementType=ve,i.lanes=b,i;case re:return i=dr(19,l,o,E),i.elementType=re,i.lanes=b,i;case oe:return md(l,E,b,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case V:x=10;break e;case se:x=9;break e;case pe:x=11;break e;case ae:x=14;break e;case xe:x=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=dr(x,l,o,E),o.elementType=i,o.type=h,o.lanes=b,o}function Ms(i,o,l,h){return i=dr(7,i,h,o),i.lanes=l,i}function md(i,o,l,h){return i=dr(22,i,h,o),i.elementType=oe,i.lanes=l,i.stateNode={isHidden:!1},i}function r0(i,o,l){return i=dr(6,i,null,o),i.lanes=l,i}function i0(i,o,l){return o=dr(4,i.children!==null?i.children:[],i.key,o),o.lanes=l,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function R7(i,o,l,h,E){this.tag=o,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Op(0),this.expirationTimes=Op(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Op(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function s0(i,o,l,h,E,b,x,R,U){return i=new R7(i,o,l,R,U),o===1?(o=1,b===!0&&(o|=8)):o=0,b=dr(3,null,null,o),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},ym(b),i}function L7(i,o,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:h==null?null:""+h,children:i,containerInfo:o,implementation:l}}function k2(i){if(!i)return Ui;i=i._reactInternals;e:{if(ws(i)!==i||i.tag!==1)throw Error(n(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Un(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(Un(l))return rx(i,l,o)}return o}function P2(i,o,l,h,E,b,x,R,U){return i=s0(l,h,!0,i,E,b,x,R,U),i.context=k2(null),l=i.current,h=kn(),E=Yi(l),b=gi(h,E),b.callback=o!=null?o:null,ji(l,b,E),i.current.lanes=E,ou(i,E,h),jn(i,h),i}function gd(i,o,l,h){var E=o.current,b=kn(),x=Yi(E);return l=k2(l),o.context===null?o.context=l:o.pendingContext=l,o=gi(b,x),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=ji(E,o,x),i!==null&&(Nr(i,E,x,b),Wc(i,E,x)),x}function Ed(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function O2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<o?l:o}}function o0(i,o){O2(i,o),(i=i.alternate)&&O2(i,o)}function D7(){return null}var I2=typeof reportError=="function"?reportError:function(i){console.error(i)};function a0(i){this._internalRoot=i}yd.prototype.render=a0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));gd(i,o,null,null)},yd.prototype.unmount=a0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Rs(function(){gd(null,i,null,null)}),o[di]=null}};function yd(i){this._internalRoot=i}yd.prototype.unstable_scheduleHydration=function(i){if(i){var o=mS();i={blockedOn:null,target:i,priority:o};for(var l=0;l<Li.length&&o!==0&&o<Li[l].priority;l++);Li.splice(l,0,i),l===0&&yS(i)}};function u0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function bd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function R2(){}function M7(i,o,l,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var ee=Ed(x);b.call(ee)}}var x=P2(o,h,i,0,null,!1,!1,"",R2);return i._reactRootContainer=x,i[di]=x.current,Tu(i.nodeType===8?i.parentNode:i),Rs(),x}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var R=h;h=function(){var ee=Ed(U);R.call(ee)}}var U=s0(i,0,!1,null,null,!1,!1,"",R2);return i._reactRootContainer=U,i[di]=U.current,Tu(i.nodeType===8?i.parentNode:i),Rs(function(){gd(o,U,l,h)}),U}function Td(i,o,l,h,E){var b=l._reactRootContainer;if(b){var x=b;if(typeof E=="function"){var R=E;E=function(){var U=Ed(x);R.call(U)}}gd(o,x,i,E)}else x=M7(l,o,i,E,h);return Ed(x)}hS=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var l=su(o.pendingLanes);l!==0&&(Ip(o,l|1),jn(o,Mt()),(it&6)===0&&(Ko=Mt()+500,Hi()))}break;case 13:Rs(function(){var h=mi(i,1);if(h!==null){var E=kn();Nr(h,i,1,E)}}),o0(i,1)}},Rp=function(i){if(i.tag===13){var o=mi(i,134217728);if(o!==null){var l=kn();Nr(o,i,134217728,l)}o0(i,134217728)}},pS=function(i){if(i.tag===13){var o=Yi(i),l=mi(i,o);if(l!==null){var h=kn();Nr(l,i,o,h)}o0(i,o)}},mS=function(){return ct},gS=function(i,o){var l=ct;try{return ct=i,o()}finally{ct=l}},Ap=function(i,o,l){switch(o){case"input":if(Nt(i,l),o=l.name,l.type==="radio"&&o!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<l.length;o++){var h=l[o];if(h!==i&&h.form===i.form){var E=Fc(h);if(!E)throw Error(n(90));Dt(h),Nt(h,E)}}}break;case"textarea":rt(i,l);break;case"select":o=l.value,o!=null&&we(i,!!l.multiple,o,!1)}},eS=Zm,tS=Rs;var F7={usingClientEntryPoint:!1,Events:[xu,Fo,Fc,J_,Z_,Zm]},Fu={findFiberByHostInstance:As,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},B7={bundleType:Fu.bundleType,version:Fu.version,rendererPackageName:Fu.rendererPackageName,rendererConfig:Fu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:z.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=sS(i),i===null?null:i.stateNode},findFiberByHostInstance:Fu.findFiberByHostInstance||D7,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var _d=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_d.isDisabled&&_d.supportsFiber)try{yc=_d.inject(B7),Yr=_d}catch(i){}}return In.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=F7,In.createPortal=function(i,o){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u0(o))throw Error(n(200));return L7(i,o,null,l)},In.createRoot=function(i,o){if(!u0(i))throw Error(n(299));var l=!1,h="",E=I2;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=s0(i,1,!1,null,null,l,!1,h,E),i[di]=o.current,Tu(i.nodeType===8?i.parentNode:i),new a0(o)},In.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=sS(o),i=i===null?null:i.stateNode,i},In.flushSync=function(i){return Rs(i)},In.hydrate=function(i,o,l){if(!bd(o))throw Error(n(200));return Td(null,i,o,!0,l)},In.hydrateRoot=function(i,o,l){if(!u0(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,b="",x=I2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(b=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),o=P2(o,null,i,1,l!=null?l:null,E,!1,b,x),i[di]=o.current,Tu(i),h)for(i=0;i<h.length;i++)l=h[i],E=l._getVersion,E=E(l._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[l,E]:o.mutableSourceEagerHydrationData.push(l,E);return new yd(o)},In.render=function(i,o,l){if(!bd(o))throw Error(n(200));return Td(null,i,o,!1,l)},In.unmountComponentAtNode=function(i){if(!bd(i))throw Error(n(40));return i._reactRootContainer?(Rs(function(){Td(null,null,i,!1,function(){i._reactRootContainer=null,i[di]=null})}),!0):!1},In.unstable_batchedUpdates=Zm,In.unstable_renderSubtreeIntoContainer=function(i,o,l,h){if(!bd(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Td(i,o,l,!1,h)},In.version="18.3.1-next-f1338f8080-20240426",In}var w1;function A1(){if(w1)return wf.exports;w1=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(),wf.exports=CN(),wf.exports}var Qs=A1();function C1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=C1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function W(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=C1(e))&&(r&&(r+=" "),r+=t);return r}const vN=()=>document.querySelector(`input[name="${H}-user-input"]:not(:disabled)`),vf=()=>{var e;return(e=vN())!=null?e:document.querySelector(`.${H}-dialog-content, .${H}-modal-content`)},NN=()=>{var e;return(e=vf())==null?void 0:e.focus({preventScroll:!0})},Nf=()=>{const e=()=>{const n=document.querySelector(`.${H}-minimized-button:not([aria-hidden="true"])`);return n==null||n.focus({preventScroll:!0}),!!n};if(e())return;const t=new MutationObserver(()=>{e()&&t.disconnect()});t.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>t.disconnect(),1e3)};var v1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},N1=Qi.createContext&&Qi.createContext(v1),kN=["attr","size","title"];function PN(e,t){if(e==null)return{};var n=ON(e,t),r,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ON(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function hl(){return hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hl.apply(this,arguments)}function k1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function pl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k1(Object(n),!0).forEach(function(r){IN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IN(e,t,n){return t=RN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RN(e){var t=LN(e,"string");return typeof t=="symbol"?t:t+""}function LN(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 P1(e){return e&&e.map((t,n)=>Qi.createElement(t.tag,pl({key:n},t.attr),P1(t.child)))}function _t(e){return t=>Qi.createElement(DN,hl({attr:pl({},e.attr)},t),P1(e.child))}function DN(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=PN(e,kN),c=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Qi.createElement("svg",hl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:pl(pl({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&Qi.createElement("title",null,a),e.children)};return N1!==void 0?Qi.createElement(N1.Consumer,null,n=>t(n)):t(v1)}function MN(e){return _t({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 ii=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:S.jsx("button",{className:W(e,`${H}-icon-button`),type:r,"aria-label":s,title:a,onClick:c,disabled:u,children:t?S.jsx("img",{className:W(`${H}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),FN="data:image/svg+xml,%3csvg%20width='140'%20height='137'%20viewBox='0%200%20140%20137'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M140%2034.5C140%2040.8513%20135.075%2046%20129%2046C122.925%2046%20118%2040.8513%20118%2034.5C118%2028.1487%20122.925%2023%20129%2023C135.075%2023%20140%2028.1487%20140%2034.5Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%2011.3028C85%205.06042%2090.1487%200%2096.5%200C102.851%200%20108%205.06042%20108%2011.3028V21.6972C108%2027.9396%20102.851%2033%2096.5%2033C90.1487%2033%2085%2027.9396%2085%2021.6972V11.3028Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%2030.0986C36.9601%2025.6719%2036.9601%2018.4948%2041.3868%2014.0682C45.8134%209.64151%2052.9905%209.6415%2057.4172%2014.0682L71.3628%2028.0138C75.7894%2032.4404%2075.7894%2039.6175%2071.3628%2044.0442C66.9361%2048.4708%2059.759%2048.4708%2055.3324%2044.0442L41.3868%2030.0986Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M140%20101C140%2094.9249%20135.075%2090%20129%2090C122.925%2090%20118%2094.9249%20118%20101C118%20107.075%20122.925%20112%20129%20112C135.075%20112%20140%20107.075%20140%20101Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%20125.697C85%20131.94%2090.1487%20137%2096.5%20137C102.851%20137%20108%20131.94%20108%20125.697V115.303C108%20109.06%20102.851%20104%2096.5%20104C90.1487%20104%2085%20109.06%2085%20115.303V125.697Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%20106.932C36.9601%20111.359%2036.9601%20118.536%2041.3868%20122.963C45.8134%20127.389%2052.9905%20127.39%2057.4172%20122.963L71.3628%20109.017C75.7894%20104.591%2075.7894%2097.4135%2071.3628%2092.9868C66.9361%2088.5602%2059.759%2088.5602%2055.3324%2092.9868L41.3868%20106.932Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M11.259%2080C5.04084%2080%200%2074.8513%200%2068.5C0%2062.1487%205.04084%2057%2011.259%2057H49.741C55.9592%2057%2061%2062.1487%2061%2068.5C61%2074.8513%2055.9592%2080%2049.741%2080H11.259Z'%20fill='%23F3F2EB'/%3e%3c/svg%3e",BN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,launcherAriaLabel:r,mode:s}=tt(),a=s==="messaging",c=r||(a?"Open Commerce Client":"Open Copilot"),d=a?S.jsx(MN,{className:W(t,`${H}-minimized-icon`)}):S.jsx("img",{src:(n==null?void 0:n.logoUrl)||FN,alt:"Copilot",className:W(t,`${H}-minimized-icon-img`)});return S.jsx(ii,{className:W(t,`${H}-minimized-button`),ariaLabel:c,title:c,icon:d,onClick:e})},UN=()=>{const{globalClassName:e,themeVariables:t}=tt(),n=()=>{ma(!1),ni(!0),setTimeout(NN)};return Qs.createPortal(S.jsx("div",{className:W(e,`${H}-minimized-container`),style:t,children:S.jsx(BN,{onClick:n})}),document.body)};function O1(e){return _t({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"},child:[]}]})(e)}function I1(e){return _t({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 Js(e){return _t({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 HN(e){return _t({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},child:[]}]})(e)}function R1(e){return _t({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 zN(e){return _t({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 jN(e){return _t({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 $N(e){return _t({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 VN(e){return _t({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 qN(e){return _t({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M18.59 10.52c1.05.51 2.04 1.15 2.96 1.91l-1.07 1.07c-.58-.47-1.21-.89-1.88-1.27v-1.71m-13.2 0v1.7c-.65.37-1.28.79-1.87 1.27l-1.07-1.07c.91-.75 1.9-1.38 2.94-1.9M12 7C7.46 7 3.34 8.78.29 11.67c-.18.18-.29.43-.29.71s.11.53.29.7l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.1.7-.28.79-.73 1.68-1.36 2.66-1.85.33-.16.56-.51.56-.9v-3.1C8.85 9.25 10.4 9 12 9s3.15.25 4.59.73v3.1c0 .4.23.74.56.9.98.49 1.88 1.11 2.67 1.85.18.17.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.11-.53-.29-.71A16.971 16.971 0 0 0 12 7z"},child:[]}]})(e)}function YN(e){return _t({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m14.12 4 1.83 2H20v12H4V6h4.05l1.83-2h4.24M15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm-3 7c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5z"},child:[]}]})(e)}const WN=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"}),L1=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>S.jsx("button",{"aria-label":t,title:t,className:W(e,`${H}-close-button`),disabled:r,onClick:n,type:"button",children:S.jsx("svg",{"aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:S.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),ml=({className:e,children:t,type:n,disabled:r=!1,onClick:s,"aria-label":a})=>S.jsx("button",{"aria-label":a,className:W(`${H}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),GN=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?S.jsx("img",{className:W(`${H}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):S.jsx(Js,{size:"16px"})},XN=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return S.jsx(ii,{className:W(e,n,`cim-${r}-component`,`${H}-search-button-icon`),type:"submit",disabled:s,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:S.jsx(Js,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return S.jsxs(ml,{className:W(e,n,`cim-${r}-component`,`${H}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&S.jsx(GN,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function KN(e){return _t({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 9h8"},child:[]},{tag:"path",attr:{d:"M8 13h6"},child:[]},{tag:"path",attr:{d:"M13 18l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6"},child:[]},{tag:"path",attr:{d:"M17 17v5"},child:[]},{tag:"path",attr:{d:"M21 17v5"},child:[]}]})(e)}const QN=()=>{const{messages:e}=Vn(),{handleCancel:t}=Ir();return{cancelRequest:F.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],s=r.eventSourceId||r.id;t(s)},[t,e])}},JN=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=tt(),{cancelRequest:r}=QN();return n!=null&&n.enableCancelSearch?S.jsx(ii,{className:W(t,`${H}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:S.jsx(KN,{}),disabled:!e,onClick:r}):null};function bU(){}function TU(){}function D1(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(s,r).trim();(u||!a)&&t.push(u),s=r+1,r=n.indexOf(",",s)}return t}function M1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ZN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ek=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tk={};function F1(e,t){return(tk.jsx?ek:ZN).test(e)}const nk=/[ \t\n\f\r]/g;function rk(e){return typeof e=="object"?e.type==="text"?B1(e.value):!1:B1(e)}function B1(e){return e.replace(nk,"")===""}class ba{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ba.prototype.normal={},ba.prototype.property={},ba.prototype.space=void 0;function U1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new ba(n,r,t)}function Ta(e){return e.toLowerCase()}class Rn{constructor(t,n){this.attribute=n,this.property=t}}Rn.prototype.attribute="",Rn.prototype.booleanish=!1,Rn.prototype.boolean=!1,Rn.prototype.commaOrSpaceSeparated=!1,Rn.prototype.commaSeparated=!1,Rn.prototype.defined=!1,Rn.prototype.mustUseProperty=!1,Rn.prototype.number=!1,Rn.prototype.overloadedBoolean=!1,Rn.prototype.property="",Rn.prototype.spaceSeparated=!1,Rn.prototype.space=void 0;let ik=0;const We=os(),Ht=os(),kf=os(),Ee=os(),ft=os(),ss=os(),qn=os();function os(){return Bu(2,++ik)}const Pf=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:Ht,commaOrSpaceSeparated:qn,commaSeparated:ss,number:Ee,overloadedBoolean:kf,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),Of=Object.keys(Pf);class If extends Rn{constructor(t,n,r,s){let a=-1;if(super(t,n),H1(this,"space",s),typeof r=="number")for(;++a<Of.length;){const u=Of[a];H1(this,Of[a],(r&Pf[u])===Pf[u])}}}If.prototype.defined=!0;function H1(e,t,n){n&&(e[t]=n)}function Zs(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new If(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Ta(r)]=r,n[Ta(a.attribute)]=r}return new ba(t,n,e.space)}const z1=Zs({properties:{ariaActiveDescendant:null,ariaAtomic:Ht,ariaAutoComplete:null,ariaBusy:Ht,ariaChecked:Ht,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:ft,ariaCurrent:null,ariaDescribedBy:ft,ariaDetails:null,ariaDisabled:Ht,ariaDropEffect:ft,ariaErrorMessage:null,ariaExpanded:Ht,ariaFlowTo:ft,ariaGrabbed:Ht,ariaHasPopup:null,ariaHidden:Ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ft,ariaLevel:Ee,ariaLive:null,ariaModal:Ht,ariaMultiLine:Ht,ariaMultiSelectable:Ht,ariaOrientation:null,ariaOwns:ft,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:Ht,ariaReadOnly:Ht,ariaRelevant:null,ariaRequired:Ht,ariaRoleDescription:ft,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:Ht,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function j1(e,t){return t in e?e[t]:t}function $1(e,t){return j1(e,t.toLowerCase())}const sk=Zs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ss,acceptCharset:ft,accessKey:ft,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alpha:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:ft,autoFocus:We,autoPlay:We,blocking:ft,capture:null,charSet:null,checked:We,cite:null,className:ft,closedBy:null,colorSpace:null,cols:Ee,colSpan:Ee,command:null,commandFor:null,content:null,contentEditable:Ht,controls:We,controlsList:ft,coords:Ee|ss,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:kf,draggable:Ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:ft,height:Ee,hidden:kf,high:Ee,href:null,hrefLang:null,htmlFor:ft,httpEquiv:ft,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:ft,itemRef:ft,itemScope:We,itemType:ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:We,optimum:Ee,pattern:null,ping:ft,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:ft,required:We,reversed:We,rows:Ee,rowSpan:Ee,sandbox:ft,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootCustomElementRegistry:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shadowRootSerializable:We,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:Ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:Ht,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ft,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:Ht,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:We,disablePictureInPicture:We,disableRemotePlayback:We,exportParts:ss,part:ft,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:$1}),ok=Zs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:qn,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:ft,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ss,g2:ss,glyphName:ss,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:qn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qn,rev:qn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qn,requiredFeatures:qn,requiredFonts:qn,requiredFormats:qn,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:qn,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:qn,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:qn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:j1}),V1=Zs({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()}}),q1=Zs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:$1}),Y1=Zs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ak={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"},uk=/[A-Z]/g,W1=/-[a-z]/g,lk=/^data[-\w.:]+$/i;function gl(e,t){const n=Ta(t);let r=t,s=Rn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&lk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(W1,dk);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!W1.test(a)){let u=a.replace(uk,ck);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=If}return new s(r,t)}function ck(e){return"-"+e.toLowerCase()}function dk(e){return e.charAt(1).toUpperCase()}const _a=U1([z1,sk,V1,q1,Y1],"html"),_i=U1([z1,ok,V1,q1,Y1],"svg");function G1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function X1(e){return e.join(" ").trim()}var eo={},Rf,K1;function fk(){if(K1)return Rf;K1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
18
+ `,f="/",p="*",m="",T="comment",y="declaration";function _(v,A){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];A=A||{};var k=1,C=1;function z(re){var ae=re.match(t);ae&&(k+=ae.length);var xe=re.lastIndexOf(d);C=~xe?re.length-xe:C+re.length}function Y(){var re={line:k,column:C};return function(ae){return ae.position=new D(re),ue(),ae}}function D(re){this.start=re,this.end={line:k,column:C},this.source=A.source}D.prototype.content=v;function q(re){var ae=new Error(A.source+":"+k+":"+C+": "+re);if(ae.reason=re,ae.filename=A.source,ae.line=k,ae.column=C,ae.source=v,!A.silent)throw ae}function ne(re){var ae=re.exec(v);if(ae){var xe=ae[0];return z(xe),v=v.slice(xe.length),ae}}function ue(){ne(n)}function V(re){var ae;for(re=re||[];ae=se();)ae!==!1&&re.push(ae);return re}function se(){var re=Y();if(!(f!=v.charAt(0)||p!=v.charAt(1))){for(var ae=2;m!=v.charAt(ae)&&(p!=v.charAt(ae)||f!=v.charAt(ae+1));)++ae;if(ae+=2,m===v.charAt(ae-1))return q("End of comment missing");var xe=v.slice(2,ae-2);return C+=2,z(xe),v=v.slice(ae),C+=2,re({type:T,comment:xe})}}function pe(){var re=Y(),ae=ne(r);if(ae){if(se(),!ne(s))return q("property missing ':'");var xe=ne(a),oe=re({type:y,property:w(ae[0].replace(e,m)),value:xe?w(xe[0].replace(e,m)):m});return ne(u),oe}}function ve(){var re=[];V(re);for(var ae;ae=pe();)ae!==!1&&(re.push(ae),V(re));return re}return ue(),ve()}function w(v){return v?v.replace(c,m):m}return Rf=_,Rf}var Q1;function hk(){if(Q1)return eo;Q1=1;var e=eo&&eo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(eo,"__esModule",{value:!0}),eo.default=n;const t=e(fk());function n(r,s){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),c=typeof s=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;c?s(f,p,d):p&&(a=a||{},a[f]=p)}),a}return eo}var Sa={},J1;function pk(){if(J1)return Sa;J1=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,p){return p.toUpperCase()},c=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(s,c):f=f.replace(r,c),f.replace(t,u))};return Sa.camelCase=d,Sa}var xa,Z1;function mk(){if(Z1)return xa;Z1=1;var e=xa&&xa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(hk()),n=pk();function r(s,a){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,xa=r,xa}var gk=mk();const Ek=Qe(gk),El=eE("end"),Rr=eE("start");function eE(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 tE(e){const t=Rr(e),n=El(e);if(t&&n)return{start:t,end:n}}function wa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?nE(e.position):"start"in e||"end"in e?nE(e):"line"in e||"column"in e?Lf(e):""}function Lf(e){return rE(e&&e.line)+":"+rE(e&&e.column)}function nE(e){return Lf(e&&e.start)+"-"+Lf(e&&e.end)}function rE(e){return e&&typeof e=="number"?e:1}class gn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=B({},n)),typeof t=="string"?s=t:!a.cause&&t&&(u=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=c?c.line:void 0,this.name=wa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}gn.prototype.file="",gn.prototype.name="",gn.prototype.reason="",gn.prototype.message="",gn.prototype.stack="",gn.prototype.column=void 0,gn.prototype.line=void 0,gn.prototype.ancestors=void 0,gn.prototype.cause=void 0,gn.prototype.fatal=void 0,gn.prototype.place=void 0,gn.prototype.ruleId=void 0,gn.prototype.source=void 0;const Df={}.hasOwnProperty,yk=new Map,bk=/[A-Z]/g,Tk=new Set(["table","tbody","thead","tfoot","tr"]),_k=new Set(["td","th"]),iE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Sk(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Pk(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=kk(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?_i:_a,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=sE(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function sE(e,t,n){if(t.type==="element")return xk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return wk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Ck(e,t,n);if(t.type==="mdxjsEsm")return Ak(e,t);if(t.type==="root")return vk(e,t,n);if(t.type==="text")return Nk(e,t)}function xk(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=_i,e.schema=s),e.ancestors.push(t);const a=aE(e,t.tagName,!1),u=Ok(e,t);let c=Ff(e,t);return Tk.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!rk(d):!0})),oE(e,u,a,t),Mf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function wk(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)}Aa(e,t.position)}function Ak(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Aa(e,t.position)}function Ck(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=_i,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:aE(e,t.name,!0),u=Ik(e,t),c=Ff(e,t);return oE(e,u,a,t),Mf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function vk(e,t,n){const r={};return Mf(r,Ff(e,t)),e.create(t,e.Fragment,r,n)}function Nk(e,t){return t.value}function oE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Mf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function kk(e,t,n){return r;function r(s,a,u,c){const f=Array.isArray(u.children)?n:t;return c?f(a,u,c):f(a,u)}}function Pk(e,t){return n;function n(r,s,a,u){const c=Array.isArray(a.children),d=Rr(r);return t(s,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function Ok(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Df.call(t.properties,s)){const a=Rk(e,s,t.properties[s]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&_k.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 Ik(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 Aa(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Aa(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Ff(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:yk;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=s.get(d)||0;u=d+"-"+f,s.set(d,f+1)}}const c=sE(e,a,u);c!==void 0&&n.push(c)}return n}function Rk(e,t,n){const r=gl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?M1(n):X1(n)),r.property==="style"){let s=typeof n=="object"?n:Lk(e,String(n));return e.stylePropertyNameCase==="css"&&(s=Dk(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?ak[r.property]||r.property:r.attribute,n]}}function Lk(e,t){try{return Ek(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new gn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=iE+"#cannot-parse-style-attribute",s}}function aE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,u;for(;++a<s.length;){const c=F1(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=F1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Df.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Aa(e)}function Aa(e,t){const n=new gn("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=iE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Dk(e){const t={};let n;for(n in e)Df.call(e,n)&&(t[Mk(n)]=e[n]);return t}function Mk(e){let t=e.replace(bk,Fk);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Fk(e){return"-"+e.toLowerCase()}const Bf={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"]},Bk={};function Uf(e,t){const n=Bk,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return uE(e,r,s)}function uE(e,t,n){if(Uk(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return lE(e.children,t,n)}return Array.isArray(e)?lE(e,t,n):""}function lE(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=uE(e[s],t,n);return r.join("")}function Uk(e){return!!(e&&typeof e=="object")}const cE=document.createElement("i");function Hf(e){const t="&"+e+";";cE.innerHTML=t;const n=cE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Yn(e,t,n,r){const s=e.length;let a=0,u;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function nr(e,t){return e.length>0?(Yn(e,e.length,0,t),e):t}const dE={}.hasOwnProperty;function fE(e){const t={};let n=-1;for(;++n<e.length;)Hk(t,e[n]);return t}function Hk(e,t){let n;for(n in t){const s=(dE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){dE.call(s,u)||(s[u]=[]);const c=a[u];zk(s[u],Array.isArray(c)?c:c?[c]:[])}}}function zk(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Yn(e,0,0,r)}function hE(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function gr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Cn=Si(/[A-Za-z]/),En=Si(/[\dA-Za-z]/),jk=Si(/[#-'*+\--9=?A-Z^-~]/);function yl(e){return e!==null&&(e<32||e===127)}const zf=Si(/\d/),$k=Si(/[\dA-Fa-f]/),Vk=Si(/[!-/:-@[-`{-~]/);function Ue(e){return e!==null&&e<-2}function ht(e){return e!==null&&(e<0||e===32)}function Ze(e){return e===-2||e===-1||e===32}const bl=Si(new RegExp("\\p{P}|\\p{S}","u")),as=Si(/\s/);function Si(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function to(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&En(e.charCodeAt(n+1))&&En(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),s=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function nt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ze(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ze(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const qk={tokenize:Yk};function Yk(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),nt(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Ue(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const Wk={tokenize:Gk},pE={tokenize:Xk};function Gk(e){const t=this,n=[];let r=0,s,a,u;return c;function c(C){if(r<n.length){const z=n[r];return t.containerState=z[1],e.attempt(z[0].continuation,d,f)(C)}return f(C)}function d(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&k();const z=t.events.length;let Y=z,D;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){D=t.events[Y][1].end;break}A(r);let q=z;for(;q<t.events.length;)t.events[q][1].end=B({},D),q++;return Yn(t.events,Y+1,0,t.events.slice(z)),t.events.length=q,f(C)}return c(C)}function f(C){if(r===n.length){if(!s)return T(C);if(s.currentConstruct&&s.currentConstruct.concrete)return _(C);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(pE,p,m)(C)}function p(C){return s&&k(),A(r),T(C)}function m(C){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(C)}function T(C){return t.containerState={},e.attempt(pE,y,_)(C)}function y(C){return r++,n.push([t.currentConstruct,t.containerState]),T(C)}function _(C){if(C===null){s&&k(),A(0),e.consume(C);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),w(C)}function w(C){if(C===null){v(e.exit("chunkFlow"),!0),A(0),e.consume(C);return}return Ue(C)?(e.consume(C),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(C),w)}function v(C,z){const Y=t.sliceStream(C);if(z&&Y.push(null),C.previous=a,a&&(a.next=C),a=C,s.defineSkip(C.start),s.write(Y),t.parser.lazy[C.start.line]){let D=s.events.length;for(;D--;)if(s.events[D][1].start.offset<u&&(!s.events[D][1].end||s.events[D][1].end.offset>u))return;const q=t.events.length;let ne=q,ue,V;for(;ne--;)if(t.events[ne][0]==="exit"&&t.events[ne][1].type==="chunkFlow"){if(ue){V=t.events[ne][1].end;break}ue=!0}for(A(r),D=q;D<t.events.length;)t.events[D][1].end=B({},V),D++;Yn(t.events,ne+1,0,t.events.slice(q)),t.events.length=D}}function A(C){let z=n.length;for(;z-- >C;){const Y=n[z];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=C}function k(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function Xk(e,t,n){return nt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function no(e){if(e===null||ht(e)||as(e))return 1;if(bl(e))return 2}function Tl(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const jf={name:"attention",resolveAll:Kk,tokenize:Qk};function Kk(e,t){let n=-1,r,s,a,u,c,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=B({},e[r][1].end),T=B({},e[n][1].start);mE(m,-d),mE(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,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)},s={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),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=nr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=nr(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=nr(f,Tl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=nr(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=nr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Yn(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Qk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=no(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const f=e.exit("attentionSequence"),p=no(d),m=!p||p===2&&s||n.includes(d),T=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(s||!T)),f._close=!!(a===42?T:T&&(p||!m)),t(d)}}function mE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Jk={name:"autolink",tokenize:Zk};function Zk(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return Cn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||En(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||En(y))&&r++<32?(e.consume(y),c):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||yl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):jk(y)?(e.consume(y),f):n(y)}function p(y){return En(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):T(y)}function T(y){if((y===45||En(y))&&r++<63){const _=y===45?T:m;return e.consume(y),_}return n(y)}}const Ca={partial:!0,tokenize:eP};function eP(e,t,n){return r;function r(a){return Ze(a)?nt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Ue(a)?t(a):n(a)}}const gE={continuation:{tokenize:nP},exit:rP,name:"blockQuote",tokenize:tP};function tP(e,t,n){const r=this;return s;function s(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ze(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function nP(e,t,n){const r=this;return s;function s(u){return Ze(u)?nt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(gE,t,n)(u)}}function rP(e){e.exit("blockQuote")}const EE={name:"characterEscape",tokenize:iP};function iP(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return Vk(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const yE={name:"characterReference",tokenize:sP};function sP(e,t,n){const r=this;let s=0,a,u;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=En,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=$k,p):(e.enter("characterReferenceValue"),a=7,u=zf,p(m))}function p(m){if(m===59&&s){const T=e.exit("characterReferenceValue");return u===En&&!Hf(r.sliceSerialize(T))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&s++<a?(e.consume(m),p):n(m)}}const bE={partial:!0,tokenize:aP},TE={concrete:!0,name:"codeFenced",tokenize:oP};function oP(e,t,n){const r=this,s={partial:!0,tokenize:Y};let a=0,u=0,c;return d;function d(D){return f(D)}function f(D){const q=r.events[r.events.length-1];return a=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,c=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(D)}function p(D){return D===c?(u++,e.consume(D),p):u<3?n(D):(e.exit("codeFencedFenceSequence"),Ze(D)?nt(e,m,"whitespace")(D):m(D))}function m(D){return D===null||Ue(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(bE,w,z)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(D))}function T(D){return D===null||Ue(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(D)):Ze(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),nt(e,y,"whitespace")(D)):D===96&&D===c?n(D):(e.consume(D),T)}function y(D){return D===null||Ue(D)?m(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(D))}function _(D){return D===null||Ue(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(D)):D===96&&D===c?n(D):(e.consume(D),_)}function w(D){return e.attempt(s,z,v)(D)}function v(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),A}function A(D){return a>0&&Ze(D)?nt(e,k,"linePrefix",a+1)(D):k(D)}function k(D){return D===null||Ue(D)?e.check(bE,w,z)(D):(e.enter("codeFlowValue"),C(D))}function C(D){return D===null||Ue(D)?(e.exit("codeFlowValue"),k(D)):(e.consume(D),C)}function z(D){return e.exit("codeFenced"),t(D)}function Y(D,q,ne){let ue=0;return V;function V(ae){return D.enter("lineEnding"),D.consume(ae),D.exit("lineEnding"),se}function se(ae){return D.enter("codeFencedFence"),Ze(ae)?nt(D,pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ae):pe(ae)}function pe(ae){return ae===c?(D.enter("codeFencedFenceSequence"),ve(ae)):ne(ae)}function ve(ae){return ae===c?(ue++,D.consume(ae),ve):ue>=u?(D.exit("codeFencedFenceSequence"),Ze(ae)?nt(D,re,"whitespace")(ae):re(ae)):ne(ae)}function re(ae){return ae===null||Ue(ae)?(D.exit("codeFencedFence"),q(ae)):ne(ae)}}}function aP(e,t,n){const r=this;return s;function s(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const $f={name:"codeIndented",tokenize:lP},uP={partial:!0,tokenize:cP};function lP(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),nt(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):Ue(f)?e.attempt(uP,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||Ue(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function cP(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):Ue(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):nt(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Ue(u)?s(u):n(u)}}const dP={name:"codeText",previous:hP,resolve:fP,tokenize:pP};function fP(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function hP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function pP(e,t,n){let r=0,s,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,p(m)):Ue(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||Ue(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),s++,p):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class mP{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&va(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),va(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),va(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);va(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);va(this.left,n.reverse())}}}function va(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 _E(e){const t={};let n=-1,r,s,a,u,c,d,f;const p=new mP(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,gP(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(r[1].end=B({},p.get(s)[1].start),c=p.slice(s,n),c.unshift(r),p.splice(s,n-s+1,c))}}return Yn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function gP(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],f={};let p,m,T=-1,y=n,_=0,w=0;const v=[w];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++T<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&&(w=T+1,v.push(w),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):v.pop(),T=v.length;T--;){const A=c.slice(v[T],v[T+1]),k=a.pop();d.push([k,k+A.length-1]),e.splice(k,2,A)}for(d.reverse(),T=-1;++T<d.length;)f[_+d[T][0]]=_+d[T][1],_+=d[T][1]-d[T][0]-1;return f}const EP={resolve:bP,tokenize:TP},yP={partial:!0,tokenize:_P};function bP(e){return _E(e),e}function TP(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?a(c):Ue(c)?e.check(yP,u,a)(c):(e.consume(c),s)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function _P(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),nt(e,a,"linePrefix")}function a(u){if(u===null||Ue(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 SE(e,t,n,r,s,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(A){return A===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(A),e.exit(a),T):A===null||A===32||A===41||yl(A)?n(A):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),w(A))}function T(A){return A===62?(e.enter(a),e.consume(A),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(A))}function y(A){return A===62?(e.exit("chunkString"),e.exit(c),T(A)):A===null||A===60||Ue(A)?n(A):(e.consume(A),A===92?_:y)}function _(A){return A===60||A===62||A===92?(e.consume(A),y):y(A)}function w(A){return!p&&(A===null||A===41||ht(A))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(A)):p<f&&A===40?(e.consume(A),p++,w):A===41?(e.consume(A),p--,w):A===null||A===32||A===40||yl(A)?n(A):(e.consume(A),A===92?v:w)}function v(A){return A===40||A===41||A===92?(e.consume(A),w):w(A)}}function xE(e,t,n,r,s,a){const u=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):Ue(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||Ue(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ze(y)),y===92?T:m)}function T(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function wE(e,t,n,r,s,a){let u;return c;function c(T){return T===34||T===39||T===40?(e.enter(r),e.enter(s),e.consume(T),e.exit(s),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(s),e.consume(T),e.exit(s),e.exit(r),t):(e.enter(a),f(T))}function f(T){return T===u?(e.exit(a),d(u)):T===null?n(T):Ue(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),nt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||Ue(T)?(e.exit("chunkString"),f(T)):(e.consume(T),T===92?m:p)}function m(T){return T===u||T===92?(e.consume(T),p):p(T)}}function Na(e,t){let n;return r;function r(s){return Ue(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Ze(s)?nt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const SP={name:"definition",tokenize:wP},xP={partial:!0,tokenize:AP};function wP(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return xE.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=gr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return ht(y)?Na(e,f)(y):f(y)}function f(y){return SE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(xP,m,m)(y)}function m(y){return Ze(y)?nt(e,T,"whitespace")(y):T(y)}function T(y){return y===null||Ue(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function AP(e,t,n){return r;function r(c){return ht(c)?Na(e,s)(c):n(c)}function s(c){return wE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ze(c)?nt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Ue(c)?t(c):n(c)}}const CP={name:"hardBreakEscape",tokenize:vP};function vP(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return Ue(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const NP={name:"headingAtx",resolve:kP,tokenize:PP};function kP(e,t){let n=e.length-2,r=3,s,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Yn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function PP(e,t,n){let r=0;return s;function s(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||ht(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Ue(p)?(e.exit("atxHeading"),t(p)):Ze(p)?nt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||ht(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const OP=["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"],AE=["pre","script","style","textarea"],IP={concrete:!0,name:"htmlFlow",resolveTo:DP,tokenize:MP},RP={partial:!0,tokenize:BP},LP={partial:!0,tokenize:FP};function DP(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 MP(e,t,n){const r=this;let s,a,u,c,d;return f;function f(I){return p(I)}function p(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),m}function m(I){return I===33?(e.consume(I),T):I===47?(e.consume(I),a=!0,w):I===63?(e.consume(I),s=3,r.interrupt?t:N):Cn(I)?(e.consume(I),u=String.fromCharCode(I),v):n(I)}function T(I){return I===45?(e.consume(I),s=2,y):I===91?(e.consume(I),s=5,c=0,_):Cn(I)?(e.consume(I),s=4,r.interrupt?t:N):n(I)}function y(I){return I===45?(e.consume(I),r.interrupt?t:N):n(I)}function _(I){const Te="CDATA[";return I===Te.charCodeAt(c++)?(e.consume(I),c===Te.length?r.interrupt?t:pe:_):n(I)}function w(I){return Cn(I)?(e.consume(I),u=String.fromCharCode(I),v):n(I)}function v(I){if(I===null||I===47||I===62||ht(I)){const Te=I===47,He=u.toLowerCase();return!Te&&!a&&AE.includes(He)?(s=1,r.interrupt?t(I):pe(I)):OP.includes(u.toLowerCase())?(s=6,Te?(e.consume(I),A):r.interrupt?t(I):pe(I)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):a?k(I):C(I))}return I===45||En(I)?(e.consume(I),u+=String.fromCharCode(I),v):n(I)}function A(I){return I===62?(e.consume(I),r.interrupt?t:pe):n(I)}function k(I){return Ze(I)?(e.consume(I),k):V(I)}function C(I){return I===47?(e.consume(I),V):I===58||I===95||Cn(I)?(e.consume(I),z):Ze(I)?(e.consume(I),C):V(I)}function z(I){return I===45||I===46||I===58||I===95||En(I)?(e.consume(I),z):Y(I)}function Y(I){return I===61?(e.consume(I),D):Ze(I)?(e.consume(I),Y):C(I)}function D(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),d=I,q):Ze(I)?(e.consume(I),D):ne(I)}function q(I){return I===d?(e.consume(I),d=null,ue):I===null||Ue(I)?n(I):(e.consume(I),q)}function ne(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||ht(I)?Y(I):(e.consume(I),ne)}function ue(I){return I===47||I===62||Ze(I)?C(I):n(I)}function V(I){return I===62?(e.consume(I),se):n(I)}function se(I){return I===null||Ue(I)?pe(I):Ze(I)?(e.consume(I),se):n(I)}function pe(I){return I===45&&s===2?(e.consume(I),xe):I===60&&s===1?(e.consume(I),oe):I===62&&s===4?(e.consume(I),L):I===63&&s===3?(e.consume(I),N):I===93&&s===5?(e.consume(I),ie):Ue(I)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(RP,J,ve)(I)):I===null||Ue(I)?(e.exit("htmlFlowData"),ve(I)):(e.consume(I),pe)}function ve(I){return e.check(LP,re,J)(I)}function re(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),ae}function ae(I){return I===null||Ue(I)?ve(I):(e.enter("htmlFlowData"),pe(I))}function xe(I){return I===45?(e.consume(I),N):pe(I)}function oe(I){return I===47?(e.consume(I),u="",Q):pe(I)}function Q(I){if(I===62){const Te=u.toLowerCase();return AE.includes(Te)?(e.consume(I),L):pe(I)}return Cn(I)&&u.length<8?(e.consume(I),u+=String.fromCharCode(I),Q):pe(I)}function ie(I){return I===93?(e.consume(I),N):pe(I)}function N(I){return I===62?(e.consume(I),L):I===45&&s===2?(e.consume(I),N):pe(I)}function L(I){return I===null||Ue(I)?(e.exit("htmlFlowData"),J(I)):(e.consume(I),L)}function J(I){return e.exit("htmlFlow"),t(I)}}function FP(e,t,n){const r=this;return s;function s(u){return Ue(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 BP(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Ca,t,n)}}const UP={name:"htmlText",tokenize:HP};function HP(e,t,n){const r=this;let s,a,u;return c;function c(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),d}function d(N){return N===33?(e.consume(N),f):N===47?(e.consume(N),Y):N===63?(e.consume(N),C):Cn(N)?(e.consume(N),ne):n(N)}function f(N){return N===45?(e.consume(N),p):N===91?(e.consume(N),a=0,_):Cn(N)?(e.consume(N),k):n(N)}function p(N){return N===45?(e.consume(N),y):n(N)}function m(N){return N===null?n(N):N===45?(e.consume(N),T):Ue(N)?(u=m,oe(N)):(e.consume(N),m)}function T(N){return N===45?(e.consume(N),y):m(N)}function y(N){return N===62?xe(N):N===45?T(N):m(N)}function _(N){const L="CDATA[";return N===L.charCodeAt(a++)?(e.consume(N),a===L.length?w:_):n(N)}function w(N){return N===null?n(N):N===93?(e.consume(N),v):Ue(N)?(u=w,oe(N)):(e.consume(N),w)}function v(N){return N===93?(e.consume(N),A):w(N)}function A(N){return N===62?xe(N):N===93?(e.consume(N),A):w(N)}function k(N){return N===null||N===62?xe(N):Ue(N)?(u=k,oe(N)):(e.consume(N),k)}function C(N){return N===null?n(N):N===63?(e.consume(N),z):Ue(N)?(u=C,oe(N)):(e.consume(N),C)}function z(N){return N===62?xe(N):C(N)}function Y(N){return Cn(N)?(e.consume(N),D):n(N)}function D(N){return N===45||En(N)?(e.consume(N),D):q(N)}function q(N){return Ue(N)?(u=q,oe(N)):Ze(N)?(e.consume(N),q):xe(N)}function ne(N){return N===45||En(N)?(e.consume(N),ne):N===47||N===62||ht(N)?ue(N):n(N)}function ue(N){return N===47?(e.consume(N),xe):N===58||N===95||Cn(N)?(e.consume(N),V):Ue(N)?(u=ue,oe(N)):Ze(N)?(e.consume(N),ue):xe(N)}function V(N){return N===45||N===46||N===58||N===95||En(N)?(e.consume(N),V):se(N)}function se(N){return N===61?(e.consume(N),pe):Ue(N)?(u=se,oe(N)):Ze(N)?(e.consume(N),se):ue(N)}function pe(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),s=N,ve):Ue(N)?(u=pe,oe(N)):Ze(N)?(e.consume(N),pe):(e.consume(N),re)}function ve(N){return N===s?(e.consume(N),s=void 0,ae):N===null?n(N):Ue(N)?(u=ve,oe(N)):(e.consume(N),ve)}function re(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||ht(N)?ue(N):(e.consume(N),re)}function ae(N){return N===47||N===62||ht(N)?ue(N):n(N)}function xe(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function oe(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),Q}function Q(N){return Ze(N)?nt(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):ie(N)}function ie(N){return e.enter("htmlTextData"),u(N)}}const Vf={name:"labelEnd",resolveAll:VP,resolveTo:qP,tokenize:YP},zP={tokenize:WP},jP={tokenize:GP},$P={tokenize:XP};function VP(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Yn(e,0,e.length,n),e}function qP(e,t){let n=e.length,r=0,s,a,u,c;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:B({},e[a][1].start),end:B({},e[e.length-1][1].end)},f={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",f,t]],c=nr(c,e.slice(a+1,a+r+3)),c=nr(c,[["enter",p,t]]),c=nr(c,Tl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=nr(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=nr(c,e.slice(u+1)),c=nr(c,[["exit",d,t]]),Yn(e,a,e.length,c),e}function YP(e,t,n){const r=this;let s=r.events.length,a,u;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return c;function c(T){return a?a._inactive?m(T):(u=r.parser.defined.includes(gr(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(zP,p,u?p:m)(T):T===91?e.attempt(jP,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt($P,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function WP(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return ht(m)?Na(e,a)(m):a(m)}function a(m){return m===41?p(m):SE(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return ht(m)?Na(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?wE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return ht(m)?Na(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function GP(e,t,n){const r=this;return s;function s(c){return xE.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(gr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function XP(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const KP={name:"labelStartImage",resolveAll:Vf.resolveAll,tokenize:QP};function QP(e,t,n){const r=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const JP={name:"labelStartLink",resolveAll:Vf.resolveAll,tokenize:ZP};function ZP(e,t,n){const r=this;return s;function s(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const qf={name:"lineEnding",tokenize:eO};function eO(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),nt(e,t,"linePrefix")}}const _l={name:"thematicBreak",tokenize:tO};function tO(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return s=f,c(f)}function c(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||Ue(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ze(f)?nt(e,c,"whitespace")(f):c(f))}}const Ln={continuation:{tokenize:sO},exit:aO,name:"list",tokenize:iO},nO={partial:!0,tokenize:uO},rO={partial:!0,tokenize:oO};function iO(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return c;function c(y){const _=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:zf(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(_l,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return zf(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Ca,r.interrupt?n:p,e.attempt(nO,T,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function m(y){return Ze(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 sO(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ca,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,nt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ze(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(rO,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,nt(e,e.attempt(Ln,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function oO(e,t,n){const r=this;return nt(e,s,"listItemIndent",r.containerState.size+1);function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function aO(e){e.exit(this.containerState.type)}function uO(e,t,n){const r=this;return nt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const u=r.events[r.events.length-1];return!Ze(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const CE={name:"setextUnderline",resolveTo:lO,tokenize:cO};function lO(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:B({},e[r][1].start),end:B({},e[e.length-1][1].end)};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=B({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function cO(e,t,n){const r=this;let s;return a;function a(f){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===s?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Ze(f)?nt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Ue(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const dO={tokenize:fO};function fO(e){const t=this,n=e.attempt(Ca,r,e.attempt(this.parser.constructs.flowInitial,s,nt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(EP,s)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const hO={resolveAll:NE()},pO=vE("string"),mO=vE("text");function vE(e){return{resolveAll:NE(e==="text"?gO:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,u,c);return u;function u(p){return f(p)?a(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=s[p];let T=-1;if(m)for(;++T<m.length;){const y=m[T];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function NE(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function gO(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let a=s.length,u=-1,c=0,d;for(;a--;){const f=s[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(f===-2)d=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:B({},r.end)};r.end=B({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const EO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:SP},disable:{null:[]},document:{42:Ln,43:Ln,45:Ln,48:Ln,49:Ln,50:Ln,51:Ln,52:Ln,53:Ln,54:Ln,55:Ln,56:Ln,57:Ln,62:gE},flow:{35:NP,42:_l,45:[CE,_l],60:IP,61:CE,95:_l,96:TE,126:TE},flowInitial:{[-2]:$f,[-1]:$f,32:$f},insideSpan:{null:[jf,hO]},string:{38:yE,92:EE},text:{[-5]:qf,[-4]:qf,[-3]:qf,33:KP,38:yE,42:jf,60:[Jk,UP],91:JP,92:[CP,EE],93:Vf,95:jf,96:dP}},Symbol.toStringTag,{value:"Module"}));function yO(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},a=[];let u=[],c=[];const d={attempt:q(Y),check:q(D),consume:k,enter:C,exit:z,interrupt:q(D,{interrupt:!0})},f={code:null,containerState:{},defineSkip:w,events:[],now:_,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(se){return u=nr(u,se),v(),u[u.length-1]!==null?[]:(ne(t,0),f.events=Tl(a,f.events,f),f.events)}function T(se,pe){return TO(y(se),pe)}function y(se){return bO(u,se)}function _(){const{_bufferIndex:se,_index:pe,line:ve,column:re,offset:ae}=r;return{_bufferIndex:se,_index:pe,line:ve,column:re,offset:ae}}function w(se){s[se.line]=se.column,V()}function v(){let se;for(;r._index<u.length;){const pe=u[r._index];if(typeof pe=="string")for(se=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===se&&r._bufferIndex<pe.length;)A(pe.charCodeAt(r._bufferIndex));else A(pe)}}function A(se){p=p(se)}function k(se){Ue(se)?(r.line++,r.column=1,r.offset+=se===-3?2:1,V()):se!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=se}function C(se,pe){const ve=pe||{};return ve.type=se,ve.start=_(),f.events.push(["enter",ve,f]),c.push(ve),ve}function z(se){const pe=c.pop();return pe.end=_(),f.events.push(["exit",pe,f]),pe}function Y(se,pe){ne(se,pe.from)}function D(se,pe){pe.restore()}function q(se,pe){return ve;function ve(re,ae,xe){let oe,Q,ie,N;return Array.isArray(re)?J(re):"tokenize"in re?J([re]):L(re);function L(ye){return Le;function Le(Be){const Ge=Be!==null&&ye[Be],at=Be!==null&&ye.null,on=[...Array.isArray(Ge)?Ge:Ge?[Ge]:[],...Array.isArray(at)?at:at?[at]:[]];return J(on)(Be)}}function J(ye){return oe=ye,Q=0,ye.length===0?xe:I(ye[Q])}function I(ye){return Le;function Le(Be){return N=ue(),ie=ye,ye.partial||(f.currentConstruct=ye),ye.name&&f.parser.constructs.disable.null.includes(ye.name)?He():ye.tokenize.call(pe?Object.assign(Object.create(f),pe):f,d,Te,He)(Be)}}function Te(ye){return se(ie,N),ae}function He(ye){return N.restore(),++Q<oe.length?I(oe[Q]):xe}}}function ne(se,pe){se.resolveAll&&!a.includes(se)&&a.push(se),se.resolve&&Yn(f.events,pe,f.events.length-pe,se.resolve(f.events.slice(pe),f)),se.resolveTo&&(f.events=se.resolveTo(f.events,f))}function ue(){const se=_(),pe=f.previous,ve=f.currentConstruct,re=f.events.length,ae=Array.from(c);return{from:re,restore:xe};function xe(){r=se,f.previous=pe,f.currentConstruct=ve,f.events.length=re,c=ae,V()}}function V(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function bO(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(r,a)];else{if(u=e.slice(n,s),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[s].slice(0,a))}return u}function TO(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
19
19
  `;break}case-3:{u=`\r
20
- `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&s)continue;u=" ";break}default:u=String.fromCharCode(a)}s=a===-2,r.push(u)}return r.join("")}function _O(e){const r={constructs:fE([EO,...(e||{}).extensions||[]]),content:s(qk),defined:[],document:s(Wk),flow:s(dO),lazy:{},string:s(pO),text:s(mO)};return r;function s(a){return u;function u(c){return yO(r,a,c)}}}function SO(e){for(;!_E(e););return e}const kE=/[\0\t\n\r]/g;function xO(){let e=1,t="",n=!0,r;return s;function s(a,u,c){const d=[];let f,p,m,T,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(kE.lastIndex=m,f=kE.exec(a),T=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(T),!f){t=a.slice(m);break}if(y===10&&m===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<T&&(d.push(a.slice(m,T)),e+=T-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=T+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const wO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function AO(e){return e.replace(wO,CO)}function CO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return hE(n.slice(a?2:1),a?16:10)}return Hf(n)||e}const PE={}.hasOwnProperty;function vO(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),NO(n)(SO(_O(n).document().write(xO()(e,t,!0))))}function NO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(an),autolinkProtocol:ue,autolinkEmail:ue,atxHeading:a(Zt),blockQuote:a(ht),characterEscape:ue,characterReference:ue,codeFenced:a(Vt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Vt,u),codeText:a(on,u),codeTextData:ue,data:ue,codeFlowValue:ue,definition:a(_r),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(sr),hardBreakEscape:a(Ve),hardBreakTrailing:a(Ve),htmlFlow:a(Nt,u),htmlFlowData:ue,htmlText:a(Nt,u),htmlTextData:ue,image:a(vn),label:u,link:a(an),listItem:a(we),listItemValue:T,listOrdered:a(Fn,m),listUnordered:a(Fn),paragraph:a(Pe),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Zt),strong:a(Me),thematicBreak:a(pt)},exit:{atxHeading:d(),atxHeadingSequence:Y,autolink:d(),autolinkEmail:Ye,autolinkProtocol:He,blockQuote:d(),characterEscapeValue:V,characterReferenceMarkerHexadecimal:Ue,characterReferenceMarkerNumeric:Ue,characterReferenceValue:ye,characterReference:Le,codeFenced:d(v),codeFencedFence:w,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:V,codeIndented:d(A),codeText:d(ae),codeTextData:V,data:V,definition:d(),definitionDestinationString:z,definitionLabelString:N,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(pe),hardBreakTrailing:d(pe),htmlFlow:d(ve),htmlFlowData:V,htmlText:d(re),htmlTextData:V,image:d(oe),label:ie,labelText:Q,lineEnding:se,link:d(xe),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Se,resourceDestinationString:k,resourceTitleString:R,resource:ee,setextHeading:d(ne),setextHeadingLineSequence:q,setextHeadingText:D,strong:d(),thematicBreak:d()}};OE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let ge={type:"root",children:[]};const Ce={stack:[ge],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},qe=[];let Ie=-1;for(;++Ie<J.length;)if(J[Ie][1].type==="listOrdered"||J[Ie][1].type==="listUnordered")if(J[Ie][0]==="enter")qe.push(Ie);else{const ut=qe.pop();Ie=s(J,ut,Ie)}for(Ie=-1;++Ie<J.length;){const ut=t[J[Ie][0]];PE.call(ut,J[Ie][1].type)&&ut[J[Ie][1].type].call(Object.assign({sliceSerialize:J[Ie][2].sliceSerialize},Ce),J[Ie][1])}if(Ce.tokenStack.length>0){const ut=Ce.tokenStack[Ce.tokenStack.length-1];(ut[1]||IE).call(Ce,void 0,ut[0])}for(ge.position={start:xi(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:xi(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ie=-1;++Ie<t.transforms.length;)ge=t.transforms[Ie](ge)||ge;return ge}function s(J,ge,Ce){let qe=ge-1,Ie=-1,ut=!1,qt,Ht,un,Vr;for(;++qe<=Ce;){const ln=J[qe];switch(ln[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ln[0]==="enter"?Ie++:Ie--,Vr=void 0;break}case"lineEndingBlank":{ln[0]==="enter"&&(qt&&!Vr&&!Ie&&!un&&(un=qe),Vr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Vr=void 0}if(!Ie&&ln[0]==="enter"&&ln[1].type==="listItemPrefix"||Ie===-1&&ln[0]==="exit"&&(ln[1].type==="listUnordered"||ln[1].type==="listOrdered")){if(qt){let qr=qe;for(Ht=void 0;qr--;){const Gn=J[qr];if(Gn[1].type==="lineEnding"||Gn[1].type==="lineEndingBlank"){if(Gn[0]==="exit")continue;Ht&&(J[Ht][1].type="lineEndingBlank",ut=!0),Gn[1].type="lineEnding",Ht=qr}else if(!(Gn[1].type==="linePrefix"||Gn[1].type==="blockQuotePrefix"||Gn[1].type==="blockQuotePrefixWhitespace"||Gn[1].type==="blockQuoteMarker"||Gn[1].type==="listItemIndent"))break}un&&(!Ht||un<Ht)&&(qt._spread=!0),qt.end=Object.assign({},Ht?J[Ht][1].start:ln[1].end),J.splice(Ht||qe,0,["exit",qt,ln[2]]),qe++,Ce++}if(ln[1].type==="listItemPrefix"){const qr={type:"listItem",_spread:!1,start:Object.assign({},ln[1].start),end:void 0};qt=qr,J.splice(qe,0,["enter",qr,ln[2]]),qe++,Ce++,un=void 0,Vr=!0}}}return J[ge][1]._spread=ut,Ce}function a(J,ge){return Ce;function Ce(qe){c.call(this,J(qe),qe),ge&&ge.call(this,qe)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(J,ge,Ce){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ge,Ce||void 0]),J.position={start:xi(ge.start),end:void 0}}function d(J){return ge;function ge(Ce){J&&J.call(this,Ce),f.call(this,Ce)}}function f(J,ge){const Ce=this.stack.pop(),qe=this.tokenStack.pop();if(qe)qe[0].type!==J.type&&(ge?ge.call(this,J,qe[0]):(qe[1]||IE).call(this,J,qe[0]));else throw new Error("Cannot close `"+J.type+"` ("+wa({start:J.start,end:J.end})+"): it’s not open");Ce.position.end=xi(J.end)}function p(){return Uf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(J){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=J}function _(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=J}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J.replace(/(\r?\n|\r)$/g,"")}function N(J){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=gr(this.sliceSerialize(J)).toLowerCase()}function C(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.title=J}function z(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.url=J}function Y(J){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Ce=this.sliceSerialize(J).length;ge.depth=Ce}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function q(J){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function ne(){this.data.setextHeadingSlurpLineEnding=void 0}function ue(J){const Ce=this.stack[this.stack.length-1].children;let qe=Ce[Ce.length-1];(!qe||qe.type!=="text")&&(qe=rt(),qe.position={start:xi(J.start),end:void 0},Ce.push(qe)),this.stack.push(qe)}function V(J){const ge=this.stack.pop();ge.value+=this.sliceSerialize(J),ge.position.end=xi(J.end)}function se(J){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=ge.children[ge.children.length-1];Ce.position.end=xi(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(ue.call(this,J),V.call(this,J))}function pe(){this.data.atHardBreak=!0}function ve(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function re(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function ae(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function xe(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ge,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function oe(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ge,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function Q(J){const ge=this.sliceSerialize(J),Ce=this.stack[this.stack.length-2];Ce.label=AO(ge),Ce.identifier=gr(ge).toLowerCase()}function ie(){const J=this.stack[this.stack.length-1],ge=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const qe=J.children;Ce.children=qe}else Ce.alt=ge}function k(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.url=J}function R(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.title=J}function ee(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function Se(J){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=gr(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function Ue(J){this.data.characterReferenceType=J.type}function ye(J){const ge=this.sliceSerialize(J),Ce=this.data.characterReferenceType;let qe;Ce?(qe=hE(ge,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):qe=Hf(ge);const Ie=this.stack[this.stack.length-1];Ie.value+=qe}function Le(J){const ge=this.stack.pop();ge.position.end=xi(J.end)}function He(J){V.call(this,J);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(J)}function Ye(J){V.call(this,J);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(J)}function ht(){return{type:"blockquote",children:[]}}function Vt(){return{type:"code",lang:null,meta:null,value:""}}function on(){return{type:"inlineCode",value:""}}function _r(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function sr(){return{type:"emphasis",children:[]}}function Zt(){return{type:"heading",depth:0,children:[]}}function Ve(){return{type:"break"}}function Nt(){return{type:"html",value:""}}function vn(){return{type:"image",title:null,url:"",alt:null}}function an(){return{type:"link",title:null,url:"",children:[]}}function Fn(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function we(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Pe(){return{type:"paragraph",children:[]}}function Me(){return{type:"strong",children:[]}}function rt(){return{type:"text",value:""}}function pt(){return{type:"thematicBreak"}}}function xi(e){return{line:e.line,column:e.column,offset:e.offset}}function OE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?OE(e,r):kO(e,r)}}function kO(e,t){let n;for(n in t)if(PE.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 IE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+wa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+wa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+wa({start:t.start,end:t.end})+") is still open")}function PO(e){const t=this;t.parser=n;function n(r){return vO(r,fe(B(B({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function OO(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 IO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
20
+ `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&s)continue;u=" ";break}default:u=String.fromCharCode(a)}s=a===-2,r.push(u)}return r.join("")}function _O(e){const r={constructs:fE([EO,...(e||{}).extensions||[]]),content:s(qk),defined:[],document:s(Wk),flow:s(dO),lazy:{},string:s(pO),text:s(mO)};return r;function s(a){return u;function u(c){return yO(r,a,c)}}}function SO(e){for(;!_E(e););return e}const kE=/[\0\t\n\r]/g;function xO(){let e=1,t="",n=!0,r;return s;function s(a,u,c){const d=[];let f,p,m,T,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(kE.lastIndex=m,f=kE.exec(a),T=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(T),!f){t=a.slice(m);break}if(y===10&&m===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<T&&(d.push(a.slice(m,T)),e+=T-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=T+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const wO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function AO(e){return e.replace(wO,CO)}function CO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return hE(n.slice(a?2:1),a?16:10)}return Hf(n)||e}const PE={}.hasOwnProperty;function vO(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),NO(n)(SO(_O(n).document().write(xO()(e,t,!0))))}function NO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(an),autolinkProtocol:ue,autolinkEmail:ue,atxHeading:a(Zt),blockQuote:a(at),characterEscape:ue,characterReference:ue,codeFenced:a(on),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(on,u),codeText:a(Dt,u),codeTextData:ue,data:ue,codeFlowValue:ue,definition:a(_r),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(sr),hardBreakEscape:a(Ve),hardBreakTrailing:a(Ve),htmlFlow:a(Nt,u),htmlFlowData:ue,htmlText:a(Nt,u),htmlTextData:ue,image:a(vn),label:u,link:a(an),listItem:a(we),listItemValue:T,listOrdered:a(Fn,m),listUnordered:a(Fn),paragraph:a(Pe),reference:I,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Zt),strong:a(Me),thematicBreak:a(pt)},exit:{atxHeading:d(),atxHeadingSequence:Y,autolink:d(),autolinkEmail:Ge,autolinkProtocol:Be,blockQuote:d(),characterEscapeValue:V,characterReferenceMarkerHexadecimal:He,characterReferenceMarkerNumeric:He,characterReferenceValue:ye,characterReference:Le,codeFenced:d(v),codeFencedFence:w,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:V,codeIndented:d(A),codeText:d(ae),codeTextData:V,data:V,definition:d(),definitionDestinationString:z,definitionLabelString:k,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(pe),hardBreakTrailing:d(pe),htmlFlow:d(ve),htmlFlowData:V,htmlText:d(re),htmlTextData:V,image:d(oe),label:ie,labelText:Q,lineEnding:se,link:d(xe),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Te,resourceDestinationString:N,resourceTitleString:L,resource:J,setextHeading:d(ne),setextHeadingLineSequence:q,setextHeadingText:D,strong:d(),thematicBreak:d()}};OE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Z){let ge={type:"root",children:[]};const Ce={stack:[ge],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},qe=[];let Ie=-1;for(;++Ie<Z.length;)if(Z[Ie][1].type==="listOrdered"||Z[Ie][1].type==="listUnordered")if(Z[Ie][0]==="enter")qe.push(Ie);else{const lt=qe.pop();Ie=s(Z,lt,Ie)}for(Ie=-1;++Ie<Z.length;){const lt=t[Z[Ie][0]];PE.call(lt,Z[Ie][1].type)&&lt[Z[Ie][1].type].call(Object.assign({sliceSerialize:Z[Ie][2].sliceSerialize},Ce),Z[Ie][1])}if(Ce.tokenStack.length>0){const lt=Ce.tokenStack[Ce.tokenStack.length-1];(lt[1]||IE).call(Ce,void 0,lt[0])}for(ge.position={start:xi(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:xi(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},Ie=-1;++Ie<t.transforms.length;)ge=t.transforms[Ie](ge)||ge;return ge}function s(Z,ge,Ce){let qe=ge-1,Ie=-1,lt=!1,qt,zt,un,Vr;for(;++qe<=Ce;){const ln=Z[qe];switch(ln[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ln[0]==="enter"?Ie++:Ie--,Vr=void 0;break}case"lineEndingBlank":{ln[0]==="enter"&&(qt&&!Vr&&!Ie&&!un&&(un=qe),Vr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Vr=void 0}if(!Ie&&ln[0]==="enter"&&ln[1].type==="listItemPrefix"||Ie===-1&&ln[0]==="exit"&&(ln[1].type==="listUnordered"||ln[1].type==="listOrdered")){if(qt){let qr=qe;for(zt=void 0;qr--;){const Gn=Z[qr];if(Gn[1].type==="lineEnding"||Gn[1].type==="lineEndingBlank"){if(Gn[0]==="exit")continue;zt&&(Z[zt][1].type="lineEndingBlank",lt=!0),Gn[1].type="lineEnding",zt=qr}else if(!(Gn[1].type==="linePrefix"||Gn[1].type==="blockQuotePrefix"||Gn[1].type==="blockQuotePrefixWhitespace"||Gn[1].type==="blockQuoteMarker"||Gn[1].type==="listItemIndent"))break}un&&(!zt||un<zt)&&(qt._spread=!0),qt.end=Object.assign({},zt?Z[zt][1].start:ln[1].end),Z.splice(zt||qe,0,["exit",qt,ln[2]]),qe++,Ce++}if(ln[1].type==="listItemPrefix"){const qr={type:"listItem",_spread:!1,start:Object.assign({},ln[1].start),end:void 0};qt=qr,Z.splice(qe,0,["enter",qr,ln[2]]),qe++,Ce++,un=void 0,Vr=!0}}}return Z[ge][1]._spread=lt,Ce}function a(Z,ge){return Ce;function Ce(qe){c.call(this,Z(qe),qe),ge&&ge.call(this,qe)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(Z,ge,Ce){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([ge,Ce||void 0]),Z.position={start:xi(ge.start),end:void 0}}function d(Z){return ge;function ge(Ce){Z&&Z.call(this,Ce),f.call(this,Ce)}}function f(Z,ge){const Ce=this.stack.pop(),qe=this.tokenStack.pop();if(qe)qe[0].type!==Z.type&&(ge?ge.call(this,Z,qe[0]):(qe[1]||IE).call(this,Z,qe[0]));else throw new Error("Cannot close `"+Z.type+"` ("+wa({start:Z.start,end:Z.end})+"): it’s not open");Ce.position.end=xi(Z.end)}function p(){return Uf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(Z){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function y(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=Z}function _(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=Z}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z.replace(/(\r?\n|\r)$/g,"")}function k(Z){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=gr(this.sliceSerialize(Z)).toLowerCase()}function C(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.title=Z}function z(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.url=Z}function Y(Z){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Ce=this.sliceSerialize(Z).length;ge.depth=Ce}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function q(Z){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function ne(){this.data.setextHeadingSlurpLineEnding=void 0}function ue(Z){const Ce=this.stack[this.stack.length-1].children;let qe=Ce[Ce.length-1];(!qe||qe.type!=="text")&&(qe=rt(),qe.position={start:xi(Z.start),end:void 0},Ce.push(qe)),this.stack.push(qe)}function V(Z){const ge=this.stack.pop();ge.value+=this.sliceSerialize(Z),ge.position.end=xi(Z.end)}function se(Z){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=ge.children[ge.children.length-1];Ce.position.end=xi(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(ue.call(this,Z),V.call(this,Z))}function pe(){this.data.atHardBreak=!0}function ve(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z}function re(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z}function ae(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z}function xe(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ge,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function oe(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ge,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function Q(Z){const ge=this.sliceSerialize(Z),Ce=this.stack[this.stack.length-2];Ce.label=AO(ge),Ce.identifier=gr(ge).toLowerCase()}function ie(){const Z=this.stack[this.stack.length-1],ge=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const qe=Z.children;Ce.children=qe}else Ce.alt=ge}function N(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.url=Z}function L(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.title=Z}function J(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function Te(Z){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=gr(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function He(Z){this.data.characterReferenceType=Z.type}function ye(Z){const ge=this.sliceSerialize(Z),Ce=this.data.characterReferenceType;let qe;Ce?(qe=hE(ge,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):qe=Hf(ge);const Ie=this.stack[this.stack.length-1];Ie.value+=qe}function Le(Z){const ge=this.stack.pop();ge.position.end=xi(Z.end)}function Be(Z){V.call(this,Z);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(Z)}function Ge(Z){V.call(this,Z);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(Z)}function at(){return{type:"blockquote",children:[]}}function on(){return{type:"code",lang:null,meta:null,value:""}}function Dt(){return{type:"inlineCode",value:""}}function _r(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function sr(){return{type:"emphasis",children:[]}}function Zt(){return{type:"heading",depth:0,children:[]}}function Ve(){return{type:"break"}}function Nt(){return{type:"html",value:""}}function vn(){return{type:"image",title:null,url:"",alt:null}}function an(){return{type:"link",title:null,url:"",children:[]}}function Fn(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function we(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function Pe(){return{type:"paragraph",children:[]}}function Me(){return{type:"strong",children:[]}}function rt(){return{type:"text",value:""}}function pt(){return{type:"thematicBreak"}}}function xi(e){return{line:e.line,column:e.column,offset:e.offset}}function OE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?OE(e,r):kO(e,r)}}function kO(e,t){let n;for(n in t)if(PE.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 IE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+wa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+wa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+wa({start:t.start,end:t.end})+") is still open")}function PO(e){const t=this;t.parser=n;function n(r){return vO(r,fe(B(B({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function OO(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 IO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
21
21
  `}]}function RO(e,t){const n=t.value?t.value+`
22
22
  `:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function LO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function DO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=to(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function FO(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 BO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function RE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const u=s[s.length-1];return u&&u.type==="text"?u.value+=r:s.push({type:"text",value:r}),s}function UO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return RE(e,t);const s={src:to(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function HO(e,t){const n={src:to(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 zO(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 jO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return RE(e,t);const s={href:to(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function $O(e,t){const n={href:to(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 VO(e,t,n){const r=e.all(t),s=n?qO(n):LE(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(s||c!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
23
23
  `}),p.type==="element"&&p.tagName==="p"&&!s?u.push(...p.children):u.push(p)}const d=r[r.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
24
- `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function qO(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=LE(n[r])}return t}function LE(e){const t=e.spread;return t==null?e.children.length>1:t}function YO(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const u=r[s];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function WO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function XO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KO(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),s.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Rr(t.children[1]),d=El(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),s.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function QO(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,c=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const m=t.children[d],T={},y=u?u[d]:void 0;y&&(T.align=y);let _={type:"element",tagName:a,properties:T,children:[]};m&&(_.children=e.all(m),e.patch(m,_),_=e.applyData(m,_)),f.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function JO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const DE=9,ME=32;function ZO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(FE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(FE(t.slice(s),s>0,!1)),a.join("")}function FE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===DE||a===ME;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===DE||a===ME;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function e3(e,t){const n={type:"text",value:ZO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function t3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const n3={blockquote:OO,break:IO,code:RO,delete:LO,emphasis:DO,footnoteReference:MO,heading:FO,html:BO,imageReference:UO,image:HO,inlineCode:zO,linkReference:jO,link:$O,listItem:VO,list:YO,paragraph:WO,root:GO,strong:XO,table:KO,tableCell:JO,tableRow:QO,text:e3,thematicBreak:t3,toml:Sl,yaml:Sl,definition:Sl,footnoteDefinition:Sl};function Sl(){}const BE=-1,xl=0,ka=1,wl=2,Yf=3,Wf=4,Gf=5,Xf=6,UE=7,HE=8,{defineProperty:r3}=Object,zE=typeof self=="object"?self:globalThis,jE=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new zE[e](t)},i3=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,u]=t[s];switch(a){case xl:case BE:return n(u,s);case ka:{const c=n([],s);for(const d of u)c.push(r(d));return c}case wl:{const c=n({},s);for(const[d,f]of u){const p=r(d),m=r(f);p==="__proto__"?r3(c,p,{value:m,configurable:!0,enumerable:!0,writable:!0}):c[p]=m}return c}case Yf:return n(new Date(u),s);case Wf:{const{source:c,flags:d}=u;return n(new RegExp(c,d),s)}case Gf:{const c=n(new Map,s);for(const[d,f]of u)c.set(r(d),r(f));return c}case Xf:{const c=n(new Set,s);for(const d of u)c.add(r(d));return c}case UE:{const{name:c,message:d}=u;return n(typeof zE[c]=="function"?jE(c,d):new Error(d),s)}case HE:return n(BigInt(u),s);case"BigInt":return n(Object(BigInt(u)),s);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}case"-0":return-0}return n(jE(a,u),s)};return r},$E=e=>i3(new Map,e)(0),us="",{toString:s3}={},{keys:o3,is:a3}=Object,Pa=e=>{const t=typeof e;if(t!=="object"||!e)return[xl,t];const n=s3.call(e).slice(8,-1);switch(n){case"Array":return[ka,us];case"Object":return[wl,us];case"Date":return[Yf,us];case"RegExp":return[Wf,us];case"Map":return[Gf,us];case"Set":return[Xf,us];case"DataView":return[ka,n]}return n.includes("Array")?[ka,n]:e instanceof Error?[UE,e.name||"Error"]:[wl,n]},Al=([e,t])=>e===xl&&(t==="function"||t==="symbol"),u3=(e,t,n,r)=>{const s=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},a=u=>{if(n.has(u))return n.get(u);let[c,d]=Pa(u);switch(c){case xl:{let p=u;switch(d){case"bigint":c=HE,p=u.toString();break;case"number":if(!u&&a3(u,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return s([BE],u)}return s([c,p],u)}case ka:{if(d){let T=u;return d==="DataView"?T=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(T=new Uint8Array(u)),s([d,[...T]],u)}const p=[],m=s([c,p],u);for(const T of u)p.push(a(T));return m}case wl:{if(d)switch(d){case"BigInt":return s([d,u.toString()],u);case"Boolean":case"Number":case"String":return s([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],m=s([c,p],u);for(const T of o3(u))(e||!Al(Pa(u[T])))&&p.push([a(T),a(u[T])]);return m}case Yf:return s([c,isNaN(u.getTime())?us:u.toISOString()],u);case Wf:{const{source:p,flags:m}=u;return s([c,{source:p,flags:m}],u)}case Gf:{const p=[],m=s([c,p],u);for(const[T,y]of u)(e||!(Al(Pa(T))||Al(Pa(y))))&&p.push([a(T),a(y)]);return m}case Xf:{const p=[],m=s([c,p],u);for(const T of u)(e||!Al(Pa(T)))&&p.push(a(T));return m}}const{message:f}=u;return s([c,{name:d,message:f}],u)};return a},VE=(e,{json:t,lossy:n}={})=>{const r=[];return u3(!(t||n),!!t,new Map,r)(e),r},ls=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?$E(VE(e,t)):structuredClone(e):(e,t)=>$E(VE(e,t));function l3(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 c3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function d3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||l3,r=e.options.footnoteBackLabel||c3,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),T=to(m.toLowerCase());let y=0;const _=[],w=e.footnoteCounts.get(m);for(;w!==void 0&&++y<=w;){_.length>0&&_.push({type:"text",value:" "});let N=typeof n=="string"?n:n(d,y);typeof N=="string"&&(N={type:"text",value:N}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+T+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(N)?N:[N]})}const v=p[p.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const N=v.children[v.children.length-1];N&&N.type==="text"?N.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(..._)}else p.push(..._);const A={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(f,A),c.push(A)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:fe(B({},ls(u)),{id:"footnote-label"}),children:[{type:"text",value:s}]},{type:"text",value:`
24
+ `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function qO(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=LE(n[r])}return t}function LE(e){const t=e.spread;return t==null?e.children.length>1:t}function YO(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const u=r[s];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function WO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function XO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KO(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),s.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Rr(t.children[1]),d=El(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),s.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function QO(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,c=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const m=t.children[d],T={},y=u?u[d]:void 0;y&&(T.align=y);let _={type:"element",tagName:a,properties:T,children:[]};m&&(_.children=e.all(m),e.patch(m,_),_=e.applyData(m,_)),f.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function JO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const DE=9,ME=32;function ZO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(FE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(FE(t.slice(s),s>0,!1)),a.join("")}function FE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===DE||a===ME;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===DE||a===ME;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function e3(e,t){const n={type:"text",value:ZO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function t3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const n3={blockquote:OO,break:IO,code:RO,delete:LO,emphasis:DO,footnoteReference:MO,heading:FO,html:BO,imageReference:UO,image:HO,inlineCode:zO,linkReference:jO,link:$O,listItem:VO,list:YO,paragraph:WO,root:GO,strong:XO,table:KO,tableCell:JO,tableRow:QO,text:e3,thematicBreak:t3,toml:Sl,yaml:Sl,definition:Sl,footnoteDefinition:Sl};function Sl(){}const BE=-1,xl=0,ka=1,wl=2,Yf=3,Wf=4,Gf=5,Xf=6,UE=7,HE=8,{defineProperty:r3}=Object,zE=typeof self=="object"?self:globalThis,jE=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new zE[e](t)},i3=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,u]=t[s];switch(a){case xl:case BE:return n(u,s);case ka:{const c=n([],s);for(const d of u)c.push(r(d));return c}case wl:{const c=n({},s);for(const[d,f]of u){const p=r(d),m=r(f);p==="__proto__"?r3(c,p,{value:m,configurable:!0,enumerable:!0,writable:!0}):c[p]=m}return c}case Yf:return n(new Date(u),s);case Wf:{const{source:c,flags:d}=u;return n(new RegExp(c,d),s)}case Gf:{const c=n(new Map,s);for(const[d,f]of u)c.set(r(d),r(f));return c}case Xf:{const c=n(new Set,s);for(const d of u)c.add(r(d));return c}case UE:{const{name:c,message:d}=u;return n(typeof zE[c]=="function"?jE(c,d):new Error(d),s)}case HE:return n(BigInt(u),s);case"BigInt":return n(Object(BigInt(u)),s);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}case"-0":return-0}return n(jE(a,u),s)};return r},$E=e=>i3(new Map,e)(0),us="",{toString:s3}={},{keys:o3,is:a3}=Object,Pa=e=>{const t=typeof e;if(t!=="object"||!e)return[xl,t];const n=s3.call(e).slice(8,-1);switch(n){case"Array":return[ka,us];case"Object":return[wl,us];case"Date":return[Yf,us];case"RegExp":return[Wf,us];case"Map":return[Gf,us];case"Set":return[Xf,us];case"DataView":return[ka,n]}return n.includes("Array")?[ka,n]:e instanceof Error?[UE,e.name||"Error"]:[wl,n]},Al=([e,t])=>e===xl&&(t==="function"||t==="symbol"),u3=(e,t,n,r)=>{const s=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},a=u=>{if(n.has(u))return n.get(u);let[c,d]=Pa(u);switch(c){case xl:{let p=u;switch(d){case"bigint":c=HE,p=u.toString();break;case"number":if(!u&&a3(u,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return s([BE],u)}return s([c,p],u)}case ka:{if(d){let T=u;return d==="DataView"?T=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(T=new Uint8Array(u)),s([d,[...T]],u)}const p=[],m=s([c,p],u);for(const T of u)p.push(a(T));return m}case wl:{if(d)switch(d){case"BigInt":return s([d,u.toString()],u);case"Boolean":case"Number":case"String":return s([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],m=s([c,p],u);for(const T of o3(u))(e||!Al(Pa(u[T])))&&p.push([a(T),a(u[T])]);return m}case Yf:return s([c,isNaN(u.getTime())?us:u.toISOString()],u);case Wf:{const{source:p,flags:m}=u;return s([c,{source:p,flags:m}],u)}case Gf:{const p=[],m=s([c,p],u);for(const[T,y]of u)(e||!(Al(Pa(T))||Al(Pa(y))))&&p.push([a(T),a(y)]);return m}case Xf:{const p=[],m=s([c,p],u);for(const T of u)(e||!Al(Pa(T)))&&p.push(a(T));return m}}const{message:f}=u;return s([c,{name:d,message:f}],u)};return a},VE=(e,{json:t,lossy:n}={})=>{const r=[];return u3(!(t||n),!!t,new Map,r)(e),r},ls=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?$E(VE(e,t)):structuredClone(e):(e,t)=>$E(VE(e,t));function l3(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 c3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function d3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||l3,r=e.options.footnoteBackLabel||c3,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),T=to(m.toLowerCase());let y=0;const _=[],w=e.footnoteCounts.get(m);for(;w!==void 0&&++y<=w;){_.length>0&&_.push({type:"text",value:" "});let k=typeof n=="string"?n:n(d,y);typeof k=="string"&&(k={type:"text",value:k}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+T+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const v=p[p.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const k=v.children[v.children.length-1];k&&k.type==="text"?k.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(..._)}else p.push(..._);const A={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(f,A),c.push(A)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:fe(B({},ls(u)),{id:"footnote-label"}),children:[{type:"text",value:s}]},{type:"text",value:`
25
25
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
26
- `}]}}const Cl=(function(e){if(e==null)return m3;if(typeof e=="function")return vl(e);if(typeof e=="object")return Array.isArray(e)?f3(e):h3(e);if(typeof e=="string")return p3(e);throw new Error("Expected function, string, or object as test")});function f3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Cl(e[n]);return vl(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function h3(e){const t=e;return vl(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function p3(e){return vl(t);function t(n){return n&&n.type===e}}function vl(e){return t;function t(n,r,s){return!!(g3(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function m3(){return!0}function g3(e){return e!==null&&typeof e=="object"&&"type"in e}function PU(e){return e}const qE=[],E3=!0,Kf=!1,y3="skip";function YE(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=Cl(s),u=r?-1:1;c(e,void 0,[])();function c(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(T,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return T;function T(){let y=qE,_,w,v;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=b3(n(d,p)),y[0]===Kf))return y;if("children"in d&&d.children){const A=d;if(A.children&&y[0]!==y3)for(w=(r?A.children.length:-1)+u,v=p.concat(A);w>-1&&w<A.children.length;){const N=A.children[w];if(_=c(N,w,v)(),_[0]===Kf)return _;w=typeof _[1]=="number"?_[1]:w+u}}return y}}}function b3(e){return Array.isArray(e)?e:typeof e=="number"?[E3,e]:e==null?qE:[e]}function Nl(e,t,n,r){let s,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,s=n):(a=t,u=n,s=r),YE(e,a,c,s);function c(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const Qf={}.hasOwnProperty,T3={};function _3(e,t){const n=t||T3,r=new Map,s=new Map,a=new Map,u=B(B({},n3),n.handlers),c={all:f,applyData:x3,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:S3,wrap:A3};return Nl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:s,T=String(p.identifier).toUpperCase();m.has(T)||m.set(T,p)}}),c;function d(p,m){const T=p.type,y=c.handlers[T];if(Qf.call(c.handlers,T)&&y)return y(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(T)){if("children"in p){const w=p,{children:v}=w,A=fn(w,["children"]),N=ls(A);return N.children=c.all(p),N}return ls(p)}return(c.options.unknownHandler||w3)(c,p,m)}function f(p){const m=[];if("children"in p){const T=p.children;let y=-1;for(;++y<T.length;){const _=c.one(T[y],p);if(_){if(y&&T[y-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=WE(_.value)),!Array.isArray(_)&&_.type==="element")){const w=_.children[0];w&&w.type==="text"&&(w.value=WE(w.value))}Array.isArray(_)?m.push(..._):m.push(_)}}}return m}}function S3(e,t){e.position&&(t.position=tE(e))}function x3(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,ls(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function w3(e,t){const n=t.data||{},r="value"in t&&!(Qf.call(n,"hProperties")||Qf.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 A3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
26
+ `}]}}const Cl=(function(e){if(e==null)return m3;if(typeof e=="function")return vl(e);if(typeof e=="object")return Array.isArray(e)?f3(e):h3(e);if(typeof e=="string")return p3(e);throw new Error("Expected function, string, or object as test")});function f3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Cl(e[n]);return vl(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function h3(e){const t=e;return vl(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function p3(e){return vl(t);function t(n){return n&&n.type===e}}function vl(e){return t;function t(n,r,s){return!!(g3(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function m3(){return!0}function g3(e){return e!==null&&typeof e=="object"&&"type"in e}function PU(e){return e}const qE=[],E3=!0,Kf=!1,y3="skip";function YE(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=Cl(s),u=r?-1:1;c(e,void 0,[])();function c(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(T,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return T;function T(){let y=qE,_,w,v;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=b3(n(d,p)),y[0]===Kf))return y;if("children"in d&&d.children){const A=d;if(A.children&&y[0]!==y3)for(w=(r?A.children.length:-1)+u,v=p.concat(A);w>-1&&w<A.children.length;){const k=A.children[w];if(_=c(k,w,v)(),_[0]===Kf)return _;w=typeof _[1]=="number"?_[1]:w+u}}return y}}}function b3(e){return Array.isArray(e)?e:typeof e=="number"?[E3,e]:e==null?qE:[e]}function Nl(e,t,n,r){let s,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,s=n):(a=t,u=n,s=r),YE(e,a,c,s);function c(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const Qf={}.hasOwnProperty,T3={};function _3(e,t){const n=t||T3,r=new Map,s=new Map,a=new Map,u=B(B({},n3),n.handlers),c={all:f,applyData:x3,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:S3,wrap:A3};return Nl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:s,T=String(p.identifier).toUpperCase();m.has(T)||m.set(T,p)}}),c;function d(p,m){const T=p.type,y=c.handlers[T];if(Qf.call(c.handlers,T)&&y)return y(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(T)){if("children"in p){const w=p,{children:v}=w,A=fn(w,["children"]),k=ls(A);return k.children=c.all(p),k}return ls(p)}return(c.options.unknownHandler||w3)(c,p,m)}function f(p){const m=[];if("children"in p){const T=p.children;let y=-1;for(;++y<T.length;){const _=c.one(T[y],p);if(_){if(y&&T[y-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=WE(_.value)),!Array.isArray(_)&&_.type==="element")){const w=_.children[0];w&&w.type==="text"&&(w.value=WE(w.value))}Array.isArray(_)?m.push(..._):m.push(_)}}}return m}}function S3(e,t){e.position&&(t.position=tE(e))}function x3(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,ls(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function w3(e,t){const n=t.data||{},r="value"in t&&!(Qf.call(n,"hProperties")||Qf.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 A3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
27
27
  `});++r<e.length;)r&&n.push({type:"text",value:`
28
28
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
29
29
  `}),n}function WE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function GE(e,t){const n=_3(e,t),r=n.one(e,void 0),s=d3(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
30
- `},s),a}function C3(e,t){return e&&"run"in e?function(n,r){return Ke(this,null,function*(){const s=GE(n,B({file:r},t));yield e.run(s,r)})}:function(n,r){return GE(n,B({file:r},e||t))}}function XE(e){if(e)throw e}var Jf,KE;function v3(){if(KE)return Jf;KE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var T;for(T in f);return typeof T=="undefined"||e.call(f,T)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},c=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return Jf=function d(){var f,p,m,T,y,_,w=arguments[0],v=1,A=arguments.length,N=!1;for(typeof w=="boolean"&&(N=w,w=arguments[1]||{},v=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});v<A;++v)if(f=arguments[v],f!=null)for(p in f)m=c(w,p),T=c(f,p),w!==T&&(N&&T&&(a(T)||(y=s(T)))?(y?(y=!1,_=m&&s(m)?m:[]):_=m&&a(m)?m:{},u(w,{name:p,newValue:d(N,_,T)})):typeof T!="undefined"&&u(w,{name:p,newValue:T}));return w},Jf}var N3=v3();const Zf=Qe(N3);function eh(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function k3(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const u=s.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...s);function c(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,p?P3(p,c)(...f):u(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function P3(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(s);try{d=e.apply(this,u)}catch(f){const p=f;if(c&&n)throw p;return s(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(u,...c){n||(n=!0,t(u,...c))}function a(u){s(null,u)}}const Lr={basename:O3,dirname:I3,extname:R3,join:L3,sep:"/"};function O3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Oa(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else u<0&&(a=!0,u=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(r=s):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function I3(e){if(Oa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function R3(e){Oa(e);let t=e.length,n=-1,r=0,s=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function L3(...e){let t=-1,n;for(;++t<e.length;)Oa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":D3(n)}function D3(e){Oa(e);const t=e.codePointAt(0)===47;let n=M3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function M3(e,t){let n="",r=0,s=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(s===u-1||a===1))if(s!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),s=u,a=0;continue}}else if(n.length>0){n="",r=0,s=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,u):n=e.slice(s+1,u),r=u-s-1;s=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function Oa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const F3={cwd:B3};function B3(){return"/"}function th(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function U3(e){if(typeof e=="string")e=new URL(e);else if(!th(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 H3(e)}function H3(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const nh=["history","path","basename","stem","extname","dirname"];class QE{constructor(t){let n;t?th(t)?n={path:t}:typeof t=="string"||z3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":F3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<nh.length;){const a=nh[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)nh.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Lr.basename(this.path):void 0}set basename(t){ih(t,"basename"),rh(t,"basename"),this.path=Lr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Lr.dirname(this.path):void 0}set dirname(t){JE(this.basename,"dirname"),this.path=Lr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Lr.extname(this.path):void 0}set extname(t){if(rh(t,"extname"),JE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Lr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){th(t)&&(t=U3(t)),ih(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Lr.basename(this.path,this.extname):void 0}set stem(t){ih(t,"stem"),rh(t,"stem"),this.path=Lr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new gn(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function rh(e,t){if(e&&e.includes(Lr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Lr.sep+"`")}function ih(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function JE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function z3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const j3=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),$3={}.hasOwnProperty;class sh extends j3{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=k3()}copy(){const t=new sh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Zf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(uh("data",this.frozen),this.namespace[t]=n,this):$3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(uh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=kl(t),r=this.parser||this.Parser;return oh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),oh("process",this.parser||this.Parser),ah("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const c=kl(t),d=r.parse(c);r.run(d,c,function(p,m,T){if(p||!m||!T)return f(p);const y=m,_=r.stringify(y,T);Y3(_)?T.value=_:T.result=_,f(p,T)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),oh("processSync",this.parser||this.Parser),ah("processSync",this.compiler||this.Compiler),this.process(t,s),ey("processSync","process",n),r;function s(a,u){n=!0,XE(a),r=u}}run(t,n,r){ZE(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=kl(n);s.run(t,d,f);function f(p,m,T){const y=m||t;p?c(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),ey("runSync","run",r),s;function a(u,c){XE(u),s=c,r=!0}}stringify(t,n){this.freeze();const r=kl(n),s=this.compiler||this.Compiler;return ah("stringify",s),ZE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(uh("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(f.plugins),f.settings&&(s.settings=Zf(!0,s.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,T=-1;for(;++m<r.length;)if(r[m][0]===f){T=m;break}if(T===-1)r.push([f,...p]);else if(p.length>0){let[y,..._]=p;const w=r[T][1];eh(w)&&eh(y)&&(y=Zf(!0,w,y)),r[T]=[f,y,..._]}}}}const V3=new sh().freeze();function oh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ah(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function uh(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 ZE(e){if(!eh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ey(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function kl(e){return q3(e)?e:new QE(e)}function q3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Y3(e){return typeof e=="string"||W3(e)}function W3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const G3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ty=[],ny={allowDangerousHtml:!0},X3=/^(https?|ircs?|mailto|xmpp)$/i,K3=[{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 ry(e){const t=Q3(e),n=J3(e);return Z3(t.runSync(t.parse(n),n),e)}function Q3(e){const t=e.rehypePlugins||ty,n=e.remarkPlugins||ty,r=e.remarkRehypeOptions?B(B({},e.remarkRehypeOptions),ny):ny;return V3().use(PO).use(n).use(C3,r).use(t)}function J3(e){const t=e.children||"",n=new QE;return typeof t=="string"&&(n.value=t),n}function Z3(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||eI;for(const p of K3)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+G3+p.id,void 0);return Nl(e,f),Sk(e,{Fragment:S.Fragment,components:s,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function f(p,m,T){if(p.type==="raw"&&T&&typeof m=="number")return u?T.children.splice(m,1):T.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in Bf)if(Object.hasOwn(Bf,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],w=Bf[y];(w===null||w.includes(p.tagName))&&(p.properties[y]=d(String(_||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,T)),y&&T&&typeof m=="number")return c&&p.children?T.children.splice(m,1,...p.children):T.children.splice(m,1),m}}}function eI(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||X3.test(e.slice(0,t))?e:""}const iy=/[#.]/g;function tI(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){iy.lastIndex=s;const c=iy.exec(n),d=n.slice(s,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,s+=d.length),c&&(a=c[0],s++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function sy(e,t,n){const r=n?sI(n):void 0;function s(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const f=u;c.unshift(f)}else{d=tI(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,nI(u))c.unshift(u);else for(const[m,T]of Object.entries(u))rI(e,d.properties,m,T)}for(const f of c)lh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function nI(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const s=t[r];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const a=s;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function rI(e,t,n,r){const s=gl(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?s.spaceSeparated?a=G1(r):s.commaSeparated?a=D1(r):s.commaOrSpaceSeparated?a=G1(D1(r).join(" ")):a=oy(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?iI(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(oy(s,s.property,c));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function lh(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)lh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?lh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function oy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Ta(n)===Ta(t)))return!0}return n}function iI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function sI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const oI=["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"],aI=sy(_a,"div"),uI=sy(_i,"g",oI);function lI(e){const t=String(e),n=[];return{toOffset:s,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=ay(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function s(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],d=ay(t,c),f=d===-1?t.length+1:d+1;if(c===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function ay(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
31
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const cs={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},uy={}.hasOwnProperty,cI=Object.prototype;function dI(e,t){const n=t||{};return ch({file:n.file||void 0,location:!1,schema:n.space==="svg"?_i:_a,verbose:n.verbose||!1},e)}function ch(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Pl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:ly(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=lI(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Pl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Pl(e,r,n),n}default:return n=fI(e,t),n}}function ly(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=ch(e,t[n]);r.push(s)}return r}function fI(e,t){const n=e.schema;e.schema=t.namespaceURI===cs.svg?_i:_a;let r=-1;const s={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;uy.call(cI,d)||(s[d]=c.value)}const u=(e.schema.space==="svg"?uI:aI)(t.tagName,s,ly(e,t.childNodes));if(Pl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&ro(d.startTag),p=d&&d.endTag&&ro(d.endTag),m=ch(e,c.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Pl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=hI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function hI(e,t,n){const r=ro(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)uy.call(n.attrs,u)&&(a[gl(e.schema,u).property]=ro(n.attrs[u]));n.startTag;const c=ro(n.startTag),d=n.endTag?ro(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function ro(e){const t=cy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=cy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function cy(e){return e.line&&e.column?e:void 0}const dy={}.hasOwnProperty;function fy(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const c=r.handlers;if(s&&dy.call(s,e)){const d=String(s[e]);u=dy.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,s,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const pI={},mI={}.hasOwnProperty,hy=fy("type",{handlers:{root:EI,element:SI,text:TI,comment:_I,doctype:bI}});function gI(e,t){const r=(t||pI).space;return hy(e,r==="svg"?_i:_a)}function EI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=dh(e.children,n,t),io(e,n),n}function yI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=dh(e.children,n,t),io(e,n),n}function bI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return io(e,t),t}function TI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return io(e,t),t}function _I(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return io(e,t),t}function SI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=_i);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&mI.call(e.properties,a)){const d=xI(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:cs[u],childNodes:[],parentNode:null};return c.childNodes=dh(e.children,c,r),io(e,c),e.tagName==="template"&&e.content&&(c.content=yI(e.content,r)),c}function xI(e,t,n){const r=gl(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?M1(n):X1(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=s.name.indexOf(":");a<0?s.prefix="":(s.name=s.name.slice(a+1),s.prefix=r.attribute.slice(0,a)),s.namespace=cs[r.space]}return s}function dh(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=hy(e[r],n);a.parentNode=t,s.push(a)}return s}function io(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 wI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],AI=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),wt="�";var P;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(P||(P={}));const Dn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function py(e){return e>=55296&&e<=57343}function CI(e){return e>=56320&&e<=57343}function vI(e,t){return(e-55296)*1024+9216+t}function my(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function gy(e){return e>=64976&&e<=65007||AI.has(e)}var te;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(te||(te={}));const NI=65536;class kI{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=NI,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:s,offset:a}=this,u=s+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(CI(n))return this.pos++,this._addGap(),vI(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(te.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;const r=this.html.charCodeAt(n);return r===P.CARRIAGE_RETURN?P.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;let t=this.html.charCodeAt(this.pos);return t===P.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,P.LINE_FEED):t===P.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,py(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===P.LINE_FEED||t===P.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){my(t)?this._err(te.controlCharacterInInputStream):gy(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Xe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Xe||(Xe={}));function Ey(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 PI=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),OI=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 II(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=OI.get(e))!==null&&t!==void 0?t:e}var Xt;(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"})(Xt||(Xt={}));const RI=32;var wi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(wi||(wi={}));function fh(e){return e>=Xt.ZERO&&e<=Xt.NINE}function LI(e){return e>=Xt.UPPER_A&&e<=Xt.UPPER_F||e>=Xt.LOWER_A&&e<=Xt.LOWER_F}function DI(e){return e>=Xt.UPPER_A&&e<=Xt.UPPER_Z||e>=Xt.LOWER_A&&e<=Xt.LOWER_Z||fh(e)}function MI(e){return e===Xt.EQUALS||DI(e)}var Kt;(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"})(Kt||(Kt={}));var si;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(si||(si={}));class FI{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Kt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=si.Strict}startEntity(t){this.decodeMode=t,this.state=Kt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Kt.EntityStart:return t.charCodeAt(n)===Xt.NUM?(this.state=Kt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Kt.NamedEntity,this.stateNamedEntity(t,n));case Kt.NumericStart:return this.stateNumericStart(t,n);case Kt.NumericDecimal:return this.stateNumericDecimal(t,n);case Kt.NumericHex:return this.stateNumericHex(t,n);case Kt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|RI)===Xt.LOWER_X?(this.state=Kt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Kt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const a=r-n;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(n,a),s),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(fh(s)||LI(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(fh(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Xt.SEMI)this.consumed+=1;else if(this.decodeMode===si.Strict)return 0;return this.emitCodePoint(II(this.result),this.consumed),this.errors&&(t!==Xt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],a=(s&wi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=BI(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===si.Attribute&&(a===0||MI(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&wi.VALUE_LENGTH)>>14,a!==0){if(u===Xt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==si.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&wi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~wi.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Kt.NamedEntity:return this.result!==0&&(this.decodeMode!==si.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Kt.NumericDecimal:return this.emitNumericEntity(0,2);case Kt.NumericHex:return this.emitNumericEntity(0,3);case Kt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Kt.EntityStart:return 0}}}function BI(e,t,n,r){const s=(t&wi.BRANCH_LENGTH)>>7,a=t&wi.JUMP_TABLE;if(s===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=s?-1:e[n+d]-1}let u=n,c=u+s-1;for(;u<=c;){const d=u+c>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)c=d-1;else return e[d+s]}return-1}var ce;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(ce||(ce={}));var ds;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(ds||(ds={}));var rr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(rr||(rr={}));var X;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(X||(X={}));var g;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(g||(g={}));const UI=new Map([[X.A,g.A],[X.ADDRESS,g.ADDRESS],[X.ANNOTATION_XML,g.ANNOTATION_XML],[X.APPLET,g.APPLET],[X.AREA,g.AREA],[X.ARTICLE,g.ARTICLE],[X.ASIDE,g.ASIDE],[X.B,g.B],[X.BASE,g.BASE],[X.BASEFONT,g.BASEFONT],[X.BGSOUND,g.BGSOUND],[X.BIG,g.BIG],[X.BLOCKQUOTE,g.BLOCKQUOTE],[X.BODY,g.BODY],[X.BR,g.BR],[X.BUTTON,g.BUTTON],[X.CAPTION,g.CAPTION],[X.CENTER,g.CENTER],[X.CODE,g.CODE],[X.COL,g.COL],[X.COLGROUP,g.COLGROUP],[X.DD,g.DD],[X.DESC,g.DESC],[X.DETAILS,g.DETAILS],[X.DIALOG,g.DIALOG],[X.DIR,g.DIR],[X.DIV,g.DIV],[X.DL,g.DL],[X.DT,g.DT],[X.EM,g.EM],[X.EMBED,g.EMBED],[X.FIELDSET,g.FIELDSET],[X.FIGCAPTION,g.FIGCAPTION],[X.FIGURE,g.FIGURE],[X.FONT,g.FONT],[X.FOOTER,g.FOOTER],[X.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[X.FORM,g.FORM],[X.FRAME,g.FRAME],[X.FRAMESET,g.FRAMESET],[X.H1,g.H1],[X.H2,g.H2],[X.H3,g.H3],[X.H4,g.H4],[X.H5,g.H5],[X.H6,g.H6],[X.HEAD,g.HEAD],[X.HEADER,g.HEADER],[X.HGROUP,g.HGROUP],[X.HR,g.HR],[X.HTML,g.HTML],[X.I,g.I],[X.IMG,g.IMG],[X.IMAGE,g.IMAGE],[X.INPUT,g.INPUT],[X.IFRAME,g.IFRAME],[X.KEYGEN,g.KEYGEN],[X.LABEL,g.LABEL],[X.LI,g.LI],[X.LINK,g.LINK],[X.LISTING,g.LISTING],[X.MAIN,g.MAIN],[X.MALIGNMARK,g.MALIGNMARK],[X.MARQUEE,g.MARQUEE],[X.MATH,g.MATH],[X.MENU,g.MENU],[X.META,g.META],[X.MGLYPH,g.MGLYPH],[X.MI,g.MI],[X.MO,g.MO],[X.MN,g.MN],[X.MS,g.MS],[X.MTEXT,g.MTEXT],[X.NAV,g.NAV],[X.NOBR,g.NOBR],[X.NOFRAMES,g.NOFRAMES],[X.NOEMBED,g.NOEMBED],[X.NOSCRIPT,g.NOSCRIPT],[X.OBJECT,g.OBJECT],[X.OL,g.OL],[X.OPTGROUP,g.OPTGROUP],[X.OPTION,g.OPTION],[X.P,g.P],[X.PARAM,g.PARAM],[X.PLAINTEXT,g.PLAINTEXT],[X.PRE,g.PRE],[X.RB,g.RB],[X.RP,g.RP],[X.RT,g.RT],[X.RTC,g.RTC],[X.RUBY,g.RUBY],[X.S,g.S],[X.SCRIPT,g.SCRIPT],[X.SEARCH,g.SEARCH],[X.SECTION,g.SECTION],[X.SELECT,g.SELECT],[X.SOURCE,g.SOURCE],[X.SMALL,g.SMALL],[X.SPAN,g.SPAN],[X.STRIKE,g.STRIKE],[X.STRONG,g.STRONG],[X.STYLE,g.STYLE],[X.SUB,g.SUB],[X.SUMMARY,g.SUMMARY],[X.SUP,g.SUP],[X.TABLE,g.TABLE],[X.TBODY,g.TBODY],[X.TEMPLATE,g.TEMPLATE],[X.TEXTAREA,g.TEXTAREA],[X.TFOOT,g.TFOOT],[X.TD,g.TD],[X.TH,g.TH],[X.THEAD,g.THEAD],[X.TITLE,g.TITLE],[X.TR,g.TR],[X.TRACK,g.TRACK],[X.TT,g.TT],[X.U,g.U],[X.UL,g.UL],[X.SVG,g.SVG],[X.VAR,g.VAR],[X.WBR,g.WBR],[X.XMP,g.XMP]]);function so(e){var t;return(t=UI.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const he=g,HI={[ce.HTML]:new Set([he.ADDRESS,he.APPLET,he.AREA,he.ARTICLE,he.ASIDE,he.BASE,he.BASEFONT,he.BGSOUND,he.BLOCKQUOTE,he.BODY,he.BR,he.BUTTON,he.CAPTION,he.CENTER,he.COL,he.COLGROUP,he.DD,he.DETAILS,he.DIR,he.DIV,he.DL,he.DT,he.EMBED,he.FIELDSET,he.FIGCAPTION,he.FIGURE,he.FOOTER,he.FORM,he.FRAME,he.FRAMESET,he.H1,he.H2,he.H3,he.H4,he.H5,he.H6,he.HEAD,he.HEADER,he.HGROUP,he.HR,he.HTML,he.IFRAME,he.IMG,he.INPUT,he.LI,he.LINK,he.LISTING,he.MAIN,he.MARQUEE,he.MENU,he.META,he.NAV,he.NOEMBED,he.NOFRAMES,he.NOSCRIPT,he.OBJECT,he.OL,he.P,he.PARAM,he.PLAINTEXT,he.PRE,he.SCRIPT,he.SECTION,he.SELECT,he.SOURCE,he.STYLE,he.SUMMARY,he.TABLE,he.TBODY,he.TD,he.TEMPLATE,he.TEXTAREA,he.TFOOT,he.TH,he.THEAD,he.TITLE,he.TR,he.TRACK,he.UL,he.WBR,he.XMP]),[ce.MATHML]:new Set([he.MI,he.MO,he.MN,he.MS,he.MTEXT,he.ANNOTATION_XML]),[ce.SVG]:new Set([he.TITLE,he.FOREIGN_OBJECT,he.DESC]),[ce.XLINK]:new Set,[ce.XML]:new Set,[ce.XMLNS]:new Set},hh=new Set([he.H1,he.H2,he.H3,he.H4,he.H5,he.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var I;(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"})(I||(I={}));const Lt={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function zI(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function Ia(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function jI(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function Ai(e){return jI(e)||Ia(e)}function yy(e){return Ai(e)||zI(e)}function Ol(e){return e+32}function by(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function Ty(e){return by(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function $I(e){return e===P.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:py(e)?te.surrogateCharacterReference:gy(e)?te.noncharacterCharacterReference:my(e)||e===P.CARRIAGE_RETURN?te.controlCharacterReference:null}class VI{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=I.DATA,this.returnState=I.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new kI(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new FI(PI,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=$I(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Xe.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Xe.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Xe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Xe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Ey(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=so(t.tagName),t.type===Xe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Xe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Xe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Xe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Xe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=by(t)?Xe.WHITESPACE_CHARACTER:t===P.NULL?Xe.NULL_CHARACTER:Xe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Xe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?si.Attribute:si.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===I.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case I.DATA:{this._stateData(t);break}case I.RCDATA:{this._stateRcdata(t);break}case I.RAWTEXT:{this._stateRawtext(t);break}case I.SCRIPT_DATA:{this._stateScriptData(t);break}case I.PLAINTEXT:{this._statePlaintext(t);break}case I.TAG_OPEN:{this._stateTagOpen(t);break}case I.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case I.TAG_NAME:{this._stateTagName(t);break}case I.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case I.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case I.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case I.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case I.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case I.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case I.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case I.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case I.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case I.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case I.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case I.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case I.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case I.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case I.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case I.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case I.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case I.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case I.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case I.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case I.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case I.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case I.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case I.BOGUS_COMMENT:{this._stateBogusComment(t);break}case I.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case I.COMMENT_START:{this._stateCommentStart(t);break}case I.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case I.COMMENT:{this._stateComment(t);break}case I.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case I.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case I.COMMENT_END:{this._stateCommentEnd(t);break}case I.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case I.DOCTYPE:{this._stateDoctype(t);break}case I.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case I.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case I.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case I.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case I.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case I.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case I.CDATA_SECTION:{this._stateCdataSection(t);break}case I.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case I.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case I.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case I.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=I.TAG_OPEN;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case P.AMPERSAND:{this._startCharacterReference();break}case P.LESS_THAN_SIGN:{this.state=I.RCDATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case P.LESS_THAN_SIGN:{this.state=I.RAWTEXT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ai(t))this._createStartTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case P.EXCLAMATION_MARK:{this.state=I.MARKUP_DECLARATION_OPEN;break}case P.SOLIDUS:{this.state=I.END_TAG_OPEN;break}case P.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ai(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=I.DATA;break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=wt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ia(t)?Ol(t):t)}}_stateRcdataLessThanSign(t){t===P.SOLIDUS?this.state=I.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ai(t)?(this.state=I.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=I.BEFORE_ATTRIBUTE_NAME,!1;case P.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=I.SELF_CLOSING_START_TAG,!1;case P.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=I.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===P.SOLIDUS?this.state=I.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ai(t)?(this.state=I.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case P.SOLIDUS:{this.state=I.SCRIPT_DATA_END_TAG_OPEN;break}case P.EXCLAMATION_MARK:{this.state=I.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=I.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ai(t)?(this.state=I.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===P.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===P.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===P.SOLIDUS?this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ai(t)?(this._emitChars("<"),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ai(t)?(this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Dn.SCRIPT,!1)&&Ty(this.preprocessor.peek(Dn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Dn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===P.SOLIDUS?(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Dn.SCRIPT,!1)&&Ty(this.preprocessor.peek(Dn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Dn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=I.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this._leaveAttrName(),this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._leaveAttrName(),this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=wt;break}default:this.currentAttr.name+=String.fromCodePoint(Ia(t)?Ol(t):t)}}_stateAfterAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case P.EQUALS_SIGN:{this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{this.state=I.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this.state=I.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=I.DATA,this.emitCurrentTagToken();break}default:this.state=I.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case P.QUOTATION_MARK:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case P.APOSTROPHE:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this._leaveAttrValue(),this.state=I.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case P.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=I.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=wt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Dn.DASH_DASH,!0)?(this._createCommentToken(Dn.DASH_DASH.length+1),this.state=I.COMMENT_START):this._consumeSequenceIfMatch(Dn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Dn.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch(Dn.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(Dn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_START_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=I.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_END_DASH;break}case P.LESS_THAN_SIGN:{n.data+="<",this.state=I.COMMENT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=wt;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case P.EXCLAMATION_MARK:{n.data+="!",this.state=I.COMMENT_LESS_THAN_SIGN_BANG;break}case P.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===P.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=I.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===P.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=I.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==P.GREATER_THAN_SIGN&&t!==P.EOF&&this._err(te.nestedComment),this.state=I.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case P.EXCLAMATION_MARK:{this.state=I.COMMENT_END_BANG;break}case P.HYPHEN_MINUS:{n.data+="-";break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{n.data+="--!",this.state=I.COMMENT_END_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=I.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ia(t))this._createDoctypeToken(String.fromCharCode(Ol(t))),this.state=I.DOCTYPE_NAME;else switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(wt),this.state=I.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=I.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.AFTER_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.name+=wt;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ia(t)?Ol(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Dn.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Dn.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case P.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case P.NULL:{this._err(te.unexpectedNullCharacter);break}case P.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case P.RIGHT_SQUARE_BRACKET:{this.state=I.CDATA_SECTION_BRACKET;break}case P.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===P.RIGHT_SQUARE_BRACKET?this.state=I.CDATA_SECTION_END:(this._emitChars("]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case P.GREATER_THAN_SIGN:{this.state=I.DATA;break}case P.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(P.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&yy(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){yy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const _y=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Sy=new Set([..._y,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Il=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),qI=new Set([...Il,g.OL,g.UL]),YI=new Set([...Il,g.BUTTON]),xy=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),wy=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),WI=new Set([g.TR,g.TEMPLATE,g.HTML]),GI=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),XI=new Set([g.TABLE,g.TEMPLATE,g.HTML]),KI=new Set([g.TD,g.TH]);class QI{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ce.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==ce.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(hh,ce.HTML)}popUntilTableCellPopped(){this.popUntilPopped(KI,ce.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(XI,ce.HTML)}clearBackToTableBodyContext(){this.clearBackTo(GI,ce.HTML)}clearBackToTableRowContext(){this.clearBackTo(WI,ce.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ce.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case ce.SVG:{if(wy.has(s))return!1;break}case ce.MATHML:{if(xy.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Il)}hasInListItemScope(t){return this.hasInDynamicScope(t,qI)}hasInButtonScope(t){return this.hasInDynamicScope(t,YI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ce.HTML:{if(hh.has(n))return!0;if(Il.has(n))return!1;break}case ce.SVG:{if(wy.has(n))return!1;break}case ce.MATHML:{if(xy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ce.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ce.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ce.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&_y.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Sy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Sy.has(this.currentTagId);)this.pop()}}const ph=3;var Dr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Dr||(Dr={}));const Ay={type:Dr.Marker};class JI{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===Dr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===s&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<ph)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<ph)return;const s=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>s.get(d.name)===d.value)&&(a+=1,a>=ph&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(Ay)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Dr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Dr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Ay);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Dr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Dr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Dr.Element&&n.element===t)}}const Ci={createDocument(){return{nodeName:"#document",mode:rr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ci.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Ci.isTextNode(n)){n.value+=t;return}}Ci.appendChild(e,Ci.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ci.isTextNode(r)?r.value+=t:Ci.insertBefore(e,Ci.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=B(B({},e.sourceCodeLocation),t)}},Cy="html",ZI="about:legacy-compat",eR="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",vy=["+//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//"],tR=[...vy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],nR=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Ny=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],rR=[...Ny,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ky(e,t){return t.some(n=>e.startsWith(n))}function iR(e){return e.name===Cy&&e.publicId===null&&(e.systemId===null||e.systemId===ZI)}function sR(e){if(e.name!==Cy)return rr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===eR)return rr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),nR.has(n))return rr.QUIRKS;let r=t===null?tR:vy;if(ky(n,r))return rr.QUIRKS;if(r=t===null?Ny:rR,ky(n,r))return rr.LIMITED_QUIRKS}return rr.NO_QUIRKS}const Py={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},oR="definitionurl",aR="definitionURL",uR=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])),lR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ce.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ce.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ce.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ce.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ce.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ce.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ce.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ce.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ce.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ce.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ce.XMLNS}]]),cR=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])),dR=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function fR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===ds.COLOR||r===ds.SIZE||r===ds.FACE)||dR.has(t)}function Oy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===oR){e.attrs[t].name=aR;break}}function Iy(e){for(let t=0;t<e.attrs.length;t++){const n=uR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function mh(e){for(let t=0;t<e.attrs.length;t++){const n=lR.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 hR(e){const t=cR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=so(e.tagName))}function pR(e,t){return t===ce.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function mR(e,t,n){if(t===ce.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ds.ENCODING){const s=n[r].value.toLowerCase();return s===Py.TEXT_HTML||s===Py.APPLICATION_XML}}return t===ce.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function gR(e,t,n,r){return(!r||r===ce.HTML)&&mR(e,t,n)||(!r||r===ce.MATHML)&&pR(e,t)}const ER="hidden",yR=8,bR=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 TR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Ry=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Ly={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ci,onParseError:null};class Dy{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=B(B({},Ly),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 VI(this.options,this),this.activeFormattingElements=new JI(this.treeAdapter),this.fragmentContextID=r?so(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new QI(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({},Ly),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,ce.HTML,[]));const s=r.treeAdapter.createElement("documentmock",ce.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(M.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:TR,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var s,a;(a=(s=this.treeAdapter).onItemPush)===null||a===void 0||a.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===ce.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ce.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=Lt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===X.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ce.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Lt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Lt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Lt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Lt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&fe(B({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,ce.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ce.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(X.HTML,ce.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),a=r?s.lastIndexOf(r):s.length,u=s[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,s=this.treeAdapter.getTagName(t),a=n.type===Xe.END_TAG&&s===n.tagName?{endTag: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===g.SVG&&this.treeAdapter.getTagName(n)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ce.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ce.HTML)}_processToken(t){switch(t.type){case Xe.CHARACTER:{this.onCharacter(t);break}case Xe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Xe.COMMENT:{this.onComment(t);break}case Xe.DOCTYPE:{this.onDoctype(t);break}case Xe.START_TAG:{this._processStartTag(t);break}case Xe.END_TAG:{this.onEndTag(t);break}case Xe.EOF:{this.onEof(t);break}case Xe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return gR(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Dr.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const a=this.activeFormattingElements.entries[s];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=M.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=M.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=M.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=M.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=M.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=M.IN_TABLE;return}case g.BODY:{this.insertionMode=M.IN_BODY;return}case g.FRAMESET:{this.insertionMode=M.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?M.AFTER_HEAD:M.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=M.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=M.IN_HEAD;return}break}}this.insertionMode=M.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=M.IN_SELECT_IN_TABLE;return}}this.insertionMode=M.IN_SELECT}_isElementCausesFosterParenting(t){return Ry.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ce.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return HI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){KL(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ra(this,t);break}case M.BEFORE_HTML:{La(this,t);break}case M.BEFORE_HEAD:{Da(this,t);break}case M.IN_HEAD:{Ma(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case M.AFTER_HEAD:{Ba(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{Fy(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:{bh(this,t);break}case M.IN_TABLE_TEXT:{qy(this,t);break}case M.IN_COLUMN_GROUP:{Dl(this,t);break}case M.AFTER_BODY:{Bl(this,t);break}case M.AFTER_AFTER_BODY:{Ul(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){XL(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ra(this,t);break}case M.BEFORE_HTML:{La(this,t);break}case M.BEFORE_HEAD:{Da(this,t);break}case M.IN_HEAD:{Ma(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case M.AFTER_HEAD:{Ba(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{bh(this,t);break}case M.IN_COLUMN_GROUP:{Dl(this,t);break}case M.AFTER_BODY:{Bl(this,t);break}case M.AFTER_AFTER_BODY:{Ul(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Eh(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:{Eh(this,t);break}case M.IN_TABLE_TEXT:{za(this,t);break}case M.AFTER_BODY:{vR(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{NR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{kR(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case M.IN_TABLE_TEXT:{za(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?QL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ra(this,t);break}case M.BEFORE_HTML:{PR(this,t);break}case M.BEFORE_HEAD:{IR(this,t);break}case M.IN_HEAD:{Er(this,t);break}case M.IN_HEAD_NO_SCRIPT:{DR(this,t);break}case M.AFTER_HEAD:{FR(this,t);break}case M.IN_BODY:{yn(this,t);break}case M.IN_TABLE:{oo(this,t);break}case M.IN_TABLE_TEXT:{za(this,t);break}case M.IN_CAPTION:{RL(this,t);break}case M.IN_COLUMN_GROUP:{Th(this,t);break}case M.IN_TABLE_BODY:{Ml(this,t);break}case M.IN_ROW:{Fl(this,t);break}case M.IN_CELL:{ML(this,t);break}case M.IN_SELECT:{Gy(this,t);break}case M.IN_SELECT_IN_TABLE:{BL(this,t);break}case M.IN_TEMPLATE:{HL(this,t);break}case M.AFTER_BODY:{jL(this,t);break}case M.IN_FRAMESET:{$L(this,t);break}case M.AFTER_FRAMESET:{qL(this,t);break}case M.AFTER_AFTER_BODY:{WL(this,t);break}case M.AFTER_AFTER_FRAMESET:{GL(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?JL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ra(this,t);break}case M.BEFORE_HTML:{OR(this,t);break}case M.BEFORE_HEAD:{RR(this,t);break}case M.IN_HEAD:{LR(this,t);break}case M.IN_HEAD_NO_SCRIPT:{MR(this,t);break}case M.AFTER_HEAD:{BR(this,t);break}case M.IN_BODY:{Ll(this,t);break}case M.TEXT:{xL(this,t);break}case M.IN_TABLE:{Ua(this,t);break}case M.IN_TABLE_TEXT:{za(this,t);break}case M.IN_CAPTION:{LL(this,t);break}case M.IN_COLUMN_GROUP:{DL(this,t);break}case M.IN_TABLE_BODY:{_h(this,t);break}case M.IN_ROW:{Wy(this,t);break}case M.IN_CELL:{FL(this,t);break}case M.IN_SELECT:{Xy(this,t);break}case M.IN_SELECT_IN_TABLE:{UL(this,t);break}case M.IN_TEMPLATE:{zL(this,t);break}case M.AFTER_BODY:{Qy(this,t);break}case M.IN_FRAMESET:{VL(this,t);break}case M.AFTER_FRAMESET:{YL(this,t);break}case M.AFTER_AFTER_BODY:{Ul(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Ra(this,t);break}case M.BEFORE_HTML:{La(this,t);break}case M.BEFORE_HEAD:{Da(this,t);break}case M.IN_HEAD:{Ma(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case M.AFTER_HEAD:{Ba(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:{$y(this,t);break}case M.TEXT:{wL(this,t);break}case M.IN_TABLE_TEXT:{za(this,t);break}case M.IN_TEMPLATE:{Ky(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:{yh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===P.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{My(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{bh(this,t);break}case M.IN_TABLE_TEXT:{Vy(this,t);break}}}}function _R(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):jy(e,t),n}function SR(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function xR(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let a=0,u=s;u!==n;a++,u=s){s=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=bR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=wR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function wR(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 AR(e,t,n){const r=e.treeAdapter.getTagName(t),s=so(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===ce.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function CR(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,a=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,s.tagID)}function gh(e,t){for(let n=0;n<yR;n++){const r=_R(e,t);if(!r)break;const s=SR(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=xR(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&AR(e,u,a),CR(e,s,r)}}function Eh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function vR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function NR(e,t){e._appendCommentNode(t,e.document)}function yh(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function kR(e,t){e._setDocumentType(t);const n=t.forceQuirks?rr.QUIRKS:sR(t);iR(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Ra(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,rr.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function PR(e,t){t.tagID===g.HTML?(e._insertElement(t,ce.HTML),e.insertionMode=M.BEFORE_HEAD):La(e,t)}function OR(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&La(e,t)}function La(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function IR(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.HEAD:{e._insertElement(t,ce.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:Da(e,t)}}function RR(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Da(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function Da(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function Er(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Lt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Lt.RAWTEXT):(e._insertElement(t,ce.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Lt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Lt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=M.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(M.IN_TEMPLATE);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Ma(e,t)}}function LR(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=M.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Ma(e,t);break}case g.TEMPLATE:{fs(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function fs(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function Ma(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function DR(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Er(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:Fa(e,t)}}function MR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case g.BR:{Fa(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Fa(e,t){const n=t.type===Xe.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function FR(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.BODY:{e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,ce.HTML),e.insertionMode=M.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),Er(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Ba(e,t)}}function BR(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Ba(e,t);break}case g.TEMPLATE:{fs(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Ba(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=M.IN_BODY,Rl(e,t)}function Rl(e,t){switch(t.type){case Xe.CHARACTER:{Fy(e,t);break}case Xe.WHITESPACE_CHARACTER:{My(e,t);break}case Xe.COMMENT:{Eh(e,t);break}case Xe.START_TAG:{yn(e,t);break}case Xe.END_TAG:{Ll(e,t);break}case Xe.EOF:{$y(e,t);break}}}function My(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Fy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function UR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function HR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function zR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_FRAMESET)}function jR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML)}function $R(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&hh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ce.HTML)}function VR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function qR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),n||(e.formElement=e.openElements.current))}function YR(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===g.LI&&s===g.LI||(n===g.DD||n===g.DT)&&(s===g.DD||s===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==g.ADDRESS&&s!==g.DIV&&s!==g.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML)}function WR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.tokenizer.state=Lt.PLAINTEXT}function GR(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.framesetOk=!1}function XR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(gh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function KR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function QR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(gh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function JR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function ZR(e,t){e.treeAdapter.getDocumentMode(e.document)!==rr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function By(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ce.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Uy(e){const t=Ey(e,ds.TYPE);return t!=null&&t.toLowerCase()===ER}function eL(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ce.HTML),Uy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function tL(e,t){e._appendElement(t,ce.HTML),t.ackSelfClosing=!0}function nL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,ce.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function rL(e,t){t.tagName=X.IMG,t.tagID=g.IMG,By(e,t)}function iL(e,t){e._insertElement(t,ce.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Lt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function sL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function oL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function Hy(e,t){e._switchToTextParsing(t,Lt.RAWTEXT)}function aL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function uL(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML)}function lL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ce.HTML)}function cL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,ce.HTML)}function dL(e,t){e._reconstructActiveFormattingElements(),Oy(t),mh(t),t.selfClosing?e._appendElement(t,ce.MATHML):e._insertElement(t,ce.MATHML),t.ackSelfClosing=!0}function fL(e,t){e._reconstructActiveFormattingElements(),Iy(t),mh(t),t.selfClosing?e._appendElement(t,ce.SVG):e._insertElement(t,ce.SVG),t.ackSelfClosing=!0}function zy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML)}function yn(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{KR(e,t);break}case g.A:{XR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{$R(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{jR(e,t);break}case g.LI:case g.DD:case g.DT:{YR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{By(e,t);break}case g.HR:{nL(e,t);break}case g.RB:case g.RTC:{lL(e,t);break}case g.RT:case g.RP:{cL(e,t);break}case g.PRE:case g.LISTING:{VR(e,t);break}case g.XMP:{sL(e,t);break}case g.SVG:{fL(e,t);break}case g.HTML:{UR(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{Er(e,t);break}case g.BODY:{HR(e,t);break}case g.FORM:{qR(e,t);break}case g.NOBR:{QR(e,t);break}case g.MATH:{dL(e,t);break}case g.TABLE:{ZR(e,t);break}case g.INPUT:{eL(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{tL(e,t);break}case g.IMAGE:{rL(e,t);break}case g.BUTTON:{GR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{JR(e,t);break}case g.IFRAME:{oL(e,t);break}case g.SELECT:{aL(e,t);break}case g.OPTION:case g.OPTGROUP:{uL(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Hy(e,t);break}case g.FRAMESET:{zR(e,t);break}case g.TEXTAREA:{iL(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Hy(e,t):zy(e,t);break}case g.PLAINTEXT:{WR(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:zy(e,t)}}function hL(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function pL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,Qy(e,t))}function mL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function gL(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):n&&e.openElements.remove(n))}function EL(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function yL(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function bL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function TL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function _L(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function SL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function jy(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const a=e.openElements.items[s],u=e.openElements.tagIDs[s];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(a,u))break}}function Ll(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{gh(e,t);break}case g.P:{EL(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{mL(e,t);break}case g.LI:{yL(e);break}case g.DD:case g.DT:{bL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{TL(e);break}case g.BR:{SL(e);break}case g.BODY:{hL(e,t);break}case g.HTML:{pL(e,t);break}case g.FORM:{gL(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{_L(e,t);break}case g.TEMPLATE:{fs(e,t);break}default:jy(e,t)}}function $y(e,t){e.tmplInsertionModeStack.length>0?Ky(e,t):yh(e,t)}function xL(e,t){var n;t.tagID===g.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function wL(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function bh(e,t){if(e.openElements.currentTagId!==void 0&&Ry.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case Xe.CHARACTER:{qy(e,t);break}case Xe.WHITESPACE_CHARACTER:{Vy(e,t);break}}else Ha(e,t)}function AL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_CAPTION}function CL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function vL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,Th(e,t)}function NL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_TABLE_BODY}function kL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=M.IN_TABLE_BODY,Ml(e,t)}function PL(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function OL(e,t){Uy(t)?e._appendElement(t,ce.HTML):Ha(e,t),t.ackSelfClosing=!0}function IL(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ce.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function oo(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{kL(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Er(e,t);break}case g.COL:{vL(e,t);break}case g.FORM:{IL(e,t);break}case g.TABLE:{PL(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{NL(e,t);break}case g.INPUT:{OL(e,t);break}case g.CAPTION:{AL(e,t);break}case g.COLGROUP:{CL(e,t);break}default:Ha(e,t)}}function Ua(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{fs(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Ha(e,t)}}function Ha(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Rl(e,t),e.fosterParentingEnabled=n}function Vy(e,t){e.pendingCharacterTokens.push(t)}function qy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function za(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 Yy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function RL(e,t){const n=t.tagID;Yy.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,oo(e,t)):yn(e,t)}function LL(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,n===g.TABLE&&Ua(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Ll(e,t)}}function Th(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.COL:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{Er(e,t);break}default:Dl(e,t)}}function DL(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TEMPLATE:{fs(e,t);break}case g.COL:break;default:Dl(e,t)}}function Dl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function Ml(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=M.IN_ROW,Fl(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,oo(e,t));break}default:oo(e,t)}}function _h(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,Ua(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:Ua(e,t)}}function Fl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Ml(e,t));break}default:oo(e,t)}}function Wy(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,_h(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,_h(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:Ua(e,t)}}function ML(e,t){const n=t.tagID;Yy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),Fl(e,t)):yn(e,t)}function FL(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Wy(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Ll(e,t)}}function Gy(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,ce.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ce.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{Er(e,t);break}}}function Xy(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{fs(e,t);break}}}function BL(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Gy(e,t)}function UL(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Xy(e,t)}function HL(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{Er(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=M.IN_TABLE,e.insertionMode=M.IN_TABLE,oo(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,Th(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,Ml(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,Fl(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,yn(e,t)}}function zL(e,t){t.tagID===g.TEMPLATE&&fs(e,t)}function Ky(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):yh(e,t)}function jL(e,t){t.tagID===g.HTML?yn(e,t):Bl(e,t)}function Qy(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=M.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Bl(e,t)}function Bl(e,t){e.insertionMode=M.IN_BODY,Rl(e,t)}function $L(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.FRAMESET:{e._insertElement(t,ce.HTML);break}case g.FRAME:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{Er(e,t);break}}}function VL(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=M.AFTER_FRAMESET))}function qL(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.NOFRAMES:{Er(e,t);break}}}function YL(e,t){t.tagID===g.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function WL(e,t){t.tagID===g.HTML?yn(e,t):Ul(e,t)}function Ul(e,t){e.insertionMode=M.IN_BODY,Rl(e,t)}function GL(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.NOFRAMES:{Er(e,t);break}}}function XL(e,t){t.chars=wt,e._insertCharacters(t)}function KL(e,t){e._insertCharacters(t),e.framesetOk=!1}function Jy(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ce.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function QL(e,t){if(fR(t))Jy(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ce.MATHML?Oy(t):r===ce.SVG&&(hR(t),Iy(t)),mh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function JL(e,t){if(t.tagID===g.P||t.tagID===g.BR){Jy(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===ce.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}X.AREA,X.BASE,X.BASEFONT,X.BGSOUND,X.BR,X.COL,X.EMBED,X.FRAME,X.HR,X.IMG,X.INPUT,X.KEYGEN,X.LINK,X.META,X.PARAM,X.SOURCE,X.TRACK,X.WBR;const ZL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,e6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Zy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function eb(e,t){const n=c6(e),r=fy("type",{handlers:{root:t6,element:n6,text:r6,comment:nb,doctype:i6,raw:o6},unknown:a6}),s={parser:n?new Dy(Zy):Dy.getFragmentParser(void 0,Zy),handle(c){r(c,s)},stitches:!1,options:t||{}};r(e,s),ao(s,Rr());const a=n?s.parser.document:s.parser.getFragment(),u=dI(a,{file:s.options.file});return s.stitches&&Nl(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function tb(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function t6(e,t){tb(e.children,t)}function n6(e,t){u6(e,t),tb(e.children,t),l6(e,t)}function r6(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Xe.CHARACTER,chars:e.value,location:ja(e)};ao(t,Rr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function i6(e,t){const n={type:Xe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ja(e)};ao(t,Rr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function s6(e,t){t.stitches=!0;const n=d6(e);if("children"in e&&"children"in n){const r=eb({type:"root",children:e.children},t.options);n.children=r.children}nb({type:"comment",value:{stitch:n}},t)}function nb(e,t){const n=e.value,r={type:Xe.COMMENT,data:n,location:ja(e)};ao(t,Rr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function o6(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,rb(t,Rr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(ZL,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function a6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))s6(n,t);else{let r="";throw e6.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 ao(e,t){rb(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Lt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function rb(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 u6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Lt.PLAINTEXT)return;ao(t,Rr(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:cs.html;s===cs.html&&n==="svg"&&(s=cs.svg);const a=gI(fe(B({},e),{children:[]}),{space:s===cs.svg?"svg":"html"}),u={type:Xe.START_TAG,tagName:n,tagID:so(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ja(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function l6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&wI.includes(n)||t.parser.tokenizer.state===Lt.PLAINTEXT)return;ao(t,El(e));const r={type:Xe.END_TAG,tagName:n,tagID:so(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ja(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Lt.RCDATA||t.parser.tokenizer.state===Lt.RAWTEXT||t.parser.tokenizer.state===Lt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Lt.DATA)}function c6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ja(e){const t=Rr(e)||{line:void 0,column:void 0,offset:void 0},n=El(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function d6(e){return"children"in e?ls(fe(B({},e),{children:[]})):ls(e)}function ib(e){return function(t,n){return eb(t,fe(B({},e),{file:n}))}}const hs=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],sb={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...hs,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...hs],h2:[["className","sr-only"]],img:[...hs,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...hs,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...hs],table:[...hs],ul:[...hs,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},vi={}.hasOwnProperty;function f6(e,t){let n={type:"root",children:[]};const r={schema:t?B(B({},sb),t):sb,stack:[]},s=ob(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function ob(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return h6(e,n);case"doctype":return p6(e,n);case"element":return m6(e,n);case"root":return g6(e,n);case"text":return E6(e,n)}}}function h6(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 $a(a,t),a}}function p6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return $a(n,t),n}}function m6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=ab(e,t.children),s=y6(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&vi.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:s,children:r};return $a(u,t),u}function g6(e,t){const r={type:"root",children:ab(e,t.children)};return $a(r,t),r}function E6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return $a(r,t),r}function ab(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=ob(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function y6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&vi.call(r,n)?r[n]:void 0,u=r&&vi.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(vi.call(c,f)){const p=c[f];let m=ub(e,cb(a,f),f,p);m==null&&(m=ub(e,cb(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&vi.call(s,n)){const p=s[n];for(f in p)vi.call(p,f)&&!vi.call(d,f)&&(d[f]=p[f])}return d}function ub(e,t,n,r){return t?Array.isArray(r)?b6(e,t,n,r):lb(e,t,n,r):void 0}function b6(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=lb(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function lb(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&T6(e,n,r)){if(typeof t=="object"&&t.length>1){let s=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){s=!0;break}}else if(u===r){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function T6(e,t,n){const r=e.schema.protocols&&vi.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),a=s.indexOf(":"),u=s.indexOf("?"),c=s.indexOf("#"),d=s.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&s.slice(0,p.length)===p)return!0}return!1}function $a(e,t){const n=tE(t);t.data&&(e.data=ls(t.data)),n&&(e.position=n)}function cb(e,t){let n,r=-1;if(e)for(;++r<e.length;){const s=e[r],a=typeof s=="string"?s:s[0];if(a===t)return s;a==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function _6(e){return function(t){return f6(t,e)}}const db=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return S.jsx("a",fe(B(B({className:W(e,`${H}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},S6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=tt();return!e&&!t?null:S.jsx("div",{className:W(n,`${H}-disclaimer`),children:t?S.jsx(ry,{rehypePlugins:[ib,_6],components:{ul:({children:r})=>S.jsx("ul",{className:W(n,`${H}-ul`),children:r}),ol:({children:r})=>S.jsx("ol",{className:W(n,`${H}-ol`),children:r}),li:({children:r})=>S.jsx("li",{className:W(n,`${H}-li`),children:r}),a:({href:r,title:s,children:a})=>S.jsx(db,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>S.jsx("img",{className:W(n,`${H}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>S.jsx("p",{className:W(n,`${H}-disclaimer-text`),children:r}),span:({children:r})=>S.jsx("span",{className:W(n,`${H}-disclaimer-text-span`),children:r})},children:t}):S.jsx("p",{className:W(n,`${H}-disclaimer-text`),children:e})})},Sh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:s,imageFile:a}=Vn(),{setImageFile:u}=Ks(),{logger:c,globalClassName:d,searchConfig:f,features:p}=tt(),m=F.useRef(null),T=F.useRef(null),y=F.useId(),_=!!(p!=null&&p.enableImageUpload),w=(a==null?void 0:a.name)||"",v=!!s||!1,A=v?"connected":"disconnected",N=t||!v,C=()=>a?new Promise((q,ne)=>{const ue=new FileReader;ue.readAsDataURL(a),ue.onload=()=>q(ue.result),ue.onerror=V=>ne(V)}):Promise.resolve(""),z=q=>Ke(null,null,function*(){var V;if(N)return;const ne=10*1024*1024,ue=(V=q.target.files)==null?void 0:V[0];if(ue){if(ue.size>ne){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(ue)}}),Y=()=>{u(null),T.current&&(T.current.value="")},D=q=>Ke(null,null,function*(){var V;q.preventDefault();const ne=(((V=m.current)==null?void 0:V.value)||"").trim();let ue="";try{ue=yield C()}catch(se){c==null||c.error("Error converting file to base64:",se),alert("There was an error processing the file. Please try again.");return}ne&&(Y(),m.current.value="",r(ne,ue))});return S.jsxs("div",{className:W(d,e,`cim-${n}-component`,a&&"with-attachments",`${H}-search-bar-wrapper`),children:[a&&S.jsxs("div",{className:W(d,`cim-${n}-component`,`${H}-image-file-preview`),children:[S.jsx("img",{className:W(d,`cim-${n}-component`,`${H}-image-preview`),src:URL.createObjectURL(a),alt:`${w} preview`,loading:"lazy"}),S.jsx("span",{className:W(d,`cim-${n}-component`,`${H}-image-file-name`),title:w,children:w}),S.jsx(L1,{className:W(`cim-${n}-component`,"clear-attachment"),label:"Remove image",onClick:Y})]}),S.jsxs("form",{className:W(d,e,`cim-${n}-component`,`${H}-search-bar`),name:`${H}-search-form`,onSubmit:D,children:[S.jsx("span",{role:"status",className:W(`${H}-connection-status-icon`,A),children:S.jsx("span",{className:`${H}-visually-hidden`,children:v?"Connected to assistant":"Disconnected from assistant"})}),_&&S.jsxs("div",{className:W(d,e,`cim-${n}-component`,N&&"disabled",`${H}-image-upload-button-container`),children:[S.jsx("button",{type:"button",className:W(d,e,`cim-${n}-component`,N&&"disabled",`${H}-image-upload-button`),"aria-label":"Upload an image",disabled:N,onClick:()=>{var q;return(q=T.current)==null?void 0:q.click()},children:S.jsx(YN,{"aria-hidden":"true"})}),S.jsx("input",{className:W(d,e,`cim-${n}-component`,`${H}-file-input`),type:"file",ref:T,id:y,"aria-label":"Upload an image file",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${H}-file-input`,disabled:N,onInput:z})]}),S.jsx("input",{className:W(d,e,`cim-${n}-component`,`${H}-search-input`),type:"text",ref:m,placeholder:f==null?void 0:f.placeholder,"aria-label":(f==null?void 0:f.inputAriaLabel)||(f==null?void 0:f.placeholder)||"Ask a question",name:`${H}-user-input`}),S.jsx(JN,{isLoading:N}),S.jsx(XN,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:N})]}),S.jsx(S6,{})]})};function x6(e){return _t({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function w6(e){return _t({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 fb=F.createContext({isOpen:!1}),xh=F.createContext(null),hb=F.createContext(null),ps=()=>{var n,r;const e=F.useContext(xh),t=F.useContext(hb);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},pb=({onClearChat:e,componentType:t})=>{const n=ps(),r=()=>{e(),n()};return S.jsxs("button",{className:W(`${H}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[S.jsx(w6,{}),"Clear chat"]})};function A6(e){return e==null?[]:Array.isArray(e)?e:[e]}var C6=(e,...t)=>e.concat(t),v6=(e,...t)=>e.filter(n=>!t.includes(n)),N6=e=>Array.from(new Set(e));function mb(e,t,n={}){const{step:r=1,loop:s=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?s?c:0:a>=u?s?0:t>u?u:t:a}function k6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return mb(e,t,{step:-r,loop:s})}var P6=e=>Array.isArray(e),gb=e=>e!=null&&typeof e=="object",O6=e=>gb(e)&&!P6(e),Hl=e=>typeof e=="string",uo=e=>typeof e=="function",I6=e=>e==null,R6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),L6=e=>Object.prototype.toString.call(e),Eb=Function.prototype.toString,D6=Eb.call(Object),M6=e=>{if(!gb(e)||L6(e)!="[object Object]"||U6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=R6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Eb.call(n)==D6},F6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,B6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,U6=e=>F6(e)||B6(e),H6=e=>e(),z6=()=>{},wh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function j6(e,t=0){let n=0,r=null;return((...s)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...s),n=a):r||(r=setTimeout(()=>{e(...s),n=Date.now(),r=null},t-u))})}var{min:$6,max:V6}=Math,q6=e=>Number.isNaN(e),Y6=e=>q6(e)?0:e,yb=(e,t,n)=>$6(V6(Y6(e),t),n);function Ah(e){if(!M6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const s=e[r];s!==void 0&&(n[r]=Ah(s))}return n}function Ch(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function W6(e,t){if(e==null)throw new Error(t())}function G6(e,t,n){let r=[];for(const s of t)e[s]==null&&r.push(s);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var X6=Object.defineProperty,K6=(e,t,n)=>t in e?X6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vh=(e,t,n)=>K6(e,typeof t!="symbol"?t+"":t,n),bb=()=>{},zl=e=>typeof e=="object"&&e!==null,lo=e=>e?"":void 0,Tb=e=>e?"true":void 0,Q6=1,J6=9,Z6=11,Qt=e=>zl(e)&&e.nodeType===Q6&&typeof e.nodeName=="string",jl=e=>zl(e)&&e.nodeType===J6,e4=e=>zl(e)&&e===e.window,_b=e=>Qt(e)?e.localName||"":"#document";function t4(e){return["html","body","#document"].includes(_b(e))}var n4=e=>zl(e)&&e.nodeType!==void 0,ms=e=>n4(e)&&e.nodeType===Z6&&"host"in e,r4=e=>Qt(e)&&e.localName==="input",i4=e=>Qt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Va(e){if(!e)return!1;const t=e.getRootNode();return ho(t)===e}var s4=/(textarea|select)/;function o4(e){if(e==null||!Qt(e))return!1;try{return r4(e)&&e.selectionStart!=null||s4.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function co(e,t){var r;if(!e||!t||!Qt(e)||!Qt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&ms(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Mr(e){var t;return jl(e)?e:e4(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function a4(e){return Mr(e).documentElement}function fo(e){var t,n,r;return ms(e)?fo(e.host):jl(e)?(t=e.defaultView)!=null?t:window:Qt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function ho(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function u4(e){if(_b(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ms(e)&&e.host||a4(e);return ms(t)?t.host:t}function Nh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),jl(t)||ms(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var kh=new WeakMap;function po(e){return kh.has(e)||kh.set(e,fo(e).getComputedStyle(e)),kh.get(e)}var Ph=new Set(["menu","listbox","dialog","grid","tree","region"]),l4=e=>Ph.has(e),Sb=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function xb(e,t){const n=new Set,r=Nh(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Sb(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(m&&l4(m)&&!T&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function wb(e,t){const n=Nh(e),r=new Set,s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Sb(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";m&&Ph.has(m)&&!T&&(t(p),s(p))}}}};s(e)}function c4(e){const t=new Set;return wb(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function d4(e){const t=e.getAttribute("role");return!!(t&&Ph.has(t))}function f4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function h4(e){var t;return f4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function p4(e){if(!e.id)return!1;const t=Nh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&d4(e))}var Oh=()=>typeof document!="undefined";function m4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Ih=e=>Oh()&&e.test(m4()),g4=e=>Oh()&&e.test(navigator.vendor),Ab=()=>Oh()&&!!navigator.maxTouchPoints,E4=()=>Ih(/^iPhone/i),y4=()=>Ih(/^iPad/i)||Rh()&&navigator.maxTouchPoints>1,$l=()=>E4()||y4(),b4=()=>Rh()||$l(),Rh=()=>Ih(/^Mac/i),T4=()=>b4()&&g4(/apple/i);function _4(e){var t,n,r,s;return(s=(t=e.composedPath)==null?void 0:t.call(e))!=null?s:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function yr(e){var n;const t=_4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Cb=e=>e.button===0,S4=e=>e.button===2||Rh()&&e.ctrlKey&&e.button===0,x4=e=>"touches"in e&&e.touches.length>0,w4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},vb={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function A4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=w4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in vb&&(s=vb[s]),s}function Nb(e,t="client"){const n=x4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Jt=(e,t,n,r)=>{const s=typeof e=="function"?e():e;return s==null||s.addEventListener(t,n,r),()=>{s==null||s.removeEventListener(t,n,r)}},kb=e=>Qt(e)&&e.tagName==="IFRAME",C4=/^(audio|video|details)$/;function Pb(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var v4=e=>!Number.isNaN(Pb(e)),N4=e=>Pb(e)<0;function k4(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 Ob(e,t,n){const r=[...e],s=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<s.length;){const d=s[c++];if(!d||a.has(d))continue;a.add(d);const f=k4(d,t);if(f){const p=Array.from(f.querySelectorAll(Vl)).filter(n),m=u.get(d);if(m!==void 0){const T=m+1;r.splice(T,0,...p),p.forEach((y,_)=>{u.set(y,T+_)});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,_)=>{u.set(y,T+_)})}s.push(...p)}}return r}var Vl="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",Ib=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Vl));(n==!0||n=="if-empty"&&s.length===0)&&Qt(e)&&Fr(e)&&s.unshift(e);const u=[];for(const c of s)if(Fr(c)){if(kb(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...Ib(d,{getShadowRoot:r}));continue}u.push(c)}return r?Ob(u,r,Fr):u};function Fr(e){return!Qt(e)||e.closest("[inert]")?!1:e.matches(Vl)&&i4(e)}function mo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Vl));n&&gs(e)&&s.unshift(e);const a=[];for(const u of s)if(gs(u)){if(kb(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...mo(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Ob(a,r,gs);return!u.length&&n?s:u}return!a.length&&n?s:a}function gs(e){return Qt(e)&&e.tabIndex>0?!0:Fr(e)&&!N4(e)}function P4(e,t={}){const n=mo(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function O4(e,t={}){const{current:n,getShadowRoot:r}=t,s=mo(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:ho(a);if(!u)return null;const c=s.indexOf(u);return s[c+1]||null}function qa(e){return e.tabIndex<0&&(C4.test(e.localName)||o4(e))&&!v4(e)?0:e.tabIndex}function Rb(e){const{root:t,getInitialEl:n,filter:r,enabled:s=!0}=e;if(!s)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=mo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var I4=class U2{constructor(){vh(this,"id",null),vh(this,"fn_cleanup"),vh(this,"cleanup",()=>{this.cancel()})}static create(){return new U2}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function jt(e){const t=I4.create();return t.request(e),t.cleanup}function Lb(e){const t=new Set;function n(r){const s=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(s))}return n(()=>n(e)),function(){t.forEach(s=>s())}}function Lh(e){const t=u4(e);return t4(t)?Mr(t).body:Qt(t)&&D4(t)?t:Lh(t)}var R4=/auto|scroll|overlay|hidden|clip/,L4=new Set(["inline","contents"]);function D4(e){const t=fo(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return R4.test(n+s+r)&&!L4.has(a)}var go="default",Dh="",ql=new WeakMap;function M4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return $l()?(go==="default"&&(Dh=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),go="disabled"):t&&(ql.set(t,t.style.userSelect),t.style.userSelect="none"),()=>F4({target:t,doc:r})}function F4(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if($l()){if(go!=="disabled")return;go="restoring",setTimeout(()=>{Lb(()=>{go==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=Dh||""),Dh="",go="default")})},300)}else if(t&&ql.has(t)){const a=ql.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),ql.delete(t)}}function B4(e={}){const u=e,{defer:t,target:n}=u,r=fn(u,["defer","target"]),s=t?jt:c=>c(),a=[];return a.push(s(()=>{const c=typeof n=="function"?n():n;a.push(M4(fe(B({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function U4(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=c=>{const d=Nb(c),f=Math.sqrt(Bu(d.x,2)+Bu(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(f<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=Nb(c);r({point:d,event:c})},u=[Jt(e,"pointermove",s,!1),Jt(e,"pointerup",a,!1),Jt(e,"pointercancel",a,!1),Jt(e,"contextmenu",a,!1),B4({doc:e})];return()=>{u.forEach(c=>c())}}function H4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:s,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,T]=P4(e,{includeContainer:!0,getShadowRoot:a}),y=O4(c,{current:n,getShadowRoot:a}),_=!m&&!T;f.shiftKey&&Va(y)?(s==null||s(),p=T):f.shiftKey&&(Va(m)||_)?p=n:!f.shiftKey&&Va(n)?(s==null||s(),p=m):!f.shiftKey&&(Va(T)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Jt(u,"keydown",d,!0)}function z4(e,t){const c=t,{defer:n,triggerElement:r}=c,s=fn(c,["defer","triggerElement"]),a=n?jt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(H4(d,B({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function j4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Yl(e,t){if(!e)return bb;const n=Object.keys(t).reduce((r,s)=>(r[s]=e.style.getPropertyValue(s),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function $4(e,t,n){if(!e)return bb;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 V4(e,t,n){const{signal:r}=t;return[new Promise((u,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),c(f))})}),()=>t.abort()]}function q4(e,t){const{timeout:n,rootNode:r}=t,s=fo(r),a=Mr(r),u=new s.AbortController;return V4(new Promise(c=>{const d=e();if(d){c(d);return}const f=new s.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var Y4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),W4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Db=e=>{const t={};let n;for(;n=W4.exec(e);)t[n[1]]=n[2];return t},G4=(e,t)=>{if(Hl(e)){if(Hl(t))return`${e};${t}`;e=Db(e)}else Hl(t)&&(t=Db(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function $t(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=wh(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=Y4(t[s],n[s]);continue}if(s==="style"){t[s]=G4(t[s],n[s]);continue}t[s]=n[s]!==void 0?n[s]:t[s]}for(let s in n)t[s]===void 0&&(t[s]=n[s]);const r=Object.getOwnPropertySymbols(n);for(let s of r)t[s]=n[s]}return t}function OU(e){return e}var Eo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Eo||{}),Mh="__init__";function X4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Mr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>ho(t()),a=u=>t().getElementById(u);return fe(B({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:Va,getById:a})}function K4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var yo=()=>e=>Array.from(new Set(e)),Mb=typeof globalThis.document!="undefined"?F.useLayoutEffect:F.useEffect;function Wl(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=F.useState(t),[s,a]=F.useState(r),u=e().value!==void 0,c=F.useRef(s);c.current=u?e().value:s;const d=F.useRef(c.current);Mb(()=>{d.current=c.current},[s,e().value]);const f=y=>{var v,A;const _=d.current,w=uo(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:w,prev:_}),u||a(w),n(w,_)||(A=(v=e()).onChange)==null||A.call(v,w,_)};function p(){return u?e().value:s}return{initial:r,ref:c,get:p,set(y){(e().sync?Qs.flushSync:H6)(()=>f(y))},invoke(y,_){var w,v;(v=(w=e()).onChange)==null||v.call(w,y,_)},hash(y){var _,w,v;return(v=(w=(_=e()).hash)==null?void 0:w.call(_,y))!=null?v:String(y)}}}Wl.cleanup=e=>{F.useEffect(()=>e,[])},Wl.ref=e=>{const t=F.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function Q4(e){const t=F.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var J4=(e,t)=>{const n=F.useRef(!1),r=F.useRef(!1);F.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),F.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Gl(e,t={}){var se,pe,ve,re,ae,xe;const n=F.useMemo(()=>{const{id:oe,ids:Q,getRootNode:ie}=t;return X4({id:oe,ids:Q,getRootNode:ie})},[t]),r=(...oe)=>{e.debug&&console.log(...oe)},s=(pe=(se=e.props)==null?void 0:se.call(e,{props:Ah(t),scope:n}))!=null?pe:t,a=Z4(s),u=(ve=e.context)==null?void 0:ve.call(e,{prop:a,bindable:Wl,scope:n,flush:Bb,getContext(){return d},getComputed(){return Y},getRefs(){return w},getEvent(){return y()}}),c=Fb(u),d={get(oe){var Q;return(Q=c.current)==null?void 0:Q[oe].ref.current},set(oe,Q){var ie;(ie=c.current)==null||ie[oe].set(Q)},initial(oe){var Q;return(Q=c.current)==null?void 0:Q[oe].initial},hash(oe){var ie,k;const Q=(ie=c.current)==null?void 0:ie[oe].get();return(k=c.current)==null?void 0:k[oe].hash(Q)}},f=F.useRef(new Map),p=F.useRef(null),m=F.useRef(null),T=F.useRef({type:""}),y=()=>fe(B({},T.current),{current(){return T.current},previous(){return m.current}}),_=()=>fe(B({},D),{matches(...oe){return oe.includes(D.ref.current)},hasTag(oe){var Q,ie;return!!((ie=(Q=e.states[D.ref.current])==null?void 0:Q.tags)!=null&&ie.includes(oe))}}),w=Q4((ae=(re=e.refs)==null?void 0:re.call(e,{prop:a,context:d}))!=null?ae:{}),v=()=>({state:_(),context:d,event:y(),prop:a,send:V,action:A,guard:N,track:J4,refs:w,computed:Y,flush:Bb,scope:n,choose:z}),A=oe=>{const Q=uo(oe)?oe(v()):oe;if(!Q)return;const ie=Q.map(k=>{var ee,O;const R=(O=(ee=e.implementations)==null?void 0:ee.actions)==null?void 0:O[k];return R||Ch(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),R});for(const k of ie)k==null||k(v())},N=oe=>{var Q,ie;return uo(oe)?oe(v()):(ie=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:ie[oe](v())},C=oe=>{const Q=uo(oe)?oe(v()):oe;if(!Q)return;const ie=Q.map(R=>{var O,Se;const ee=(Se=(O=e.implementations)==null?void 0:O.effects)==null?void 0:Se[R];return ee||Ch(`[zag-js] No implementation found for effect "${JSON.stringify(R)}"`),ee}),k=[];for(const R of ie){const ee=R==null?void 0:R(v());ee&&k.push(ee)}return()=>k.forEach(R=>R==null?void 0:R())},z=oe=>A6(oe).find(Q=>{let ie=!Q.guard;return Hl(Q.guard)?ie=!!N(Q.guard):uo(Q.guard)&&(ie=Q.guard(v())),ie}),Y=oe=>{W6(e.computed,()=>"[zag-js] No computed object found on machine");const Q=e.computed[oe];return Q({context:d,event:y(),prop:a,refs:w,scope:n,computed:Y})},D=Wl(()=>({defaultValue:e.initialState({prop:a}),onChange(oe,Q){var k,R,ee,O;if(Q){const Se=f.current.get(Q);Se==null||Se(),f.current.delete(Q)}Q&&A((k=e.states[Q])==null?void 0:k.exit),A((R=p.current)==null?void 0:R.actions);const ie=C((ee=e.states[oe])==null?void 0:ee.effects);if(ie&&f.current.set(oe,ie),Q===Mh){A(e.entry);const Se=C(e.effects);Se&&f.current.set(Mh,Se)}A((O=e.states[oe])==null?void 0:O.entry)}})),q=F.useRef(void 0),ne=F.useRef(Eo.NotStarted);Mb(()=>{queueMicrotask(()=>{var R;const ie=ne.current===Eo.Started;ne.current=Eo.Started,r(ie?"rehydrating...":"initializing...");const k=(R=q.current)!=null?R:D.initial;D.invoke(k,ie?D.get():Mh)});const oe=f.current,Q=D.ref.current;return()=>{r("unmounting..."),q.current=Q,ne.current=Eo.Stopped,oe.forEach(ie=>ie==null?void 0:ie()),f.current=new Map,p.current=null,queueMicrotask(()=>{A(e.exit)})}},[]);const ue=()=>"ref"in D?D.ref.current:D.get(),V=oe=>{queueMicrotask(()=>{var O,Se,Ue,ye,Le;if(ne.current!==Eo.Started)return;m.current=T.current,T.current=oe;let Q=ue();const ie=(Ue=(O=e.states[Q].on)==null?void 0:O[oe.type])!=null?Ue:(Se=e.on)==null?void 0:Se[oe.type],k=z(ie);if(!k)return;p.current=k;const R=(ye=k.target)!=null?ye:Q;r("transition",oe.type,k.target||Q,`(${k.actions})`);const ee=R!==Q;ee?Qs.flushSync(()=>D.set(R)):k.reenter&&!ee?D.invoke(Q,Q):A((Le=k.actions)!=null?Le:[])})};return(xe=e.watch)==null||xe.call(e,v()),{state:_(),send:V,context:d,prop:a,scope:n,refs:w,computed:Y,event:y(),getStatus:()=>ne.current}}function Fb(e){const t=F.useRef(e);return t.current=e,t}function Z4(e){const t=Fb(e);return function(r){return t.current[r]}}function Bb(e){queueMicrotask(()=>{Qs.flushSync(()=>e())})}var Fh=K4(e=>e);function Xl(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const s=r(t);typeof s=="function"&&n.push(s)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function eD(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Bh=e=>{const t=F.memo(F.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=fn(f,["asChild","children"]);if(!s)return F.createElement(e,fe(B({},u),{ref:r}),a);if(!F.isValidElement(a))return null;const c=F.Children.only(a),d=eD(c);return F.cloneElement(c,fe(B({},$t(u,c.props)),{ref:r?Xl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},bn=(()=>{const e=new Map;return new Proxy(Bh,{apply(t,n,r){return Bh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Bh(r)),e.get(r)}})})();function tD(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Es(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,c=F.createContext(u);c.displayName=t;function d(){var p;const f=F.useContext(c);if(!f&&n){const m=new Error(a!=null?a:tD(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[c.Provider,d,c]}const[nD,Uh]=Es({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[Ub,Ya]=Es({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),Hb=F.forwardRef((e,t)=>{const n=Uh(),r=Ya(),s=$t(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:S.jsx(bn.div,fe(B({},s),{ref:Xl(r.ref,t)}))});Hb.displayName="PopoverContent";const zb=F.forwardRef((e,t)=>{const n=Uh(),r=Ya(),s=$t(n.getPositionerProps(),e);return r.unmounted?null:S.jsx(bn.div,fe(B({},s),{ref:t}))});zb.displayName="PopoverPositioner";const Wa=()=>(e,t)=>t.reduce((n,r)=>{const[s,a]=n,u=r;return a[u]!==void 0&&(s[u]=a[u]),delete a[u],[s,a]},[{},B({},e)]),jb=e=>Wa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function rD(e,t){const{state:n,send:r,context:s}=e,a=n.matches("mounted","unmountSuspended");return{skip:!s.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var iD={props({props:e}){return fe(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",po(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const s=r("present");if(s)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!s&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});jt(()=>{var c,d;const u=Kl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{jt(()=>{e.set("prevAnimationName",Kl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const s=t.get("node");if(!s)return;const a=d=>{var p,m,T;((T=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?T:d.target)===s&&e.set("prevAnimationName",Kl(t.get("styles")))},u=d=>{const f=Kl(t.get("styles"));yr(d)===s&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u);const c=Yl(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),Lb(()=>c())}}}}};function Kl(e){return(e==null?void 0:e.animationName)||"none"}yo()(["onExitComplete","present","immediate"]);function sD(e,t={}){const{sync:n=!1}=t,r=oD(e);return F.useCallback((...s)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...s)}):(a=r.current)==null?void 0:a.call(r,...s)},[n,r])}function oD(e){const t=F.useRef(e);return t.current=e,t}const Hh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=T,a=fn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=F.useRef(!1),c=fe(B({},a),{present:r,onExitComplete:sD(e.onExitComplete)}),d=Gl(iD,c),f=rD(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&s?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var ys=(e,t=[])=>({parts:(...n)=>{if(aD(t))return ys(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>ys(e,[...t,...n]),omit:(...n)=>ys(e,t.filter(r=>!n.includes(r))),rename:n=>ys(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${bo(e)}"][data-part="${bo(r)}"]`,`& [data-scope="${bo(e)}"][data-part="${bo(r)}"]`].join(", "),attrs:{"data-scope":bo(e),"data-part":bo(r)}}}),{})}),bo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),aD=e=>e.length===0;const uD=["top","right","bottom","left"],Ni=Math.min,oi=Math.max,Ql=Math.round,Jl=Math.floor,Br=e=>({x:e,y:e}),lD={left:"right",right:"left",bottom:"top",top:"bottom"};function $b(e,t,n){return oi(e,Ni(t,n))}function ai(e,t){return typeof e=="function"?e(t):e}function ki(e){return e.split("-")[0]}function To(e){return e.split("-")[1]}function zh(e){return e==="x"?"y":"x"}function jh(e){return e==="y"?"height":"width"}function Ur(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function $h(e){return zh(Ur(e))}function cD(e,t,n){n===void 0&&(n=!1);const r=To(e),s=$h(e),a=jh(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Zl(u)),[u,Zl(u)]}function dD(e){const t=Zl(e);return[Vh(e),t,Vh(t)]}function Vh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Vb=["left","right"],qb=["right","left"],fD=["top","bottom"],hD=["bottom","top"];function pD(e,t,n){switch(e){case"top":case"bottom":return n?t?qb:Vb:t?Vb:qb;case"left":case"right":return t?fD:hD;default:return[]}}function mD(e,t,n,r){const s=To(e);let a=pD(ki(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Vh)))),a}function Zl(e){const t=ki(e);return lD[t]+e.slice(t.length)}function gD(e){var t,n,r,s;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(s=e.left)!=null?s:0}}function Yb(e){return typeof e!="number"?gD(e):{top:e,right:e,bottom:e,left:e}}function ec(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function Wb(e,t,n){let{reference:r,floating:s}=e;const a=Ur(t),u=$h(t),c=jh(u),d=ki(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,T=r[c]/2-s[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-s.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}const _=To(t);return _&&(y[u]+=T*(_==="end"?1:-1)*(n&&f?-1:1)),y}function ED(e,t){return Ke(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:T=!1,padding:y=0}=ai(t,e),_=Yb(y),v=c[T?m==="floating"?"reference":"floating":m],A=ec(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(v))==null||n?v:v.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),N=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,C=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),z=(yield a.isElement==null?void 0:a.isElement(C))&&(yield a.getScale==null?void 0:a.getScale(C))||{x:1,y:1},Y=ec(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:N,offsetParent:C,strategy:d}):N);return{top:(A.top-Y.top+_.top)/z.y,bottom:(Y.bottom-A.bottom+_.bottom)/z.y,left:(A.left-Y.left+_.left)/z.x,right:(Y.right-A.right+_.right)/z.x}})}const yD=50,bD=(e,t,n)=>Ke(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,c=u.detectOverflow?u:fe(B({},u),{detectOverflow:ED}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:m}=Wb(f,r,d),T=r,y=0;const _={};for(let w=0;w<a.length;w++){const v=a[w];if(!v)continue;const{name:A,fn:N}=v,{x:C,y:z,data:Y,reset:D}=yield N({x:p,y:m,initialPlacement:r,placement:T,strategy:s,middlewareData:_,rects:f,platform:c,elements:{reference:e,floating:t}});p=C!=null?C:p,m=z!=null?z:m,_[A]=B(B({},_[A]),Y),D&&y<yD&&(y++,typeof D=="object"&&(D.placement&&(T=D.placement),D.rects&&(f=D.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):D.rects),{x:p,y:m}=Wb(f,T,d)),w=-1)}return{x:p,y:m,placement:T,strategy:s,middlewareData:_}}),TD=e=>({name:"arrow",options:e,fn(n){return Ke(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=ai(e,n)||{};if(p==null)return{};const T=Yb(m),y={x:r,y:s},_=$h(a),w=jh(_),v=yield c.getDimensions(p),A=_==="y",N=A?"top":"left",C=A?"bottom":"right",z=A?"clientHeight":"clientWidth",Y=u.reference[w]+u.reference[_]-y[_]-u.floating[w],D=y[_]-u.reference[_],q=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ne=q?q[z]:0;(!ne||!(yield c.isElement==null?void 0:c.isElement(q)))&&(ne=d.floating[z]||u.floating[w]);const ue=Y/2-D/2,V=ne/2-v[w]/2-1,se=Ni(T[N],V),pe=Ni(T[C],V),ve=ne-v[w]-pe,re=ne/2-v[w]/2+ue,ae=$b(se,re,ve),xe=!f.arrow&&To(a)!=null&&re!==ae&&u.reference[w]/2-(re<se?se:pe)-v[w]/2<0,oe=xe?re<se?re-se:re-ve:0;return{[_]:y[_]+oe,data:B({[_]:ae,centerOffset:re-ae-oe},xe&&{alignmentOffset:oe}),reset:xe}})}}),_D=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ke(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,ae=ai(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:v=!0}=ae,A=fn(ae,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const N=ki(a),C=Ur(d),z=ki(d)===d,Y=yield f.isRTL==null?void 0:f.isRTL(p.floating),D=y||(z||!v?[Zl(d)]:dD(d)),q=w!=="none";!y&&q&&D.push(...mD(d,v,w,Y));const ne=[d,...D],ue=yield f.detectOverflow(n,A),V=[];let se=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&V.push(ue[N]),T){const xe=cD(a,c,Y);V.push(ue[xe[0]],ue[xe[1]])}if(se=[...se,{placement:a,overflows:V}],!V.every(xe=>xe<=0)){var pe,ve;const xe=(((pe=u.flip)==null?void 0:pe.index)||0)+1,oe=ne[xe];if(oe&&(!(T==="alignment"?C!==Ur(oe):!1)||se.every(k=>Ur(k.placement)===C?k.overflows[0]>0:!0)))return{data:{index:xe,overflows:se},reset:{placement:oe}};let Q=(ve=se.filter(ie=>ie.overflows[0]<=0).sort((ie,k)=>ie.overflows[1]-k.overflows[1])[0])==null?void 0:ve.placement;if(!Q)switch(_){case"bestFit":{var re;const ie=(re=se.filter(k=>{if(q){const R=Ur(k.placement);return R===C||R==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(R=>R>0).reduce((R,ee)=>R+ee,0)]).sort((k,R)=>k[1]-R[1])[0])==null?void 0:re[0];ie&&(Q=ie);break}case"initialPlacement":Q=d;break}if(a!==Q)return{reset:{placement:Q}}}return{}})}}};function Gb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Xb(e){return uD.some(t=>e[t]>=0)}const SD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ke(this,null,function*(){const{rects:r,platform:s}=n,c=ai(e,n),{strategy:a="referenceHidden"}=c,u=fn(c,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,fe(B({},u),{elementContext:"reference"})),f=Gb(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Xb(f)}}}case"escaped":{const d=yield s.detectOverflow(n,fe(B({},u),{altBoundary:!0})),f=Gb(d,r.floating);return{data:{escapedOffsets:f,escaped:Xb(f)}}}default:return{}}})}}},Kb=new Set(["left","top"]);function xD(e,t){return Ke(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=ki(n),c=To(n),d=Ur(n)==="y",f=Kb.has(u)?-1:1,p=a&&d?-1:1,m=ai(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:_}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof _=="number"&&(y=c==="end"?_*-1:_),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const wD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ke(this,null,function*(){var r,s;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield xD(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:fe(B({},f),{placement:c})}})}}},AD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ke(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,C=ai(e,n),{mainAxis:c=!0,crossAxis:d=!1,limiter:f={fn:z=>{let{x:Y,y:D}=z;return{x:Y,y:D}}}}=C,p=fn(C,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},T=yield u.detectOverflow(n,p),y=Ur(a),_=zh(y);let w=m[_],v=m[y];const A=(z,Y)=>$b(Y+T[z==="y"?"top":"left"],Y,Y-T[z==="y"?"bottom":"right"]);c&&(w=A(_,w)),d&&(v=A(y,v));const N=f.fn(fe(B({},n),{[_]:w,[y]:v}));return fe(B({},N),{data:{x:N.x-r,y:N.y-s,enabled:{[_]:c,[y]:d}}})})}}},CD=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:u,rects:c,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=ai(e,t),T={x:s,y:a},y=Ur(u),_=zh(y);let w=T[_],v=T[y];const A=ai(f,t),N=typeof A=="number"?{mainAxis:A,crossAxis:0}:{mainAxis:(n=A.mainAxis)!=null?n:0,crossAxis:(r=A.crossAxis)!=null?r:0};if(p){const Y=_==="y"?"height":"width",D=c.reference[_]-c.floating[Y]+N.mainAxis,q=c.reference[_]+c.reference[Y]-N.mainAxis;w<D?w=D:w>q&&(w=q)}if(m){var C,z;const Y=_==="y"?"width":"height",D=Kb.has(ki(u)),q=c.reference[y]-c.floating[Y]+(D&&((C=d.offset)==null?void 0:C[y])||0)+(D?0:N.crossAxis),ne=c.reference[y]+c.reference[Y]+(D?0:((z=d.offset)==null?void 0:z[y])||0)-(D?N.crossAxis:0);v<q?v=q:v>ne&&(v=ne)}return{[_]:w,[y]:v}}}},vD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ke(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,V=ai(e,n),{apply:c=()=>{}}=V,d=fn(V,["apply"]),f=yield a.detectOverflow(n,d),p=ki(r),m=To(r),T=Ur(r)==="y",{width:y,height:_}=s.floating;let w,v;p==="top"||p==="bottom"?(w=p,v=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(v=p,w=m==="end"?"top":"bottom");const A=_-f.top-f.bottom,N=y-f.left-f.right,C=Ni(_-f[w],A),z=Ni(y-f[v],N),Y=n.middlewareData.shift,D=!Y;let q=C,ne=z;Y!=null&&Y.enabled.x&&(ne=N),Y!=null&&Y.enabled.y&&(q=A),D&&!m&&(T?ne=y-2*oi(f.left,f.right):q=_-2*oi(f.top,f.bottom)),yield c(fe(B({},n),{availableWidth:ne,availableHeight:q}));const ue=yield a.getDimensions(u.floating);return y!==ue.width||_!==ue.height?{reset:{rects:!0}}:{}})}}};function tc(){return typeof window!="undefined"}function _o(e){return Qb(e)?(e.nodeName||"").toLowerCase():"#document"}function Wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hr(e){var t;return(t=(Qb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Qb(e){return tc()?e instanceof Node||e instanceof Wn(e).Node:!1}function br(e){return tc()?e instanceof Element||e instanceof Wn(e).Element:!1}function zr(e){return tc()?e instanceof HTMLElement||e instanceof Wn(e).HTMLElement:!1}function Jb(e){return!tc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Wn(e).ShadowRoot}function Ga(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Tr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function ND(e){return/^(table|td|th)$/.test(_o(e))}function nc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const kD=/transform|translate|scale|rotate|perspective|filter/,PD=/paint|layout|strict|content/,bs=e=>!!e&&e!=="none";let qh;function Yh(e){const t=br(e)?Tr(e):e;return bs(t.transform)||bs(t.translate)||bs(t.scale)||bs(t.rotate)||bs(t.perspective)||!Wh()&&(bs(t.backdropFilter)||bs(t.filter))||kD.test(t.willChange||"")||PD.test(t.contain||"")}function OD(e){let t=Pi(e);for(;zr(t)&&!So(t);){if(Yh(t))return t;if(nc(t))return null;t=Pi(t)}return null}function Wh(){return qh==null&&(qh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),qh}function So(e){return/^(html|body|#document)$/.test(_o(e))}function Tr(e){return Wn(e).getComputedStyle(e)}function rc(e){return br(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pi(e){if(_o(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jb(e)&&e.host||Hr(e);return Jb(t)?t.host:t}function Zb(e){const t=Pi(e);return So(t)?(e.ownerDocument||e).body:zr(t)&&Ga(t)?t:Zb(t)}function Xa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Zb(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Wn(s);if(a){const c=Gh(u);return t.concat(u,u.visualViewport||[],Ga(s)?s:[],c&&n?Xa(c):[])}else return t.concat(s,Xa(s,[],n))}function Gh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function eT(e){const t=Tr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=zr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,c=Ql(n)!==a||Ql(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Xh(e){return br(e)?e:e.contextElement}function xo(e){const t=Xh(e);if(!zr(t))return Br(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=eT(t);let u=(a?Ql(n.width):n.width)/r,c=(a?Ql(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const ID=Br(0);function tT(e){const t=Wn(e);return!Wh()||!t.visualViewport?ID:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function RD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wn(e)?!1:t}function Ts(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Xh(e);let u=Br(1);t&&(r?br(r)&&(u=xo(r)):u=xo(e));const c=RD(a,n,r)?tT(a):Br(0);let d=(s.left+c.x)/u.x,f=(s.top+c.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(a){const T=Wn(a),y=r&&br(r)?Wn(r):r;let _=T,w=Gh(_);for(;w&&r&&y!==_;){const v=xo(w),A=w.getBoundingClientRect(),N=Tr(w),C=A.left+(w.clientLeft+parseFloat(N.paddingLeft))*v.x,z=A.top+(w.clientTop+parseFloat(N.paddingTop))*v.y;d*=v.x,f*=v.y,p*=v.x,m*=v.y,d+=C,f+=z,_=Wn(w),w=Gh(_)}}return ec({width:p,height:m,x:d,y:f})}function ic(e,t){const n=rc(e).scrollLeft;return t?t.left+n:Ts(Hr(e)).left+n}function nT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ic(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function LD(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Hr(r),c=t?nc(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Br(1);const p=Br(0),m=zr(r);if((m||!m&&!a)&&((_o(r)!=="body"||Ga(u))&&(d=rc(r)),zr(r))){const y=Ts(r);f=xo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?nT(u,d):Br(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+T.x,y:n.y*f.y-d.scrollTop*f.y+p.y+T.y}}function DD(e){return Array.from(e.getClientRects())}function MD(e){const t=Hr(e),n=rc(e),r=e.ownerDocument.body,s=oi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=oi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+ic(e);const c=-n.scrollTop;return Tr(r).direction==="rtl"&&(u+=oi(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:c}}const rT=25;function FD(e,t){const n=Wn(e),r=Hr(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(s){a=s.width,u=s.height;const p=Wh();(!p||p&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}const f=ic(r);if(f<=0){const p=r.ownerDocument,m=p.body,T=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,_=Math.abs(r.clientWidth-m.clientWidth-y);_<=rT&&(a-=_)}else f<=rT&&(a+=f);return{width:a,height:u,x:c,y:d}}const BD=new Set(["absolute","fixed"]);function UD(e,t){const n=Ts(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=zr(e)?xo(e):Br(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function iT(e,t,n){let r;if(t==="viewport")r=FD(e,n);else if(t==="document")r=MD(Hr(e));else if(br(t))r=UD(t,n);else{const s=tT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ec(r)}function sT(e,t){const n=Pi(e);return n===t||!br(n)||So(n)?!1:Tr(n).position==="fixed"||sT(n,t)}function HD(e,t){const n=t.get(e);if(n)return n;let r=Xa(e,[],!1).filter(c=>br(c)&&_o(c)!=="body"),s=null;const a=Tr(e).position==="fixed";let u=a?Pi(e):e;for(;br(u)&&!So(u);){const c=Tr(u),d=Yh(u);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&BD.has(s.position)||Ga(u)&&!d&&sT(e,u))?r=r.filter(p=>p!==u):s=c,u=Pi(u)}return t.set(e,r),r}function zD(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?nc(t)?[]:HD(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const m=iT(t,p,s);return f.top=oi(m.top,f.top),f.right=Ni(m.right,f.right),f.bottom=Ni(m.bottom,f.bottom),f.left=oi(m.left,f.left),f},iT(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function jD(e){const{width:t,height:n}=eT(e);return{width:t,height:n}}function $D(e,t,n){const r=zr(t),s=Hr(t),a=n==="fixed",u=Ts(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Br(0);function f(){d.x=ic(s)}if(r||!r&&!a)if((_o(t)!=="body"||Ga(s))&&(c=rc(t)),r){const y=Ts(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const p=s&&!r&&!a?nT(s,c):Br(0),m=u.left+c.scrollLeft-d.x-p.x,T=u.top+c.scrollTop-d.y-p.y;return{x:m,y:T,width:u.width,height:u.height}}function Kh(e){return Tr(e).position==="static"}function oT(e,t){if(!zr(e)||Tr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Hr(e)===n&&(n=n.ownerDocument.body),n}function aT(e,t){const n=Wn(e);if(nc(e))return n;if(!zr(e)){let s=Pi(e);for(;s&&!So(s);){if(br(s)&&!Kh(s))return s;s=Pi(s)}return n}let r=oT(e,t);for(;r&&ND(r)&&Kh(r);)r=oT(r,t);return r&&So(r)&&Kh(r)&&!Yh(r)?n:r||OD(e)||n}const VD=function(e){return Ke(this,null,function*(){const t=this.getOffsetParent||aT,n=this.getDimensions,r=yield n(e.floating);return{reference:$D(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function qD(e){return Tr(e).direction==="rtl"}const YD={convertOffsetParentRelativeRectToViewportRelativeRect:LD,getDocumentElement:Hr,getClippingRect:zD,getOffsetParent:aT,getElementRects:VD,getClientRects:DD,getDimensions:jD,getScale:xo,isElement:br,isRTL:qD};function uT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function WD(e,t){let n=null,r;const s=Hr(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:T,height:y}=f;if(c||t(),!T||!y)return;const _=Jl(m),w=Jl(s.clientWidth-(p+T)),v=Jl(s.clientHeight-(m+y)),A=Jl(p),C={rootMargin:-_+"px "+-w+"px "+-v+"px "+-A+"px",threshold:oi(0,Ni(1,d))||1};let z=!0;function Y(D){const q=D[0].intersectionRatio;if(q!==d){if(!z)return u();q?u(!1,q):r=setTimeout(()=>{u(!1,1e-7)},1e3)}q===1&&!uT(f,e.getBoundingClientRect())&&u(),z=!1}try{n=new IntersectionObserver(Y,fe(B({},C),{root:s.ownerDocument}))}catch(D){n=new IntersectionObserver(Y,C)}n.observe(e)}return u(!0),a}function GD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Xh(e),p=s||a?[...f?Xa(f):[],...Xa(t)]:[];p.forEach(A=>{s&&A.addEventListener("scroll",n,{passive:!0}),a&&A.addEventListener("resize",n)});const m=f&&c?WD(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(A=>{let[N]=A;N&&N.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,w=d?Ts(e):null;d&&v();function v(){const A=Ts(e);w&&!uT(w,A)&&n(),w=A,_=requestAnimationFrame(v)}return n(),()=>{var A;p.forEach(N=>{s&&N.removeEventListener("scroll",n),a&&N.removeEventListener("resize",n)}),m==null||m(),(A=y)==null||A.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const XD=wD,KD=AD,QD=_D,JD=vD,ZD=SD,e5=TD,t5=CD,n5=(e,t,n)=>{const r=new Map,s=B({platform:YD},n),a=fe(B({},s.platform),{_c:r});return bD(e,t,fe(B({},s),{platform:a}))};function lT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const s={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return fe(B({},s),{toJSON:()=>s})}function r5(e){if(!e)return lT();const{x:t,y:n,width:r,height:s}=e;return lT(t,n,r,s)}function i5(e,t){return{contextElement:Qt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?r5(r):n.getBoundingClientRect()}}}var Ka=e=>({variable:e,reference:`var(${e})`}),ui={arrowSize:Ka("--arrow-size"),arrowSizeHalf:Ka("--arrow-size-half"),arrowBg:Ka("--arrow-background"),transformOrigin:Ka("--transform-origin"),arrowOffset:Ka("--arrow-offset")},s5=e=>e==="top"||e==="bottom"?"y":"x";function o5(e,t){return{name:"transformOrigin",fn(n){var ue,V,se,pe,ve;const{elements:r,middlewareData:s,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=s5(d),p=((ue=s.arrow)==null?void 0:ue.x)||0,m=((V=s.arrow)==null?void 0:V.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+T/2,w=m+y/2,v=Math.abs(((se=s.shift)==null?void 0:se.y)||0),A=u.reference.height/2,N=y/2,C=(ve=(pe=e.offset)==null?void 0:pe.mainAxis)!=null?ve:e.gutter,z=typeof C=="number"?C+N:C!=null?C:N,Y=v>z,D={top:`${_}px calc(100% + ${z}px)`,bottom:`${_}px ${-z}px`,left:`calc(100% + ${z}px) ${w}px`,right:`${-z}px ${w}px`}[d],q=`${_}px ${u.reference.y+A-c}px`,ne=!!e.overlap&&f==="y"&&Y;return r.floating.style.setProperty(ui.transformOrigin.variable,ne?q:D),{data:{transformOrigin:ne?q:D}}}}}var a5={name:"rects",fn({rects:e}){return{data:e}}},u5=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:s}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:s!=null?`${s}px`:"",[a]:`calc(100% + ${ui.arrowOffset.reference})`}),{}}}};function l5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var c5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function cT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Qh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function d5(e,t,n){const r=e||t.createElement("div");return e5({element:r,padding:n.arrowPadding})}function f5(e,t){var n;if(!I6((n=t.offset)!=null?n:t.gutter))return XD(({placement:r})=>{var p,m,T,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:c}=l5(r),d=c?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Ah({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function h5(e){if(!e.flip)return;const t=Qh(e.boundary);return QD(fe(B({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function p5(e){if(!e.slide&&!e.overlap)return;const t=Qh(e.boundary);return KD(fe(B({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:t5()}))}function m5(e){return JD({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:s}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);s=Math.floor(s),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${s}px`),a.style.setProperty("--available-height",`${r}px`)}})}function g5(e){var t;if(e.hideWhenDetached)return ZD({strategy:"referenceHidden",boundary:(t=Qh(e.boundary))!=null?t:"clippingAncestors"})}function E5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function y5(e,t,n={}){const r=i5(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},c5,n),a=t.querySelector("[data-part=arrow]"),u=[f5(a,s),h5(s),p5(s),d5(a,t.ownerDocument,s),u5(a),o5({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),m5(s),g5(s),a5],{placement:c,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>Ke(null,null,function*(){var z;if(!r||!t)return;const w=yield n5(r,t,{placement:c,middleware:u,strategy:d});f==null||f(w),p==null||p({placed:!0});const v=fo(t),A=cT(v,w.x),N=cT(v,w.y);t.style.setProperty("--x",`${A}px`),t.style.setProperty("--y",`${N}px`),s.hideWhenDetached&&(((z=w.middlewareData.hide)==null?void 0:z.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const C=t.firstElementChild;if(C){const Y=po(C);t.style.setProperty("--z-index",Y.zIndex)}}),T=()=>Ke(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=E5(s.listeners),_=s.listeners?GD(r,t,T,y):z6;return T(),()=>{_==null||_(),p==null||p({placed:!1})}}function dT(e,t,n={}){const c=n,{defer:r}=c,s=fn(c,["defer"]),a=r?jt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(y5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var b5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function T5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:ui.arrowSize.reference,height:ui.arrowSize.reference,[ui.arrowSizeHalf.variable]:`calc(${ui.arrowSize.reference} / 2)`,[ui.arrowOffset.variable]:`calc(${ui.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?b5[t.split("-")[0]]:void 0,background:ui.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:s,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var wo=new WeakMap,sc=new WeakMap,oc={},Jh=0,fT=e=>e&&(e.host||fT(e.parentNode)),_5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=fT(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),S5=new Set(["script","output","status","next-route-announcer"]),x5=e=>S5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),w5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=_5(n,Array.isArray(e)?e:[e]);oc[r]||(oc[r]=new WeakMap);const c=oc[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&Qt(y)&&wb(y,_=>{m(_)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))T(_);else try{if(x5(_))return;const v=_.getAttribute(s)==="true",A=(wo.get(_)||0)+1,N=(c.get(_)||0)+1;wo.set(_,A),c.set(_,N),d.push(_),A===1&&v&&sc.set(_,!0),N===1&&_.setAttribute(r,""),v||_.setAttribute(s,"true")}catch(w){console.error("[zag-js > ariaHidden] cannot operate on ",_,w)}})};return T(n),f.clear(),Jh++,()=>{d.forEach(y=>{const _=wo.get(y)-1,w=c.get(y)-1;wo.set(y,_),c.set(y,w),_||(sc.has(y)||y.removeAttribute(s),sc.delete(y)),w||y.removeAttribute(r)}),Jh--,Jh||(wo=new WeakMap,wo=new WeakMap,sc=new WeakMap,oc={})}},A5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,C5=(e,t=A5(e),n="data-aria-hidden",r=!0)=>{if(t)return w5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},v5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function hT(e,t={}){const{defer:n=!0}=t,r=n?v5:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(C5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function N5(e){const t={each(n){var r;for(let s=0;s<((r=e.frames)==null?void 0:r.length);s+=1){const a=e.frames[s];a&&n(a)}},addEventListener(n,r,s){return t.each(a=>{try{a.document.addEventListener(n,r,s)}catch(u){}}),()=>{try{t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener(n,r,s){t.each(a=>{try{a.document.removeEventListener(n,r,s)}catch(u){}})}};return t}function k5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,s)=>{try{t==null||t.addEventListener(n,r,s)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener:(n,r,s)=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}}}var pT="pointerdown.outside",mT="focus.outside";function P5(e){for(const t of e)if(Qt(t)&&Fr(t))return!0;return!1}var gT=e=>"clientY"in e;function O5(e,t){if(!gT(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 I5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function ET(e,t){if(!t||!gT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,s=t.scrollWidth>t.clientWidth,a=s&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(s?16:0)},c={x:e.clientX,y:e.clientY};return I5(u,c)?r||a:!1}function R5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Mr(e),f=fo(e),p=N5(f),m=k5(f);function T(C,z){if(!Qt(z)||!z.isConnected||co(e,z)||O5(e,C)||c&&xb(e,z))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const q=Lh(Y);if(ET(C,q))return!1}const D=Lh(e);return ET(C,D)?!1:!(n!=null&&n(z))}const y=new Set,_=ms(e==null?void 0:e.getRootNode());function w(C){function z(Y){var ue,V;const D=u&&!Ab()?jt:se=>se(),q=Y!=null?Y:C,ne=(V=(ue=q==null?void 0:q.composedPath)==null?void 0:ue.call(q))!=null?V:[q==null?void 0:q.target];D(()=>{const se=_?ne[0]:yr(C);if(!(!e||!T(C,se))){if(s||a){const pe=wh(s,a);e.addEventListener(pT,pe,{once:!0})}yT(e,pT,{bubbles:!1,cancelable:!0,detail:{originalEvent:q,contextmenu:S4(q),focusable:P5(ne),target:se}})}})}C.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(Jt(d,"click",z,{once:!0})),y.add(m.addEventListener("click",z,{once:!0})),y.add(p.addEventListener("click",z,{once:!0}))):z()}const v=new Set,A=setTimeout(()=>{v.add(Jt(d,"pointerdown",w,!0)),v.add(m.addEventListener("pointerdown",w,!0)),v.add(p.addEventListener("pointerdown",w,!0))},0);function N(C){(u?jt:Y=>Y())(()=>{var q,ne;const Y=(ne=(q=C==null?void 0:C.composedPath)==null?void 0:q.call(C))!=null?ne:[C==null?void 0:C.target],D=_?Y[0]:yr(C);if(!(!e||!T(C,D))){if(r||a){const ue=wh(r,a);e.addEventListener(mT,ue,{once:!0})}yT(e,mT,{bubbles:!1,cancelable:!0,detail:{originalEvent:C,contextmenu:!1,focusable:Fr(D),target:D}})}})}return Ab()||(v.add(Jt(d,"focusin",N,!0)),v.add(m.addEventListener("focusin",N,!0)),v.add(p.addEventListener("focusin",N,!0))),()=>{clearTimeout(A),y.forEach(C=>C()),v.forEach(C=>C())}}function L5(e,t){const{defer:n}=t,r=n?jt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(R5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function yT(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function D5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Jt(Mr(e),"keydown",n,{capture:!0})}var bT="layer:request-dismiss",ir={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var r;const t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf((r=this.topMostPointerBlockingLayer())==null?void 0:r.node):-1;return t<n},isTopMost(e){const t=this.layers[this.count()-1];return(t==null?void 0:t.node)===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){const n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(r=>r.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(r=>r.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>co(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>co(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(r=>ir.dismiss(r.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const r=this.countNestedLayersOfType(e.node,e.type);r>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${r}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const n=this.indexOf(e);if(n===-1)return;const r=this.layers[n];F5(e,bT,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),M5(e,bT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function M5(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(s)}function F5(e,t,n){e.addEventListener(t,n,{once:!0})}var TT;function _T(){ir.layers.forEach(({node:e})=>{e.style.pointerEvents=ir.isBelowPointerBlockingLayer(e)?"none":"auto"})}function B5(e){e.style.pointerEvents=""}function U5(e,t){const n=Mr(e),r=[];return ir.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(TT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=q4(()=>{const c=s();return Qt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Yl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{ir.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=TT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function H5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Ch("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:s,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};ir.add(f),_T();function p(w){var A,N;const v=yr(w.detail.originalEvent);ir.isBelowPointerBlockingLayer(e)||ir.isInBranch(v)||((A=t.onPointerDownOutside)==null||A.call(t,w),(N=t.onInteractOutside)==null||N.call(t,w),!w.defaultPrevented&&(c&&console.log("onPointerDownOutside:",w.detail.originalEvent),r==null||r()))}function m(w){var A,N;const v=yr(w.detail.originalEvent);ir.isInBranch(v)||((A=t.onFocusOutside)==null||A.call(t,w),(N=t.onInteractOutside)==null||N.call(t,w),!w.defaultPrevented&&(c&&console.log("onFocusOutside:",w.detail.originalEvent),r==null||r()))}function T(w){var v;ir.isTopMost(e)&&((v=t.onEscapeKeyDown)==null||v.call(t,w),!w.defaultPrevented&&r&&(w.preventDefault(),r()))}function y(w){var C;if(!e)return!1;const v=typeof u=="function"?u():u,A=Array.isArray(v)?v:[v],N=(C=t.persistentElements)==null?void 0:C.map(z=>z()).filter(Qt);return N&&A.push(...N),A.some(z=>co(z,w))||ir.isInNestedLayer(e,w)}const _=[a?U5(e,t.persistentElements):void 0,D5(e,T),L5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{ir.remove(e),_T(),B5(e),_.forEach(w=>w==null?void 0:w())}}function ST(e,t){const{defer:n}=t,r=n?jt:a=>a(),s=[];return s.push(r(()=>{const a=uo(e)?e():e;s.push(H5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var z5=Object.defineProperty,j5=(e,t,n)=>t in e?z5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,At=(e,t,n)=>j5(e,typeof t!="symbol"?t+"":t,n),xT={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()}},$5=[],V5=class{constructor(e,t){At(this,"trapStack"),At(this,"config"),At(this,"doc"),At(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),At(this,"portalContainers",new Set),At(this,"listenerCleanups",[]),At(this,"handleFocus",r=>{const s=yr(r),a=this.findContainerIndex(s,r)>=0;if(a||jl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(qa(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],c=!1):p-1>=0&&(u=f[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>qa(f)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),At(this,"handlePointerDown",r=>{const s=yr(r);if(!(this.findContainerIndex(s,r)>=0)){if(Ja(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Ja(this.config.allowOutsideClick,r)||r.preventDefault()}}),At(this,"handleClick",r=>{const s=yr(r);this.findContainerIndex(s,r)>=0||Ja(this.config.clickOutsideDeactivates,r)||Ja(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),At(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const s=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:s});if(!a)return;Qa(r)&&r.preventDefault(),this.tryFocus(a)}}),At(this,"handleEscapeKey",r=>{q5(r)&&Ja(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),At(this,"_mutationObserver"),At(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(s=>{s.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),s.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return h4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?p4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),At(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(s=>{var a;(a=this._mutationObserver)==null||a.observe(s,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(s=>{this.observePortalContainer(s)}))}),At(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Fr(r)){const s=ho(this.doc);if(s&&this.findContainerIndex(s)>=0)r=s;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),At(this,"tryFocus",r=>{if(r!==!1&&r!==ho(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,Y5(r)&&r.select()}}),At(this,"deactivate",r=>{if(!this.state.active)return this;const s=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(),xT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(s,"onDeactivate"),u=this.getOption(s,"onPostDeactivate"),c=this.getOption(s,"checkCanReturnFocus"),d=this.getOption(s,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{wT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(p).then(f,f),this}return f(),this}),At(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,s==null||s(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),At(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,s==null||s(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),At(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),At(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),At(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),At(this,"getNodeForOption",(r,{hasFallback:s=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!s)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),At(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||yr(s);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,s),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Fr(u)&&!gs(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[m];c=qa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Qa(s)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Fr(u)&&!gs(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[m];c=qa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Qa(s)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||$5;const n=B({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Qa(r)&&!r.shiftKey},isKeyBackward(r){return Qa(r)&&r.shiftKey}},t);this.doc=n.document||Mr(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{c4(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:s})=>r.contains(e)||(n==null?void 0:n.includes(r))||s.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?xb(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=mo(e,{getShadowRoot:this.config.getShadowRoot}),n=Ib(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],s=t[t.length-1],a=r,u=s;let c=!1;for(let f=0;f<t.length;f++)if(qa(t[f])>0){c=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(gs(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(gs(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:s,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return xT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?wT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Jt(this.doc,"focusin",this.handleFocus,!0),Jt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Jt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Jt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Jt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Jt(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=ho(this.doc),t==null||t();const s=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(s,s),this):(s(),this)}},Qa=e=>e.key==="Tab",Ja=(e,...t)=>typeof e=="function"?e(...t):e,q5=e=>!e.isComposing&&e.key==="Escape",wT=e=>setTimeout(e,0),Y5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function AT(e,t={}){let n;const r=jt(()=>{const s=typeof e=="function"?e():e;if(s){n=new V5(s,fe(B({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:Mr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Zh="data-scroll-lock";function W5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function CT(e){const t=po(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function vT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Zh))return;const u=CT(r)||CT(s),c=n.innerWidth-r.clientWidth;s.setAttribute(Zh,"");const d=()=>$4(r,"--scrollbar-width",`${c}px`),f=W5(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Yl(s,_)},m=()=>{var Y,D;const{scrollX:_,scrollY:w,visualViewport:v}=n,A=(Y=v==null?void 0:v.offsetLeft)!=null?Y:0,N=(D=v==null?void 0:v.offsetTop)!=null?D:0,C={position:"fixed",overflow:"hidden",top:`${-(w-Math.floor(N))}px`,left:`${-(_-Math.floor(A))}px`,right:"0"};!u&&c>0&&(C[f]=`${c}px`);const z=Yl(s,C);return()=>{z==null||z(),n.scrollTo({left:_,top:w,behavior:"instant"})}},T=[d(),$l()?m():p()];return()=>{T.forEach(_=>_==null?void 0:_()),s.removeAttribute(Zh)}}var G5=ys("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),jr=G5.build(),NT=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`},ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},PT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},X5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},tp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},np=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},K5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},OT=e=>e.getById(NT(e)),Ao=e=>e.getById(kT(e)),Co=e=>e.getById(ep(e)),IT=e=>e.getById(PT(e)),Q5=e=>e.getById(tp(e)),J5=e=>e.getById(np(e));function Z5(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=T5(fe(B({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&s({type:y?"OPEN":"CLOSE"})},reposition(y={}){s({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(fe(B({id:X5(c)},jr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(fe(B({},jr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(fe(B({},jr.anchor.attrs),{dir:u("dir"),id:NT(c)}))},getTriggerProps(){return t.button(fe(B({},jr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:kT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ep(c),onPointerDown(y){Cb(y)&&T4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(fe(B({},jr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(fe(B({id:PT(c)},jr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(fe(B({},jr.content.attrs),{dir:u("dir"),id:ep(c),tabIndex:-1,role:"dialog","aria-modal":Tb(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":lo(d),"aria-labelledby":m.title?tp(c):void 0,"aria-describedby":m.description?np(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(fe(B({},jr.title.attrs),{id:tp(c),dir:u("dir")}))},getDescriptionProps(){return t.element(fe(B({},jr.description.attrs),{id:np(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(fe(B({},jr.closeTrigger.attrs),{dir:u("dir"),id:K5(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var e8={props({props:e}){return fe(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=OT(n))!=null?a:Ao(n);return dT(r,()=>IT(n),fe(B({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Co(n);let s=!0;return ST(r,{type:"popover",pointerBlocking:t("modal"),exclude:Ao(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(s=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:s})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:z4(()=>Co(t),{triggerElement:Ao(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?hT(()=>[Co(t),Ao(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return vT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?AT(()=>Co(t),{initialFocus:()=>Rb({root:Co(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=OT(n))!=null?u:Ao(n);dT(s,()=>IT(n),fe(B(B({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){jt(()=>{Object.assign(e.get("renderedElements"),{title:!!Q5(t),description:!!J5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||jt(()=>{const n=Rb({root:Co(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,s;const n=(s=e.restoreFocus)!=null?s:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||jt(()=>{const a=Ao(t);a==null||a.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};yo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[RU,ac]=Es({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[LU,rp]=Es({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),t8=e=>{const t=F.useId(),{getRootNode:n}=ac(),{dir:r}=rp(),s=B({id:t,dir:r,getRootNode:n},e),a=Gl(e8,s);return Z5(a,Fh)},n8=e=>{const[t,u]=jb(e),c=u,{children:n}=c,r=fn(c,["children"]),s=t8(r),a=Hh($t({present:s.open},t));return S.jsx(nD,{value:s,children:S.jsx(Ub,{value:a,children:n})})},RT=F.forwardRef((e,t)=>{const n=Uh(),r=Ya(),s=$t(fe(B({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return S.jsx(bn.button,fe(B({},s),{ref:t}))});RT.displayName="PopoverTrigger";function r8(e){return _t({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 i8(e){return _t({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 s8(e){return _t({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 o8(e){return _t({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 a8(e){return _t({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 u8(e){return _t({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 ip(e){return _t({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 LT(e){return _t({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 l8=({className:e,componentType:t,children:n})=>{const[r,s]=F.useState(!1),{globalClassName:a}=tt(),u=f=>{s(f.open)},c=F.useCallback(()=>{s(!1)},[]),d=F.useMemo(()=>({closeMenu:c}),[c]);return S.jsxs(n8,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[S.jsx(RT,{"aria-label":`Overflow menu for ${t}`,className:W(`${H}-overflow-menu-button-trigger`,`${H}-icon-button`,a,e,`cim-${t}-component`),children:S.jsx(LT,{})}),S.jsx(zb,{children:S.jsx(Hb,{className:W(`${H}-overflow-menu-list`,a,`cim-${t}-component`),children:S.jsx(hb.Provider,{value:d,children:n})})})]})};function DT(e){return _t({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 MT(e){return _t({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[c8,_s]=Es({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),FT=F.forwardRef((e,t)=>{const n=_s(),r=$t(n.getControlProps(),e);return S.jsx(bn.div,fe(B(B({},r),e),{ref:t}))});FT.displayName="CarouselControl";const BT=F.forwardRef((e,t)=>{const[n,r]=Wa()(e,["readOnly","index"]),s=_s(),a=$t(s.getIndicatorProps(n),r);return S.jsx(bn.button,fe(B({},a),{ref:t}))});BT.displayName="CarouselIndicator";const UT=F.forwardRef((e,t)=>{const n=_s(),r=$t(n.getIndicatorGroupProps(),e);return S.jsx(bn.div,fe(B({},r),{ref:t}))});UT.displayName="CarouselIndicatorGroup";const HT=F.forwardRef((e,t)=>{const[n,r]=Wa()(e,["index","snapAlign"]),s=_s(),a=$t(s.getItemProps(n),r);return S.jsx(bn.div,fe(B({},a),{ref:t}))});HT.displayName="CarouselItem";const zT=F.forwardRef((e,t)=>{const n=_s(),r=$t(n.getItemGroupProps(),e);return S.jsx(bn.div,fe(B({},r),{ref:t}))});zT.displayName="CarouselItemGroup";const jT=F.forwardRef((e,t)=>{const n=_s(),r=$t(n.getNextTriggerProps(),e);return S.jsx(bn.button,fe(B({},r),{ref:t}))});jT.displayName="CarouselNextTrigger";const $T=F.forwardRef((e,t)=>{const n=_s(),r=$t(n.getPrevTriggerProps(),e);return S.jsx(bn.button,fe(B({},r),{ref:t}))});$T.displayName="CarouselPrevTrigger";function d8(e){const t=po(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(T,y){let _=parseFloat(T);return/%/.test(T)&&(_/=100,_*=y),Number.isNaN(_)?0:_}let d=c(r,n.width),f=c(s,n.height),p=c(a,n.width),m=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function f8(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 VT(e){let t=[];for(const n of e.children)t=t.concat(n,VT(n));return t}function qT(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?VT(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of s){const m=p.getBoundingClientRect();if(!f8(n,m,u))continue;const T=po(p);let[y,_]=T.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const w=a==="x"?_:y,v=m[c]-n[c]+e[f];switch(w){case"none":break;case"start":r[a].start.push({node:p,position:v});break;case"center":r[a].center.push({node:p,position:v+m[d]/2});break;case"end":r[a].end.push({node:p,position:v+m[d]});break}}}return r}function YT(e){const t=e.getBoundingClientRect(),n=d8(e),r=qT(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:WT([...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(GT(0,s.x))),y:WT([...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(GT(0,s.y)))}}function h8(e,t,n){const r=qT(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var WT=e=>[...new Set(e)],GT=(e,t)=>n=>Math.max(e,Math.min(t,n)),p8=ys("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),li=p8.build(),m8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},g8=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:item:${t}`},uc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},E8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},y8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},b8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},XT=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:indicator:${t}`},Mn=e=>e.getById(uc(e)),KT=e=>j4(Mn(e),"[data-part=item]"),T8=(e,t)=>e.getById(XT(e,t)),QT=e=>{const t=Mn(e);if(!t)return;const n=mo(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function _8(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=s("canScrollNext"),m=s("canScrollPrev"),T=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),_=r.get("page"),w=c("slidesPerPage"),v=c("padding"),A=c("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return _/y.length},scrollToIndex(N,C){a({type:"INDEX.SET",index:N,instant:C})},scrollTo(N,C){a({type:"PAGE.SET",index:N,instant:C})},scrollNext(N){a({type:"PAGE.NEXT",instant:N})},scrollPrev(N){a({type:"PAGE.PREV",instant:N})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(N){return Array.from(r.get("slidesInView")).includes(N)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(fe(B({},li.root.attrs),{id:m8(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":w,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(fe(B({},li.itemGroup.attrs),{id:uc(u),"data-orientation":c("orientation"),"data-dragging":lo(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(N){co(N.currentTarget,yr(N))&&a({type:"VIEWPORT.FOCUS"})},onBlur(N){co(N.currentTarget,N.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(N){if(N.defaultPrevented||!c("allowMouseDrag")||!Cb(N))return;const C=yr(N);Fr(C)&&C!==N.currentTarget||(N.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:j6(N=>{const C=c("orientation")==="horizontal"?"deltaX":"deltaY";N[C]<0&&!s("canScrollPrev")||N[C]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",c("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:v,[T?"paddingInline":"paddingBlock"]:v,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(N){const C=r.get("slidesInView").includes(N.index);return t.element(fe(B({},li.item.attrs),{id:g8(u,N.index),dir:c("dir"),role:"group","data-index":N.index,"data-inview":lo(C),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":A.item(N.index,c("slideCount")),"aria-hidden":Tb(!C),style:{scrollSnapAlign:(()=>{var ne;const z=(ne=N.snapAlign)!=null?ne:"start",Y=c("slidesPerMove"),D=Y==="auto"?Math.floor(c("slidesPerPage")):Y;return(N.index+D)%D===0?z:void 0})()}}))},getControlProps(){return t.element(fe(B({},li.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(fe(B({},li.prevTrigger.attrs),{id:y8(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":A.prevTrigger,"data-orientation":c("orientation"),"aria-controls":uc(u),onClick(N){N.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(fe(B({},li.nextTrigger.attrs),{dir:c("dir"),id:E8(u),type:"button","aria-label":A.nextTrigger,"data-orientation":c("orientation"),"aria-controls":uc(u),disabled:!p,onClick(N){N.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(fe(B({},li.indicatorGroup.attrs),{dir:c("dir"),id:b8(u),"data-orientation":c("orientation"),onKeyDown(N){if(N.defaultPrevented)return;const C="indicator",z={ArrowDown(q){T||(a({type:"PAGE.NEXT",src:C}),q.preventDefault())},ArrowUp(q){T||(a({type:"PAGE.PREV",src:C}),q.preventDefault())},ArrowRight(q){T&&(a({type:"PAGE.NEXT",src:C}),q.preventDefault())},ArrowLeft(q){T&&(a({type:"PAGE.PREV",src:C}),q.preventDefault())},Home(q){a({type:"PAGE.SET",index:0,src:C}),q.preventDefault()},End(q){a({type:"PAGE.SET",index:y.length-1,src:C}),q.preventDefault()}},Y=A4(N,{dir:c("dir"),orientation:c("orientation")}),D=z[Y];D==null||D(N)}}))},getIndicatorProps(N){return t.button(fe(B({},li.indicator.attrs),{dir:c("dir"),id:XT(u,N.index),type:"button","data-orientation":c("orientation"),"data-index":N.index,"data-readonly":lo(N.readOnly),"data-current":lo(N.index===_),"aria-label":A.indicator(N.index),onClick(C){C.defaultPrevented||N.readOnly||a({type:"PAGE.SET",index:N.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(fe(B({},li.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":lo(d),"aria-label":d?A.autoplayStop:A.autoplayStart,onClick(N){N.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var S8={props({props:e}){return G6(e,["slideCount"],"carousel"),fe(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:x8(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 O6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:s}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{s({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{s({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(Mn(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=Mn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),QT(e)});return QT(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!Mn(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};jt(()=>{s(),jt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return KT(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Mn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const c=u.reduce((d,f)=>{var T;const p=f.target,m=Number((T=p.dataset.index)!=null?T:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?C6(d,m):v6(d,m)},n.get("slidesInView"));n.set("slidesInView",N6(c))},{root:r,threshold:t("inViewThreshold")});return KT(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Mn(n);return r?Jt(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 Jt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return U4(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 Jt(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:s}){var f;const a=t.instant?"instant":"smooth",u=yb((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=Mn(n);if(!c)return;const d=r("isHorizontal")?"left":"top";s(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=Mn(t);if(!r)return;const s=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-s)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=mb(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=k6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=Mn(r);if(!s)return;const a=h8(s,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=yb(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Mn(n);if(!r)return;const s=YT(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=Mn(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=Mn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Mn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=YT(r),c=u.x.reduce((f,p)=>Math.abs(p-s)<Math.abs(f-s)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);jt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const f=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=T8(n,e.get("page"));r&&jt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function x8(e,t,n){if(e==null||n<=0)return[];const r=[],s=t==="auto"?Math.floor(n):t;if(s<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=s)r.push(a);return r}yo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),yo()(["index","readOnly"]),yo()(["index","snapAlign"]);const w8=e=>{const t=F.useId(),{getRootNode:n}=ac(),{dir:r}=rp(),s=B({id:t,dir:r,getRootNode:n},e),a=Gl(S8,s);return _8(a,Fh)},JT=F.forwardRef((e,t)=>{const[n,r]=Wa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=w8(n),a=$t(s.getRootProps(),r);return S.jsx(c8,{value:s,children:S.jsx(bn.div,fe(B({},a),{ref:t}))})});JT.displayName="CarouselRoot";const A8=180,C8=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},v8=({globalClassName:e,className:t,itemMinWidth:n=A8,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p).map((ne,ue)=>({node:ne,key:F.isValidElement(ne)&&ne.key!=null?ne.key:`carousel-item-${ue}`})),T=m.length,y=F.useRef(null),[_,w]=F.useState(0),{width:v}=Ov();F.useLayoutEffect(()=>{y.current&&w(y.current.getBoundingClientRect().width)},[v,T]);const A=C8(r),N=n+A,C=_>0?(_+A)/N:1,z=Math.max(1,Math.floor(C));if(T===0)return null;const Y=T>z,D=Math.ceil(T/z),q=Y?Math.max(1,C):z;return S.jsxs(JT,{ref:y,className:W(e,t,`${H}-carousel`),slidesPerPage:q,slidesPerMove:z,spacing:r,loop:s,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[S.jsx(zT,{className:W(e,`${H}-carousel__item-group`,{"carousel-row-container":!Y}),children:m.map(({node:ne,key:ue},V)=>S.jsx(HT,{index:V,className:W(e,`${H}-carousel__item`),children:ne},ue))}),c&&Y&&S.jsxs(FT,{className:W(e,`${H}-carousel__control`),children:[S.jsx($T,{className:W(e,`${H}-carousel__prev-trigger`),"aria-label":"Previous slide",children:S.jsx(s8,{size:"16px"})}),S.jsx(jT,{className:W(e,`${H}-carousel__next-trigger`),"aria-label":"Next slide",children:S.jsx(o8,{size:"16px"})})]}),u&&Y&&S.jsx(UT,{className:W(e,`${H}-carousel__indicator-group`),children:Array.from({length:D},(ne,ue)=>S.jsx(BT,{index:ue,className:W(e,`${H}-carousel__indicator`),"aria-label":`Go to slide group ${ue+1}`},ue))})]})},[N8,k8]=Es({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),P8=e=>Wa()(e,["lazyMount","unmountOnExit"]),[O8,Za]=Es({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),ZT=F.forwardRef((e,t)=>{const n=Za(),r=k8(),s=Hh(fe(B({},r),{present:n.open})),a=$t(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:S.jsx(bn.div,fe(B({},a),{ref:Xl(s.ref,t)}))});ZT.displayName="DialogBackdrop";const sp=F.forwardRef((e,t)=>{const n=Za(),r=Ya(),s=$t(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:S.jsx(bn.div,fe(B({},s),{ref:Xl(r.ref,t)}))});sp.displayName="DialogContent";const op=F.forwardRef((e,t)=>{const n=Za(),r=$t(n.getDescriptionProps(),e);return S.jsx(bn.div,fe(B({},r),{ref:t}))});op.displayName="DialogDescription";const ap=F.forwardRef((e,t)=>{const n=Za(),r=$t(n.getPositionerProps(),e);return Ya().unmounted?null:S.jsx(bn.div,fe(B({},r),{ref:t}))});ap.displayName="DialogPositioner";var I8=ys("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Ss=I8.build(),e_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},t_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},up=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},n_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},lp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},cp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},r_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},lc=e=>e.getById(up(e)),R8=e=>e.getById(e_(e)),L8=e=>e.getById(t_(e)),D8=e=>e.getById(n_(e)),M8=e=>e.getById(lp(e)),F8=e=>e.getById(cp(e)),B8=e=>e.getById(r_(e));function U8(e,t){const{state:n,send:r,context:s,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(fe(B({},Ss.trigger.attrs),{dir:a("dir"),id:n_(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":up(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(fe(B({},Ss.backdrop.attrs),{dir:a("dir"),hidden:!d,id:t_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(fe(B({},Ss.positioner.attrs),{dir:a("dir"),id:e_(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(fe(B({},Ss.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:up(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:lp(u),"aria-describedby":f.description?cp(u):void 0}))},getTitleProps(){return t.element(fe(B({},Ss.title.attrs),{dir:a("dir"),id:lp(u)}))},getDescriptionProps(){return t.element(fe(B({},Ss.description.attrs),{dir:a("dir"),id:cp(u)}))},getCloseTriggerProps(){return t.button(fe(B({},Ss.closeTrigger.attrs),{dir:a("dir"),id:r_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var H8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>B8(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return B({role:"dialog",modal:s,trapFocus:s,preventScroll:s,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return ST(()=>lc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[D8(e)],onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),n("closeOnInteractOutside")||s.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(s){var a;(a=n("onEscapeKeyDown"))==null||a(s),n("closeOnEscape")||s.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return vT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?AT(()=>lc(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var s,a;return(a=(s=t("finalFocusEl"))==null?void 0:s())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?hT(()=>[lc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){jt(()=>{e.set("rendered",{title:!!M8(t),description:!!F8(t)})})},syncZIndex({scope:e}){jt(()=>{const t=lc(e);if(!t)return;const n=po(t);[R8(e),L8(e)].forEach(s=>{s==null||s.style.setProperty("--z-index",n.zIndex),s==null||s.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};yo()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const z8=e=>{const t=F.useId(),{getRootNode:n}=ac(),{dir:r}=rp(),s=B({id:t,getRootNode:n,dir:r},e),a=Gl(H8,s);return U8(a,Fh)},i_=e=>{const[t,c]=jb(e),d=c,{children:n}=d,r=fn(d,["children"]),[s]=P8(t),a=z8(r),u=Hh($t({present:a.open},t));return S.jsx(O8,{value:a,children:S.jsx(N8,{value:s,children:S.jsx(Ub,{value:u,children:n})})})},s_=F.forwardRef((e,t)=>{const n=Za(),r=$t(n.getTitleProps(),e);return S.jsx(bn.h2,fe(B({},r),{ref:t}))});s_.displayName="DialogTitle";const j8=({children:e})=>{const[t,n]=F.useState(!1),r=F.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=F.useMemo(()=>({isOpen:t}),[t]);return S.jsx(xh.Provider,{value:r,children:S.jsx(fb.Provider,{value:s,children:e})})},o_=()=>F.useContext(fb),a_=()=>{const e=F.useContext(xh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},$8=`${H}-overflow-menu-button-trigger`,V8=({componentType:e,children:t})=>{const{isOpen:n}=o_(),{closeMenu:r}=a_(),{globalClassName:s}=tt(),a=F.useRef(null);return F.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const f=d.target;f instanceof Element&&f.closest(`.${$8}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?S.jsx("div",{ref:a,className:W(`${H}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},q8=({componentType:e,className:t})=>{const{toggleMenu:n}=a_(),{isOpen:r}=o_(),{globalClassName:s}=tt();return S.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,className:W(`${H}-overflow-menu-button-trigger`,`${H}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:S.jsx(LT,{})})},dp=()=>{const{status:e,entryType:t}=tr(),{messages:n}=Vn(),r=t==="ask_cim",s=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&s},Y8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{previousComponentType:r}=tr(),s=ps(),a=()=>{fl(r||"dialog"),s()};return t?S.jsx(ii,{className:W(n,`${H}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:S.jsx(DT,{})}):S.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[S.jsx(DT,{}),"Show ",r||"dialog"]})},W8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{isModalFullscreen:r}=tr(),s=ps(),a=()=>{bf(!r),s()},u=r?$N:VN,c="Toggle Fullscreen";return t?S.jsx(ii,{ariaLabel:c,title:c,className:W(n,`${H}-modal-fullscreen-button`,`cim-${e}-component`),icon:S.jsx(u,{}),onClick:a}):S.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[S.jsx(u,{}),c]})},G8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{dialogPosition:r}=tr(),s=ps(),a=r==="bottom-left",u=()=>{Tf(a?"bottom-right":"bottom-left"),s()},c=a?i8:r8,d=a?"Move right":"Move left";return t?S.jsx(ii,{className:W(n,`${H}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:S.jsx(c,{})}):S.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[S.jsx(c,{}),d]})},u_=({componentType:e,onClearChat:t,onEndConversation:n,onClose:r,onDownloadTranscript:s})=>{const{headerConfig:a,globalClassName:u,mode:c,enableDownloadTranscript:d}=tt(),{mode:f}=tr(),p=c==="messaging"&&d&&!!s,m=f==="standalone",T=e==="modal",y=T?Y8:l_,_=T?W8:G8,w=F.useMemo(()=>a?WN(a):{},[a]);return S.jsx(j8,{children:S.jsxs("div",{className:W(u,`${H}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[S.jsxs("div",{className:W(u,`${H}-${e}-header`,{standalone:m,embedded:!m}),style:w,children:[(a==null?void 0:a.logoUrl)&&S.jsx("img",{alt:"",role:"img",className:W(u,`${H}-${e}-logo`,{standalone:m,embedded:!m}),src:a.logoUrl}),S.jsx(s_,{className:W(u,`${H}-${e}-title`,{standalone:m,embedded:!m}),children:a==null?void 0:a.headerText}),S.jsxs("div",{className:W(u,`${H}-${e}-controls`),children:[S.jsx(y,{componentType:e,isIcon:!0}),S.jsx(q8,{componentType:e}),S.jsx(L1,{className:W(u,`cim-${e}-component`),label:a==null?void 0:a.closeButtonAriaLabel,onClick:r})]})]}),S.jsxs(V8,{componentType:e,children:[S.jsx(_,{componentType:e}),S.jsx(Z8,{componentType:e}),S.jsx(pb,{componentType:e,onClearChat:t}),n&&S.jsx(K8,{componentType:e,onEndConversation:n}),p&&S.jsx(X8,{componentType:e,onDownloadTranscript:s})]})]})})},X8=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=tt(),r=ps(),[s,a]=F.useState(!1),u=()=>Ke(null,null,function*(){if(!s){a(!0);try{yield e(),r()}catch(c){n==null||n.error("Error downloading transcript:",c)}finally{a(!1)}}});return S.jsxs("button",{className:W(`${H}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[S.jsx(x6,{}),"Download transcript"]})},K8=({onEndConversation:e,componentType:t})=>{const n=ps(),r=()=>{e(),n()};return S.jsxs("button",{className:W(`${H}-overflow-menu-button`,"end-conversation-button",`cim-${t}-component`),onClick:r,children:[S.jsx(qN,{}),"End conversation"]})},Q8={sparkle:ip,plus:a8,"paper-plane":u8},fp=({icon:e,className:t})=>{const n=Q8[e];return n?S.jsx(n,{className:t,"aria-hidden":"true"}):null},J8=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=tt(),c=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",p=_=>()=>{a(_)},m={"has-icon":!!c,"icon-right":!!c&&d==="right"},T=_=>S.jsxs(S.Fragment,{children:[c&&S.jsx(fp,{icon:c,className:`${H}-suggestion-button-icon`}),S.jsx("span",{children:_})]});return S.jsx("div",{className:W(t,`${H}-suggestion-container ${f}`,e),children:n.map(_=>s?S.jsx(ml,{disabled:r,className:W(t,`${H}-suggestion-button standalone`,m),onClick:p(_),children:T(_)},_):S.jsx("button",{disabled:r,className:W(t,`${H}-suggestion-button embedded`,m),onClick:p(_),children:T(_)},_))})},Z8=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=tt();if(!r)return null;const s=()=>{ni(!1),ma(!0),Nf()};return t?S.jsx(ii,{className:W(n,`${H}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:S.jsx(I1,{})}):S.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[S.jsx(I1,{}),"Minimize"]})},l_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),r=ps(),s=()=>{fl("modal"),r()};return t?S.jsx(ii,{className:W(n,`${H}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:S.jsx(MT,{})}):S.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[S.jsx(MT,{}),"Show modal"]})},eM=({isWidgetStandalone:e})=>{var v,A;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:s,staticQuestions:a,staticQuestionsStrategy:u}=tt(),{askCimPrompts:c,messages:d}=Vn(),{isLoading:f,handleAskCim:p}=Ir(),m=s==null?void 0:s.icon,T=(v=s==null?void 0:s.iconPosition)!=null?v:"left",y=F.useMemo(()=>{const N=typeof n=="string"?n:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return d.some(z=>z.name==="conversation_reset")&&r||N},[d,n,r]),_=F.useMemo(()=>{var C,z;const N=((z=(C=c.message)==null?void 0:C.suggestions)!=null?z:[]).map(Y=>Y.displayText.trim()).filter(Boolean);return B0(N,a||[],u)},[(A=c.message)==null?void 0:A.suggestions,a,u]),w=N=>()=>{p({userPrompt:N})};return S.jsxs("div",{className:W(t,`${H}-ask-cim-entry-message`,`${H}-message-group`,e?"standalone":"embedded"),children:[S.jsx("p",{className:W(t,`${H}-ask-cim-entry-text`),children:y}),!!(_!=null&&_.length)&&S.jsx("div",{className:W(t,`${H}-ask-cim-suggestions-container`,`${H}-suggestion-container`,e?"standalone":"embedded"),children:_.map(N=>S.jsxs(ml,{disabled:f,className:W(t,`${H}-ask-cim-suggestion-button`,`${H}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!m,"icon-right":!!m&&T==="right"}),onClick:w(N),children:[m&&S.jsx(fp,{icon:m,className:`${H}-suggestion-button-icon`}),S.jsx("span",{children:N})]},N))})]})},tM=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:s}=tt();if(!n)return null;const a=n.getName(t),u=n.getBrand(t),c=n.getPriceDisplay(t),d=n.getRelativePdp(t),f=n.getPdp(t),p=n.getImage(t),m=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return S.jsxs("div",{className:W(r,`${H}-product-tile`,{embedded:!e,standalone:e}),children:[m?S.jsx("a",{href:`${m}`,target:s?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${a}`,children:S.jsx("img",{className:W(r,`${H}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):S.jsx("img",{className:W(r,`${H}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),S.jsxs("div",{className:W(r,`${H}-product-tile-details`,{embedded:!e,standalone:e}),children:[S.jsxs("div",{className:W(r,`${H}-product-tile-content`),children:[u&&S.jsx("p",{className:`${H}-product-tile-brand`,children:u}),m?S.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:W(r,`${H}-product-tile-pdp`),href:`${m}`,target:s?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",S.jsx("span",{className:W(r,`${H}-product-tile-pdp-arrow`),children:"→"})]}):S.jsx("p",{className:W(r,`${H}-product-tile-name`),title:a,children:a})]}),S.jsx("div",{className:W(r,`${H}-product-tile-footer`),children:S.jsx("p",{className:W(r,`${H}-product-tile-price`),children:c})})]})]})},nM=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=tt(),s=t;return n?S.jsxs("div",{className:W(r,`${H}-display-products`),children:[S.jsx("p",{children:s.message}),s.products&&s.products.length>0&&S.jsx(v8,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:s.products.map(a=>{const u=n.getPid(a);return S.jsx(tM,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},rM=({globalClassName:e,message:t,isWidgetStandalone:n})=>S.jsx("div",{className:W(e,`${H}-error-message`,{standalone:n,embedded:!n}),children:S.jsxs("p",{className:W(e,`${H}-error-message-text`,{standalone:n,embedded:!n}),children:[S.jsx(HN,{})," ",t.message||"An error occurred while processing your request."]})}),iM=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:s})=>{var _;const{isLoading:a}=Ir(),{messages:u}=Vn(),c=u.find(w=>w.id===n.eventSourceId),d=!!c,f=((_=c==null?void 0:c.name)==null?void 0:_.replace("_suggestions",""))||"",p=d?fA(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=w=>{const v=n.suggestions.find(A=>A.displayText===w);v&&s(v,n.eventSourceId||n.id)};return S.jsxs("div",{className:W(e,`${H}-follow-up`),children:[S.jsx("p",{className:W(e,`${H}-text`),children:n.message}),S.jsx(J8,{suggestions:n.suggestions.map(w=>w.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function c_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function sM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function oM(e,t,n){const s=Cl((n||{}).ignore||[]),a=aM(t);let u=-1;for(;++u<a.length;)YE(e,"text",c);function c(f,p){let m=-1,T;for(;++m<p.length;){const y=p[m],_=T?T.children:void 0;if(s(y,_?_.indexOf(y):void 0,T))return;T=y}if(T)return d(f,p)}function d(f,p){const m=p[p.length-1],T=a[u][0],y=a[u][1];let _=0;const v=m.children.indexOf(f);let A=!1,N=[];T.lastIndex=0;let C=T.exec(f.value);for(;C;){const z=C.index,Y={index:C.index,input:C.input,stack:[...p,f]};let D=y(...C,Y);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?T.lastIndex=z+1:(_!==z&&N.push({type:"text",value:f.value.slice(_,z)}),Array.isArray(D)?N.push(...D):D&&N.push(D),_=z+C[0].length,A=!0),!T.global)break;C=T.exec(f.value)}return A?(_<f.value.length&&N.push({type:"text",value:f.value.slice(_)}),m.children.splice(v,1,...N)):N=[f],v+N.length}}function aM(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([uM(s[0]),lM(s[1])])}return t}function uM(e){return typeof e=="string"?new RegExp(sM(e),"g"):e}function lM(e){return typeof e=="function"?e:function(){return e}}const hp="phrasing",pp=["autolink","link","image","label"];function cM(){return{transforms:[EM],enter:{literalAutolink:fM,literalAutolinkEmail:mp,literalAutolinkHttp:mp,literalAutolinkWww:mp},exit:{literalAutolink:gM,literalAutolinkEmail:mM,literalAutolinkHttp:hM,literalAutolinkWww:pM}}}function dM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:hp,notInConstruct:pp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:hp,notInConstruct:pp},{character:":",before:"[ps]",after:"\\/",inConstruct:hp,notInConstruct:pp}]}}function fM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function mp(e){this.config.enter.autolinkProtocol.call(this,e)}function hM(e){this.config.exit.autolinkProtocol.call(this,e)}function pM(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 mM(e){this.config.exit.autolinkEmail.call(this,e)}function gM(e){this.exit(e)}function EM(e){oM(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,yM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),bM]],{ignore:["link","linkReference"]})}function yM(e,t,n,r,s){let a="";if(!d_(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!TM(n)))return!1;const u=_M(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 bM(e,t,n,r){return!d_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function TM(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 _M(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=c_(e,"(");let a=c_(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function d_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||as(n)||bl(n))&&(!t||n!==47)}f_.peek=PM;function SM(){this.buffer()}function xM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function wM(){this.buffer()}function AM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function CM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vM(e){this.exit(e)}function NM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function kM(e){this.exit(e)}function PM(){return"["}function f_(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=s.move("]"),a}function OM(){return{enter:{gfmFootnoteCallString:SM,gfmFootnoteCall:xM,gfmFootnoteDefinitionLabelString:wM,gfmFootnoteDefinition:AM},exit:{gfmFootnoteCallString:CM,gfmFootnoteCall:vM,gfmFootnoteDefinitionLabelString:NM,gfmFootnoteDefinition:kM}}}function IM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:f_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,u){const c=a.createTracker(u);let d=c.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
32
- `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?h_:RM))),f(),d}}function RM(e,t,n){return t===0?e:h_(e,t,n)}function h_(e,t,n){return(n?"":" ")+e}const LM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];p_.peek=UM;function DM(){return{canContainEols:["delete"],enter:{strikethrough:FM},exit:{strikethrough:BM}}}function MM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:LM}],handlers:{delete:p_}}}function FM(e){this.enter({type:"delete",children:[]},e)}function BM(e){this.exit(e)}function p_(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,fe(B({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function UM(){return"~"}function HM(e){return e.length}function zM(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||HM,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const w=[],v=[];let A=-1;for(e[p].length>f&&(f=e[p].length);++A<e[p].length;){const N=jM(e[p][A]);if(n.alignDelimiters!==!1){const C=s(N);v[A]=C,(d[A]===void 0||C>d[A])&&(d[A]=C)}w.push(N)}u[p]=w,c[p]=v}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=m_(r[m]);else{const w=m_(r);for(;++m<f;)a[m]=w}m=-1;const T=[],y=[];for(;++m<f;){const w=a[m];let v="",A="";w===99?(v=":",A=":"):w===108?v=":":w===114&&(A=":");let N=n.alignDelimiters===!1?1:Math.max(1,d[m]-v.length-A.length);const C=v+"-".repeat(N)+A;n.alignDelimiters!==!1&&(N=v.length+N+A.length,N>d[m]&&(d[m]=N),y[m]=N),T[m]=C}u.splice(1,0,T),c.splice(1,0,y),p=-1;const _=[];for(;++p<u.length;){const w=u[p],v=c[p];m=-1;const A=[];for(;++m<f;){const N=w[m]||"";let C="",z="";if(n.alignDelimiters!==!1){const Y=d[m]-(v[m]||0),D=a[m];D===114?C=" ".repeat(Y):D===99?Y%2?(C=" ".repeat(Y/2+.5),z=" ".repeat(Y/2-.5)):(C=" ".repeat(Y/2),z=C):z=" ".repeat(Y)}n.delimiterStart!==!1&&!m&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&N==="")&&(n.delimiterStart!==!1||m)&&A.push(" "),n.alignDelimiters!==!1&&A.push(C),A.push(N),n.alignDelimiters!==!1&&A.push(z),n.padding!==!1&&A.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&A.push("|")}_.push(n.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return _.join(`
30
+ `},s),a}function C3(e,t){return e&&"run"in e?function(n,r){return Ke(this,null,function*(){const s=GE(n,B({file:r},t));yield e.run(s,r)})}:function(n,r){return GE(n,B({file:r},e||t))}}function XE(e){if(e)throw e}var Jf,KE;function v3(){if(KE)return Jf;KE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var T;for(T in f);return typeof T=="undefined"||e.call(f,T)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},c=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return Jf=function d(){var f,p,m,T,y,_,w=arguments[0],v=1,A=arguments.length,k=!1;for(typeof w=="boolean"&&(k=w,w=arguments[1]||{},v=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});v<A;++v)if(f=arguments[v],f!=null)for(p in f)m=c(w,p),T=c(f,p),w!==T&&(k&&T&&(a(T)||(y=s(T)))?(y?(y=!1,_=m&&s(m)?m:[]):_=m&&a(m)?m:{},u(w,{name:p,newValue:d(k,_,T)})):typeof T!="undefined"&&u(w,{name:p,newValue:T}));return w},Jf}var N3=v3();const Zf=Qe(N3);function eh(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function k3(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const u=s.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...s);function c(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,p?P3(p,c)(...f):u(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function P3(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(s);try{d=e.apply(this,u)}catch(f){const p=f;if(c&&n)throw p;return s(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(u,...c){n||(n=!0,t(u,...c))}function a(u){s(null,u)}}const Lr={basename:O3,dirname:I3,extname:R3,join:L3,sep:"/"};function O3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Oa(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else u<0&&(a=!0,u=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(r=s):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function I3(e){if(Oa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function R3(e){Oa(e);let t=e.length,n=-1,r=0,s=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function L3(...e){let t=-1,n;for(;++t<e.length;)Oa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":D3(n)}function D3(e){Oa(e);const t=e.codePointAt(0)===47;let n=M3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function M3(e,t){let n="",r=0,s=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(s===u-1||a===1))if(s!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),s=u,a=0;continue}}else if(n.length>0){n="",r=0,s=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,u):n=e.slice(s+1,u),r=u-s-1;s=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function Oa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const F3={cwd:B3};function B3(){return"/"}function th(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function U3(e){if(typeof e=="string")e=new URL(e);else if(!th(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 H3(e)}function H3(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const nh=["history","path","basename","stem","extname","dirname"];class QE{constructor(t){let n;t?th(t)?n={path:t}:typeof t=="string"||z3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":F3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<nh.length;){const a=nh[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)nh.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Lr.basename(this.path):void 0}set basename(t){ih(t,"basename"),rh(t,"basename"),this.path=Lr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Lr.dirname(this.path):void 0}set dirname(t){JE(this.basename,"dirname"),this.path=Lr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Lr.extname(this.path):void 0}set extname(t){if(rh(t,"extname"),JE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Lr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){th(t)&&(t=U3(t)),ih(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Lr.basename(this.path,this.extname):void 0}set stem(t){ih(t,"stem"),rh(t,"stem"),this.path=Lr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new gn(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function rh(e,t){if(e&&e.includes(Lr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Lr.sep+"`")}function ih(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function JE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function z3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const j3=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),$3={}.hasOwnProperty;class sh extends j3{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=k3()}copy(){const t=new sh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Zf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(uh("data",this.frozen),this.namespace[t]=n,this):$3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(uh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=kl(t),r=this.parser||this.Parser;return oh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),oh("process",this.parser||this.Parser),ah("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const c=kl(t),d=r.parse(c);r.run(d,c,function(p,m,T){if(p||!m||!T)return f(p);const y=m,_=r.stringify(y,T);Y3(_)?T.value=_:T.result=_,f(p,T)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),oh("processSync",this.parser||this.Parser),ah("processSync",this.compiler||this.Compiler),this.process(t,s),ey("processSync","process",n),r;function s(a,u){n=!0,XE(a),r=u}}run(t,n,r){ZE(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=kl(n);s.run(t,d,f);function f(p,m,T){const y=m||t;p?c(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),ey("runSync","run",r),s;function a(u,c){XE(u),s=c,r=!0}}stringify(t,n){this.freeze();const r=kl(n),s=this.compiler||this.Compiler;return ah("stringify",s),ZE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(uh("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(f.plugins),f.settings&&(s.settings=Zf(!0,s.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,T=-1;for(;++m<r.length;)if(r[m][0]===f){T=m;break}if(T===-1)r.push([f,...p]);else if(p.length>0){let[y,..._]=p;const w=r[T][1];eh(w)&&eh(y)&&(y=Zf(!0,w,y)),r[T]=[f,y,..._]}}}}const V3=new sh().freeze();function oh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ah(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function uh(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 ZE(e){if(!eh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ey(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function kl(e){return q3(e)?e:new QE(e)}function q3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Y3(e){return typeof e=="string"||W3(e)}function W3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const G3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ty=[],ny={allowDangerousHtml:!0},X3=/^(https?|ircs?|mailto|xmpp)$/i,K3=[{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 ry(e){const t=Q3(e),n=J3(e);return Z3(t.runSync(t.parse(n),n),e)}function Q3(e){const t=e.rehypePlugins||ty,n=e.remarkPlugins||ty,r=e.remarkRehypeOptions?B(B({},e.remarkRehypeOptions),ny):ny;return V3().use(PO).use(n).use(C3,r).use(t)}function J3(e){const t=e.children||"",n=new QE;return typeof t=="string"&&(n.value=t),n}function Z3(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||eI;for(const p of K3)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+G3+p.id,void 0);return Nl(e,f),Sk(e,{Fragment:S.Fragment,components:s,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function f(p,m,T){if(p.type==="raw"&&T&&typeof m=="number")return u?T.children.splice(m,1):T.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in Bf)if(Object.hasOwn(Bf,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],w=Bf[y];(w===null||w.includes(p.tagName))&&(p.properties[y]=d(String(_||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,T)),y&&T&&typeof m=="number")return c&&p.children?T.children.splice(m,1,...p.children):T.children.splice(m,1),m}}}function eI(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||X3.test(e.slice(0,t))?e:""}const iy=/[#.]/g;function tI(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){iy.lastIndex=s;const c=iy.exec(n),d=n.slice(s,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,s+=d.length),c&&(a=c[0],s++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function sy(e,t,n){const r=n?sI(n):void 0;function s(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const f=u;c.unshift(f)}else{d=tI(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,nI(u))c.unshift(u);else for(const[m,T]of Object.entries(u))rI(e,d.properties,m,T)}for(const f of c)lh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function nI(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const s=t[r];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const a=s;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function rI(e,t,n,r){const s=gl(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?s.spaceSeparated?a=G1(r):s.commaSeparated?a=D1(r):s.commaOrSpaceSeparated?a=G1(D1(r).join(" ")):a=oy(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?iI(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(oy(s,s.property,c));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function lh(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)lh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?lh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function oy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Ta(n)===Ta(t)))return!0}return n}function iI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function sI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const oI=["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"],aI=sy(_a,"div"),uI=sy(_i,"g",oI);function lI(e){const t=String(e),n=[];return{toOffset:s,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=ay(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function s(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],d=ay(t,c),f=d===-1?t.length+1:d+1;if(c===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function ay(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
31
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const cs={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},uy={}.hasOwnProperty,cI=Object.prototype;function dI(e,t){const n=t||{};return ch({file:n.file||void 0,location:!1,schema:n.space==="svg"?_i:_a,verbose:n.verbose||!1},e)}function ch(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Pl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:ly(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=lI(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Pl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Pl(e,r,n),n}default:return n=fI(e,t),n}}function ly(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=ch(e,t[n]);r.push(s)}return r}function fI(e,t){const n=e.schema;e.schema=t.namespaceURI===cs.svg?_i:_a;let r=-1;const s={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;uy.call(cI,d)||(s[d]=c.value)}const u=(e.schema.space==="svg"?uI:aI)(t.tagName,s,ly(e,t.childNodes));if(Pl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&ro(d.startTag),p=d&&d.endTag&&ro(d.endTag),m=ch(e,c.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Pl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=hI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function hI(e,t,n){const r=ro(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)uy.call(n.attrs,u)&&(a[gl(e.schema,u).property]=ro(n.attrs[u]));n.startTag;const c=ro(n.startTag),d=n.endTag?ro(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function ro(e){const t=cy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=cy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function cy(e){return e.line&&e.column?e:void 0}const dy={}.hasOwnProperty;function fy(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const c=r.handlers;if(s&&dy.call(s,e)){const d=String(s[e]);u=dy.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,s,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const pI={},mI={}.hasOwnProperty,hy=fy("type",{handlers:{root:EI,element:SI,text:TI,comment:_I,doctype:bI}});function gI(e,t){const r=(t||pI).space;return hy(e,r==="svg"?_i:_a)}function EI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=dh(e.children,n,t),io(e,n),n}function yI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=dh(e.children,n,t),io(e,n),n}function bI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return io(e,t),t}function TI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return io(e,t),t}function _I(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return io(e,t),t}function SI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=_i);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&mI.call(e.properties,a)){const d=xI(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:cs[u],childNodes:[],parentNode:null};return c.childNodes=dh(e.children,c,r),io(e,c),e.tagName==="template"&&e.content&&(c.content=yI(e.content,r)),c}function xI(e,t,n){const r=gl(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?M1(n):X1(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=s.name.indexOf(":");a<0?s.prefix="":(s.name=s.name.slice(a+1),s.prefix=r.attribute.slice(0,a)),s.namespace=cs[r.space]}return s}function dh(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=hy(e[r],n);a.parentNode=t,s.push(a)}return s}function io(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 wI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],AI=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),wt="�";var P;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(P||(P={}));const Dn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function py(e){return e>=55296&&e<=57343}function CI(e){return e>=56320&&e<=57343}function vI(e,t){return(e-55296)*1024+9216+t}function my(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function gy(e){return e>=64976&&e<=65007||AI.has(e)}var te;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(te||(te={}));const NI=65536;class kI{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=NI,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:s,offset:a}=this,u=s+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(CI(n))return this.pos++,this._addGap(),vI(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(te.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;const r=this.html.charCodeAt(n);return r===P.CARRIAGE_RETURN?P.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;let t=this.html.charCodeAt(this.pos);return t===P.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,P.LINE_FEED):t===P.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,py(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===P.LINE_FEED||t===P.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){my(t)?this._err(te.controlCharacterInInputStream):gy(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Xe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Xe||(Xe={}));function Ey(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 PI=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),OI=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 II(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=OI.get(e))!==null&&t!==void 0?t:e}var Xt;(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"})(Xt||(Xt={}));const RI=32;var wi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(wi||(wi={}));function fh(e){return e>=Xt.ZERO&&e<=Xt.NINE}function LI(e){return e>=Xt.UPPER_A&&e<=Xt.UPPER_F||e>=Xt.LOWER_A&&e<=Xt.LOWER_F}function DI(e){return e>=Xt.UPPER_A&&e<=Xt.UPPER_Z||e>=Xt.LOWER_A&&e<=Xt.LOWER_Z||fh(e)}function MI(e){return e===Xt.EQUALS||DI(e)}var Kt;(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"})(Kt||(Kt={}));var si;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(si||(si={}));class FI{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Kt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=si.Strict}startEntity(t){this.decodeMode=t,this.state=Kt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Kt.EntityStart:return t.charCodeAt(n)===Xt.NUM?(this.state=Kt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Kt.NamedEntity,this.stateNamedEntity(t,n));case Kt.NumericStart:return this.stateNumericStart(t,n);case Kt.NumericDecimal:return this.stateNumericDecimal(t,n);case Kt.NumericHex:return this.stateNumericHex(t,n);case Kt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|RI)===Xt.LOWER_X?(this.state=Kt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Kt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const a=r-n;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(n,a),s),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(fh(s)||LI(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(fh(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Xt.SEMI)this.consumed+=1;else if(this.decodeMode===si.Strict)return 0;return this.emitCodePoint(II(this.result),this.consumed),this.errors&&(t!==Xt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],a=(s&wi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=BI(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===si.Attribute&&(a===0||MI(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&wi.VALUE_LENGTH)>>14,a!==0){if(u===Xt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==si.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&wi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~wi.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Kt.NamedEntity:return this.result!==0&&(this.decodeMode!==si.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Kt.NumericDecimal:return this.emitNumericEntity(0,2);case Kt.NumericHex:return this.emitNumericEntity(0,3);case Kt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Kt.EntityStart:return 0}}}function BI(e,t,n,r){const s=(t&wi.BRANCH_LENGTH)>>7,a=t&wi.JUMP_TABLE;if(s===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=s?-1:e[n+d]-1}let u=n,c=u+s-1;for(;u<=c;){const d=u+c>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)c=d-1;else return e[d+s]}return-1}var ce;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(ce||(ce={}));var ds;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(ds||(ds={}));var rr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(rr||(rr={}));var X;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(X||(X={}));var g;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(g||(g={}));const UI=new Map([[X.A,g.A],[X.ADDRESS,g.ADDRESS],[X.ANNOTATION_XML,g.ANNOTATION_XML],[X.APPLET,g.APPLET],[X.AREA,g.AREA],[X.ARTICLE,g.ARTICLE],[X.ASIDE,g.ASIDE],[X.B,g.B],[X.BASE,g.BASE],[X.BASEFONT,g.BASEFONT],[X.BGSOUND,g.BGSOUND],[X.BIG,g.BIG],[X.BLOCKQUOTE,g.BLOCKQUOTE],[X.BODY,g.BODY],[X.BR,g.BR],[X.BUTTON,g.BUTTON],[X.CAPTION,g.CAPTION],[X.CENTER,g.CENTER],[X.CODE,g.CODE],[X.COL,g.COL],[X.COLGROUP,g.COLGROUP],[X.DD,g.DD],[X.DESC,g.DESC],[X.DETAILS,g.DETAILS],[X.DIALOG,g.DIALOG],[X.DIR,g.DIR],[X.DIV,g.DIV],[X.DL,g.DL],[X.DT,g.DT],[X.EM,g.EM],[X.EMBED,g.EMBED],[X.FIELDSET,g.FIELDSET],[X.FIGCAPTION,g.FIGCAPTION],[X.FIGURE,g.FIGURE],[X.FONT,g.FONT],[X.FOOTER,g.FOOTER],[X.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[X.FORM,g.FORM],[X.FRAME,g.FRAME],[X.FRAMESET,g.FRAMESET],[X.H1,g.H1],[X.H2,g.H2],[X.H3,g.H3],[X.H4,g.H4],[X.H5,g.H5],[X.H6,g.H6],[X.HEAD,g.HEAD],[X.HEADER,g.HEADER],[X.HGROUP,g.HGROUP],[X.HR,g.HR],[X.HTML,g.HTML],[X.I,g.I],[X.IMG,g.IMG],[X.IMAGE,g.IMAGE],[X.INPUT,g.INPUT],[X.IFRAME,g.IFRAME],[X.KEYGEN,g.KEYGEN],[X.LABEL,g.LABEL],[X.LI,g.LI],[X.LINK,g.LINK],[X.LISTING,g.LISTING],[X.MAIN,g.MAIN],[X.MALIGNMARK,g.MALIGNMARK],[X.MARQUEE,g.MARQUEE],[X.MATH,g.MATH],[X.MENU,g.MENU],[X.META,g.META],[X.MGLYPH,g.MGLYPH],[X.MI,g.MI],[X.MO,g.MO],[X.MN,g.MN],[X.MS,g.MS],[X.MTEXT,g.MTEXT],[X.NAV,g.NAV],[X.NOBR,g.NOBR],[X.NOFRAMES,g.NOFRAMES],[X.NOEMBED,g.NOEMBED],[X.NOSCRIPT,g.NOSCRIPT],[X.OBJECT,g.OBJECT],[X.OL,g.OL],[X.OPTGROUP,g.OPTGROUP],[X.OPTION,g.OPTION],[X.P,g.P],[X.PARAM,g.PARAM],[X.PLAINTEXT,g.PLAINTEXT],[X.PRE,g.PRE],[X.RB,g.RB],[X.RP,g.RP],[X.RT,g.RT],[X.RTC,g.RTC],[X.RUBY,g.RUBY],[X.S,g.S],[X.SCRIPT,g.SCRIPT],[X.SEARCH,g.SEARCH],[X.SECTION,g.SECTION],[X.SELECT,g.SELECT],[X.SOURCE,g.SOURCE],[X.SMALL,g.SMALL],[X.SPAN,g.SPAN],[X.STRIKE,g.STRIKE],[X.STRONG,g.STRONG],[X.STYLE,g.STYLE],[X.SUB,g.SUB],[X.SUMMARY,g.SUMMARY],[X.SUP,g.SUP],[X.TABLE,g.TABLE],[X.TBODY,g.TBODY],[X.TEMPLATE,g.TEMPLATE],[X.TEXTAREA,g.TEXTAREA],[X.TFOOT,g.TFOOT],[X.TD,g.TD],[X.TH,g.TH],[X.THEAD,g.THEAD],[X.TITLE,g.TITLE],[X.TR,g.TR],[X.TRACK,g.TRACK],[X.TT,g.TT],[X.U,g.U],[X.UL,g.UL],[X.SVG,g.SVG],[X.VAR,g.VAR],[X.WBR,g.WBR],[X.XMP,g.XMP]]);function so(e){var t;return(t=UI.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const he=g,HI={[ce.HTML]:new Set([he.ADDRESS,he.APPLET,he.AREA,he.ARTICLE,he.ASIDE,he.BASE,he.BASEFONT,he.BGSOUND,he.BLOCKQUOTE,he.BODY,he.BR,he.BUTTON,he.CAPTION,he.CENTER,he.COL,he.COLGROUP,he.DD,he.DETAILS,he.DIR,he.DIV,he.DL,he.DT,he.EMBED,he.FIELDSET,he.FIGCAPTION,he.FIGURE,he.FOOTER,he.FORM,he.FRAME,he.FRAMESET,he.H1,he.H2,he.H3,he.H4,he.H5,he.H6,he.HEAD,he.HEADER,he.HGROUP,he.HR,he.HTML,he.IFRAME,he.IMG,he.INPUT,he.LI,he.LINK,he.LISTING,he.MAIN,he.MARQUEE,he.MENU,he.META,he.NAV,he.NOEMBED,he.NOFRAMES,he.NOSCRIPT,he.OBJECT,he.OL,he.P,he.PARAM,he.PLAINTEXT,he.PRE,he.SCRIPT,he.SECTION,he.SELECT,he.SOURCE,he.STYLE,he.SUMMARY,he.TABLE,he.TBODY,he.TD,he.TEMPLATE,he.TEXTAREA,he.TFOOT,he.TH,he.THEAD,he.TITLE,he.TR,he.TRACK,he.UL,he.WBR,he.XMP]),[ce.MATHML]:new Set([he.MI,he.MO,he.MN,he.MS,he.MTEXT,he.ANNOTATION_XML]),[ce.SVG]:new Set([he.TITLE,he.FOREIGN_OBJECT,he.DESC]),[ce.XLINK]:new Set,[ce.XML]:new Set,[ce.XMLNS]:new Set},hh=new Set([he.H1,he.H2,he.H3,he.H4,he.H5,he.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var O;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(O||(O={}));const Lt={DATA:O.DATA,RCDATA:O.RCDATA,RAWTEXT:O.RAWTEXT,SCRIPT_DATA:O.SCRIPT_DATA,PLAINTEXT:O.PLAINTEXT,CDATA_SECTION:O.CDATA_SECTION};function zI(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function Ia(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function jI(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function Ai(e){return jI(e)||Ia(e)}function yy(e){return Ai(e)||zI(e)}function Ol(e){return e+32}function by(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function Ty(e){return by(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function $I(e){return e===P.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:py(e)?te.surrogateCharacterReference:gy(e)?te.noncharacterCharacterReference:my(e)||e===P.CARRIAGE_RETURN?te.controlCharacterReference:null}class VI{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=O.DATA,this.returnState=O.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new kI(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new FI(PI,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=$I(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Xe.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Xe.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Xe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Xe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Ey(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=so(t.tagName),t.type===Xe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Xe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Xe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Xe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Xe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=by(t)?Xe.WHITESPACE_CHARACTER:t===P.NULL?Xe.NULL_CHARACTER:Xe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Xe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=O.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?si.Attribute:si.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===O.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case O.DATA:{this._stateData(t);break}case O.RCDATA:{this._stateRcdata(t);break}case O.RAWTEXT:{this._stateRawtext(t);break}case O.SCRIPT_DATA:{this._stateScriptData(t);break}case O.PLAINTEXT:{this._statePlaintext(t);break}case O.TAG_OPEN:{this._stateTagOpen(t);break}case O.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case O.TAG_NAME:{this._stateTagName(t);break}case O.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case O.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case O.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case O.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case O.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case O.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case O.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case O.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case O.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case O.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case O.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case O.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case O.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case O.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case O.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case O.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case O.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case O.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case O.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case O.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case O.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case O.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case O.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case O.BOGUS_COMMENT:{this._stateBogusComment(t);break}case O.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case O.COMMENT_START:{this._stateCommentStart(t);break}case O.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case O.COMMENT:{this._stateComment(t);break}case O.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case O.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case O.COMMENT_END:{this._stateCommentEnd(t);break}case O.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case O.DOCTYPE:{this._stateDoctype(t);break}case O.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case O.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case O.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case O.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case O.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case O.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case O.CDATA_SECTION:{this._stateCdataSection(t);break}case O.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case O.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case O.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case O.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.TAG_OPEN;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case P.AMPERSAND:{this._startCharacterReference();break}case P.LESS_THAN_SIGN:{this.state=O.RCDATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.RAWTEXT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ai(t))this._createStartTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case P.EXCLAMATION_MARK:{this.state=O.MARKUP_DECLARATION_OPEN;break}case P.SOLIDUS:{this.state=O.END_TAG_OPEN;break}case P.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=O.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ai(t))this._createEndTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=O.DATA;break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=wt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ia(t)?Ol(t):t)}}_stateRcdataLessThanSign(t){t===P.SOLIDUS?this.state=O.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ai(t)?(this.state=O.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=O.BEFORE_ATTRIBUTE_NAME,!1;case P.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=O.SELF_CLOSING_START_TAG,!1;case P.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=O.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===P.SOLIDUS?this.state=O.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ai(t)?(this.state=O.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case P.SOLIDUS:{this.state=O.SCRIPT_DATA_END_TAG_OPEN;break}case P.EXCLAMATION_MARK:{this.state=O.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=O.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ai(t)?(this.state=O.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===P.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===P.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===P.SOLIDUS?this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ai(t)?(this._emitChars("<"),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ai(t)?(this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Dn.SCRIPT,!1)&&Ty(this.preprocessor.peek(Dn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Dn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===P.SOLIDUS?(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Dn.SCRIPT,!1)&&Ty(this.preprocessor.peek(Dn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Dn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=O.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this._leaveAttrName(),this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._leaveAttrName(),this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=wt;break}default:this.currentAttr.name+=String.fromCodePoint(Ia(t)?Ol(t):t)}}_stateAfterAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case P.EQUALS_SIGN:{this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{this.state=O.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this.state=O.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=O.DATA,this.emitCurrentTagToken();break}default:this.state=O.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case P.APOSTROPHE:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this._leaveAttrValue(),this.state=O.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case P.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=wt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Dn.DASH_DASH,!0)?(this._createCommentToken(Dn.DASH_DASH.length+1),this.state=O.COMMENT_START):this._consumeSequenceIfMatch(Dn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Dn.DOCTYPE.length+1),this.state=O.DOCTYPE):this._consumeSequenceIfMatch(Dn.CDATA_START,!0)?this.inForeignNode?this.state=O.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(Dn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=O.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_START_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END_DASH;break}case P.LESS_THAN_SIGN:{n.data+="<",this.state=O.COMMENT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=wt;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case P.EXCLAMATION_MARK:{n.data+="!",this.state=O.COMMENT_LESS_THAN_SIGN_BANG;break}case P.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===P.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=O.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===P.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=O.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==P.GREATER_THAN_SIGN&&t!==P.EOF&&this._err(te.nestedComment),this.state=O.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case P.EXCLAMATION_MARK:{this.state=O.COMMENT_END_BANG;break}case P.HYPHEN_MINUS:{n.data+="-";break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{n.data+="--!",this.state=O.COMMENT_END_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=O.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ia(t))this._createDoctypeToken(String.fromCharCode(Ol(t))),this.state=O.DOCTYPE_NAME;else switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(wt),this.state=O.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=O.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.AFTER_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.name+=wt;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ia(t)?Ol(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Dn.PUBLIC,!1)?this.state=O.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Dn.SYSTEM,!1)?this.state=O.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.NULL:{this._err(te.unexpectedNullCharacter);break}case P.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case P.RIGHT_SQUARE_BRACKET:{this.state=O.CDATA_SECTION_BRACKET;break}case P.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===P.RIGHT_SQUARE_BRACKET?this.state=O.CDATA_SECTION_END:(this._emitChars("]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA;break}case P.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(P.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&yy(this.preprocessor.peek(1))?O.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){yy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const _y=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Sy=new Set([..._y,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Il=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),qI=new Set([...Il,g.OL,g.UL]),YI=new Set([...Il,g.BUTTON]),xy=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),wy=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),WI=new Set([g.TR,g.TEMPLATE,g.HTML]),GI=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),XI=new Set([g.TABLE,g.TEMPLATE,g.HTML]),KI=new Set([g.TD,g.TH]);class QI{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ce.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==ce.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(hh,ce.HTML)}popUntilTableCellPopped(){this.popUntilPopped(KI,ce.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(XI,ce.HTML)}clearBackToTableBodyContext(){this.clearBackTo(GI,ce.HTML)}clearBackToTableRowContext(){this.clearBackTo(WI,ce.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ce.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case ce.SVG:{if(wy.has(s))return!1;break}case ce.MATHML:{if(xy.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Il)}hasInListItemScope(t){return this.hasInDynamicScope(t,qI)}hasInButtonScope(t){return this.hasInDynamicScope(t,YI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ce.HTML:{if(hh.has(n))return!0;if(Il.has(n))return!1;break}case ce.SVG:{if(wy.has(n))return!1;break}case ce.MATHML:{if(xy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ce.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ce.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ce.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&_y.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Sy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Sy.has(this.currentTagId);)this.pop()}}const ph=3;var Dr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Dr||(Dr={}));const Ay={type:Dr.Marker};class JI{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===Dr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===s&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<ph)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<ph)return;const s=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>s.get(d.name)===d.value)&&(a+=1,a>=ph&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(Ay)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Dr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Dr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Ay);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Dr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Dr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Dr.Element&&n.element===t)}}const Ci={createDocument(){return{nodeName:"#document",mode:rr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ci.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Ci.isTextNode(n)){n.value+=t;return}}Ci.appendChild(e,Ci.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ci.isTextNode(r)?r.value+=t:Ci.insertBefore(e,Ci.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=B(B({},e.sourceCodeLocation),t)}},Cy="html",ZI="about:legacy-compat",eR="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",vy=["+//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//"],tR=[...vy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],nR=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Ny=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],rR=[...Ny,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ky(e,t){return t.some(n=>e.startsWith(n))}function iR(e){return e.name===Cy&&e.publicId===null&&(e.systemId===null||e.systemId===ZI)}function sR(e){if(e.name!==Cy)return rr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===eR)return rr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),nR.has(n))return rr.QUIRKS;let r=t===null?tR:vy;if(ky(n,r))return rr.QUIRKS;if(r=t===null?Ny:rR,ky(n,r))return rr.LIMITED_QUIRKS}return rr.NO_QUIRKS}const Py={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},oR="definitionurl",aR="definitionURL",uR=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])),lR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ce.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ce.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ce.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ce.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ce.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ce.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ce.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ce.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ce.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ce.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ce.XMLNS}]]),cR=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])),dR=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function fR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===ds.COLOR||r===ds.SIZE||r===ds.FACE)||dR.has(t)}function Oy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===oR){e.attrs[t].name=aR;break}}function Iy(e){for(let t=0;t<e.attrs.length;t++){const n=uR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function mh(e){for(let t=0;t<e.attrs.length;t++){const n=lR.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 hR(e){const t=cR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=so(e.tagName))}function pR(e,t){return t===ce.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function mR(e,t,n){if(t===ce.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ds.ENCODING){const s=n[r].value.toLowerCase();return s===Py.TEXT_HTML||s===Py.APPLICATION_XML}}return t===ce.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function gR(e,t,n,r){return(!r||r===ce.HTML)&&mR(e,t,n)||(!r||r===ce.MATHML)&&pR(e,t)}const ER="hidden",yR=8,bR=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 TR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Ry=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Ly={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ci,onParseError:null};class Dy{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=B(B({},Ly),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 VI(this.options,this),this.activeFormattingElements=new JI(this.treeAdapter),this.fragmentContextID=r?so(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new QI(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({},Ly),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,ce.HTML,[]));const s=r.treeAdapter.createElement("documentmock",ce.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(M.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:TR,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var s,a;(a=(s=this.treeAdapter).onItemPush)===null||a===void 0||a.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===ce.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ce.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=Lt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===X.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ce.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Lt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Lt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Lt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Lt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&fe(B({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,ce.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ce.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(X.HTML,ce.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),a=r?s.lastIndexOf(r):s.length,u=s[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,s=this.treeAdapter.getTagName(t),a=n.type===Xe.END_TAG&&s===n.tagName?{endTag: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===g.SVG&&this.treeAdapter.getTagName(n)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ce.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ce.HTML)}_processToken(t){switch(t.type){case Xe.CHARACTER:{this.onCharacter(t);break}case Xe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Xe.COMMENT:{this.onComment(t);break}case Xe.DOCTYPE:{this.onDoctype(t);break}case Xe.START_TAG:{this._processStartTag(t);break}case Xe.END_TAG:{this.onEndTag(t);break}case Xe.EOF:{this.onEof(t);break}case Xe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return gR(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Dr.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const a=this.activeFormattingElements.entries[s];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=M.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=M.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=M.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=M.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=M.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=M.IN_TABLE;return}case g.BODY:{this.insertionMode=M.IN_BODY;return}case g.FRAMESET:{this.insertionMode=M.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?M.AFTER_HEAD:M.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=M.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=M.IN_HEAD;return}break}}this.insertionMode=M.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=M.IN_SELECT_IN_TABLE;return}}this.insertionMode=M.IN_SELECT}_isElementCausesFosterParenting(t){return Ry.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ce.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return HI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){KL(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ra(this,t);break}case M.BEFORE_HTML:{La(this,t);break}case M.BEFORE_HEAD:{Da(this,t);break}case M.IN_HEAD:{Ma(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case M.AFTER_HEAD:{Ba(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{Fy(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:{bh(this,t);break}case M.IN_TABLE_TEXT:{qy(this,t);break}case M.IN_COLUMN_GROUP:{Dl(this,t);break}case M.AFTER_BODY:{Bl(this,t);break}case M.AFTER_AFTER_BODY:{Ul(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){XL(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ra(this,t);break}case M.BEFORE_HTML:{La(this,t);break}case M.BEFORE_HEAD:{Da(this,t);break}case M.IN_HEAD:{Ma(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case M.AFTER_HEAD:{Ba(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{bh(this,t);break}case M.IN_COLUMN_GROUP:{Dl(this,t);break}case M.AFTER_BODY:{Bl(this,t);break}case M.AFTER_AFTER_BODY:{Ul(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Eh(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:{Eh(this,t);break}case M.IN_TABLE_TEXT:{za(this,t);break}case M.AFTER_BODY:{vR(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{NR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{kR(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case M.IN_TABLE_TEXT:{za(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?QL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ra(this,t);break}case M.BEFORE_HTML:{PR(this,t);break}case M.BEFORE_HEAD:{IR(this,t);break}case M.IN_HEAD:{Er(this,t);break}case M.IN_HEAD_NO_SCRIPT:{DR(this,t);break}case M.AFTER_HEAD:{FR(this,t);break}case M.IN_BODY:{yn(this,t);break}case M.IN_TABLE:{oo(this,t);break}case M.IN_TABLE_TEXT:{za(this,t);break}case M.IN_CAPTION:{RL(this,t);break}case M.IN_COLUMN_GROUP:{Th(this,t);break}case M.IN_TABLE_BODY:{Ml(this,t);break}case M.IN_ROW:{Fl(this,t);break}case M.IN_CELL:{ML(this,t);break}case M.IN_SELECT:{Gy(this,t);break}case M.IN_SELECT_IN_TABLE:{BL(this,t);break}case M.IN_TEMPLATE:{HL(this,t);break}case M.AFTER_BODY:{jL(this,t);break}case M.IN_FRAMESET:{$L(this,t);break}case M.AFTER_FRAMESET:{qL(this,t);break}case M.AFTER_AFTER_BODY:{WL(this,t);break}case M.AFTER_AFTER_FRAMESET:{GL(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?JL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ra(this,t);break}case M.BEFORE_HTML:{OR(this,t);break}case M.BEFORE_HEAD:{RR(this,t);break}case M.IN_HEAD:{LR(this,t);break}case M.IN_HEAD_NO_SCRIPT:{MR(this,t);break}case M.AFTER_HEAD:{BR(this,t);break}case M.IN_BODY:{Ll(this,t);break}case M.TEXT:{xL(this,t);break}case M.IN_TABLE:{Ua(this,t);break}case M.IN_TABLE_TEXT:{za(this,t);break}case M.IN_CAPTION:{LL(this,t);break}case M.IN_COLUMN_GROUP:{DL(this,t);break}case M.IN_TABLE_BODY:{_h(this,t);break}case M.IN_ROW:{Wy(this,t);break}case M.IN_CELL:{FL(this,t);break}case M.IN_SELECT:{Xy(this,t);break}case M.IN_SELECT_IN_TABLE:{UL(this,t);break}case M.IN_TEMPLATE:{zL(this,t);break}case M.AFTER_BODY:{Qy(this,t);break}case M.IN_FRAMESET:{VL(this,t);break}case M.AFTER_FRAMESET:{YL(this,t);break}case M.AFTER_AFTER_BODY:{Ul(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Ra(this,t);break}case M.BEFORE_HTML:{La(this,t);break}case M.BEFORE_HEAD:{Da(this,t);break}case M.IN_HEAD:{Ma(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Fa(this,t);break}case M.AFTER_HEAD:{Ba(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:{$y(this,t);break}case M.TEXT:{wL(this,t);break}case M.IN_TABLE_TEXT:{za(this,t);break}case M.IN_TEMPLATE:{Ky(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:{yh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===P.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{My(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{bh(this,t);break}case M.IN_TABLE_TEXT:{Vy(this,t);break}}}}function _R(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):jy(e,t),n}function SR(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function xR(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let a=0,u=s;u!==n;a++,u=s){s=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=bR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=wR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function wR(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 AR(e,t,n){const r=e.treeAdapter.getTagName(t),s=so(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===ce.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function CR(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,a=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,s.tagID)}function gh(e,t){for(let n=0;n<yR;n++){const r=_R(e,t);if(!r)break;const s=SR(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=xR(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&AR(e,u,a),CR(e,s,r)}}function Eh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function vR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function NR(e,t){e._appendCommentNode(t,e.document)}function yh(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function kR(e,t){e._setDocumentType(t);const n=t.forceQuirks?rr.QUIRKS:sR(t);iR(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Ra(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,rr.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function PR(e,t){t.tagID===g.HTML?(e._insertElement(t,ce.HTML),e.insertionMode=M.BEFORE_HEAD):La(e,t)}function OR(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&La(e,t)}function La(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function IR(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.HEAD:{e._insertElement(t,ce.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:Da(e,t)}}function RR(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Da(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function Da(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function Er(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Lt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Lt.RAWTEXT):(e._insertElement(t,ce.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Lt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Lt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=M.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(M.IN_TEMPLATE);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Ma(e,t)}}function LR(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=M.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Ma(e,t);break}case g.TEMPLATE:{fs(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function fs(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function Ma(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function DR(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Er(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:Fa(e,t)}}function MR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case g.BR:{Fa(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Fa(e,t){const n=t.type===Xe.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function FR(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.BODY:{e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,ce.HTML),e.insertionMode=M.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),Er(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Ba(e,t)}}function BR(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Ba(e,t);break}case g.TEMPLATE:{fs(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Ba(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=M.IN_BODY,Rl(e,t)}function Rl(e,t){switch(t.type){case Xe.CHARACTER:{Fy(e,t);break}case Xe.WHITESPACE_CHARACTER:{My(e,t);break}case Xe.COMMENT:{Eh(e,t);break}case Xe.START_TAG:{yn(e,t);break}case Xe.END_TAG:{Ll(e,t);break}case Xe.EOF:{$y(e,t);break}}}function My(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Fy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function UR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function HR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function zR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_FRAMESET)}function jR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML)}function $R(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&hh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ce.HTML)}function VR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function qR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),n||(e.formElement=e.openElements.current))}function YR(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===g.LI&&s===g.LI||(n===g.DD||n===g.DT)&&(s===g.DD||s===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==g.ADDRESS&&s!==g.DIV&&s!==g.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML)}function WR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.tokenizer.state=Lt.PLAINTEXT}function GR(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.framesetOk=!1}function XR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(gh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function KR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function QR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(gh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function JR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function ZR(e,t){e.treeAdapter.getDocumentMode(e.document)!==rr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function By(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ce.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Uy(e){const t=Ey(e,ds.TYPE);return t!=null&&t.toLowerCase()===ER}function eL(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ce.HTML),Uy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function tL(e,t){e._appendElement(t,ce.HTML),t.ackSelfClosing=!0}function nL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,ce.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function rL(e,t){t.tagName=X.IMG,t.tagID=g.IMG,By(e,t)}function iL(e,t){e._insertElement(t,ce.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Lt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function sL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function oL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function Hy(e,t){e._switchToTextParsing(t,Lt.RAWTEXT)}function aL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function uL(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML)}function lL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ce.HTML)}function cL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,ce.HTML)}function dL(e,t){e._reconstructActiveFormattingElements(),Oy(t),mh(t),t.selfClosing?e._appendElement(t,ce.MATHML):e._insertElement(t,ce.MATHML),t.ackSelfClosing=!0}function fL(e,t){e._reconstructActiveFormattingElements(),Iy(t),mh(t),t.selfClosing?e._appendElement(t,ce.SVG):e._insertElement(t,ce.SVG),t.ackSelfClosing=!0}function zy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML)}function yn(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{KR(e,t);break}case g.A:{XR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{$R(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{jR(e,t);break}case g.LI:case g.DD:case g.DT:{YR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{By(e,t);break}case g.HR:{nL(e,t);break}case g.RB:case g.RTC:{lL(e,t);break}case g.RT:case g.RP:{cL(e,t);break}case g.PRE:case g.LISTING:{VR(e,t);break}case g.XMP:{sL(e,t);break}case g.SVG:{fL(e,t);break}case g.HTML:{UR(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{Er(e,t);break}case g.BODY:{HR(e,t);break}case g.FORM:{qR(e,t);break}case g.NOBR:{QR(e,t);break}case g.MATH:{dL(e,t);break}case g.TABLE:{ZR(e,t);break}case g.INPUT:{eL(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{tL(e,t);break}case g.IMAGE:{rL(e,t);break}case g.BUTTON:{GR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{JR(e,t);break}case g.IFRAME:{oL(e,t);break}case g.SELECT:{aL(e,t);break}case g.OPTION:case g.OPTGROUP:{uL(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Hy(e,t);break}case g.FRAMESET:{zR(e,t);break}case g.TEXTAREA:{iL(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Hy(e,t):zy(e,t);break}case g.PLAINTEXT:{WR(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:zy(e,t)}}function hL(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function pL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,Qy(e,t))}function mL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function gL(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):n&&e.openElements.remove(n))}function EL(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function yL(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function bL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function TL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function _L(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function SL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function jy(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const a=e.openElements.items[s],u=e.openElements.tagIDs[s];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(a,u))break}}function Ll(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{gh(e,t);break}case g.P:{EL(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{mL(e,t);break}case g.LI:{yL(e);break}case g.DD:case g.DT:{bL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{TL(e);break}case g.BR:{SL(e);break}case g.BODY:{hL(e,t);break}case g.HTML:{pL(e,t);break}case g.FORM:{gL(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{_L(e,t);break}case g.TEMPLATE:{fs(e,t);break}default:jy(e,t)}}function $y(e,t){e.tmplInsertionModeStack.length>0?Ky(e,t):yh(e,t)}function xL(e,t){var n;t.tagID===g.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function wL(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function bh(e,t){if(e.openElements.currentTagId!==void 0&&Ry.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case Xe.CHARACTER:{qy(e,t);break}case Xe.WHITESPACE_CHARACTER:{Vy(e,t);break}}else Ha(e,t)}function AL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_CAPTION}function CL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function vL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,Th(e,t)}function NL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_TABLE_BODY}function kL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=M.IN_TABLE_BODY,Ml(e,t)}function PL(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function OL(e,t){Uy(t)?e._appendElement(t,ce.HTML):Ha(e,t),t.ackSelfClosing=!0}function IL(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ce.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function oo(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{kL(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Er(e,t);break}case g.COL:{vL(e,t);break}case g.FORM:{IL(e,t);break}case g.TABLE:{PL(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{NL(e,t);break}case g.INPUT:{OL(e,t);break}case g.CAPTION:{AL(e,t);break}case g.COLGROUP:{CL(e,t);break}default:Ha(e,t)}}function Ua(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{fs(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Ha(e,t)}}function Ha(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Rl(e,t),e.fosterParentingEnabled=n}function Vy(e,t){e.pendingCharacterTokens.push(t)}function qy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function za(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 Yy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function RL(e,t){const n=t.tagID;Yy.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,oo(e,t)):yn(e,t)}function LL(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,n===g.TABLE&&Ua(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Ll(e,t)}}function Th(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.COL:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{Er(e,t);break}default:Dl(e,t)}}function DL(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TEMPLATE:{fs(e,t);break}case g.COL:break;default:Dl(e,t)}}function Dl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function Ml(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=M.IN_ROW,Fl(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,oo(e,t));break}default:oo(e,t)}}function _h(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,Ua(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:Ua(e,t)}}function Fl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Ml(e,t));break}default:oo(e,t)}}function Wy(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,_h(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,_h(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:Ua(e,t)}}function ML(e,t){const n=t.tagID;Yy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),Fl(e,t)):yn(e,t)}function FL(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Wy(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Ll(e,t)}}function Gy(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,ce.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ce.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{Er(e,t);break}}}function Xy(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{fs(e,t);break}}}function BL(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Gy(e,t)}function UL(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Xy(e,t)}function HL(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{Er(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=M.IN_TABLE,e.insertionMode=M.IN_TABLE,oo(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,Th(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,Ml(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,Fl(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,yn(e,t)}}function zL(e,t){t.tagID===g.TEMPLATE&&fs(e,t)}function Ky(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):yh(e,t)}function jL(e,t){t.tagID===g.HTML?yn(e,t):Bl(e,t)}function Qy(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=M.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Bl(e,t)}function Bl(e,t){e.insertionMode=M.IN_BODY,Rl(e,t)}function $L(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.FRAMESET:{e._insertElement(t,ce.HTML);break}case g.FRAME:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{Er(e,t);break}}}function VL(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=M.AFTER_FRAMESET))}function qL(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.NOFRAMES:{Er(e,t);break}}}function YL(e,t){t.tagID===g.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function WL(e,t){t.tagID===g.HTML?yn(e,t):Ul(e,t)}function Ul(e,t){e.insertionMode=M.IN_BODY,Rl(e,t)}function GL(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.NOFRAMES:{Er(e,t);break}}}function XL(e,t){t.chars=wt,e._insertCharacters(t)}function KL(e,t){e._insertCharacters(t),e.framesetOk=!1}function Jy(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ce.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function QL(e,t){if(fR(t))Jy(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ce.MATHML?Oy(t):r===ce.SVG&&(hR(t),Iy(t)),mh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function JL(e,t){if(t.tagID===g.P||t.tagID===g.BR){Jy(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===ce.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}X.AREA,X.BASE,X.BASEFONT,X.BGSOUND,X.BR,X.COL,X.EMBED,X.FRAME,X.HR,X.IMG,X.INPUT,X.KEYGEN,X.LINK,X.META,X.PARAM,X.SOURCE,X.TRACK,X.WBR;const ZL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,e6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Zy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function eb(e,t){const n=c6(e),r=fy("type",{handlers:{root:t6,element:n6,text:r6,comment:nb,doctype:i6,raw:o6},unknown:a6}),s={parser:n?new Dy(Zy):Dy.getFragmentParser(void 0,Zy),handle(c){r(c,s)},stitches:!1,options:t||{}};r(e,s),ao(s,Rr());const a=n?s.parser.document:s.parser.getFragment(),u=dI(a,{file:s.options.file});return s.stitches&&Nl(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function tb(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function t6(e,t){tb(e.children,t)}function n6(e,t){u6(e,t),tb(e.children,t),l6(e,t)}function r6(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Xe.CHARACTER,chars:e.value,location:ja(e)};ao(t,Rr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function i6(e,t){const n={type:Xe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ja(e)};ao(t,Rr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function s6(e,t){t.stitches=!0;const n=d6(e);if("children"in e&&"children"in n){const r=eb({type:"root",children:e.children},t.options);n.children=r.children}nb({type:"comment",value:{stitch:n}},t)}function nb(e,t){const n=e.value,r={type:Xe.COMMENT,data:n,location:ja(e)};ao(t,Rr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function o6(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,rb(t,Rr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(ZL,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function a6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))s6(n,t);else{let r="";throw e6.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 ao(e,t){rb(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Lt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function rb(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 u6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Lt.PLAINTEXT)return;ao(t,Rr(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:cs.html;s===cs.html&&n==="svg"&&(s=cs.svg);const a=gI(fe(B({},e),{children:[]}),{space:s===cs.svg?"svg":"html"}),u={type:Xe.START_TAG,tagName:n,tagID:so(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ja(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function l6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&wI.includes(n)||t.parser.tokenizer.state===Lt.PLAINTEXT)return;ao(t,El(e));const r={type:Xe.END_TAG,tagName:n,tagID:so(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ja(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Lt.RCDATA||t.parser.tokenizer.state===Lt.RAWTEXT||t.parser.tokenizer.state===Lt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Lt.DATA)}function c6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ja(e){const t=Rr(e)||{line:void 0,column:void 0,offset:void 0},n=El(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function d6(e){return"children"in e?ls(fe(B({},e),{children:[]})):ls(e)}function ib(e){return function(t,n){return eb(t,fe(B({},e),{file:n}))}}const hs=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],sb={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...hs,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...hs],h2:[["className","sr-only"]],img:[...hs,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...hs,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...hs],table:[...hs],ul:[...hs,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},vi={}.hasOwnProperty;function f6(e,t){let n={type:"root",children:[]};const r={schema:t?B(B({},sb),t):sb,stack:[]},s=ob(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function ob(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return h6(e,n);case"doctype":return p6(e,n);case"element":return m6(e,n);case"root":return g6(e,n);case"text":return E6(e,n)}}}function h6(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 $a(a,t),a}}function p6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return $a(n,t),n}}function m6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=ab(e,t.children),s=y6(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&vi.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:s,children:r};return $a(u,t),u}function g6(e,t){const r={type:"root",children:ab(e,t.children)};return $a(r,t),r}function E6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return $a(r,t),r}function ab(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=ob(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function y6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&vi.call(r,n)?r[n]:void 0,u=r&&vi.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(vi.call(c,f)){const p=c[f];let m=ub(e,cb(a,f),f,p);m==null&&(m=ub(e,cb(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&vi.call(s,n)){const p=s[n];for(f in p)vi.call(p,f)&&!vi.call(d,f)&&(d[f]=p[f])}return d}function ub(e,t,n,r){return t?Array.isArray(r)?b6(e,t,n,r):lb(e,t,n,r):void 0}function b6(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=lb(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function lb(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&T6(e,n,r)){if(typeof t=="object"&&t.length>1){let s=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){s=!0;break}}else if(u===r){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function T6(e,t,n){const r=e.schema.protocols&&vi.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),a=s.indexOf(":"),u=s.indexOf("?"),c=s.indexOf("#"),d=s.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&s.slice(0,p.length)===p)return!0}return!1}function $a(e,t){const n=tE(t);t.data&&(e.data=ls(t.data)),n&&(e.position=n)}function cb(e,t){let n,r=-1;if(e)for(;++r<e.length;){const s=e[r],a=typeof s=="string"?s:s[0];if(a===t)return s;a==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function _6(e){return function(t){return f6(t,e)}}const db=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return S.jsx("a",fe(B(B({className:W(e,`${H}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},S6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=tt();return!e&&!t?null:S.jsx("div",{className:W(n,`${H}-disclaimer`),children:t?S.jsx(ry,{rehypePlugins:[ib,_6],components:{ul:({children:r})=>S.jsx("ul",{className:W(n,`${H}-ul`),children:r}),ol:({children:r})=>S.jsx("ol",{className:W(n,`${H}-ol`),children:r}),li:({children:r})=>S.jsx("li",{className:W(n,`${H}-li`),children:r}),a:({href:r,title:s,children:a})=>S.jsx(db,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>S.jsx("img",{className:W(n,`${H}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>S.jsx("p",{className:W(n,`${H}-disclaimer-text`),children:r}),span:({children:r})=>S.jsx("span",{className:W(n,`${H}-disclaimer-text-span`),children:r})},children:t}):S.jsx("p",{className:W(n,`${H}-disclaimer-text`),children:e})})},Sh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:s,imageFile:a}=Vn(),{setImageFile:u}=Ks(),{logger:c,globalClassName:d,searchConfig:f,features:p}=tt(),m=F.useRef(null),T=F.useRef(null),y=F.useId(),_=!!(p!=null&&p.enableImageUpload),w=(a==null?void 0:a.name)||"",v=!!s||!1,A=v?"connected":"disconnected",k=t||!v,C=()=>a?new Promise((q,ne)=>{const ue=new FileReader;ue.readAsDataURL(a),ue.onload=()=>q(ue.result),ue.onerror=V=>ne(V)}):Promise.resolve(""),z=q=>Ke(null,null,function*(){var V;if(k)return;const ne=10*1024*1024,ue=(V=q.target.files)==null?void 0:V[0];if(ue){if(ue.size>ne){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(ue)}}),Y=()=>{u(null),T.current&&(T.current.value="")},D=q=>Ke(null,null,function*(){var V;q.preventDefault();const ne=(((V=m.current)==null?void 0:V.value)||"").trim();let ue="";try{ue=yield C()}catch(se){c==null||c.error("Error converting file to base64:",se),alert("There was an error processing the file. Please try again.");return}ne&&(Y(),m.current.value="",r(ne,ue))});return S.jsxs("div",{className:W(d,e,`cim-${n}-component`,a&&"with-attachments",`${H}-search-bar-wrapper`),children:[a&&S.jsxs("div",{className:W(d,`cim-${n}-component`,`${H}-image-file-preview`),children:[S.jsx("img",{className:W(d,`cim-${n}-component`,`${H}-image-preview`),src:URL.createObjectURL(a),alt:`${w} preview`,loading:"lazy"}),S.jsx("span",{className:W(d,`cim-${n}-component`,`${H}-image-file-name`),title:w,children:w}),S.jsx(L1,{className:W(`cim-${n}-component`,"clear-attachment"),label:"Remove image",onClick:Y})]}),S.jsxs("form",{className:W(d,e,`cim-${n}-component`,`${H}-search-bar`),name:`${H}-search-form`,onSubmit:D,children:[S.jsx("span",{role:"status",className:W(`${H}-connection-status-icon`,A),children:S.jsx("span",{className:`${H}-visually-hidden`,children:v?"Connected to assistant":"Disconnected from assistant"})}),_&&S.jsxs("div",{className:W(d,e,`cim-${n}-component`,k&&"disabled",`${H}-image-upload-button-container`),children:[S.jsx("button",{type:"button",className:W(d,e,`cim-${n}-component`,k&&"disabled",`${H}-image-upload-button`),"aria-label":"Upload an image",disabled:k,onClick:()=>{var q;return(q=T.current)==null?void 0:q.click()},children:S.jsx(YN,{"aria-hidden":"true"})}),S.jsx("input",{className:W(d,e,`cim-${n}-component`,`${H}-file-input`),type:"file",ref:T,id:y,"aria-label":"Upload an image file",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${H}-file-input`,disabled:k,onInput:z})]}),S.jsx("input",{className:W(d,e,`cim-${n}-component`,`${H}-search-input`),type:"text",ref:m,placeholder:f==null?void 0:f.placeholder,"aria-label":(f==null?void 0:f.inputAriaLabel)||(f==null?void 0:f.placeholder)||"Ask a question",name:`${H}-user-input`}),S.jsx(JN,{isLoading:k}),S.jsx(XN,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:k})]}),S.jsx(S6,{})]})};function x6(e){return _t({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function w6(e){return _t({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 fb=F.createContext({isOpen:!1}),xh=F.createContext(null),hb=F.createContext(null),ps=()=>{var n,r;const e=F.useContext(xh),t=F.useContext(hb);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},pb=({onClearChat:e,componentType:t})=>{const n=ps(),r=()=>{e(),n()};return S.jsxs("button",{className:W(`${H}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[S.jsx(w6,{}),"Clear chat"]})};function A6(e){return e==null?[]:Array.isArray(e)?e:[e]}var C6=(e,...t)=>e.concat(t),v6=(e,...t)=>e.filter(n=>!t.includes(n)),N6=e=>Array.from(new Set(e));function mb(e,t,n={}){const{step:r=1,loop:s=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?s?c:0:a>=u?s?0:t>u?u:t:a}function k6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return mb(e,t,{step:-r,loop:s})}var P6=e=>Array.isArray(e),gb=e=>e!=null&&typeof e=="object",O6=e=>gb(e)&&!P6(e),Hl=e=>typeof e=="string",uo=e=>typeof e=="function",I6=e=>e==null,R6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),L6=e=>Object.prototype.toString.call(e),Eb=Function.prototype.toString,D6=Eb.call(Object),M6=e=>{if(!gb(e)||L6(e)!="[object Object]"||U6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=R6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Eb.call(n)==D6},F6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,B6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,U6=e=>F6(e)||B6(e),H6=e=>e(),z6=()=>{},wh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function j6(e,t=0){let n=0,r=null;return((...s)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...s),n=a):r||(r=setTimeout(()=>{e(...s),n=Date.now(),r=null},t-u))})}var{min:$6,max:V6}=Math,q6=e=>Number.isNaN(e),Y6=e=>q6(e)?0:e,yb=(e,t,n)=>$6(V6(Y6(e),t),n);function Ah(e){if(!M6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const s=e[r];s!==void 0&&(n[r]=Ah(s))}return n}function Ch(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function W6(e,t){if(e==null)throw new Error(t())}function G6(e,t,n){let r=[];for(const s of t)e[s]==null&&r.push(s);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var X6=Object.defineProperty,K6=(e,t,n)=>t in e?X6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vh=(e,t,n)=>K6(e,typeof t!="symbol"?t+"":t,n),bb=()=>{},zl=e=>typeof e=="object"&&e!==null,lo=e=>e?"":void 0,Tb=e=>e?"true":void 0,Q6=1,J6=9,Z6=11,Qt=e=>zl(e)&&e.nodeType===Q6&&typeof e.nodeName=="string",jl=e=>zl(e)&&e.nodeType===J6,e4=e=>zl(e)&&e===e.window,_b=e=>Qt(e)?e.localName||"":"#document";function t4(e){return["html","body","#document"].includes(_b(e))}var n4=e=>zl(e)&&e.nodeType!==void 0,ms=e=>n4(e)&&e.nodeType===Z6&&"host"in e,r4=e=>Qt(e)&&e.localName==="input",i4=e=>Qt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Va(e){if(!e)return!1;const t=e.getRootNode();return ho(t)===e}var s4=/(textarea|select)/;function o4(e){if(e==null||!Qt(e))return!1;try{return r4(e)&&e.selectionStart!=null||s4.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function co(e,t){var r;if(!e||!t||!Qt(e)||!Qt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&ms(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Mr(e){var t;return jl(e)?e:e4(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function a4(e){return Mr(e).documentElement}function fo(e){var t,n,r;return ms(e)?fo(e.host):jl(e)?(t=e.defaultView)!=null?t:window:Qt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function ho(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function u4(e){if(_b(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ms(e)&&e.host||a4(e);return ms(t)?t.host:t}function Nh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),jl(t)||ms(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var kh=new WeakMap;function po(e){return kh.has(e)||kh.set(e,fo(e).getComputedStyle(e)),kh.get(e)}var Ph=new Set(["menu","listbox","dialog","grid","tree","region"]),l4=e=>Ph.has(e),Sb=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function xb(e,t){const n=new Set,r=Nh(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Sb(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(m&&l4(m)&&!T&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function wb(e,t){const n=Nh(e),r=new Set,s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Sb(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";m&&Ph.has(m)&&!T&&(t(p),s(p))}}}};s(e)}function c4(e){const t=new Set;return wb(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function d4(e){const t=e.getAttribute("role");return!!(t&&Ph.has(t))}function f4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function h4(e){var t;return f4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function p4(e){if(!e.id)return!1;const t=Nh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&d4(e))}var Oh=()=>typeof document!="undefined";function m4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Ih=e=>Oh()&&e.test(m4()),g4=e=>Oh()&&e.test(navigator.vendor),Ab=()=>Oh()&&!!navigator.maxTouchPoints,E4=()=>Ih(/^iPhone/i),y4=()=>Ih(/^iPad/i)||Rh()&&navigator.maxTouchPoints>1,$l=()=>E4()||y4(),b4=()=>Rh()||$l(),Rh=()=>Ih(/^Mac/i),T4=()=>b4()&&g4(/apple/i);function _4(e){var t,n,r,s;return(s=(t=e.composedPath)==null?void 0:t.call(e))!=null?s:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function yr(e){var n;const t=_4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Cb=e=>e.button===0,S4=e=>e.button===2||Rh()&&e.ctrlKey&&e.button===0,x4=e=>"touches"in e&&e.touches.length>0,w4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},vb={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function A4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=w4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in vb&&(s=vb[s]),s}function Nb(e,t="client"){const n=x4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Jt=(e,t,n,r)=>{const s=typeof e=="function"?e():e;return s==null||s.addEventListener(t,n,r),()=>{s==null||s.removeEventListener(t,n,r)}},kb=e=>Qt(e)&&e.tagName==="IFRAME",C4=/^(audio|video|details)$/;function Pb(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var v4=e=>!Number.isNaN(Pb(e)),N4=e=>Pb(e)<0;function k4(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 Ob(e,t,n){const r=[...e],s=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<s.length;){const d=s[c++];if(!d||a.has(d))continue;a.add(d);const f=k4(d,t);if(f){const p=Array.from(f.querySelectorAll(Vl)).filter(n),m=u.get(d);if(m!==void 0){const T=m+1;r.splice(T,0,...p),p.forEach((y,_)=>{u.set(y,T+_)});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,_)=>{u.set(y,T+_)})}s.push(...p)}}return r}var Vl="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",Ib=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Vl));(n==!0||n=="if-empty"&&s.length===0)&&Qt(e)&&Fr(e)&&s.unshift(e);const u=[];for(const c of s)if(Fr(c)){if(kb(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...Ib(d,{getShadowRoot:r}));continue}u.push(c)}return r?Ob(u,r,Fr):u};function Fr(e){return!Qt(e)||e.closest("[inert]")?!1:e.matches(Vl)&&i4(e)}function mo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Vl));n&&gs(e)&&s.unshift(e);const a=[];for(const u of s)if(gs(u)){if(kb(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...mo(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Ob(a,r,gs);return!u.length&&n?s:u}return!a.length&&n?s:a}function gs(e){return Qt(e)&&e.tabIndex>0?!0:Fr(e)&&!N4(e)}function P4(e,t={}){const n=mo(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function O4(e,t={}){const{current:n,getShadowRoot:r}=t,s=mo(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:ho(a);if(!u)return null;const c=s.indexOf(u);return s[c+1]||null}function qa(e){return e.tabIndex<0&&(C4.test(e.localName)||o4(e))&&!v4(e)?0:e.tabIndex}function Rb(e){const{root:t,getInitialEl:n,filter:r,enabled:s=!0}=e;if(!s)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=mo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var I4=class U2{constructor(){vh(this,"id",null),vh(this,"fn_cleanup"),vh(this,"cleanup",()=>{this.cancel()})}static create(){return new U2}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function $t(e){const t=I4.create();return t.request(e),t.cleanup}function Lb(e){const t=new Set;function n(r){const s=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(s))}return n(()=>n(e)),function(){t.forEach(s=>s())}}function Lh(e){const t=u4(e);return t4(t)?Mr(t).body:Qt(t)&&D4(t)?t:Lh(t)}var R4=/auto|scroll|overlay|hidden|clip/,L4=new Set(["inline","contents"]);function D4(e){const t=fo(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return R4.test(n+s+r)&&!L4.has(a)}var go="default",Dh="",ql=new WeakMap;function M4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return $l()?(go==="default"&&(Dh=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),go="disabled"):t&&(ql.set(t,t.style.userSelect),t.style.userSelect="none"),()=>F4({target:t,doc:r})}function F4(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if($l()){if(go!=="disabled")return;go="restoring",setTimeout(()=>{Lb(()=>{go==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=Dh||""),Dh="",go="default")})},300)}else if(t&&ql.has(t)){const a=ql.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),ql.delete(t)}}function B4(e={}){const u=e,{defer:t,target:n}=u,r=fn(u,["defer","target"]),s=t?$t:c=>c(),a=[];return a.push(s(()=>{const c=typeof n=="function"?n():n;a.push(M4(fe(B({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function U4(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=c=>{const d=Nb(c),f=Math.sqrt(Bu(d.x,2)+Bu(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(f<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=Nb(c);r({point:d,event:c})},u=[Jt(e,"pointermove",s,!1),Jt(e,"pointerup",a,!1),Jt(e,"pointercancel",a,!1),Jt(e,"contextmenu",a,!1),B4({doc:e})];return()=>{u.forEach(c=>c())}}function H4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:s,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,T]=P4(e,{includeContainer:!0,getShadowRoot:a}),y=O4(c,{current:n,getShadowRoot:a}),_=!m&&!T;f.shiftKey&&Va(y)?(s==null||s(),p=T):f.shiftKey&&(Va(m)||_)?p=n:!f.shiftKey&&Va(n)?(s==null||s(),p=m):!f.shiftKey&&(Va(T)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Jt(u,"keydown",d,!0)}function z4(e,t){const c=t,{defer:n,triggerElement:r}=c,s=fn(c,["defer","triggerElement"]),a=n?$t:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(H4(d,B({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function j4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Yl(e,t){if(!e)return bb;const n=Object.keys(t).reduce((r,s)=>(r[s]=e.style.getPropertyValue(s),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function $4(e,t,n){if(!e)return bb;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 V4(e,t,n){const{signal:r}=t;return[new Promise((u,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),c(f))})}),()=>t.abort()]}function q4(e,t){const{timeout:n,rootNode:r}=t,s=fo(r),a=Mr(r),u=new s.AbortController;return V4(new Promise(c=>{const d=e();if(d){c(d);return}const f=new s.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var Y4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),W4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Db=e=>{const t={};let n;for(;n=W4.exec(e);)t[n[1]]=n[2];return t},G4=(e,t)=>{if(Hl(e)){if(Hl(t))return`${e};${t}`;e=Db(e)}else Hl(t)&&(t=Db(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Vt(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=wh(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=Y4(t[s],n[s]);continue}if(s==="style"){t[s]=G4(t[s],n[s]);continue}t[s]=n[s]!==void 0?n[s]:t[s]}for(let s in n)t[s]===void 0&&(t[s]=n[s]);const r=Object.getOwnPropertySymbols(n);for(let s of r)t[s]=n[s]}return t}function OU(e){return e}var Eo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Eo||{}),Mh="__init__";function X4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Mr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>ho(t()),a=u=>t().getElementById(u);return fe(B({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:Va,getById:a})}function K4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var yo=()=>e=>Array.from(new Set(e)),Mb=typeof globalThis.document!="undefined"?F.useLayoutEffect:F.useEffect;function Wl(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=F.useState(t),[s,a]=F.useState(r),u=e().value!==void 0,c=F.useRef(s);c.current=u?e().value:s;const d=F.useRef(c.current);Mb(()=>{d.current=c.current},[s,e().value]);const f=y=>{var v,A;const _=d.current,w=uo(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:w,prev:_}),u||a(w),n(w,_)||(A=(v=e()).onChange)==null||A.call(v,w,_)};function p(){return u?e().value:s}return{initial:r,ref:c,get:p,set(y){(e().sync?Qs.flushSync:H6)(()=>f(y))},invoke(y,_){var w,v;(v=(w=e()).onChange)==null||v.call(w,y,_)},hash(y){var _,w,v;return(v=(w=(_=e()).hash)==null?void 0:w.call(_,y))!=null?v:String(y)}}}Wl.cleanup=e=>{F.useEffect(()=>e,[])},Wl.ref=e=>{const t=F.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function Q4(e){const t=F.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var J4=(e,t)=>{const n=F.useRef(!1),r=F.useRef(!1);F.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),F.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Gl(e,t={}){var se,pe,ve,re,ae,xe;const n=F.useMemo(()=>{const{id:oe,ids:Q,getRootNode:ie}=t;return X4({id:oe,ids:Q,getRootNode:ie})},[t]),r=(...oe)=>{e.debug&&console.log(...oe)},s=(pe=(se=e.props)==null?void 0:se.call(e,{props:Ah(t),scope:n}))!=null?pe:t,a=Z4(s),u=(ve=e.context)==null?void 0:ve.call(e,{prop:a,bindable:Wl,scope:n,flush:Bb,getContext(){return d},getComputed(){return Y},getRefs(){return w},getEvent(){return y()}}),c=Fb(u),d={get(oe){var Q;return(Q=c.current)==null?void 0:Q[oe].ref.current},set(oe,Q){var ie;(ie=c.current)==null||ie[oe].set(Q)},initial(oe){var Q;return(Q=c.current)==null?void 0:Q[oe].initial},hash(oe){var ie,N;const Q=(ie=c.current)==null?void 0:ie[oe].get();return(N=c.current)==null?void 0:N[oe].hash(Q)}},f=F.useRef(new Map),p=F.useRef(null),m=F.useRef(null),T=F.useRef({type:""}),y=()=>fe(B({},T.current),{current(){return T.current},previous(){return m.current}}),_=()=>fe(B({},D),{matches(...oe){return oe.includes(D.ref.current)},hasTag(oe){var Q,ie;return!!((ie=(Q=e.states[D.ref.current])==null?void 0:Q.tags)!=null&&ie.includes(oe))}}),w=Q4((ae=(re=e.refs)==null?void 0:re.call(e,{prop:a,context:d}))!=null?ae:{}),v=()=>({state:_(),context:d,event:y(),prop:a,send:V,action:A,guard:k,track:J4,refs:w,computed:Y,flush:Bb,scope:n,choose:z}),A=oe=>{const Q=uo(oe)?oe(v()):oe;if(!Q)return;const ie=Q.map(N=>{var J,I;const L=(I=(J=e.implementations)==null?void 0:J.actions)==null?void 0:I[N];return L||Ch(`[zag-js] No implementation found for action "${JSON.stringify(N)}"`),L});for(const N of ie)N==null||N(v())},k=oe=>{var Q,ie;return uo(oe)?oe(v()):(ie=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:ie[oe](v())},C=oe=>{const Q=uo(oe)?oe(v()):oe;if(!Q)return;const ie=Q.map(L=>{var I,Te;const J=(Te=(I=e.implementations)==null?void 0:I.effects)==null?void 0:Te[L];return J||Ch(`[zag-js] No implementation found for effect "${JSON.stringify(L)}"`),J}),N=[];for(const L of ie){const J=L==null?void 0:L(v());J&&N.push(J)}return()=>N.forEach(L=>L==null?void 0:L())},z=oe=>A6(oe).find(Q=>{let ie=!Q.guard;return Hl(Q.guard)?ie=!!k(Q.guard):uo(Q.guard)&&(ie=Q.guard(v())),ie}),Y=oe=>{W6(e.computed,()=>"[zag-js] No computed object found on machine");const Q=e.computed[oe];return Q({context:d,event:y(),prop:a,refs:w,scope:n,computed:Y})},D=Wl(()=>({defaultValue:e.initialState({prop:a}),onChange(oe,Q){var N,L,J,I;if(Q){const Te=f.current.get(Q);Te==null||Te(),f.current.delete(Q)}Q&&A((N=e.states[Q])==null?void 0:N.exit),A((L=p.current)==null?void 0:L.actions);const ie=C((J=e.states[oe])==null?void 0:J.effects);if(ie&&f.current.set(oe,ie),Q===Mh){A(e.entry);const Te=C(e.effects);Te&&f.current.set(Mh,Te)}A((I=e.states[oe])==null?void 0:I.entry)}})),q=F.useRef(void 0),ne=F.useRef(Eo.NotStarted);Mb(()=>{queueMicrotask(()=>{var L;const ie=ne.current===Eo.Started;ne.current=Eo.Started,r(ie?"rehydrating...":"initializing...");const N=(L=q.current)!=null?L:D.initial;D.invoke(N,ie?D.get():Mh)});const oe=f.current,Q=D.ref.current;return()=>{r("unmounting..."),q.current=Q,ne.current=Eo.Stopped,oe.forEach(ie=>ie==null?void 0:ie()),f.current=new Map,p.current=null,queueMicrotask(()=>{A(e.exit)})}},[]);const ue=()=>"ref"in D?D.ref.current:D.get(),V=oe=>{queueMicrotask(()=>{var I,Te,He,ye,Le;if(ne.current!==Eo.Started)return;m.current=T.current,T.current=oe;let Q=ue();const ie=(He=(I=e.states[Q].on)==null?void 0:I[oe.type])!=null?He:(Te=e.on)==null?void 0:Te[oe.type],N=z(ie);if(!N)return;p.current=N;const L=(ye=N.target)!=null?ye:Q;r("transition",oe.type,N.target||Q,`(${N.actions})`);const J=L!==Q;J?Qs.flushSync(()=>D.set(L)):N.reenter&&!J?D.invoke(Q,Q):A((Le=N.actions)!=null?Le:[])})};return(xe=e.watch)==null||xe.call(e,v()),{state:_(),send:V,context:d,prop:a,scope:n,refs:w,computed:Y,event:y(),getStatus:()=>ne.current}}function Fb(e){const t=F.useRef(e);return t.current=e,t}function Z4(e){const t=Fb(e);return function(r){return t.current[r]}}function Bb(e){queueMicrotask(()=>{Qs.flushSync(()=>e())})}var Fh=K4(e=>e);function Xl(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const s=r(t);typeof s=="function"&&n.push(s)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function eD(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Bh=e=>{const t=F.memo(F.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=fn(f,["asChild","children"]);if(!s)return F.createElement(e,fe(B({},u),{ref:r}),a);if(!F.isValidElement(a))return null;const c=F.Children.only(a),d=eD(c);return F.cloneElement(c,fe(B({},Vt(u,c.props)),{ref:r?Xl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},bn=(()=>{const e=new Map;return new Proxy(Bh,{apply(t,n,r){return Bh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Bh(r)),e.get(r)}})})();function tD(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Es(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,c=F.createContext(u);c.displayName=t;function d(){var p;const f=F.useContext(c);if(!f&&n){const m=new Error(a!=null?a:tD(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[c.Provider,d,c]}const[nD,Uh]=Es({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[Ub,Ya]=Es({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),Hb=F.forwardRef((e,t)=>{const n=Uh(),r=Ya(),s=Vt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:S.jsx(bn.div,fe(B({},s),{ref:Xl(r.ref,t)}))});Hb.displayName="PopoverContent";const zb=F.forwardRef((e,t)=>{const n=Uh(),r=Ya(),s=Vt(n.getPositionerProps(),e);return r.unmounted?null:S.jsx(bn.div,fe(B({},s),{ref:t}))});zb.displayName="PopoverPositioner";const Wa=()=>(e,t)=>t.reduce((n,r)=>{const[s,a]=n,u=r;return a[u]!==void 0&&(s[u]=a[u]),delete a[u],[s,a]},[{},B({},e)]),jb=e=>Wa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function rD(e,t){const{state:n,send:r,context:s}=e,a=n.matches("mounted","unmountSuspended");return{skip:!s.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var iD={props({props:e}){return fe(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",po(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const s=r("present");if(s)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!s&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});$t(()=>{var c,d;const u=Kl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{$t(()=>{e.set("prevAnimationName",Kl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const s=t.get("node");if(!s)return;const a=d=>{var p,m,T;((T=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?T:d.target)===s&&e.set("prevAnimationName",Kl(t.get("styles")))},u=d=>{const f=Kl(t.get("styles"));yr(d)===s&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u);const c=Yl(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),Lb(()=>c())}}}}};function Kl(e){return(e==null?void 0:e.animationName)||"none"}yo()(["onExitComplete","present","immediate"]);function sD(e,t={}){const{sync:n=!1}=t,r=oD(e);return F.useCallback((...s)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...s)}):(a=r.current)==null?void 0:a.call(r,...s)},[n,r])}function oD(e){const t=F.useRef(e);return t.current=e,t}const Hh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=T,a=fn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=F.useRef(!1),c=fe(B({},a),{present:r,onExitComplete:sD(e.onExitComplete)}),d=Gl(iD,c),f=rD(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&s?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var ys=(e,t=[])=>({parts:(...n)=>{if(aD(t))return ys(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>ys(e,[...t,...n]),omit:(...n)=>ys(e,t.filter(r=>!n.includes(r))),rename:n=>ys(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${bo(e)}"][data-part="${bo(r)}"]`,`& [data-scope="${bo(e)}"][data-part="${bo(r)}"]`].join(", "),attrs:{"data-scope":bo(e),"data-part":bo(r)}}}),{})}),bo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),aD=e=>e.length===0;const uD=["top","right","bottom","left"],Ni=Math.min,oi=Math.max,Ql=Math.round,Jl=Math.floor,Br=e=>({x:e,y:e}),lD={left:"right",right:"left",bottom:"top",top:"bottom"};function $b(e,t,n){return oi(e,Ni(t,n))}function ai(e,t){return typeof e=="function"?e(t):e}function ki(e){return e.split("-")[0]}function To(e){return e.split("-")[1]}function zh(e){return e==="x"?"y":"x"}function jh(e){return e==="y"?"height":"width"}function Ur(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function $h(e){return zh(Ur(e))}function cD(e,t,n){n===void 0&&(n=!1);const r=To(e),s=$h(e),a=jh(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Zl(u)),[u,Zl(u)]}function dD(e){const t=Zl(e);return[Vh(e),t,Vh(t)]}function Vh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Vb=["left","right"],qb=["right","left"],fD=["top","bottom"],hD=["bottom","top"];function pD(e,t,n){switch(e){case"top":case"bottom":return n?t?qb:Vb:t?Vb:qb;case"left":case"right":return t?fD:hD;default:return[]}}function mD(e,t,n,r){const s=To(e);let a=pD(ki(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Vh)))),a}function Zl(e){const t=ki(e);return lD[t]+e.slice(t.length)}function gD(e){var t,n,r,s;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(s=e.left)!=null?s:0}}function Yb(e){return typeof e!="number"?gD(e):{top:e,right:e,bottom:e,left:e}}function ec(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function Wb(e,t,n){let{reference:r,floating:s}=e;const a=Ur(t),u=$h(t),c=jh(u),d=ki(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,T=r[c]/2-s[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-s.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}const _=To(t);return _&&(y[u]+=T*(_==="end"?1:-1)*(n&&f?-1:1)),y}function ED(e,t){return Ke(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:T=!1,padding:y=0}=ai(t,e),_=Yb(y),v=c[T?m==="floating"?"reference":"floating":m],A=ec(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(v))==null||n?v:v.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),k=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,C=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),z=(yield a.isElement==null?void 0:a.isElement(C))&&(yield a.getScale==null?void 0:a.getScale(C))||{x:1,y:1},Y=ec(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:k,offsetParent:C,strategy:d}):k);return{top:(A.top-Y.top+_.top)/z.y,bottom:(Y.bottom-A.bottom+_.bottom)/z.y,left:(A.left-Y.left+_.left)/z.x,right:(Y.right-A.right+_.right)/z.x}})}const yD=50,bD=(e,t,n)=>Ke(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,c=u.detectOverflow?u:fe(B({},u),{detectOverflow:ED}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:m}=Wb(f,r,d),T=r,y=0;const _={};for(let w=0;w<a.length;w++){const v=a[w];if(!v)continue;const{name:A,fn:k}=v,{x:C,y:z,data:Y,reset:D}=yield k({x:p,y:m,initialPlacement:r,placement:T,strategy:s,middlewareData:_,rects:f,platform:c,elements:{reference:e,floating:t}});p=C!=null?C:p,m=z!=null?z:m,_[A]=B(B({},_[A]),Y),D&&y<yD&&(y++,typeof D=="object"&&(D.placement&&(T=D.placement),D.rects&&(f=D.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):D.rects),{x:p,y:m}=Wb(f,T,d)),w=-1)}return{x:p,y:m,placement:T,strategy:s,middlewareData:_}}),TD=e=>({name:"arrow",options:e,fn(n){return Ke(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=ai(e,n)||{};if(p==null)return{};const T=Yb(m),y={x:r,y:s},_=$h(a),w=jh(_),v=yield c.getDimensions(p),A=_==="y",k=A?"top":"left",C=A?"bottom":"right",z=A?"clientHeight":"clientWidth",Y=u.reference[w]+u.reference[_]-y[_]-u.floating[w],D=y[_]-u.reference[_],q=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ne=q?q[z]:0;(!ne||!(yield c.isElement==null?void 0:c.isElement(q)))&&(ne=d.floating[z]||u.floating[w]);const ue=Y/2-D/2,V=ne/2-v[w]/2-1,se=Ni(T[k],V),pe=Ni(T[C],V),ve=ne-v[w]-pe,re=ne/2-v[w]/2+ue,ae=$b(se,re,ve),xe=!f.arrow&&To(a)!=null&&re!==ae&&u.reference[w]/2-(re<se?se:pe)-v[w]/2<0,oe=xe?re<se?re-se:re-ve:0;return{[_]:y[_]+oe,data:B({[_]:ae,centerOffset:re-ae-oe},xe&&{alignmentOffset:oe}),reset:xe}})}}),_D=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ke(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,ae=ai(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:v=!0}=ae,A=fn(ae,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const k=ki(a),C=Ur(d),z=ki(d)===d,Y=yield f.isRTL==null?void 0:f.isRTL(p.floating),D=y||(z||!v?[Zl(d)]:dD(d)),q=w!=="none";!y&&q&&D.push(...mD(d,v,w,Y));const ne=[d,...D],ue=yield f.detectOverflow(n,A),V=[];let se=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&V.push(ue[k]),T){const xe=cD(a,c,Y);V.push(ue[xe[0]],ue[xe[1]])}if(se=[...se,{placement:a,overflows:V}],!V.every(xe=>xe<=0)){var pe,ve;const xe=(((pe=u.flip)==null?void 0:pe.index)||0)+1,oe=ne[xe];if(oe&&(!(T==="alignment"?C!==Ur(oe):!1)||se.every(N=>Ur(N.placement)===C?N.overflows[0]>0:!0)))return{data:{index:xe,overflows:se},reset:{placement:oe}};let Q=(ve=se.filter(ie=>ie.overflows[0]<=0).sort((ie,N)=>ie.overflows[1]-N.overflows[1])[0])==null?void 0:ve.placement;if(!Q)switch(_){case"bestFit":{var re;const ie=(re=se.filter(N=>{if(q){const L=Ur(N.placement);return L===C||L==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(L=>L>0).reduce((L,J)=>L+J,0)]).sort((N,L)=>N[1]-L[1])[0])==null?void 0:re[0];ie&&(Q=ie);break}case"initialPlacement":Q=d;break}if(a!==Q)return{reset:{placement:Q}}}return{}})}}};function Gb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Xb(e){return uD.some(t=>e[t]>=0)}const SD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ke(this,null,function*(){const{rects:r,platform:s}=n,c=ai(e,n),{strategy:a="referenceHidden"}=c,u=fn(c,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,fe(B({},u),{elementContext:"reference"})),f=Gb(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Xb(f)}}}case"escaped":{const d=yield s.detectOverflow(n,fe(B({},u),{altBoundary:!0})),f=Gb(d,r.floating);return{data:{escapedOffsets:f,escaped:Xb(f)}}}default:return{}}})}}},Kb=new Set(["left","top"]);function xD(e,t){return Ke(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=ki(n),c=To(n),d=Ur(n)==="y",f=Kb.has(u)?-1:1,p=a&&d?-1:1,m=ai(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:_}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof _=="number"&&(y=c==="end"?_*-1:_),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const wD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ke(this,null,function*(){var r,s;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield xD(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:fe(B({},f),{placement:c})}})}}},AD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ke(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,C=ai(e,n),{mainAxis:c=!0,crossAxis:d=!1,limiter:f={fn:z=>{let{x:Y,y:D}=z;return{x:Y,y:D}}}}=C,p=fn(C,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},T=yield u.detectOverflow(n,p),y=Ur(a),_=zh(y);let w=m[_],v=m[y];const A=(z,Y)=>$b(Y+T[z==="y"?"top":"left"],Y,Y-T[z==="y"?"bottom":"right"]);c&&(w=A(_,w)),d&&(v=A(y,v));const k=f.fn(fe(B({},n),{[_]:w,[y]:v}));return fe(B({},k),{data:{x:k.x-r,y:k.y-s,enabled:{[_]:c,[y]:d}}})})}}},CD=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:u,rects:c,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=ai(e,t),T={x:s,y:a},y=Ur(u),_=zh(y);let w=T[_],v=T[y];const A=ai(f,t),k=typeof A=="number"?{mainAxis:A,crossAxis:0}:{mainAxis:(n=A.mainAxis)!=null?n:0,crossAxis:(r=A.crossAxis)!=null?r:0};if(p){const Y=_==="y"?"height":"width",D=c.reference[_]-c.floating[Y]+k.mainAxis,q=c.reference[_]+c.reference[Y]-k.mainAxis;w<D?w=D:w>q&&(w=q)}if(m){var C,z;const Y=_==="y"?"width":"height",D=Kb.has(ki(u)),q=c.reference[y]-c.floating[Y]+(D&&((C=d.offset)==null?void 0:C[y])||0)+(D?0:k.crossAxis),ne=c.reference[y]+c.reference[Y]+(D?0:((z=d.offset)==null?void 0:z[y])||0)-(D?k.crossAxis:0);v<q?v=q:v>ne&&(v=ne)}return{[_]:w,[y]:v}}}},vD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ke(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,V=ai(e,n),{apply:c=()=>{}}=V,d=fn(V,["apply"]),f=yield a.detectOverflow(n,d),p=ki(r),m=To(r),T=Ur(r)==="y",{width:y,height:_}=s.floating;let w,v;p==="top"||p==="bottom"?(w=p,v=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(v=p,w=m==="end"?"top":"bottom");const A=_-f.top-f.bottom,k=y-f.left-f.right,C=Ni(_-f[w],A),z=Ni(y-f[v],k),Y=n.middlewareData.shift,D=!Y;let q=C,ne=z;Y!=null&&Y.enabled.x&&(ne=k),Y!=null&&Y.enabled.y&&(q=A),D&&!m&&(T?ne=y-2*oi(f.left,f.right):q=_-2*oi(f.top,f.bottom)),yield c(fe(B({},n),{availableWidth:ne,availableHeight:q}));const ue=yield a.getDimensions(u.floating);return y!==ue.width||_!==ue.height?{reset:{rects:!0}}:{}})}}};function tc(){return typeof window!="undefined"}function _o(e){return Qb(e)?(e.nodeName||"").toLowerCase():"#document"}function Wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hr(e){var t;return(t=(Qb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Qb(e){return tc()?e instanceof Node||e instanceof Wn(e).Node:!1}function br(e){return tc()?e instanceof Element||e instanceof Wn(e).Element:!1}function zr(e){return tc()?e instanceof HTMLElement||e instanceof Wn(e).HTMLElement:!1}function Jb(e){return!tc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Wn(e).ShadowRoot}function Ga(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Tr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function ND(e){return/^(table|td|th)$/.test(_o(e))}function nc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const kD=/transform|translate|scale|rotate|perspective|filter/,PD=/paint|layout|strict|content/,bs=e=>!!e&&e!=="none";let qh;function Yh(e){const t=br(e)?Tr(e):e;return bs(t.transform)||bs(t.translate)||bs(t.scale)||bs(t.rotate)||bs(t.perspective)||!Wh()&&(bs(t.backdropFilter)||bs(t.filter))||kD.test(t.willChange||"")||PD.test(t.contain||"")}function OD(e){let t=Pi(e);for(;zr(t)&&!So(t);){if(Yh(t))return t;if(nc(t))return null;t=Pi(t)}return null}function Wh(){return qh==null&&(qh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),qh}function So(e){return/^(html|body|#document)$/.test(_o(e))}function Tr(e){return Wn(e).getComputedStyle(e)}function rc(e){return br(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pi(e){if(_o(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jb(e)&&e.host||Hr(e);return Jb(t)?t.host:t}function Zb(e){const t=Pi(e);return So(t)?(e.ownerDocument||e).body:zr(t)&&Ga(t)?t:Zb(t)}function Xa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Zb(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Wn(s);if(a){const c=Gh(u);return t.concat(u,u.visualViewport||[],Ga(s)?s:[],c&&n?Xa(c):[])}else return t.concat(s,Xa(s,[],n))}function Gh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function eT(e){const t=Tr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=zr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,c=Ql(n)!==a||Ql(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Xh(e){return br(e)?e:e.contextElement}function xo(e){const t=Xh(e);if(!zr(t))return Br(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=eT(t);let u=(a?Ql(n.width):n.width)/r,c=(a?Ql(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const ID=Br(0);function tT(e){const t=Wn(e);return!Wh()||!t.visualViewport?ID:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function RD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wn(e)?!1:t}function Ts(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Xh(e);let u=Br(1);t&&(r?br(r)&&(u=xo(r)):u=xo(e));const c=RD(a,n,r)?tT(a):Br(0);let d=(s.left+c.x)/u.x,f=(s.top+c.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(a){const T=Wn(a),y=r&&br(r)?Wn(r):r;let _=T,w=Gh(_);for(;w&&r&&y!==_;){const v=xo(w),A=w.getBoundingClientRect(),k=Tr(w),C=A.left+(w.clientLeft+parseFloat(k.paddingLeft))*v.x,z=A.top+(w.clientTop+parseFloat(k.paddingTop))*v.y;d*=v.x,f*=v.y,p*=v.x,m*=v.y,d+=C,f+=z,_=Wn(w),w=Gh(_)}}return ec({width:p,height:m,x:d,y:f})}function ic(e,t){const n=rc(e).scrollLeft;return t?t.left+n:Ts(Hr(e)).left+n}function nT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ic(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function LD(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Hr(r),c=t?nc(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Br(1);const p=Br(0),m=zr(r);if((m||!m&&!a)&&((_o(r)!=="body"||Ga(u))&&(d=rc(r)),zr(r))){const y=Ts(r);f=xo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?nT(u,d):Br(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+T.x,y:n.y*f.y-d.scrollTop*f.y+p.y+T.y}}function DD(e){return Array.from(e.getClientRects())}function MD(e){const t=Hr(e),n=rc(e),r=e.ownerDocument.body,s=oi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=oi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+ic(e);const c=-n.scrollTop;return Tr(r).direction==="rtl"&&(u+=oi(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:c}}const rT=25;function FD(e,t){const n=Wn(e),r=Hr(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(s){a=s.width,u=s.height;const p=Wh();(!p||p&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}const f=ic(r);if(f<=0){const p=r.ownerDocument,m=p.body,T=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,_=Math.abs(r.clientWidth-m.clientWidth-y);_<=rT&&(a-=_)}else f<=rT&&(a+=f);return{width:a,height:u,x:c,y:d}}const BD=new Set(["absolute","fixed"]);function UD(e,t){const n=Ts(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=zr(e)?xo(e):Br(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function iT(e,t,n){let r;if(t==="viewport")r=FD(e,n);else if(t==="document")r=MD(Hr(e));else if(br(t))r=UD(t,n);else{const s=tT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ec(r)}function sT(e,t){const n=Pi(e);return n===t||!br(n)||So(n)?!1:Tr(n).position==="fixed"||sT(n,t)}function HD(e,t){const n=t.get(e);if(n)return n;let r=Xa(e,[],!1).filter(c=>br(c)&&_o(c)!=="body"),s=null;const a=Tr(e).position==="fixed";let u=a?Pi(e):e;for(;br(u)&&!So(u);){const c=Tr(u),d=Yh(u);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&BD.has(s.position)||Ga(u)&&!d&&sT(e,u))?r=r.filter(p=>p!==u):s=c,u=Pi(u)}return t.set(e,r),r}function zD(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?nc(t)?[]:HD(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const m=iT(t,p,s);return f.top=oi(m.top,f.top),f.right=Ni(m.right,f.right),f.bottom=Ni(m.bottom,f.bottom),f.left=oi(m.left,f.left),f},iT(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function jD(e){const{width:t,height:n}=eT(e);return{width:t,height:n}}function $D(e,t,n){const r=zr(t),s=Hr(t),a=n==="fixed",u=Ts(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Br(0);function f(){d.x=ic(s)}if(r||!r&&!a)if((_o(t)!=="body"||Ga(s))&&(c=rc(t)),r){const y=Ts(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const p=s&&!r&&!a?nT(s,c):Br(0),m=u.left+c.scrollLeft-d.x-p.x,T=u.top+c.scrollTop-d.y-p.y;return{x:m,y:T,width:u.width,height:u.height}}function Kh(e){return Tr(e).position==="static"}function oT(e,t){if(!zr(e)||Tr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Hr(e)===n&&(n=n.ownerDocument.body),n}function aT(e,t){const n=Wn(e);if(nc(e))return n;if(!zr(e)){let s=Pi(e);for(;s&&!So(s);){if(br(s)&&!Kh(s))return s;s=Pi(s)}return n}let r=oT(e,t);for(;r&&ND(r)&&Kh(r);)r=oT(r,t);return r&&So(r)&&Kh(r)&&!Yh(r)?n:r||OD(e)||n}const VD=function(e){return Ke(this,null,function*(){const t=this.getOffsetParent||aT,n=this.getDimensions,r=yield n(e.floating);return{reference:$D(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function qD(e){return Tr(e).direction==="rtl"}const YD={convertOffsetParentRelativeRectToViewportRelativeRect:LD,getDocumentElement:Hr,getClippingRect:zD,getOffsetParent:aT,getElementRects:VD,getClientRects:DD,getDimensions:jD,getScale:xo,isElement:br,isRTL:qD};function uT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function WD(e,t){let n=null,r;const s=Hr(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:T,height:y}=f;if(c||t(),!T||!y)return;const _=Jl(m),w=Jl(s.clientWidth-(p+T)),v=Jl(s.clientHeight-(m+y)),A=Jl(p),C={rootMargin:-_+"px "+-w+"px "+-v+"px "+-A+"px",threshold:oi(0,Ni(1,d))||1};let z=!0;function Y(D){const q=D[0].intersectionRatio;if(q!==d){if(!z)return u();q?u(!1,q):r=setTimeout(()=>{u(!1,1e-7)},1e3)}q===1&&!uT(f,e.getBoundingClientRect())&&u(),z=!1}try{n=new IntersectionObserver(Y,fe(B({},C),{root:s.ownerDocument}))}catch(D){n=new IntersectionObserver(Y,C)}n.observe(e)}return u(!0),a}function GD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Xh(e),p=s||a?[...f?Xa(f):[],...Xa(t)]:[];p.forEach(A=>{s&&A.addEventListener("scroll",n,{passive:!0}),a&&A.addEventListener("resize",n)});const m=f&&c?WD(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(A=>{let[k]=A;k&&k.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,w=d?Ts(e):null;d&&v();function v(){const A=Ts(e);w&&!uT(w,A)&&n(),w=A,_=requestAnimationFrame(v)}return n(),()=>{var A;p.forEach(k=>{s&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),m==null||m(),(A=y)==null||A.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const XD=wD,KD=AD,QD=_D,JD=vD,ZD=SD,e5=TD,t5=CD,n5=(e,t,n)=>{const r=new Map,s=B({platform:YD},n),a=fe(B({},s.platform),{_c:r});return bD(e,t,fe(B({},s),{platform:a}))};function lT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const s={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return fe(B({},s),{toJSON:()=>s})}function r5(e){if(!e)return lT();const{x:t,y:n,width:r,height:s}=e;return lT(t,n,r,s)}function i5(e,t){return{contextElement:Qt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?r5(r):n.getBoundingClientRect()}}}var Ka=e=>({variable:e,reference:`var(${e})`}),ui={arrowSize:Ka("--arrow-size"),arrowSizeHalf:Ka("--arrow-size-half"),arrowBg:Ka("--arrow-background"),transformOrigin:Ka("--transform-origin"),arrowOffset:Ka("--arrow-offset")},s5=e=>e==="top"||e==="bottom"?"y":"x";function o5(e,t){return{name:"transformOrigin",fn(n){var ue,V,se,pe,ve;const{elements:r,middlewareData:s,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=s5(d),p=((ue=s.arrow)==null?void 0:ue.x)||0,m=((V=s.arrow)==null?void 0:V.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+T/2,w=m+y/2,v=Math.abs(((se=s.shift)==null?void 0:se.y)||0),A=u.reference.height/2,k=y/2,C=(ve=(pe=e.offset)==null?void 0:pe.mainAxis)!=null?ve:e.gutter,z=typeof C=="number"?C+k:C!=null?C:k,Y=v>z,D={top:`${_}px calc(100% + ${z}px)`,bottom:`${_}px ${-z}px`,left:`calc(100% + ${z}px) ${w}px`,right:`${-z}px ${w}px`}[d],q=`${_}px ${u.reference.y+A-c}px`,ne=!!e.overlap&&f==="y"&&Y;return r.floating.style.setProperty(ui.transformOrigin.variable,ne?q:D),{data:{transformOrigin:ne?q:D}}}}}var a5={name:"rects",fn({rects:e}){return{data:e}}},u5=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:s}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:s!=null?`${s}px`:"",[a]:`calc(100% + ${ui.arrowOffset.reference})`}),{}}}};function l5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var c5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function cT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Qh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function d5(e,t,n){const r=e||t.createElement("div");return e5({element:r,padding:n.arrowPadding})}function f5(e,t){var n;if(!I6((n=t.offset)!=null?n:t.gutter))return XD(({placement:r})=>{var p,m,T,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:c}=l5(r),d=c?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Ah({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function h5(e){if(!e.flip)return;const t=Qh(e.boundary);return QD(fe(B({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function p5(e){if(!e.slide&&!e.overlap)return;const t=Qh(e.boundary);return KD(fe(B({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:t5()}))}function m5(e){return JD({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:s}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);s=Math.floor(s),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${s}px`),a.style.setProperty("--available-height",`${r}px`)}})}function g5(e){var t;if(e.hideWhenDetached)return ZD({strategy:"referenceHidden",boundary:(t=Qh(e.boundary))!=null?t:"clippingAncestors"})}function E5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function y5(e,t,n={}){const r=i5(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},c5,n),a=t.querySelector("[data-part=arrow]"),u=[f5(a,s),h5(s),p5(s),d5(a,t.ownerDocument,s),u5(a),o5({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),m5(s),g5(s),a5],{placement:c,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>Ke(null,null,function*(){var z;if(!r||!t)return;const w=yield n5(r,t,{placement:c,middleware:u,strategy:d});f==null||f(w),p==null||p({placed:!0});const v=fo(t),A=cT(v,w.x),k=cT(v,w.y);t.style.setProperty("--x",`${A}px`),t.style.setProperty("--y",`${k}px`),s.hideWhenDetached&&(((z=w.middlewareData.hide)==null?void 0:z.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const C=t.firstElementChild;if(C){const Y=po(C);t.style.setProperty("--z-index",Y.zIndex)}}),T=()=>Ke(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=E5(s.listeners),_=s.listeners?GD(r,t,T,y):z6;return T(),()=>{_==null||_(),p==null||p({placed:!1})}}function dT(e,t,n={}){const c=n,{defer:r}=c,s=fn(c,["defer"]),a=r?$t:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(y5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var b5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function T5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:ui.arrowSize.reference,height:ui.arrowSize.reference,[ui.arrowSizeHalf.variable]:`calc(${ui.arrowSize.reference} / 2)`,[ui.arrowOffset.variable]:`calc(${ui.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?b5[t.split("-")[0]]:void 0,background:ui.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:s,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var wo=new WeakMap,sc=new WeakMap,oc={},Jh=0,fT=e=>e&&(e.host||fT(e.parentNode)),_5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=fT(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),S5=new Set(["script","output","status","next-route-announcer"]),x5=e=>S5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),w5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=_5(n,Array.isArray(e)?e:[e]);oc[r]||(oc[r]=new WeakMap);const c=oc[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&Qt(y)&&wb(y,_=>{m(_)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))T(_);else try{if(x5(_))return;const v=_.getAttribute(s)==="true",A=(wo.get(_)||0)+1,k=(c.get(_)||0)+1;wo.set(_,A),c.set(_,k),d.push(_),A===1&&v&&sc.set(_,!0),k===1&&_.setAttribute(r,""),v||_.setAttribute(s,"true")}catch(w){console.error("[zag-js > ariaHidden] cannot operate on ",_,w)}})};return T(n),f.clear(),Jh++,()=>{d.forEach(y=>{const _=wo.get(y)-1,w=c.get(y)-1;wo.set(y,_),c.set(y,w),_||(sc.has(y)||y.removeAttribute(s),sc.delete(y)),w||y.removeAttribute(r)}),Jh--,Jh||(wo=new WeakMap,wo=new WeakMap,sc=new WeakMap,oc={})}},A5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,C5=(e,t=A5(e),n="data-aria-hidden",r=!0)=>{if(t)return w5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},v5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function hT(e,t={}){const{defer:n=!0}=t,r=n?v5:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(C5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function N5(e){const t={each(n){var r;for(let s=0;s<((r=e.frames)==null?void 0:r.length);s+=1){const a=e.frames[s];a&&n(a)}},addEventListener(n,r,s){return t.each(a=>{try{a.document.addEventListener(n,r,s)}catch(u){}}),()=>{try{t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener(n,r,s){t.each(a=>{try{a.document.removeEventListener(n,r,s)}catch(u){}})}};return t}function k5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,s)=>{try{t==null||t.addEventListener(n,r,s)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener:(n,r,s)=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}}}var pT="pointerdown.outside",mT="focus.outside";function P5(e){for(const t of e)if(Qt(t)&&Fr(t))return!0;return!1}var gT=e=>"clientY"in e;function O5(e,t){if(!gT(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 I5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function ET(e,t){if(!t||!gT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,s=t.scrollWidth>t.clientWidth,a=s&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(s?16:0)},c={x:e.clientX,y:e.clientY};return I5(u,c)?r||a:!1}function R5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Mr(e),f=fo(e),p=N5(f),m=k5(f);function T(C,z){if(!Qt(z)||!z.isConnected||co(e,z)||O5(e,C)||c&&xb(e,z))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const q=Lh(Y);if(ET(C,q))return!1}const D=Lh(e);return ET(C,D)?!1:!(n!=null&&n(z))}const y=new Set,_=ms(e==null?void 0:e.getRootNode());function w(C){function z(Y){var ue,V;const D=u&&!Ab()?$t:se=>se(),q=Y!=null?Y:C,ne=(V=(ue=q==null?void 0:q.composedPath)==null?void 0:ue.call(q))!=null?V:[q==null?void 0:q.target];D(()=>{const se=_?ne[0]:yr(C);if(!(!e||!T(C,se))){if(s||a){const pe=wh(s,a);e.addEventListener(pT,pe,{once:!0})}yT(e,pT,{bubbles:!1,cancelable:!0,detail:{originalEvent:q,contextmenu:S4(q),focusable:P5(ne),target:se}})}})}C.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(Jt(d,"click",z,{once:!0})),y.add(m.addEventListener("click",z,{once:!0})),y.add(p.addEventListener("click",z,{once:!0}))):z()}const v=new Set,A=setTimeout(()=>{v.add(Jt(d,"pointerdown",w,!0)),v.add(m.addEventListener("pointerdown",w,!0)),v.add(p.addEventListener("pointerdown",w,!0))},0);function k(C){(u?$t:Y=>Y())(()=>{var q,ne;const Y=(ne=(q=C==null?void 0:C.composedPath)==null?void 0:q.call(C))!=null?ne:[C==null?void 0:C.target],D=_?Y[0]:yr(C);if(!(!e||!T(C,D))){if(r||a){const ue=wh(r,a);e.addEventListener(mT,ue,{once:!0})}yT(e,mT,{bubbles:!1,cancelable:!0,detail:{originalEvent:C,contextmenu:!1,focusable:Fr(D),target:D}})}})}return Ab()||(v.add(Jt(d,"focusin",k,!0)),v.add(m.addEventListener("focusin",k,!0)),v.add(p.addEventListener("focusin",k,!0))),()=>{clearTimeout(A),y.forEach(C=>C()),v.forEach(C=>C())}}function L5(e,t){const{defer:n}=t,r=n?$t:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(R5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function yT(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function D5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Jt(Mr(e),"keydown",n,{capture:!0})}var bT="layer:request-dismiss",ir={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var r;const t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf((r=this.topMostPointerBlockingLayer())==null?void 0:r.node):-1;return t<n},isTopMost(e){const t=this.layers[this.count()-1];return(t==null?void 0:t.node)===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){const n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(r=>r.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(r=>r.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>co(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>co(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(r=>ir.dismiss(r.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const r=this.countNestedLayersOfType(e.node,e.type);r>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${r}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const n=this.indexOf(e);if(n===-1)return;const r=this.layers[n];F5(e,bT,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),M5(e,bT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function M5(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(s)}function F5(e,t,n){e.addEventListener(t,n,{once:!0})}var TT;function _T(){ir.layers.forEach(({node:e})=>{e.style.pointerEvents=ir.isBelowPointerBlockingLayer(e)?"none":"auto"})}function B5(e){e.style.pointerEvents=""}function U5(e,t){const n=Mr(e),r=[];return ir.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(TT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=q4(()=>{const c=s();return Qt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Yl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{ir.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=TT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function H5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Ch("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:s,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};ir.add(f),_T();function p(w){var A,k;const v=yr(w.detail.originalEvent);ir.isBelowPointerBlockingLayer(e)||ir.isInBranch(v)||((A=t.onPointerDownOutside)==null||A.call(t,w),(k=t.onInteractOutside)==null||k.call(t,w),!w.defaultPrevented&&(c&&console.log("onPointerDownOutside:",w.detail.originalEvent),r==null||r()))}function m(w){var A,k;const v=yr(w.detail.originalEvent);ir.isInBranch(v)||((A=t.onFocusOutside)==null||A.call(t,w),(k=t.onInteractOutside)==null||k.call(t,w),!w.defaultPrevented&&(c&&console.log("onFocusOutside:",w.detail.originalEvent),r==null||r()))}function T(w){var v;ir.isTopMost(e)&&((v=t.onEscapeKeyDown)==null||v.call(t,w),!w.defaultPrevented&&r&&(w.preventDefault(),r()))}function y(w){var C;if(!e)return!1;const v=typeof u=="function"?u():u,A=Array.isArray(v)?v:[v],k=(C=t.persistentElements)==null?void 0:C.map(z=>z()).filter(Qt);return k&&A.push(...k),A.some(z=>co(z,w))||ir.isInNestedLayer(e,w)}const _=[a?U5(e,t.persistentElements):void 0,D5(e,T),L5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{ir.remove(e),_T(),B5(e),_.forEach(w=>w==null?void 0:w())}}function ST(e,t){const{defer:n}=t,r=n?$t:a=>a(),s=[];return s.push(r(()=>{const a=uo(e)?e():e;s.push(H5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var z5=Object.defineProperty,j5=(e,t,n)=>t in e?z5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,At=(e,t,n)=>j5(e,typeof t!="symbol"?t+"":t,n),xT={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()}},$5=[],V5=class{constructor(e,t){At(this,"trapStack"),At(this,"config"),At(this,"doc"),At(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),At(this,"portalContainers",new Set),At(this,"listenerCleanups",[]),At(this,"handleFocus",r=>{const s=yr(r),a=this.findContainerIndex(s,r)>=0;if(a||jl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(qa(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],c=!1):p-1>=0&&(u=f[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>qa(f)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),At(this,"handlePointerDown",r=>{const s=yr(r);if(!(this.findContainerIndex(s,r)>=0)){if(Ja(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Ja(this.config.allowOutsideClick,r)||r.preventDefault()}}),At(this,"handleClick",r=>{const s=yr(r);this.findContainerIndex(s,r)>=0||Ja(this.config.clickOutsideDeactivates,r)||Ja(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),At(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const s=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:s});if(!a)return;Qa(r)&&r.preventDefault(),this.tryFocus(a)}}),At(this,"handleEscapeKey",r=>{q5(r)&&Ja(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),At(this,"_mutationObserver"),At(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(s=>{s.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),s.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return h4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?p4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),At(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(s=>{var a;(a=this._mutationObserver)==null||a.observe(s,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(s=>{this.observePortalContainer(s)}))}),At(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Fr(r)){const s=ho(this.doc);if(s&&this.findContainerIndex(s)>=0)r=s;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),At(this,"tryFocus",r=>{if(r!==!1&&r!==ho(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,Y5(r)&&r.select()}}),At(this,"deactivate",r=>{if(!this.state.active)return this;const s=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(),xT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(s,"onDeactivate"),u=this.getOption(s,"onPostDeactivate"),c=this.getOption(s,"checkCanReturnFocus"),d=this.getOption(s,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{wT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(p).then(f,f),this}return f(),this}),At(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,s==null||s(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),At(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,s==null||s(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),At(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),At(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),At(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),At(this,"getNodeForOption",(r,{hasFallback:s=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!s)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),At(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||yr(s);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,s),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Fr(u)&&!gs(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[m];c=qa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Qa(s)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Fr(u)&&!gs(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[m];c=qa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Qa(s)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||$5;const n=B({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Qa(r)&&!r.shiftKey},isKeyBackward(r){return Qa(r)&&r.shiftKey}},t);this.doc=n.document||Mr(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{c4(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:s})=>r.contains(e)||(n==null?void 0:n.includes(r))||s.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?xb(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=mo(e,{getShadowRoot:this.config.getShadowRoot}),n=Ib(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],s=t[t.length-1],a=r,u=s;let c=!1;for(let f=0;f<t.length;f++)if(qa(t[f])>0){c=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(gs(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(gs(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:s,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return xT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?wT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Jt(this.doc,"focusin",this.handleFocus,!0),Jt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Jt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Jt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Jt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Jt(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=ho(this.doc),t==null||t();const s=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(s,s),this):(s(),this)}},Qa=e=>e.key==="Tab",Ja=(e,...t)=>typeof e=="function"?e(...t):e,q5=e=>!e.isComposing&&e.key==="Escape",wT=e=>setTimeout(e,0),Y5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function AT(e,t={}){let n;const r=$t(()=>{const s=typeof e=="function"?e():e;if(s){n=new V5(s,fe(B({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:Mr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Zh="data-scroll-lock";function W5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function CT(e){const t=po(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function vT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Zh))return;const u=CT(r)||CT(s),c=n.innerWidth-r.clientWidth;s.setAttribute(Zh,"");const d=()=>$4(r,"--scrollbar-width",`${c}px`),f=W5(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Yl(s,_)},m=()=>{var Y,D;const{scrollX:_,scrollY:w,visualViewport:v}=n,A=(Y=v==null?void 0:v.offsetLeft)!=null?Y:0,k=(D=v==null?void 0:v.offsetTop)!=null?D:0,C={position:"fixed",overflow:"hidden",top:`${-(w-Math.floor(k))}px`,left:`${-(_-Math.floor(A))}px`,right:"0"};!u&&c>0&&(C[f]=`${c}px`);const z=Yl(s,C);return()=>{z==null||z(),n.scrollTo({left:_,top:w,behavior:"instant"})}},T=[d(),$l()?m():p()];return()=>{T.forEach(_=>_==null?void 0:_()),s.removeAttribute(Zh)}}var G5=ys("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),jr=G5.build(),NT=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`},ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},PT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},X5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},tp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},np=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},K5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},OT=e=>e.getById(NT(e)),Ao=e=>e.getById(kT(e)),Co=e=>e.getById(ep(e)),IT=e=>e.getById(PT(e)),Q5=e=>e.getById(tp(e)),J5=e=>e.getById(np(e));function Z5(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=T5(fe(B({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&s({type:y?"OPEN":"CLOSE"})},reposition(y={}){s({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(fe(B({id:X5(c)},jr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(fe(B({},jr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(fe(B({},jr.anchor.attrs),{dir:u("dir"),id:NT(c)}))},getTriggerProps(){return t.button(fe(B({},jr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:kT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ep(c),onPointerDown(y){Cb(y)&&T4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(fe(B({},jr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(fe(B({id:PT(c)},jr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(fe(B({},jr.content.attrs),{dir:u("dir"),id:ep(c),tabIndex:-1,role:"dialog","aria-modal":Tb(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":lo(d),"aria-labelledby":m.title?tp(c):void 0,"aria-describedby":m.description?np(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(fe(B({},jr.title.attrs),{id:tp(c),dir:u("dir")}))},getDescriptionProps(){return t.element(fe(B({},jr.description.attrs),{id:np(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(fe(B({},jr.closeTrigger.attrs),{dir:u("dir"),id:K5(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var e8={props({props:e}){return fe(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=OT(n))!=null?a:Ao(n);return dT(r,()=>IT(n),fe(B({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Co(n);let s=!0;return ST(r,{type:"popover",pointerBlocking:t("modal"),exclude:Ao(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(s=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:s})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:z4(()=>Co(t),{triggerElement:Ao(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?hT(()=>[Co(t),Ao(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return vT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?AT(()=>Co(t),{initialFocus:()=>Rb({root:Co(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=OT(n))!=null?u:Ao(n);dT(s,()=>IT(n),fe(B(B({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){$t(()=>{Object.assign(e.get("renderedElements"),{title:!!Q5(t),description:!!J5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||$t(()=>{const n=Rb({root:Co(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,s;const n=(s=e.restoreFocus)!=null?s:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||$t(()=>{const a=Ao(t);a==null||a.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};yo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[RU,ac]=Es({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[LU,rp]=Es({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),t8=e=>{const t=F.useId(),{getRootNode:n}=ac(),{dir:r}=rp(),s=B({id:t,dir:r,getRootNode:n},e),a=Gl(e8,s);return Z5(a,Fh)},n8=e=>{const[t,u]=jb(e),c=u,{children:n}=c,r=fn(c,["children"]),s=t8(r),a=Hh(Vt({present:s.open},t));return S.jsx(nD,{value:s,children:S.jsx(Ub,{value:a,children:n})})},RT=F.forwardRef((e,t)=>{const n=Uh(),r=Ya(),s=Vt(fe(B({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return S.jsx(bn.button,fe(B({},s),{ref:t}))});RT.displayName="PopoverTrigger";function r8(e){return _t({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 i8(e){return _t({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 s8(e){return _t({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 o8(e){return _t({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 a8(e){return _t({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 u8(e){return _t({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 ip(e){return _t({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 LT(e){return _t({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 l8=({className:e,componentType:t,children:n})=>{const[r,s]=F.useState(!1),{globalClassName:a}=tt(),u=f=>{s(f.open)},c=F.useCallback(()=>{s(!1)},[]),d=F.useMemo(()=>({closeMenu:c}),[c]);return S.jsxs(n8,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[S.jsx(RT,{"aria-label":`Overflow menu for ${t}`,className:W(`${H}-overflow-menu-button-trigger`,`${H}-icon-button`,a,e,`cim-${t}-component`),children:S.jsx(LT,{})}),S.jsx(zb,{children:S.jsx(Hb,{className:W(`${H}-overflow-menu-list`,a,`cim-${t}-component`),children:S.jsx(hb.Provider,{value:d,children:n})})})]})};function DT(e){return _t({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 MT(e){return _t({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[c8,_s]=Es({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),FT=F.forwardRef((e,t)=>{const n=_s(),r=Vt(n.getControlProps(),e);return S.jsx(bn.div,fe(B(B({},r),e),{ref:t}))});FT.displayName="CarouselControl";const BT=F.forwardRef((e,t)=>{const[n,r]=Wa()(e,["readOnly","index"]),s=_s(),a=Vt(s.getIndicatorProps(n),r);return S.jsx(bn.button,fe(B({},a),{ref:t}))});BT.displayName="CarouselIndicator";const UT=F.forwardRef((e,t)=>{const n=_s(),r=Vt(n.getIndicatorGroupProps(),e);return S.jsx(bn.div,fe(B({},r),{ref:t}))});UT.displayName="CarouselIndicatorGroup";const HT=F.forwardRef((e,t)=>{const[n,r]=Wa()(e,["index","snapAlign"]),s=_s(),a=Vt(s.getItemProps(n),r);return S.jsx(bn.div,fe(B({},a),{ref:t}))});HT.displayName="CarouselItem";const zT=F.forwardRef((e,t)=>{const n=_s(),r=Vt(n.getItemGroupProps(),e);return S.jsx(bn.div,fe(B({},r),{ref:t}))});zT.displayName="CarouselItemGroup";const jT=F.forwardRef((e,t)=>{const n=_s(),r=Vt(n.getNextTriggerProps(),e);return S.jsx(bn.button,fe(B({},r),{ref:t}))});jT.displayName="CarouselNextTrigger";const $T=F.forwardRef((e,t)=>{const n=_s(),r=Vt(n.getPrevTriggerProps(),e);return S.jsx(bn.button,fe(B({},r),{ref:t}))});$T.displayName="CarouselPrevTrigger";function d8(e){const t=po(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(T,y){let _=parseFloat(T);return/%/.test(T)&&(_/=100,_*=y),Number.isNaN(_)?0:_}let d=c(r,n.width),f=c(s,n.height),p=c(a,n.width),m=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function f8(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 VT(e){let t=[];for(const n of e.children)t=t.concat(n,VT(n));return t}function qT(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?VT(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of s){const m=p.getBoundingClientRect();if(!f8(n,m,u))continue;const T=po(p);let[y,_]=T.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const w=a==="x"?_:y,v=m[c]-n[c]+e[f];switch(w){case"none":break;case"start":r[a].start.push({node:p,position:v});break;case"center":r[a].center.push({node:p,position:v+m[d]/2});break;case"end":r[a].end.push({node:p,position:v+m[d]});break}}}return r}function YT(e){const t=e.getBoundingClientRect(),n=d8(e),r=qT(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:WT([...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(GT(0,s.x))),y:WT([...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(GT(0,s.y)))}}function h8(e,t,n){const r=qT(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var WT=e=>[...new Set(e)],GT=(e,t)=>n=>Math.max(e,Math.min(t,n)),p8=ys("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),li=p8.build(),m8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},g8=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:item:${t}`},uc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},E8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},y8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},b8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},XT=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:indicator:${t}`},Mn=e=>e.getById(uc(e)),KT=e=>j4(Mn(e),"[data-part=item]"),T8=(e,t)=>e.getById(XT(e,t)),QT=e=>{const t=Mn(e);if(!t)return;const n=mo(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function _8(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=s("canScrollNext"),m=s("canScrollPrev"),T=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),_=r.get("page"),w=c("slidesPerPage"),v=c("padding"),A=c("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return _/y.length},scrollToIndex(k,C){a({type:"INDEX.SET",index:k,instant:C})},scrollTo(k,C){a({type:"PAGE.SET",index:k,instant:C})},scrollNext(k){a({type:"PAGE.NEXT",instant:k})},scrollPrev(k){a({type:"PAGE.PREV",instant:k})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(k){return Array.from(r.get("slidesInView")).includes(k)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(fe(B({},li.root.attrs),{id:m8(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":w,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(fe(B({},li.itemGroup.attrs),{id:uc(u),"data-orientation":c("orientation"),"data-dragging":lo(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(k){co(k.currentTarget,yr(k))&&a({type:"VIEWPORT.FOCUS"})},onBlur(k){co(k.currentTarget,k.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(k){if(k.defaultPrevented||!c("allowMouseDrag")||!Cb(k))return;const C=yr(k);Fr(C)&&C!==k.currentTarget||(k.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:j6(k=>{const C=c("orientation")==="horizontal"?"deltaX":"deltaY";k[C]<0&&!s("canScrollPrev")||k[C]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",c("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:v,[T?"paddingInline":"paddingBlock"]:v,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(k){const C=r.get("slidesInView").includes(k.index);return t.element(fe(B({},li.item.attrs),{id:g8(u,k.index),dir:c("dir"),role:"group","data-index":k.index,"data-inview":lo(C),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":A.item(k.index,c("slideCount")),"aria-hidden":Tb(!C),style:{scrollSnapAlign:(()=>{var ne;const z=(ne=k.snapAlign)!=null?ne:"start",Y=c("slidesPerMove"),D=Y==="auto"?Math.floor(c("slidesPerPage")):Y;return(k.index+D)%D===0?z:void 0})()}}))},getControlProps(){return t.element(fe(B({},li.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(fe(B({},li.prevTrigger.attrs),{id:y8(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":A.prevTrigger,"data-orientation":c("orientation"),"aria-controls":uc(u),onClick(k){k.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(fe(B({},li.nextTrigger.attrs),{dir:c("dir"),id:E8(u),type:"button","aria-label":A.nextTrigger,"data-orientation":c("orientation"),"aria-controls":uc(u),disabled:!p,onClick(k){k.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(fe(B({},li.indicatorGroup.attrs),{dir:c("dir"),id:b8(u),"data-orientation":c("orientation"),onKeyDown(k){if(k.defaultPrevented)return;const C="indicator",z={ArrowDown(q){T||(a({type:"PAGE.NEXT",src:C}),q.preventDefault())},ArrowUp(q){T||(a({type:"PAGE.PREV",src:C}),q.preventDefault())},ArrowRight(q){T&&(a({type:"PAGE.NEXT",src:C}),q.preventDefault())},ArrowLeft(q){T&&(a({type:"PAGE.PREV",src:C}),q.preventDefault())},Home(q){a({type:"PAGE.SET",index:0,src:C}),q.preventDefault()},End(q){a({type:"PAGE.SET",index:y.length-1,src:C}),q.preventDefault()}},Y=A4(k,{dir:c("dir"),orientation:c("orientation")}),D=z[Y];D==null||D(k)}}))},getIndicatorProps(k){return t.button(fe(B({},li.indicator.attrs),{dir:c("dir"),id:XT(u,k.index),type:"button","data-orientation":c("orientation"),"data-index":k.index,"data-readonly":lo(k.readOnly),"data-current":lo(k.index===_),"aria-label":A.indicator(k.index),onClick(C){C.defaultPrevented||k.readOnly||a({type:"PAGE.SET",index:k.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(fe(B({},li.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":lo(d),"aria-label":d?A.autoplayStop:A.autoplayStart,onClick(k){k.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var S8={props({props:e}){return G6(e,["slideCount"],"carousel"),fe(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:x8(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 O6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:s}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{s({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{s({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(Mn(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=Mn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),QT(e)});return QT(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!Mn(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};$t(()=>{s(),$t(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return KT(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Mn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const c=u.reduce((d,f)=>{var T;const p=f.target,m=Number((T=p.dataset.index)!=null?T:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?C6(d,m):v6(d,m)},n.get("slidesInView"));n.set("slidesInView",N6(c))},{root:r,threshold:t("inViewThreshold")});return KT(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Mn(n);return r?Jt(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 Jt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return U4(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 Jt(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:s}){var f;const a=t.instant?"instant":"smooth",u=yb((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=Mn(n);if(!c)return;const d=r("isHorizontal")?"left":"top";s(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=Mn(t);if(!r)return;const s=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-s)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=mb(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=k6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=Mn(r);if(!s)return;const a=h8(s,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=yb(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Mn(n);if(!r)return;const s=YT(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=Mn(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=Mn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Mn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=YT(r),c=u.x.reduce((f,p)=>Math.abs(p-s)<Math.abs(f-s)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);$t(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const f=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=T8(n,e.get("page"));r&&$t(()=>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 x8(e,t,n){if(e==null||n<=0)return[];const r=[],s=t==="auto"?Math.floor(n):t;if(s<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=s)r.push(a);return r}yo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),yo()(["index","readOnly"]),yo()(["index","snapAlign"]);const w8=e=>{const t=F.useId(),{getRootNode:n}=ac(),{dir:r}=rp(),s=B({id:t,dir:r,getRootNode:n},e),a=Gl(S8,s);return _8(a,Fh)},JT=F.forwardRef((e,t)=>{const[n,r]=Wa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=w8(n),a=Vt(s.getRootProps(),r);return S.jsx(c8,{value:s,children:S.jsx(bn.div,fe(B({},a),{ref:t}))})});JT.displayName="CarouselRoot";const A8=180,C8=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},v8=({globalClassName:e,className:t,itemMinWidth:n=A8,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p).map((ne,ue)=>({node:ne,key:F.isValidElement(ne)&&ne.key!=null?ne.key:`carousel-item-${ue}`})),T=m.length,y=F.useRef(null),[_,w]=F.useState(0),{width:v}=Ov();F.useLayoutEffect(()=>{y.current&&w(y.current.getBoundingClientRect().width)},[v,T]);const A=C8(r),k=n+A,C=_>0?(_+A)/k:1,z=Math.max(1,Math.floor(C));if(T===0)return null;const Y=T>z,D=Math.ceil(T/z),q=Y?Math.max(1,C):z;return S.jsxs(JT,{ref:y,className:W(e,t,`${H}-carousel`),slidesPerPage:q,slidesPerMove:z,spacing:r,loop:s,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[S.jsx(zT,{className:W(e,`${H}-carousel__item-group`,{"carousel-row-container":!Y}),children:m.map(({node:ne,key:ue},V)=>S.jsx(HT,{index:V,className:W(e,`${H}-carousel__item`),children:ne},ue))}),c&&Y&&S.jsxs(FT,{className:W(e,`${H}-carousel__control`),children:[S.jsx($T,{className:W(e,`${H}-carousel__prev-trigger`),"aria-label":"Previous slide",children:S.jsx(s8,{size:"16px"})}),S.jsx(jT,{className:W(e,`${H}-carousel__next-trigger`),"aria-label":"Next slide",children:S.jsx(o8,{size:"16px"})})]}),u&&Y&&S.jsx(UT,{className:W(e,`${H}-carousel__indicator-group`),children:Array.from({length:D},(ne,ue)=>S.jsx(BT,{index:ue,className:W(e,`${H}-carousel__indicator`),"aria-label":`Go to slide group ${ue+1}`},ue))})]})},[N8,k8]=Es({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),P8=e=>Wa()(e,["lazyMount","unmountOnExit"]),[O8,Za]=Es({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),ZT=F.forwardRef((e,t)=>{const n=Za(),r=k8(),s=Hh(fe(B({},r),{present:n.open})),a=Vt(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:S.jsx(bn.div,fe(B({},a),{ref:Xl(s.ref,t)}))});ZT.displayName="DialogBackdrop";const sp=F.forwardRef((e,t)=>{const n=Za(),r=Ya(),s=Vt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:S.jsx(bn.div,fe(B({},s),{ref:Xl(r.ref,t)}))});sp.displayName="DialogContent";const op=F.forwardRef((e,t)=>{const n=Za(),r=Vt(n.getDescriptionProps(),e);return S.jsx(bn.div,fe(B({},r),{ref:t}))});op.displayName="DialogDescription";const ap=F.forwardRef((e,t)=>{const n=Za(),r=Vt(n.getPositionerProps(),e);return Ya().unmounted?null:S.jsx(bn.div,fe(B({},r),{ref:t}))});ap.displayName="DialogPositioner";var I8=ys("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Ss=I8.build(),e_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},t_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},up=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},n_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},lp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},cp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},r_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},lc=e=>e.getById(up(e)),R8=e=>e.getById(e_(e)),L8=e=>e.getById(t_(e)),D8=e=>e.getById(n_(e)),M8=e=>e.getById(lp(e)),F8=e=>e.getById(cp(e)),B8=e=>e.getById(r_(e));function U8(e,t){const{state:n,send:r,context:s,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(fe(B({},Ss.trigger.attrs),{dir:a("dir"),id:n_(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":up(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(fe(B({},Ss.backdrop.attrs),{dir:a("dir"),hidden:!d,id:t_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(fe(B({},Ss.positioner.attrs),{dir:a("dir"),id:e_(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(fe(B({},Ss.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:up(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:lp(u),"aria-describedby":f.description?cp(u):void 0}))},getTitleProps(){return t.element(fe(B({},Ss.title.attrs),{dir:a("dir"),id:lp(u)}))},getDescriptionProps(){return t.element(fe(B({},Ss.description.attrs),{dir:a("dir"),id:cp(u)}))},getCloseTriggerProps(){return t.button(fe(B({},Ss.closeTrigger.attrs),{dir:a("dir"),id:r_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var H8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>B8(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return B({role:"dialog",modal:s,trapFocus:s,preventScroll:s,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return ST(()=>lc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[D8(e)],onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),n("closeOnInteractOutside")||s.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(s){var a;(a=n("onEscapeKeyDown"))==null||a(s),n("closeOnEscape")||s.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return vT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?AT(()=>lc(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var s,a;return(a=(s=t("finalFocusEl"))==null?void 0:s())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?hT(()=>[lc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){$t(()=>{e.set("rendered",{title:!!M8(t),description:!!F8(t)})})},syncZIndex({scope:e}){$t(()=>{const t=lc(e);if(!t)return;const n=po(t);[R8(e),L8(e)].forEach(s=>{s==null||s.style.setProperty("--z-index",n.zIndex),s==null||s.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};yo()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const z8=e=>{const t=F.useId(),{getRootNode:n}=ac(),{dir:r}=rp(),s=B({id:t,getRootNode:n,dir:r},e),a=Gl(H8,s);return U8(a,Fh)},i_=e=>{const[t,c]=jb(e),d=c,{children:n}=d,r=fn(d,["children"]),[s]=P8(t),a=z8(r),u=Hh(Vt({present:a.open},t));return S.jsx(O8,{value:a,children:S.jsx(N8,{value:s,children:S.jsx(Ub,{value:u,children:n})})})},s_=F.forwardRef((e,t)=>{const n=Za(),r=Vt(n.getTitleProps(),e);return S.jsx(bn.h2,fe(B({},r),{ref:t}))});s_.displayName="DialogTitle";const j8=({children:e})=>{const[t,n]=F.useState(!1),r=F.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=F.useMemo(()=>({isOpen:t}),[t]);return S.jsx(xh.Provider,{value:r,children:S.jsx(fb.Provider,{value:s,children:e})})},o_=()=>F.useContext(fb),a_=()=>{const e=F.useContext(xh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},$8=`${H}-overflow-menu-button-trigger`,V8=({componentType:e,children:t})=>{const{isOpen:n}=o_(),{closeMenu:r}=a_(),{globalClassName:s}=tt(),a=F.useRef(null);return F.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const f=d.target;f instanceof Element&&f.closest(`.${$8}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?S.jsx("div",{ref:a,className:W(`${H}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},q8=({componentType:e,className:t})=>{const{toggleMenu:n}=a_(),{isOpen:r}=o_(),{globalClassName:s}=tt();return S.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,className:W(`${H}-overflow-menu-button-trigger`,`${H}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:S.jsx(LT,{})})},dp=()=>{const{status:e,entryType:t}=tr(),{messages:n}=Vn(),r=t==="ask_cim",s=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&s},Y8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{previousComponentType:r}=tr(),s=ps(),a=()=>{fl(r||"dialog"),s()};return t?S.jsx(ii,{className:W(n,`${H}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:S.jsx(DT,{})}):S.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[S.jsx(DT,{}),"Show ",r||"dialog"]})},W8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{isModalFullscreen:r}=tr(),s=ps(),a=()=>{bf(!r),s()},u=r?$N:VN,c="Toggle Fullscreen";return t?S.jsx(ii,{ariaLabel:c,title:c,className:W(n,`${H}-modal-fullscreen-button`,`cim-${e}-component`),icon:S.jsx(u,{}),onClick:a}):S.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[S.jsx(u,{}),c]})},G8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{dialogPosition:r}=tr(),s=ps(),a=r==="bottom-left",u=()=>{Tf(a?"bottom-right":"bottom-left"),s()},c=a?i8:r8,d=a?"Move right":"Move left";return t?S.jsx(ii,{className:W(n,`${H}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:S.jsx(c,{})}):S.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[S.jsx(c,{}),d]})},u_=({componentType:e,onClearChat:t,onEndConversation:n,onClose:r,onDownloadTranscript:s})=>{const{headerConfig:a,globalClassName:u,mode:c,enableDownloadTranscript:d}=tt(),{mode:f}=tr(),p=c==="messaging"&&d&&!!s,m=f==="standalone",T=e==="modal",y=T?Y8:l_,_=T?W8:G8,w=F.useMemo(()=>a?WN(a):{},[a]);return S.jsx(j8,{children:S.jsxs("div",{className:W(u,`${H}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[S.jsxs("div",{className:W(u,`${H}-${e}-header`,{standalone:m,embedded:!m}),style:w,children:[(a==null?void 0:a.logoUrl)&&S.jsx("img",{alt:"",role:"img",className:W(u,`${H}-${e}-logo`,{standalone:m,embedded:!m}),src:a.logoUrl}),S.jsx(s_,{className:W(u,`${H}-${e}-title`,{standalone:m,embedded:!m}),children:a==null?void 0:a.headerText}),S.jsxs("div",{className:W(u,`${H}-${e}-controls`),children:[S.jsx(y,{componentType:e,isIcon:!0}),S.jsx(q8,{componentType:e}),S.jsx(L1,{className:W(u,`cim-${e}-component`),label:a==null?void 0:a.closeButtonAriaLabel,onClick:r})]})]}),S.jsxs(V8,{componentType:e,children:[S.jsx(_,{componentType:e}),S.jsx(Z8,{componentType:e}),S.jsx(pb,{componentType:e,onClearChat:t}),n&&S.jsx(K8,{componentType:e,onEndConversation:n}),p&&S.jsx(X8,{componentType:e,onDownloadTranscript:s})]})]})})},X8=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=tt(),r=ps(),[s,a]=F.useState(!1),u=()=>Ke(null,null,function*(){if(!s){a(!0);try{yield e(),r()}catch(c){n==null||n.error("Error downloading transcript:",c)}finally{a(!1)}}});return S.jsxs("button",{className:W(`${H}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[S.jsx(x6,{}),"Download transcript"]})},K8=({onEndConversation:e,componentType:t})=>{const n=ps(),r=()=>{e(),n()};return S.jsxs("button",{className:W(`${H}-overflow-menu-button`,"end-conversation-button",`cim-${t}-component`),onClick:r,children:[S.jsx(qN,{}),"End conversation"]})},Q8={sparkle:ip,plus:a8,"paper-plane":u8},fp=({icon:e,className:t})=>{const n=Q8[e];return n?S.jsx(n,{className:t,"aria-hidden":"true"}):null},J8=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=tt(),c=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",p=_=>()=>{a(_)},m={"has-icon":!!c,"icon-right":!!c&&d==="right"},T=_=>S.jsxs(S.Fragment,{children:[c&&S.jsx(fp,{icon:c,className:`${H}-suggestion-button-icon`}),S.jsx("span",{children:_})]});return S.jsx("div",{className:W(t,`${H}-suggestion-container ${f}`,e),children:n.map(_=>s?S.jsx(ml,{disabled:r,className:W(t,`${H}-suggestion-button standalone`,m),onClick:p(_),children:T(_)},_):S.jsx("button",{disabled:r,className:W(t,`${H}-suggestion-button embedded`,m),onClick:p(_),children:T(_)},_))})},Z8=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=tt();if(!r)return null;const s=()=>{ni(!1),ma(!0),Nf()};return t?S.jsx(ii,{className:W(n,`${H}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:S.jsx(I1,{})}):S.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[S.jsx(I1,{}),"Minimize"]})},l_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),r=ps(),s=()=>{fl("modal"),r()};return t?S.jsx(ii,{className:W(n,`${H}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:S.jsx(MT,{})}):S.jsxs("button",{className:W(n,`${H}-overflow-menu-button`,`${H}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[S.jsx(MT,{}),"Show modal"]})},eM=({isWidgetStandalone:e})=>{var v,A;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:s,staticQuestions:a,staticQuestionsStrategy:u}=tt(),{askCimPrompts:c,messages:d}=Vn(),{isLoading:f,handleAskCim:p}=Ir(),m=s==null?void 0:s.icon,T=(v=s==null?void 0:s.iconPosition)!=null?v:"left",y=F.useMemo(()=>{const k=typeof n=="string"?n:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return d.some(z=>z.name==="conversation_reset")&&r||k},[d,n,r]),_=F.useMemo(()=>{var C,z;const k=((z=(C=c.message)==null?void 0:C.suggestions)!=null?z:[]).map(Y=>Y.displayText.trim()).filter(Boolean);return B0(k,a||[],u)},[(A=c.message)==null?void 0:A.suggestions,a,u]),w=k=>()=>{p({userPrompt:k})};return S.jsxs("div",{className:W(t,`${H}-ask-cim-entry-message`,`${H}-message-group`,e?"standalone":"embedded"),children:[S.jsx("p",{className:W(t,`${H}-ask-cim-entry-text`),children:y}),!!(_!=null&&_.length)&&S.jsx("div",{className:W(t,`${H}-ask-cim-suggestions-container`,`${H}-suggestion-container`,e?"standalone":"embedded"),children:_.map(k=>S.jsxs(ml,{disabled:f,className:W(t,`${H}-ask-cim-suggestion-button`,`${H}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!m,"icon-right":!!m&&T==="right"}),onClick:w(k),children:[m&&S.jsx(fp,{icon:m,className:`${H}-suggestion-button-icon`}),S.jsx("span",{children:k})]},k))})]})},tM=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:s}=tt();if(!n)return null;const a=n.getName(t),u=n.getBrand(t),c=n.getPriceDisplay(t),d=n.getRelativePdp(t),f=n.getPdp(t),p=n.getImage(t),m=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return S.jsxs("div",{className:W(r,`${H}-product-tile`,{embedded:!e,standalone:e}),children:[m?S.jsx("a",{href:`${m}`,target:s?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${a}`,children:S.jsx("img",{className:W(r,`${H}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):S.jsx("img",{className:W(r,`${H}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),S.jsxs("div",{className:W(r,`${H}-product-tile-details`,{embedded:!e,standalone:e}),children:[S.jsxs("div",{className:W(r,`${H}-product-tile-content`),children:[u&&S.jsx("p",{className:`${H}-product-tile-brand`,children:u}),m?S.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:W(r,`${H}-product-tile-pdp`),href:`${m}`,target:s?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",S.jsx("span",{className:W(r,`${H}-product-tile-pdp-arrow`),children:"→"})]}):S.jsx("p",{className:W(r,`${H}-product-tile-name`),title:a,children:a})]}),S.jsx("div",{className:W(r,`${H}-product-tile-footer`),children:S.jsx("p",{className:W(r,`${H}-product-tile-price`),children:c})})]})]})},nM=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=tt(),s=t;return n?S.jsxs("div",{className:W(r,`${H}-display-products`),children:[S.jsx("p",{children:s.message}),s.products&&s.products.length>0&&S.jsx(v8,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:s.products.map(a=>{const u=n.getPid(a);return S.jsx(tM,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},rM=({globalClassName:e,message:t,isWidgetStandalone:n})=>S.jsx("div",{className:W(e,`${H}-error-message`,{standalone:n,embedded:!n}),children:S.jsxs("p",{className:W(e,`${H}-error-message-text`,{standalone:n,embedded:!n}),children:[S.jsx(HN,{})," ",t.message||"An error occurred while processing your request."]})}),iM=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:s})=>{var _;const{isLoading:a}=Ir(),{messages:u}=Vn(),c=u.find(w=>w.id===n.eventSourceId),d=!!c,f=((_=c==null?void 0:c.name)==null?void 0:_.replace("_suggestions",""))||"",p=d?fA(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=w=>{const v=n.suggestions.find(A=>A.displayText===w);v&&s(v,n.eventSourceId||n.id)};return S.jsxs("div",{className:W(e,`${H}-follow-up`),children:[S.jsx("p",{className:W(e,`${H}-text`),children:n.message}),S.jsx(J8,{suggestions:n.suggestions.map(w=>w.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function c_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function sM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function oM(e,t,n){const s=Cl((n||{}).ignore||[]),a=aM(t);let u=-1;for(;++u<a.length;)YE(e,"text",c);function c(f,p){let m=-1,T;for(;++m<p.length;){const y=p[m],_=T?T.children:void 0;if(s(y,_?_.indexOf(y):void 0,T))return;T=y}if(T)return d(f,p)}function d(f,p){const m=p[p.length-1],T=a[u][0],y=a[u][1];let _=0;const v=m.children.indexOf(f);let A=!1,k=[];T.lastIndex=0;let C=T.exec(f.value);for(;C;){const z=C.index,Y={index:C.index,input:C.input,stack:[...p,f]};let D=y(...C,Y);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?T.lastIndex=z+1:(_!==z&&k.push({type:"text",value:f.value.slice(_,z)}),Array.isArray(D)?k.push(...D):D&&k.push(D),_=z+C[0].length,A=!0),!T.global)break;C=T.exec(f.value)}return A?(_<f.value.length&&k.push({type:"text",value:f.value.slice(_)}),m.children.splice(v,1,...k)):k=[f],v+k.length}}function aM(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([uM(s[0]),lM(s[1])])}return t}function uM(e){return typeof e=="string"?new RegExp(sM(e),"g"):e}function lM(e){return typeof e=="function"?e:function(){return e}}const hp="phrasing",pp=["autolink","link","image","label"];function cM(){return{transforms:[EM],enter:{literalAutolink:fM,literalAutolinkEmail:mp,literalAutolinkHttp:mp,literalAutolinkWww:mp},exit:{literalAutolink:gM,literalAutolinkEmail:mM,literalAutolinkHttp:hM,literalAutolinkWww:pM}}}function dM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:hp,notInConstruct:pp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:hp,notInConstruct:pp},{character:":",before:"[ps]",after:"\\/",inConstruct:hp,notInConstruct:pp}]}}function fM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function mp(e){this.config.enter.autolinkProtocol.call(this,e)}function hM(e){this.config.exit.autolinkProtocol.call(this,e)}function pM(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 mM(e){this.config.exit.autolinkEmail.call(this,e)}function gM(e){this.exit(e)}function EM(e){oM(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,yM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),bM]],{ignore:["link","linkReference"]})}function yM(e,t,n,r,s){let a="";if(!d_(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!TM(n)))return!1;const u=_M(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 bM(e,t,n,r){return!d_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function TM(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 _M(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=c_(e,"(");let a=c_(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function d_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||as(n)||bl(n))&&(!t||n!==47)}f_.peek=PM;function SM(){this.buffer()}function xM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function wM(){this.buffer()}function AM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function CM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vM(e){this.exit(e)}function NM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function kM(e){this.exit(e)}function PM(){return"["}function f_(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=s.move("]"),a}function OM(){return{enter:{gfmFootnoteCallString:SM,gfmFootnoteCall:xM,gfmFootnoteDefinitionLabelString:wM,gfmFootnoteDefinition:AM},exit:{gfmFootnoteCallString:CM,gfmFootnoteCall:vM,gfmFootnoteDefinitionLabelString:NM,gfmFootnoteDefinition:kM}}}function IM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:f_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,u){const c=a.createTracker(u);let d=c.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
32
+ `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?h_:RM))),f(),d}}function RM(e,t,n){return t===0?e:h_(e,t,n)}function h_(e,t,n){return(n?"":" ")+e}const LM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];p_.peek=UM;function DM(){return{canContainEols:["delete"],enter:{strikethrough:FM},exit:{strikethrough:BM}}}function MM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:LM}],handlers:{delete:p_}}}function FM(e){this.enter({type:"delete",children:[]},e)}function BM(e){this.exit(e)}function p_(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,fe(B({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function UM(){return"~"}function HM(e){return e.length}function zM(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||HM,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const w=[],v=[];let A=-1;for(e[p].length>f&&(f=e[p].length);++A<e[p].length;){const k=jM(e[p][A]);if(n.alignDelimiters!==!1){const C=s(k);v[A]=C,(d[A]===void 0||C>d[A])&&(d[A]=C)}w.push(k)}u[p]=w,c[p]=v}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=m_(r[m]);else{const w=m_(r);for(;++m<f;)a[m]=w}m=-1;const T=[],y=[];for(;++m<f;){const w=a[m];let v="",A="";w===99?(v=":",A=":"):w===108?v=":":w===114&&(A=":");let k=n.alignDelimiters===!1?1:Math.max(1,d[m]-v.length-A.length);const C=v+"-".repeat(k)+A;n.alignDelimiters!==!1&&(k=v.length+k+A.length,k>d[m]&&(d[m]=k),y[m]=k),T[m]=C}u.splice(1,0,T),c.splice(1,0,y),p=-1;const _=[];for(;++p<u.length;){const w=u[p],v=c[p];m=-1;const A=[];for(;++m<f;){const k=w[m]||"";let C="",z="";if(n.alignDelimiters!==!1){const Y=d[m]-(v[m]||0),D=a[m];D===114?C=" ".repeat(Y):D===99?Y%2?(C=" ".repeat(Y/2+.5),z=" ".repeat(Y/2-.5)):(C=" ".repeat(Y/2),z=C):z=" ".repeat(Y)}n.delimiterStart!==!1&&!m&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||m)&&A.push(" "),n.alignDelimiters!==!1&&A.push(C),A.push(k),n.alignDelimiters!==!1&&A.push(z),n.padding!==!1&&A.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&A.push("|")}_.push(n.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return _.join(`
33
33
  `)}function jM(e){return e==null?"":String(e)}function m_(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 $M(e,t,n,r){const s=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),VM);return s(),u}function VM(e,t,n){return">"+(n?"":" ")+e}function qM(e,t){return g_(e,t.inConstruct,!0)&&!g_(e,t.notInConstruct,!1)}function g_(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 E_(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
34
34
  `&&qM(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
35
35
  `}function YM(e,t){const n=String(e);let r=n.indexOf(t),s=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++a>u&&(u=a):a=1,s=r+t.length,r=n.indexOf(t,s);return u}function WM(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 GM(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 XM(e,t,n,r){const s=GM(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(WM(e,n)){const m=n.enter("codeIndented"),T=n.indentLines(a,KM);return m(),T}const c=n.createTracker(r),d=s.repeat(Math.max(YM(a,s)+1,3)),f=n.enter("codeFenced");let p=c.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);p+=c.move(n.safe(e.lang,B({before:p,after:" ",encode:["`"]},c.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,B({before:p,after:`
@@ -42,5 +42,5 @@ Error generating stack: `+b.message+`
42
42
  `+(s===1?"=":"-").repeat(T.length-(Math.max(T.lastIndexOf("\r"),T.lastIndexOf(`
43
43
  `))+1))}const u="#".repeat(s),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,B({before:"# ",after:`
44
44
  `},a.current()));return/^[\t ]/.test(f)&&(f=eu(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}b_.peek=nF;function b_(e){return e.value||""}function nF(){return"<"}T_.peek=rF;function T_(e,t,n,r){const s=gp(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,B({before:f,after:"]"},d.current()))),f+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,B({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,B({before:f,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,B({before:f,after:s},d.current()))),f+=d.move(s),c()),f+=d.move(")"),u(),f}function rF(){return"!"}__.peek=iF;function __(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,B({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),B({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function iF(){return"!"}S_.peek=sF;function S_(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],c=n.compilePattern(u);let d;if(u.atBreak)for(;d=c.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return s+r+s}function sF(){return"`"}function x_(e,t){const n=Uf(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))}w_.peek=oF;function w_(e,t,n,r){const s=gp(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(x_(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,B({before:m,after:">"},u.current()))),m+=u.move(">"),c(),n.stack=p,m}c=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,B({before:f,after:"]("},u.current()))),f+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,B({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,B({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+s),f+=u.move(n.safe(e.title,B({before:f,after:s},u.current()))),f+=u.move(s),d()),f+=u.move(")"),c(),f}function oF(e,t,n){return x_(e,n)?"<":"["}A_.peek=aF;function A_(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,B({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),B({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function aF(){return"["}function Ep(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 uF(e){const t=Ep(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 lF(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 C_(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 cF(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?lF(n):Ep(n);const c=e.ordered?u==="."?")":".":uF(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),C_(n)===u&&p){let m=-1;for(;++m<e.children.length;){const T=e.children[m];if(T&&T.type==="listItem"&&T.children&&T.children[0]&&T.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=c),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,s(),f}function dF(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 fF(e,t,n,r){const s=dF(n);let a=n.bulletCurrent||Ep(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),p);return d(),f;function p(m,T,y){return T?(y?"":" ".repeat(u))+m:(y?a:a+" ".repeat(u-a.length))+m}}function hF(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const pF=Cl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function mF(e,t,n,r){return(e.children.some(function(u){return pF(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function gF(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}v_.peek=EF;function v_(e,t,n,r){const s=gF(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(s+s);let d=u.move(n.containerPhrasing(e,B({after:s,before:c},u.current())));const f=d.charCodeAt(0),p=cc(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=eu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=cc(r.after.charCodeAt(0),m,s);T.inside&&(d=d.slice(0,-1)+eu(m));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+y}function EF(e,t,n){return n.options.strong||"*"}function yF(e,t,n,r){return n.safe(e.value,r)}function bF(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 TF(e,t,n){const r=(C_(n)+(n.options.ruleSpaces?" ":"")).repeat(bF(n));return n.options.ruleSpaces?r.slice(0,-1):r}const N_={blockquote:$M,break:E_,code:XM,definition:QM,emphasis:y_,hardBreak:E_,heading:tF,html:b_,image:T_,imageReference:__,inlineCode:S_,link:w_,linkReference:A_,list:cF,listItem:fF,paragraph:hF,root:mF,strong:v_,text:yF,thematicBreak:TF};function _F(){return{enter:{table:SF,tableData:k_,tableHeader:k_,tableRow:wF},exit:{codeText:AF,table:xF,tableData:yp,tableHeader:yp,tableRow:yp}}}function SF(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 xF(e){this.exit(e),this.data.inTable=void 0}function wF(e){this.enter({type:"tableRow",children:[]},e)}function yp(e){this.exit(e)}function k_(e){this.enter({type:"tableCell",children:[]},e)}function AF(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,CF));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function CF(e,t){return t==="|"?t:e}function vF(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
45
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:T,table:u,tableCell:d,tableRow:c}};function u(y,_,w,v){return f(p(y,w,v),y.align)}function c(y,_,w,v){const A=m(y,w,v),N=f([A]);return N.slice(0,N.indexOf(`
46
- `))}function d(y,_,w,v){const A=w.enter("tableCell"),N=w.enter("phrasing"),C=w.containerPhrasing(y,fe(B({},v),{before:a,after:a}));return N(),A(),C}function f(y,_){return zM(y,{align:_,alignDelimiters:r,padding:n,stringLength:s})}function p(y,_,w){const v=y.children;let A=-1;const N=[],C=_.enter("table");for(;++A<v.length;)N[A]=m(v[A],_,w);return C(),N}function m(y,_,w){const v=y.children;let A=-1;const N=[],C=_.enter("tableRow");for(;++A<v.length;)N[A]=d(v[A],y,_,w);return C(),N}function T(y,_,w){let v=N_.inlineCode(y,_,w);return w.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function NF(){return{exit:{taskListCheckValueChecked:P_,taskListCheckValueUnchecked:P_,paragraph:PF}}}function kF(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:OF}}}function P_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function PF(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let a=-1,u;for(;++a<s.length;){const c=s[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function OF(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=N_.listItem(e,t,n,B(B({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function IF(){return[cM(),OM(),DM(),_F(),NF()]}function RF(e){return{extensions:[dM(),IM(e),MM(),vF(e),kF()]}}const LF={tokenize:HF,partial:!0},O_={tokenize:zF,partial:!0},I_={tokenize:jF,partial:!0},R_={tokenize:$F,partial:!0},DF={tokenize:VF,partial:!0},L_={name:"wwwAutolink",tokenize:BF,previous:M_},D_={name:"protocolAutolink",tokenize:UF,previous:F_},ci={name:"emailAutolink",tokenize:FF,previous:B_},$r={};function MF(){return{text:$r}}let xs=48;for(;xs<123;)$r[xs]=ci,xs++,xs===58?xs=65:xs===91&&(xs=97);$r[43]=ci,$r[45]=ci,$r[46]=ci,$r[95]=ci,$r[72]=[ci,D_],$r[104]=[ci,D_],$r[87]=[ci,L_],$r[119]=[ci,L_];function FF(e,t,n){const r=this;let s,a;return u;function u(m){return!bp(m)||!B_.call(r,r.previous)||Tp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return bp(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(DF,p,f)(m):m===45||m===95||En(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),s=!0,d}function p(m){return a&&s&&Cn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function BF(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!M_.call(r,r.previous)||Tp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(LF,e.attempt(O_,e.attempt(I_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function UF(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&F_.call(r,r.previous)&&!Tp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(Cn(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const T=s.toLowerCase();if(T==="http"||T==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||yl(m)||ft(m)||as(m)||bl(m)?n(m):e.attempt(O_,e.attempt(I_,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function HF(e,t,n){let r=0;return s;function s(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),s):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function zF(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(R_,d,c)(f):f===null||ft(f)||as(f)||f!==45&&bl(f)?d(f):(a=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),u}function d(f){return s||r||!a?n(f):t(f)}}function jF(e,t){let n=0,r=0;return s;function s(u){return u===40?(n++,e.consume(u),s):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(R_,t,a)(u):u===null||ft(u)||as(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function $F(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),s):c===60||c===null||ft(c)||as(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||ft(c)||as(c)?t(c):r(c)}function a(c){return Cn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):Cn(c)?(e.consume(c),u):n(c)}}function VF(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return En(a)?n(a):t(a)}}function M_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ft(e)}function F_(e){return!Cn(e)}function B_(e){return!(e===47||bp(e))}function bp(e){return e===43||e===45||e===46||e===95||En(e)}function Tp(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 qF={tokenize:ZF,partial:!0};function YF(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:KF,continuation:{tokenize:QF},exit:JF}},text:{91:{name:"gfmFootnoteCall",tokenize:XF},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:WF,resolveTo:GF}}}}function WF(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const f=gr(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function GF(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function XF(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!u||m===null||m===91||ft(m))return n(m);if(m===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return s.includes(gr(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return ft(m)||(u=!0),a++,e.consume(m),m===92?p:f}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function KF(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(_)}function p(_){if(u>999||_===93&&!c||_===null||_===91||ft(_))return n(_);if(_===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=gr(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return ft(_)||(c=!0),u++,e.consume(_),_===92?m:p}function m(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function T(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),s.includes(a)||s.push(a),nt(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function QF(e,t,n){return e.check(Ca,t,e.attempt(qF,t,n))}function JF(e){e.exit("gfmFootnoteDefinition")}function ZF(e,t,n){const r=this;return nt(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function e9(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},T=[["enter",p,c],["enter",u[f][1],c],["exit",u[f][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&Yn(T,T.length,0,Tl(y,u.slice(f+1,d),c)),Yn(T,T.length,0,[["exit",m,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),Yn(u,f-1,d-f+3,T),d=f+T.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,c,d){const f=this.previous,p=this.events;let m=0;return T;function T(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),y(_))}function y(_){const w=no(f);if(_===126)return m>1?d(_):(u.consume(_),m++,y);if(m<2&&!n)return d(_);const v=u.exit("strikethroughSequenceTemporary"),A=no(_);return v._open=!A||A===2&&!!w,v._close=!w||w===2&&!!A,c(_)}}}class t9{constructor(){this.map=[]}add(t,n,r){n9(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function n9(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function r9(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function i9(){return{flow:{null:{name:"table",tokenize:s9,resolveAll:o9}}}}function s9(e,t,n){const r=this;let s=0,a=0,u;return c;function c(V){let se=r.events.length-1;for(;se>-1;){const re=r.events[se][1].type;if(re==="lineEnding"||re==="linePrefix")se--;else break}const pe=se>-1?r.events[se][1].type:null,ve=pe==="tableHead"||pe==="tableRow"?D:d;return ve===D&&r.parser.lazy[r.now().line]?n(V):ve(V)}function d(V){return e.enter("tableHead"),e.enter("tableRow"),f(V)}function f(V){return V===124||(u=!0,a+=1),p(V)}function p(V){return V===null?n(V):Be(V)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),y):n(V):Ze(V)?nt(e,p,"whitespace")(V):(a+=1,u&&(u=!1,s+=1),V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(V)))}function m(V){return V===null||V===124||ft(V)?(e.exit("data"),p(V)):(e.consume(V),V===92?T:m)}function T(V){return V===92||V===124?(e.consume(V),m):m(V)}function y(V){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(V):(e.enter("tableDelimiterRow"),u=!1,Ze(V)?nt(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):_(V))}function _(V){return V===45||V===58?v(V):V===124?(u=!0,e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),w):Y(V)}function w(V){return Ze(V)?nt(e,v,"whitespace")(V):v(V)}function v(V){return V===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),A):V===45?(a+=1,A(V)):V===null||Be(V)?z(V):Y(V)}function A(V){return V===45?(e.enter("tableDelimiterFiller"),N(V)):Y(V)}function N(V){return V===45?(e.consume(V),N):V===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(V))}function C(V){return Ze(V)?nt(e,z,"whitespace")(V):z(V)}function z(V){return V===124?_(V):V===null||Be(V)?!u||s!==a?Y(V):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(V)):Y(V)}function Y(V){return n(V)}function D(V){return e.enter("tableRow"),q(V)}function q(V){return V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),q):V===null||Be(V)?(e.exit("tableRow"),t(V)):Ze(V)?nt(e,q,"whitespace")(V):(e.enter("data"),ne(V))}function ne(V){return V===null||V===124||ft(V)?(e.exit("data"),q(V)):(e.consume(V),V===92?ue:ne)}function ue(V){return V===92||V===124?(e.consume(V),ne):ne(V)}}function o9(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,p,m;const T=new t9;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(U_(T,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},T.add(n,0,[["enter",f,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},T.add(n,0,[["enter",p,t]])),s=_.type==="tableDelimiterRow"?2:p?3:1):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=dc(T,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=dc(T,t,a,s,void 0,m)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(c=!0,d=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=dc(T,t,a,s,n,m)):u[1]!==0&&(m=dc(T,t,u,s,n,m)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&U_(T,t,d,f,p),T.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=r9(t.events,n))}return e}function dc(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},vo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=vo(t.events,n[1]);if(a={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=vo(t.events,n[2]),p=vo(t.events,n[3]),m={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const 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 _=n[2]+1,w=n[3]-n[2]-1;e.add(_,w,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},vo(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function U_(e,t,n,r,s){const a=[],u=vo(t.events,n);s&&(s.end=Object.assign({},u),a.push(["exit",s,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function vo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const a9={name:"tasklistCheck",tokenize:l9};function u9(){return{text:{91:a9}}}function l9(e,t,n){const r=this;return s;function s(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return ft(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Be(d)?t(d):Ze(d)?e.check({tokenize:c9},t,n)(d):n(d)}}function c9(e,t,n){return nt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function d9(e){return fE([MF(),YF(),e9(e),i9(),u9()])}const f9={};function h9(e){const t=this,n=e||f9,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(d9(n)),a.push(IF()),u.push(RF(n))}const fc=()=>S.jsx("span",{className:`${H}-blinking-cursor`,children:S.jsx("svg",{"aria-hidden":"true",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:S.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),_p=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>S.jsx(ry,{remarkPlugins:[h9],rehypePlugins:[ib],components:{h1:({children:s})=>S.jsx("h1",{className:W(e,`${H}-header h1`),children:s}),h2:({children:s})=>S.jsx("h2",{className:W(e,`${H}-header h2`),children:s}),h3:({children:s})=>S.jsx("h3",{className:W(e,`${H}-header h3`),children:s}),ul:({children:s})=>S.jsx("ul",{className:W(e,`${H}-ul`),children:s}),ol:({children:s})=>S.jsx("ol",{className:W(e,`${H}-ol`),children:s}),li:({children:s})=>S.jsx("li",{className:W(e,`${H}-li`),children:s}),a:({href:s,children:a})=>S.jsx(db,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>S.jsx("div",{className:W(e,`${H}-table-container`),children:S.jsx("table",{className:W(e,`${H}-table`),children:s})}),thead:({children:s})=>S.jsx("thead",{className:W(e,`${H}-thead`),children:s}),tbody:({children:s})=>S.jsx("tbody",{className:W(e,`${H}-tbody`),children:s}),tr:({children:s})=>S.jsx("tr",{className:W(e,`${H}-tr`),children:s}),th:({children:s})=>S.jsx("th",{className:W(e,`${H}-th`),children:s}),td:({children:s})=>S.jsx("td",{className:W(e,`${H}-td`),children:s}),span:({className:s,children:a})=>s===`${H}-blinking-cursor`?S.jsx(fc,{}):S.jsx("span",{children:a})},children:r+(n?`<span className='${H}-blinking-cursor'></span>`:"")}),p9=({globalClassName:e,message:t})=>{const[n,r]=F.useState(!1),s=t.tool_name||t.toolName,a=!!t.thought,u=!!s,c=()=>{r(d=>!d)};return S.jsxs("div",{children:[S.jsxs("div",{className:W(e,`${H}-progress-message`,"standalone"),children:[S.jsx("span",{className:W(e,`${H}-message-icon`,"progress-icon","standalone"),children:S.jsx(O1,{})}),S.jsx("p",{className:W(e,`${H}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&S.jsxs(S.Fragment,{children:[S.jsx(ml,{className:W(e,`${H}-thought-context-button`),onClick:c,children:n?S.jsxs(S.Fragment,{children:["Hide ",S.jsx(zN,{})]}):S.jsxs(S.Fragment,{children:["Context ",S.jsx(jN,{})]})}),n&&S.jsx("div",{className:W(e,`${H}-thought-container`),children:a&&S.jsx("p",{className:W(e,`${H}-progress-thought`),children:t.thought})})]})]})},m9=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?S.jsx(p9,{globalClassName:e,message:t}):S.jsxs("div",{className:W(e,`${H}-progress-message`,"embedded"),title:t.message,children:[S.jsx("span",{className:W(e,`${H}-message-icon`,"progress-icon","embedded"),children:S.jsx(O1,{})}),S.jsx("i",{className:W(e,`${H}-progress-text`,"embedded"),children:t.message})]}),g9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var s;const r=(s=t.searchParams)==null?void 0:s.query;return S.jsxs("div",{className:W(e,`${H}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&S.jsxs("div",{className:W(e,`${H}-refined-event-query`,{embedded:!n,standalone:n}),children:[S.jsx("span",{className:W(e,`${H}-message-icon`,`${H}-refined-event-icon`,{embedded:!n,standalone:n}),children:S.jsx(Js,{role:"img"})}),S.jsx("p",{className:W(e,`${H}-text`,`${H}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),S.jsx(_p,{text:t.message})]})},H_=e=>{var d,f;const{configModule:t}=tt(),n=((d=e.request)==null?void 0:d.searchParams)||((f=e.request)==null?void 0:f.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:s={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(s).filter(([p])=>!r.includes(p))),u=Object.keys(a),c=Object.values(a).reduce((p,m)=>p+m.length,0);return{facetFiltersList:u,filterCount:c}},hc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>S.jsx("span",{className:W(t,`${H}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),z_=({globalClassName:e,message:t,facetFiltersList:n})=>{var a,u;if(!n.length)return null;const r=((a=t.request)==null?void 0:a.searchParams)||((u=t.request)==null?void 0:u.browseParams),s=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var f;const d=((f=s[c])==null?void 0:f.join(", "))||"";return S.jsxs("div",{className:W(e,`${H}-facets`),children:[S.jsx("p",{className:W(e,`${H}-facet-category`),children:c}),S.jsx("p",{className:W(e,`${H}-facet-values`),children:d})]},c)})},tu=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>S.jsx("span",{className:W(e,`${H}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),E9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:s}=t,{facetFiltersList:a,filterCount:u}=H_(t),c=new Date(s).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?S.jsxs("div",{className:W(e,`${H}-user-message standalone`),children:[S.jsxs("div",{className:W(e,`${H}-user-message-row standalone`),children:[d?S.jsx("img",{className:W(e,`${H}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):S.jsx("span",{className:W(e,`${H}-message-icon user-message-icon standalone`),children:S.jsx(R1,{})}),S.jsx("p",{className:W(e,`${H}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&S.jsx(hc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),S.jsx(z_,{globalClassName:e,facetFiltersList:a,message:t}),S.jsx(tu,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):S.jsxs("div",{className:W(e,`${H}-user-message embedded`),children:[S.jsxs("div",{className:W(e,`${H}-user-message-row embedded`),children:[d?S.jsx("img",{className:W(e,`${H}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):S.jsx("span",{className:W(e,`${H}-message-icon user-message-icon embedded`),children:S.jsx(R1,{})}),S.jsx("p",{className:W(e,`${H}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&S.jsx(hc,{isWidgetStandalone:!1,filterCount:u})]}),S.jsx(tu,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},y9=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:s,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>S.jsxs("div",{className:W(e,`${H}-user-search standalone`),children:[S.jsxs("div",{children:[S.jsxs("div",{className:W(e,`${H}-user-search-query standalone`),children:[d?S.jsx("img",{className:W(e,`${H}-user-search-image standalone`),src:d,alt:s||r,loading:"lazy"}):S.jsx("span",{className:W(e,`${H}-message-icon user-search-icon standalone`),children:S.jsx(Js,{})}),S.jsx("p",{className:W(e,`${H}-text bold`),children:`${n}: ${s||r}`}),u.length>0&&S.jsx(hc,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),S.jsx(z_,{globalClassName:e,facetFiltersList:u,message:a})]}),S.jsx(tu,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),b9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:s,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=H_(t),d=new Date(a).toLocaleString(),f=(y=r==null?void 0:r.attachments)==null?void 0:y.image,{actionLabel:p,query:m,queryLabel:T}=F.useMemo(()=>{var w,v,A;const _=typeof((w=r==null?void 0:r.clientContext)==null?void 0:w.cimLabel)=="string"?(v=r==null?void 0:r.clientContext)==null?void 0:v.cimLabel:r==null?void 0:r.label;switch(s){case"copilot_search":return{actionLabel:"Your search",query:r==null?void 0:r.searchParams.query,queryLabel:""};case"copilot_browse":return{actionLabel:"Browsing category",query:(A=r==null?void 0:r.browseParams)==null?void 0:A.categoryId,queryLabel:_||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:_||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[s,r]);return m?n?S.jsx(y9,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:T,facetFiltersList:u,filterCount:c}):S.jsxs("div",{className:W(e,`${H}-user-search embedded`),children:[S.jsxs("div",{className:W(e,`${H}-user-search-query embedded`),children:[f?S.jsx("img",{className:W(e,`${H}-user-search-image embedded`),src:f,alt:T||m,loading:"lazy"}):S.jsx("span",{className:W(e,`${H}-message-icon user-search-icon embedded`),children:S.jsx(Js,{})}),S.jsx("p",{className:W(e,`${H}-text bold embedded`),children:T||m}),u.length>0&&S.jsx(hc,{isWidgetStandalone:!1,filterCount:c})]}),S.jsx(tu,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},j_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:s,isWidgetStandalone:a,handleSuggestionClick:u})=>{var T;const{isLoading:c,isResponseLoading:d}=Ir(),f=c&&d((e==null?void 0:e.eventSourceId)||"")&&e.name==="partial_inquiry";if(!e)return null;const p=e.name,m=!!((T=e.request)!=null&&T.userPrompt);switch(p){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return m?S.jsx(E9,{globalClassName:t,isWidgetStandalone:a,message:e}):S.jsx(b9,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return S.jsx(g9,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return S.jsx(iM,{globalClassName:t,entryType:s,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return S.jsx(_p,{globalClassName:t,openLinksInNewTab:n,showIsLoading:f,text:e.message});case"error":return S.jsx(rM,{message:e,isWidgetStandalone:a});case"display_products":return S.jsx(nM,{message:e,isWidgetStandalone:a});case"progress":return S.jsx(m9,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return s==="ask_cim"?null:S.jsxs(S.Fragment,{children:[S.jsx("p",{className:W(t,`${H}-reset-message`),children:"This conversation has been reset."}),S.jsx("p",{className:W(t,`${H}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},T9=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:s}=tt(),{groupedMessages:a}=Vn(),{entryType:u}=tr();return S.jsxs(S.Fragment,{children:[u==="ask_cim"&&S.jsx(eM,{isWidgetStandalone:e}),a.map(c=>{if(c.messages&&c.type==="group"){let d=new Date(c.createdAt).toLocaleString();const f=c.messages[c.messages.length-1];return f&&(d=new Date(f.createdAt).toLocaleString()),S.jsxs("div",{className:W(n,`${H}-message-group`,e?"standalone":"embedded"),children:[c.messages.length>0&&c.messages.map(p=>S.jsx("div",{className:`${H}-message-group-child`,children:S.jsx(j_,{id:p.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),S.jsx(tu,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${c.eventSourceId}`)}else if(c.type==="individual"&&c.message)return S.jsx("div",{className:W(n,`${H}-message`,e?"standalone":"embedded",{error:c.message.name.includes("error")}),children:S.jsx(j_,{id:c.message.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:c.message,handleSuggestionClick:t})},c.message.id);return null})]})},_9=4e3,S9=e=>(typeof e=="string"?e:"").replace(/<[^>]*>/g," ").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/[`*_~#>|]+/g," ").replace(/\s+/g," ").trim().slice(0,_9),x9=({message:e,announcementKey:t})=>{const[n,r]=F.useState("");return F.useEffect(()=>{if(r(""),!e)return;const s=setTimeout(()=>r(e),100),a=setTimeout(()=>r(""),1e4);return()=>{clearTimeout(s),clearTimeout(a)}},[e,t]),S.jsx("span",{className:`${H}-visually-hidden`,role:"status","aria-atomic":"true",children:n})},w9=()=>{const{groupedMessages:e}=Vn(),n=e.flatMap(r=>{var s;return r.type==="group"?(s=r.messages)!=null?s:[]:r.message?[r.message]:[]}).reverse().find(r=>r.name==="inquiry"&&!r.bypassHandlers);return S.jsx(x9,{message:n?S9(n.message):"",announcementKey:n==null?void 0:n.id})},A9=({isOpen:e}={})=>{const{messages:t}=Ir(),{autoScroll:n}=tt(),r=F.useRef(null);return F.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[t,n]),F.useEffect(()=>{e&&r.current&&r.current.scrollIntoView(!0)},[e]),r},C9={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},Sp=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:s})=>{const a=A9({isOpen:e});return S.jsxs(S.Fragment,{children:[S.jsx(T9,{isWidgetStandalone:t,handleSuggestionClick:r}),S.jsx(w9,{}),n&&S.jsx("div",{style:B(B({},C9),s),children:S.jsx(fc,{})}),S.jsx("div",{ref:a})]})},$_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{copilot:r,isLoading:s,handleUserInput:a,handleSuggestion:u,resetConversation:c}=Ir();return dp()?r?S.jsxs("div",{className:W(e,`${H}-container`,`${H}-embedded-chat`),style:t,children:[S.jsx("div",{className:W(e,`${H}-message-container`,`container-${n}`,"embedded"),role:"region","aria-label":"Conversation",children:S.jsx(Sp,{isWidgetStandalone:!1,isLoading:s,handleSuggestionClick:u})}),S.jsx(Sh,{componentType:"chat",className:"embedded-chat",isLoading:s,onSubmit:a}),S.jsx("div",{className:W(`${H}-embedded-chat-menu`),children:S.jsxs(l8,{componentType:"chat",children:[S.jsx(l_,{componentType:"chat"}),S.jsx(pb,{componentType:"chat",onClearChat:c})]})})]}):S.jsx("div",{children:"Loading Copilot..."}):null},V_=e=>{var d;const{children:t,disabled:n}=e,[r,s]=F.useState((d=e.container)==null?void 0:d.current),a=F.useSyncExternalStore(N9,()=>!1,()=>!0),{getRootNode:u}=ac();if(F.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return S.jsx(S.Fragment,{children:t});const c=r!=null?r:v9(u);return S.jsx(S.Fragment,{children:F.Children.map(t,f=>Qs.createPortal(f,c))})},v9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return ms(n)?n:Mr(t).body},N9=()=>()=>{},q_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:c}=tr(),{copilot:d,isLoading:f,handleUserInput:p,handleSuggestion:m,resetConversation:T}=Ir(),y=dp(),{isOpen:_}=s||{},w=r==="standalone",v=()=>{ni(!1),Nf()};return y?d?S.jsx(i_,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:y,initialFocusEl:vf,children:S.jsx(V_,{children:S.jsx(ap,{className:W(e,`${H}-container`,`${H}-dialog`,a,u&&"full-height"),style:B(B({},t),c&&{width:c}),children:S.jsxs(sp,{className:W(e,`${H}-dialog-content`,{standalone:w,embedded:!w}),children:[S.jsx(u_,{componentType:"dialog",onClearChat:T,onClose:v}),S.jsx(op,{className:W(e,`${H}-message-container`,`container-${n}`,{standalone:w,embedded:!w}),role:"region","aria-label":"Conversation",children:S.jsx(Sp,{isWidgetStandalone:w,isLoading:f,isOpen:_,handleSuggestionClick:m})}),S.jsx(Sh,{componentType:"dialog",isLoading:f,onSubmit:p})]})})})}):S.jsx("div",{children:"Loading Copilot..."}):null},Y_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{mode:r,status:s,isModalFullscreen:a}=tr(),{copilot:u,isLoading:c,handleUserInput:d,handleSuggestion:f,resetConversation:p}=Ir(),{isOpen:m}=s||{},T=r==="standalone",y=dp(),_=({open:v})=>{if(v){ni(!0);return}w()},w=()=>{ni(!1),Nf()};return y?u?S.jsx(i_,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:_,initialFocusEl:vf,children:S.jsx(V_,{children:S.jsxs("div",{className:W(e,`${H}-modal-container`),style:t,children:[S.jsx(ZT,{className:W(e,`${H}-modal-backdrop`)}),S.jsx(ap,{className:W(e,`${H}-container`,`${H}-modal`,{fullscreen:a,standalone:T,embedded:!T}),children:S.jsxs(sp,{className:W(e,`${H}-modal-content`,{standalone:T,embedded:!T}),children:[S.jsx(u_,{componentType:"modal",onClearChat:p,onClose:w}),S.jsx(op,{className:W(e,`${H}-message-container`,`container-${n}`,{standalone:T,embedded:!T}),role:"region","aria-label":"Conversation",children:S.jsx(Sp,{isWidgetStandalone:T,isLoading:c,isOpen:m,handleSuggestionClick:f,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),S.jsx(Sh,{componentType:"modal",isLoading:c,onSubmit:d})]})})]})})}):S.jsx("div",{children:"Loading Copilot..."}):null},k9=()=>{const e=tr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?S.jsx(UN,{}):t==="dialog"?S.jsx(q_,{}):t==="modal"?S.jsx(Y_,{}):S.jsx($_,{})},P9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=xf();F.useEffect(()=>{const a=u=>{const{property:c,value:d}=u.detail||{};!c||d===void 0||(c==="isOpen"&&e(d),c==="isInline"&&t(d),c==="elementId"&&n(d),c==="entryType"&&r(d),c==="params"&&s(d))};return Wv(a),()=>{Gv(a)}},[e,t,n,r,s])},O9=()=>{const{copilot:e}=Vn(),{entryType:t,activePromptsId:n,params:r}=ri(),{setIsInitialized:s,setActivePromptsId:a,setPromptsMessage:u,setResponseMessage:c,setIsResponseLoading:d}=xf(),{getCopilotSuggestions:f}=b1();P9();const p=F.useCallback(_=>{if(!t||!_)return;f(_,t,v=>{a(v.id)})},[t,f,a]);F.useEffect(()=>{!e||!t||!r||p(r)},[e,t,r,p]);const m=F.useCallback(_=>{_.eventSourceId===n&&(u(_),a(_.id),s(!0))},[n,u,a,s]),T=F.useCallback(_=>{(_==null?void 0:_.eventSourceId)===n&&(c(_),d(!1))},[n,c,d]),y=F.useCallback(()=>{s(!0),d(!1)},[s,d]);return F.useEffect(()=>{if(e)return e.on("follow_up",m),e.on("inquiry",T),e.on("error",y),()=>{e.off("follow_up",m),e.off("inquiry",T),e.off("error",y)}},[e,m,T,y]),null},W_={copilot:"Ask Copilot",messaging:"Ask a question"},I9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=tt(),{placeholder:s,isResponseLoading:a}=ri(),u=s||W_[r],[c,d]=F.useState(""),f=t||a,p=m=>{const T=c.trim();T&&(m.preventDefault(),e(T),d(""))};return S.jsxs("form",{className:W(n,`${H}-prompts-input-container`),name:`${H}-prompts-form`,onSubmit:p,children:[S.jsx("label",{htmlFor:`${H}-prompts-input`,"aria-label":u,children:S.jsx(ip,{className:W(n,`${H}-prompts-input-icon`)})}),S.jsx("input",{id:`${H}-prompts-input`,className:W(n,`${H}-prompts-input`),name:`${H}-prompts-input`,placeholder:u,type:"text",disabled:f,value:c,onChange:m=>d(m.target.value)}),S.jsx(ii,{className:W(n,`${H}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:S.jsx(Js,{}),disabled:f})]})},R9=()=>{const{globalClassName:e,mode:t}=tt(),{placeholder:n}=ri(),r=n||W_[t];return S.jsxs("div",{className:W(e,`${H}-prompts-header`),children:[S.jsx(ip,{className:W(e,`${H}-prompts-input-icon`),"aria-hidden":"true"}),S.jsx("span",{className:W(e,`${H}-prompts-header-text`),children:r})]})},G_=({label:e,disabled:t=!1,onClick:n})=>{var c;const{globalClassName:r,suggestionButtonConfig:s}=tt(),a=s==null?void 0:s.icon,u=(c=s==null?void 0:s.iconPosition)!=null?c:"left";return S.jsxs("button",{className:W(r,`${H}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&S.jsx(fp,{icon:a,className:`${H}-suggestion-button-icon`}),S.jsx("span",{children:e})]})},L9="Ask me something else",D9=({label:e,disabled:t=!1})=>S.jsx(G_,{label:e||L9,disabled:t,onClick:()=>ni(!0)}),M9=({sendCopilotPrompt:e})=>{var v,A;const{globalClassName:t}=tt(),{promptsMessage:n,isResponseLoading:r,isInitialized:s,isInline:a,askElseButtonLabel:u,staticQuestions:c,staticQuestionsStrategy:d,disableAskElseButton:f}=ri(),p=s?(A=(v=n==null?void 0:n.suggestions)==null?void 0:v.map(N=>N.displayText.trim()).filter(Boolean))!=null?A:[]:[],m=s?B0(p,c,d):[],T=!s,_=m.length>0&&!a&&!f,w=N=>()=>{const C=N.trim();C&&e(C)};return S.jsxs("div",{className:W(t,`${H}-prompts-button-group`),children:[T&&S.jsx(fc,{}),m.map(N=>S.jsx(G_,{label:N,disabled:r,onClick:w(N)},N)),_&&S.jsx(D9,{label:u,disabled:r})]})},F9=()=>{const{globalClassName:e}=tt(),{isInline:t,userPrompt:n}=ri();return!n||!t?null:S.jsx("div",{className:W(e,`${H}-prompts-user-message-container`),children:S.jsx("p",{className:W(e,`${H}-prompts-user-message`),children:n})})},B9=()=>{const{globalClassName:e,openLinksInNewTab:t}=tt(),{isInline:n,responseMessage:r,isResponseLoading:s}=ri();return!n||!r&&!s?null:s?S.jsx(fc,{}):r?S.jsx("div",{className:W(e,`${H}-prompts-response-container`,`${H}-message-container`),children:S.jsx(_p,{globalClassName:e,openLinksInNewTab:t,text:r.message})}):null},U9=()=>{const{globalClassName:e,themeVariables:t}=tt(),{connected:n,copilot:r}=Vn(),{handleCopilotRequestAck:s}=Ks(),{status:{isOpen:a}}=tr(),{isOpen:u,isInline:c,elementId:d,entryType:f,params:p,promptsDisplay:m}=ri(),T=m!=="buttons",y=m!=="input",{setActivePromptsId:_,setUserPrompt:w,setResponseMessage:v,setIsResponseLoading:A}=xf(),[N,C]=F.useState(null);F.useEffect(()=>{if(!d||N)return;const Y=document.getElementById(d);Y&&C(Y)},[d,N]);const z=F.useCallback(Y=>{if(!r||!f||!p)return;const D=ne=>{c?(v(null),w(Y),_(ne.id),A(!0)):(a||ni(!0),s(ne))},q={userPrompt:Y,clientContext:B({_cimEventSource:"prompts-extension"},c?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(q,D);break;case"search":r.search(B({searchParams:p},q),D);break;case"browse":r.browse(B({browseParams:p},q),D);break;case"pdp":r.productView(B(B({},p),q),D);break}},[r,c,f,p,a,_,v,w,A,s]);return!n||!u||!N||!f?null:Qs.createPortal(S.jsxs("div",{className:W(e,`${H}-prompts-extension-container`),style:t,children:[T&&S.jsx(I9,{onSubmit:z}),!T&&S.jsx(R9,{}),y&&S.jsx(M9,{sendCopilotPrompt:z}),S.jsxs("div",{className:W(e,`${H}-prompts-extension-messages-container`),children:[S.jsx(F9,{}),S.jsx(B9,{})]})]}),N)},H9=()=>S.jsxs(S.Fragment,{children:[S.jsx(O9,{}),S.jsx(U9,{})]}),xp=e=>S.jsxs(T1,fe(B({},e),{children:[S.jsx(k9,{}),S.jsx(H9,{})]}));var pc={},X_;function z9(){if(X_)return pc;X_=1;var e=A1();return pc.createRoot=e.createRoot,pc.hydrateRoot=e.hydrateRoot,pc}var K_=z9();const j9=r=>{var s=r,{elementId:e,timeout:t=5e3}=s,n=fn(s,["elementId","timeout"]);let a;const u=(d,f)=>{var p;for(const m of d)if(m.type==="childList"&&m.addedNodes.length)for(const T of m.addedNodes)T.nodeType===Node.ELEMENT_NODE&&T.id===e&&(Xs(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=K_.createRoot(T))==null||p.render(S.jsx(xp,B({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Xs(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},$9=r=>{var s=r,{timeout:e,elementId:t}=s,n=fn(s,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Xs(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Xs(!0,"warn","Container element not found for id:",t),Xs(!0,"warn","Beginning observation for element"),j9(B({elementId:t,timeout:e},n));return}K_.createRoot(a).render(S.jsx(xp,B({},n)))},V9={search:oN,browse:jv,pdp:{setPdpContext:s1,updatePdpProductId:Vv,updatePdpLink:qv},components:{setEntryType:pa,toggleWidgetOpen:ni,toggleWidgetMinimized:ma,toggleModalFullscreen:bf,setWidgetType:fl,setWidgetDialogPosition:Tf,togglePromptsExtensionOpen:o1,togglePromptsExtensionInline:a1,loadPromptsComponent:Zv,getAskCimPrompts:Xv,getSearchPrompts:Kv,getBrowsePrompts:Qv,getProductViewPrompts:Jv},session:eN},q9=()=>Object.freeze({search:Object.freeze(Tt.state),browse:Object.freeze(at.state),pdp:Object.freeze(mr.state),isConnected:Je.state.connected,isOpen:Je.isOpen,entryType:Je.entryType});De.CopilotDialog=q_,De.CopilotEmbed=$_,De.CopilotModal=Y_,De.CopilotWidget=xp,De.CopilotWidgetProvider=T1,De.eventHandlers=V9,De.injectCopilotWidget=$9,De.state=q9,De.useCopilot=Ir,Object.defineProperty(De,Symbol.toStringTag,{value:"Module"})}));
45
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:T,table:u,tableCell:d,tableRow:c}};function u(y,_,w,v){return f(p(y,w,v),y.align)}function c(y,_,w,v){const A=m(y,w,v),k=f([A]);return k.slice(0,k.indexOf(`
46
+ `))}function d(y,_,w,v){const A=w.enter("tableCell"),k=w.enter("phrasing"),C=w.containerPhrasing(y,fe(B({},v),{before:a,after:a}));return k(),A(),C}function f(y,_){return zM(y,{align:_,alignDelimiters:r,padding:n,stringLength:s})}function p(y,_,w){const v=y.children;let A=-1;const k=[],C=_.enter("table");for(;++A<v.length;)k[A]=m(v[A],_,w);return C(),k}function m(y,_,w){const v=y.children;let A=-1;const k=[],C=_.enter("tableRow");for(;++A<v.length;)k[A]=d(v[A],y,_,w);return C(),k}function T(y,_,w){let v=N_.inlineCode(y,_,w);return w.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function NF(){return{exit:{taskListCheckValueChecked:P_,taskListCheckValueUnchecked:P_,paragraph:PF}}}function kF(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:OF}}}function P_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function PF(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let a=-1,u;for(;++a<s.length;){const c=s[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function OF(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=N_.listItem(e,t,n,B(B({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function IF(){return[cM(),OM(),DM(),_F(),NF()]}function RF(e){return{extensions:[dM(),IM(e),MM(),vF(e),kF()]}}const LF={tokenize:HF,partial:!0},O_={tokenize:zF,partial:!0},I_={tokenize:jF,partial:!0},R_={tokenize:$F,partial:!0},DF={tokenize:VF,partial:!0},L_={name:"wwwAutolink",tokenize:BF,previous:M_},D_={name:"protocolAutolink",tokenize:UF,previous:F_},ci={name:"emailAutolink",tokenize:FF,previous:B_},$r={};function MF(){return{text:$r}}let xs=48;for(;xs<123;)$r[xs]=ci,xs++,xs===58?xs=65:xs===91&&(xs=97);$r[43]=ci,$r[45]=ci,$r[46]=ci,$r[95]=ci,$r[72]=[ci,D_],$r[104]=[ci,D_],$r[87]=[ci,L_],$r[119]=[ci,L_];function FF(e,t,n){const r=this;let s,a;return u;function u(m){return!bp(m)||!B_.call(r,r.previous)||Tp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return bp(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(DF,p,f)(m):m===45||m===95||En(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),s=!0,d}function p(m){return a&&s&&Cn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function BF(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!M_.call(r,r.previous)||Tp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(LF,e.attempt(O_,e.attempt(I_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function UF(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&F_.call(r,r.previous)&&!Tp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(Cn(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const T=s.toLowerCase();if(T==="http"||T==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||yl(m)||ht(m)||as(m)||bl(m)?n(m):e.attempt(O_,e.attempt(I_,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function HF(e,t,n){let r=0;return s;function s(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),s):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function zF(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(R_,d,c)(f):f===null||ht(f)||as(f)||f!==45&&bl(f)?d(f):(a=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),u}function d(f){return s||r||!a?n(f):t(f)}}function jF(e,t){let n=0,r=0;return s;function s(u){return u===40?(n++,e.consume(u),s):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(R_,t,a)(u):u===null||ht(u)||as(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function $F(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),s):c===60||c===null||ht(c)||as(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||ht(c)||as(c)?t(c):r(c)}function a(c){return Cn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):Cn(c)?(e.consume(c),u):n(c)}}function VF(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return En(a)?n(a):t(a)}}function M_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ht(e)}function F_(e){return!Cn(e)}function B_(e){return!(e===47||bp(e))}function bp(e){return e===43||e===45||e===46||e===95||En(e)}function Tp(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 qF={tokenize:ZF,partial:!0};function YF(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:KF,continuation:{tokenize:QF},exit:JF}},text:{91:{name:"gfmFootnoteCall",tokenize:XF},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:WF,resolveTo:GF}}}}function WF(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const f=gr(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function GF(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function XF(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!u||m===null||m===91||ht(m))return n(m);if(m===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return s.includes(gr(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return ht(m)||(u=!0),a++,e.consume(m),m===92?p:f}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function KF(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(_)}function p(_){if(u>999||_===93&&!c||_===null||_===91||ht(_))return n(_);if(_===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=gr(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return ht(_)||(c=!0),u++,e.consume(_),_===92?m:p}function m(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function T(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),s.includes(a)||s.push(a),nt(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function QF(e,t,n){return e.check(Ca,t,e.attempt(qF,t,n))}function JF(e){e.exit("gfmFootnoteDefinition")}function ZF(e,t,n){const r=this;return nt(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function e9(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},T=[["enter",p,c],["enter",u[f][1],c],["exit",u[f][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&Yn(T,T.length,0,Tl(y,u.slice(f+1,d),c)),Yn(T,T.length,0,[["exit",m,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),Yn(u,f-1,d-f+3,T),d=f+T.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,c,d){const f=this.previous,p=this.events;let m=0;return T;function T(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),y(_))}function y(_){const w=no(f);if(_===126)return m>1?d(_):(u.consume(_),m++,y);if(m<2&&!n)return d(_);const v=u.exit("strikethroughSequenceTemporary"),A=no(_);return v._open=!A||A===2&&!!w,v._close=!w||w===2&&!!A,c(_)}}}class t9{constructor(){this.map=[]}add(t,n,r){n9(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function n9(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function r9(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function i9(){return{flow:{null:{name:"table",tokenize:s9,resolveAll:o9}}}}function s9(e,t,n){const r=this;let s=0,a=0,u;return c;function c(V){let se=r.events.length-1;for(;se>-1;){const re=r.events[se][1].type;if(re==="lineEnding"||re==="linePrefix")se--;else break}const pe=se>-1?r.events[se][1].type:null,ve=pe==="tableHead"||pe==="tableRow"?D:d;return ve===D&&r.parser.lazy[r.now().line]?n(V):ve(V)}function d(V){return e.enter("tableHead"),e.enter("tableRow"),f(V)}function f(V){return V===124||(u=!0,a+=1),p(V)}function p(V){return V===null?n(V):Ue(V)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),y):n(V):Ze(V)?nt(e,p,"whitespace")(V):(a+=1,u&&(u=!1,s+=1),V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(V)))}function m(V){return V===null||V===124||ht(V)?(e.exit("data"),p(V)):(e.consume(V),V===92?T:m)}function T(V){return V===92||V===124?(e.consume(V),m):m(V)}function y(V){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(V):(e.enter("tableDelimiterRow"),u=!1,Ze(V)?nt(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):_(V))}function _(V){return V===45||V===58?v(V):V===124?(u=!0,e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),w):Y(V)}function w(V){return Ze(V)?nt(e,v,"whitespace")(V):v(V)}function v(V){return V===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),A):V===45?(a+=1,A(V)):V===null||Ue(V)?z(V):Y(V)}function A(V){return V===45?(e.enter("tableDelimiterFiller"),k(V)):Y(V)}function k(V){return V===45?(e.consume(V),k):V===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(V))}function C(V){return Ze(V)?nt(e,z,"whitespace")(V):z(V)}function z(V){return V===124?_(V):V===null||Ue(V)?!u||s!==a?Y(V):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(V)):Y(V)}function Y(V){return n(V)}function D(V){return e.enter("tableRow"),q(V)}function q(V){return V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),q):V===null||Ue(V)?(e.exit("tableRow"),t(V)):Ze(V)?nt(e,q,"whitespace")(V):(e.enter("data"),ne(V))}function ne(V){return V===null||V===124||ht(V)?(e.exit("data"),q(V)):(e.consume(V),V===92?ue:ne)}function ue(V){return V===92||V===124?(e.consume(V),ne):ne(V)}}function o9(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,p,m;const T=new t9;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(U_(T,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},T.add(n,0,[["enter",f,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},T.add(n,0,[["enter",p,t]])),s=_.type==="tableDelimiterRow"?2:p?3:1):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=dc(T,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=dc(T,t,a,s,void 0,m)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(c=!0,d=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=dc(T,t,a,s,n,m)):u[1]!==0&&(m=dc(T,t,u,s,n,m)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&U_(T,t,d,f,p),T.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=r9(t.events,n))}return e}function dc(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},vo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=vo(t.events,n[1]);if(a={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=vo(t.events,n[2]),p=vo(t.events,n[3]),m={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const 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 _=n[2]+1,w=n[3]-n[2]-1;e.add(_,w,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},vo(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function U_(e,t,n,r,s){const a=[],u=vo(t.events,n);s&&(s.end=Object.assign({},u),a.push(["exit",s,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function vo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const a9={name:"tasklistCheck",tokenize:l9};function u9(){return{text:{91:a9}}}function l9(e,t,n){const r=this;return s;function s(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return ht(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 Ue(d)?t(d):Ze(d)?e.check({tokenize:c9},t,n)(d):n(d)}}function c9(e,t,n){return nt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function d9(e){return fE([MF(),YF(),e9(e),i9(),u9()])}const f9={};function h9(e){const t=this,n=e||f9,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(d9(n)),a.push(IF()),u.push(RF(n))}const fc=()=>S.jsx("span",{className:`${H}-blinking-cursor`,children:S.jsx("svg",{"aria-hidden":"true",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:S.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),_p=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>S.jsx(ry,{remarkPlugins:[h9],rehypePlugins:[ib],components:{h1:({children:s})=>S.jsx("h1",{className:W(e,`${H}-header h1`),children:s}),h2:({children:s})=>S.jsx("h2",{className:W(e,`${H}-header h2`),children:s}),h3:({children:s})=>S.jsx("h3",{className:W(e,`${H}-header h3`),children:s}),ul:({children:s})=>S.jsx("ul",{className:W(e,`${H}-ul`),children:s}),ol:({children:s})=>S.jsx("ol",{className:W(e,`${H}-ol`),children:s}),li:({children:s})=>S.jsx("li",{className:W(e,`${H}-li`),children:s}),a:({href:s,children:a})=>S.jsx(db,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>S.jsx("div",{className:W(e,`${H}-table-container`),children:S.jsx("table",{className:W(e,`${H}-table`),children:s})}),thead:({children:s})=>S.jsx("thead",{className:W(e,`${H}-thead`),children:s}),tbody:({children:s})=>S.jsx("tbody",{className:W(e,`${H}-tbody`),children:s}),tr:({children:s})=>S.jsx("tr",{className:W(e,`${H}-tr`),children:s}),th:({children:s})=>S.jsx("th",{className:W(e,`${H}-th`),children:s}),td:({children:s})=>S.jsx("td",{className:W(e,`${H}-td`),children:s}),span:({className:s,children:a})=>s===`${H}-blinking-cursor`?S.jsx(fc,{}):S.jsx("span",{children:a})},children:r+(n?`<span className='${H}-blinking-cursor'></span>`:"")}),p9=({globalClassName:e,message:t})=>{const[n,r]=F.useState(!1),s=t.tool_name||t.toolName,a=!!t.thought,u=!!s,c=()=>{r(d=>!d)};return S.jsxs("div",{children:[S.jsxs("div",{className:W(e,`${H}-progress-message`,"standalone"),children:[S.jsx("span",{className:W(e,`${H}-message-icon`,"progress-icon","standalone"),children:S.jsx(O1,{})}),S.jsx("p",{className:W(e,`${H}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&S.jsxs(S.Fragment,{children:[S.jsx(ml,{className:W(e,`${H}-thought-context-button`),onClick:c,children:n?S.jsxs(S.Fragment,{children:["Hide ",S.jsx(zN,{})]}):S.jsxs(S.Fragment,{children:["Context ",S.jsx(jN,{})]})}),n&&S.jsx("div",{className:W(e,`${H}-thought-container`),children:a&&S.jsx("p",{className:W(e,`${H}-progress-thought`),children:t.thought})})]})]})},m9=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?S.jsx(p9,{globalClassName:e,message:t}):S.jsxs("div",{className:W(e,`${H}-progress-message`,"embedded"),title:t.message,children:[S.jsx("span",{className:W(e,`${H}-message-icon`,"progress-icon","embedded"),children:S.jsx(O1,{})}),S.jsx("i",{className:W(e,`${H}-progress-text`,"embedded"),children:t.message})]}),g9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var s;const r=(s=t.searchParams)==null?void 0:s.query;return S.jsxs("div",{className:W(e,`${H}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&S.jsxs("div",{className:W(e,`${H}-refined-event-query`,{embedded:!n,standalone:n}),children:[S.jsx("span",{className:W(e,`${H}-message-icon`,`${H}-refined-event-icon`,{embedded:!n,standalone:n}),children:S.jsx(Js,{role:"img"})}),S.jsx("p",{className:W(e,`${H}-text`,`${H}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),S.jsx(_p,{text:t.message})]})},H_=e=>{var d,f;const{configModule:t}=tt(),n=((d=e.request)==null?void 0:d.searchParams)||((f=e.request)==null?void 0:f.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:s={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(s).filter(([p])=>!r.includes(p))),u=Object.keys(a),c=Object.values(a).reduce((p,m)=>p+m.length,0);return{facetFiltersList:u,filterCount:c}},hc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>S.jsx("span",{className:W(t,`${H}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),z_=({globalClassName:e,message:t,facetFiltersList:n})=>{var a,u;if(!n.length)return null;const r=((a=t.request)==null?void 0:a.searchParams)||((u=t.request)==null?void 0:u.browseParams),s=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var f;const d=((f=s[c])==null?void 0:f.join(", "))||"";return S.jsxs("div",{className:W(e,`${H}-facets`),children:[S.jsx("p",{className:W(e,`${H}-facet-category`),children:c}),S.jsx("p",{className:W(e,`${H}-facet-values`),children:d})]},c)})},tu=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>S.jsx("span",{className:W(e,`${H}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),E9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:s}=t,{facetFiltersList:a,filterCount:u}=H_(t),c=new Date(s).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?S.jsxs("div",{className:W(e,`${H}-user-message standalone`),children:[S.jsxs("div",{className:W(e,`${H}-user-message-row standalone`),children:[d?S.jsx("img",{className:W(e,`${H}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):S.jsx("span",{className:W(e,`${H}-message-icon user-message-icon standalone`),children:S.jsx(R1,{})}),S.jsx("p",{className:W(e,`${H}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&S.jsx(hc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),S.jsx(z_,{globalClassName:e,facetFiltersList:a,message:t}),S.jsx(tu,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):S.jsxs("div",{className:W(e,`${H}-user-message embedded`),children:[S.jsxs("div",{className:W(e,`${H}-user-message-row embedded`),children:[d?S.jsx("img",{className:W(e,`${H}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):S.jsx("span",{className:W(e,`${H}-message-icon user-message-icon embedded`),children:S.jsx(R1,{})}),S.jsx("p",{className:W(e,`${H}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&S.jsx(hc,{isWidgetStandalone:!1,filterCount:u})]}),S.jsx(tu,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},y9=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:s,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>S.jsxs("div",{className:W(e,`${H}-user-search standalone`),children:[S.jsxs("div",{children:[S.jsxs("div",{className:W(e,`${H}-user-search-query standalone`),children:[d?S.jsx("img",{className:W(e,`${H}-user-search-image standalone`),src:d,alt:s||r,loading:"lazy"}):S.jsx("span",{className:W(e,`${H}-message-icon user-search-icon standalone`),children:S.jsx(Js,{})}),S.jsx("p",{className:W(e,`${H}-text bold`),children:`${n}: ${s||r}`}),u.length>0&&S.jsx(hc,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),S.jsx(z_,{globalClassName:e,facetFiltersList:u,message:a})]}),S.jsx(tu,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),b9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:s,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=H_(t),d=new Date(a).toLocaleString(),f=(y=r==null?void 0:r.attachments)==null?void 0:y.image,{actionLabel:p,query:m,queryLabel:T}=F.useMemo(()=>{var w,v,A;const _=typeof((w=r==null?void 0:r.clientContext)==null?void 0:w.cimLabel)=="string"?(v=r==null?void 0:r.clientContext)==null?void 0:v.cimLabel:r==null?void 0:r.label;switch(s){case"copilot_search":return{actionLabel:"Your search",query:r==null?void 0:r.searchParams.query,queryLabel:""};case"copilot_browse":return{actionLabel:"Browsing category",query:(A=r==null?void 0:r.browseParams)==null?void 0:A.categoryId,queryLabel:_||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:_||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[s,r]);return m?n?S.jsx(y9,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:T,facetFiltersList:u,filterCount:c}):S.jsxs("div",{className:W(e,`${H}-user-search embedded`),children:[S.jsxs("div",{className:W(e,`${H}-user-search-query embedded`),children:[f?S.jsx("img",{className:W(e,`${H}-user-search-image embedded`),src:f,alt:T||m,loading:"lazy"}):S.jsx("span",{className:W(e,`${H}-message-icon user-search-icon embedded`),children:S.jsx(Js,{})}),S.jsx("p",{className:W(e,`${H}-text bold embedded`),children:T||m}),u.length>0&&S.jsx(hc,{isWidgetStandalone:!1,filterCount:c})]}),S.jsx(tu,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},j_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:s,isWidgetStandalone:a,handleSuggestionClick:u})=>{var T;const{isLoading:c,isResponseLoading:d}=Ir(),f=c&&d((e==null?void 0:e.eventSourceId)||"")&&e.name==="partial_inquiry";if(!e)return null;const p=e.name,m=!!((T=e.request)!=null&&T.userPrompt);switch(p){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return m?S.jsx(E9,{globalClassName:t,isWidgetStandalone:a,message:e}):S.jsx(b9,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return S.jsx(g9,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return S.jsx(iM,{globalClassName:t,entryType:s,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return S.jsx(_p,{globalClassName:t,openLinksInNewTab:n,showIsLoading:f,text:e.message});case"error":return S.jsx(rM,{message:e,isWidgetStandalone:a});case"display_products":return S.jsx(nM,{message:e,isWidgetStandalone:a});case"progress":return S.jsx(m9,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return s==="ask_cim"?null:S.jsxs(S.Fragment,{children:[S.jsx("p",{className:W(t,`${H}-reset-message`),children:"This conversation has been reset."}),S.jsx("p",{className:W(t,`${H}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},T9=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:s}=tt(),{groupedMessages:a}=Vn(),{entryType:u}=tr();return S.jsxs(S.Fragment,{children:[u==="ask_cim"&&S.jsx(eM,{isWidgetStandalone:e}),a.map(c=>{if(c.messages&&c.type==="group"){let d=new Date(c.createdAt).toLocaleString();const f=c.messages[c.messages.length-1];return f&&(d=new Date(f.createdAt).toLocaleString()),S.jsxs("div",{className:W(n,`${H}-message-group`,e?"standalone":"embedded"),children:[c.messages.length>0&&c.messages.map(p=>S.jsx("div",{className:`${H}-message-group-child`,children:S.jsx(j_,{id:p.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),S.jsx(tu,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${c.eventSourceId}`)}else if(c.type==="individual"&&c.message)return S.jsx("div",{className:W(n,`${H}-message`,e?"standalone":"embedded",{error:c.message.name.includes("error")}),children:S.jsx(j_,{id:c.message.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:c.message,handleSuggestionClick:t})},c.message.id);return null})]})},_9=4e3,S9=e=>(typeof e=="string"?e:"").replace(/<[^>]*>/g," ").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/[`*_~#>|]+/g," ").replace(/\s+/g," ").trim().slice(0,_9),x9=({message:e,announcementKey:t})=>{const[n,r]=F.useState("");return F.useEffect(()=>{if(r(""),!e)return;const s=setTimeout(()=>r(e),100),a=setTimeout(()=>r(""),1e4);return()=>{clearTimeout(s),clearTimeout(a)}},[e,t]),S.jsx("span",{className:`${H}-visually-hidden`,role:"status","aria-atomic":"true",children:n})},w9=()=>{const{groupedMessages:e}=Vn(),n=e.flatMap(r=>{var s;return r.type==="group"?(s=r.messages)!=null?s:[]:r.message?[r.message]:[]}).reverse().find(r=>r.name==="inquiry"&&!r.bypassHandlers);return S.jsx(x9,{message:n?S9(n.message):"",announcementKey:n==null?void 0:n.id})},A9=({isOpen:e}={})=>{const{messages:t}=Ir(),{autoScroll:n}=tt(),r=F.useRef(null);return F.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[t,n]),F.useEffect(()=>{e&&r.current&&r.current.scrollIntoView(!0)},[e]),r},C9={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},Sp=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:s})=>{const a=A9({isOpen:e});return S.jsxs(S.Fragment,{children:[S.jsx(T9,{isWidgetStandalone:t,handleSuggestionClick:r}),S.jsx(w9,{}),n&&S.jsx("div",{style:B(B({},C9),s),children:S.jsx(fc,{})}),S.jsx("div",{ref:a})]})},$_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{copilot:r,isLoading:s,handleUserInput:a,handleSuggestion:u,resetConversation:c}=Ir();return dp()?r?S.jsxs("div",{className:W(e,`${H}-container`,`${H}-embedded-chat`),style:t,children:[S.jsx("div",{className:W(e,`${H}-message-container`,`container-${n}`,"embedded"),role:"region","aria-label":"Conversation",children:S.jsx(Sp,{isWidgetStandalone:!1,isLoading:s,handleSuggestionClick:u})}),S.jsx(Sh,{componentType:"chat",className:"embedded-chat",isLoading:s,onSubmit:a}),S.jsx("div",{className:W(`${H}-embedded-chat-menu`),children:S.jsxs(l8,{componentType:"chat",children:[S.jsx(l_,{componentType:"chat"}),S.jsx(pb,{componentType:"chat",onClearChat:c})]})})]}):S.jsx("div",{children:"Loading Copilot..."}):null},V_=e=>{var d;const{children:t,disabled:n}=e,[r,s]=F.useState((d=e.container)==null?void 0:d.current),a=F.useSyncExternalStore(N9,()=>!1,()=>!0),{getRootNode:u}=ac();if(F.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return S.jsx(S.Fragment,{children:t});const c=r!=null?r:v9(u);return S.jsx(S.Fragment,{children:F.Children.map(t,f=>Qs.createPortal(f,c))})},v9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return ms(n)?n:Mr(t).body},N9=()=>()=>{},q_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:c}=tr(),{copilot:d,isLoading:f,handleUserInput:p,handleSuggestion:m,resetConversation:T}=Ir(),y=dp(),{isOpen:_}=s||{},w=r==="standalone",v=()=>{ni(!1),Nf()};return y?d?S.jsx(i_,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:y,initialFocusEl:vf,children:S.jsx(V_,{children:S.jsx(ap,{className:W(e,`${H}-container`,`${H}-dialog`,a,u&&"full-height"),style:B(B({},t),c&&{width:c}),children:S.jsxs(sp,{className:W(e,`${H}-dialog-content`,{standalone:w,embedded:!w}),children:[S.jsx(u_,{componentType:"dialog",onClearChat:T,onClose:v}),S.jsx(op,{className:W(e,`${H}-message-container`,`container-${n}`,{standalone:w,embedded:!w}),role:"region","aria-label":"Conversation",children:S.jsx(Sp,{isWidgetStandalone:w,isLoading:f,isOpen:_,handleSuggestionClick:m})}),S.jsx(Sh,{componentType:"dialog",isLoading:f,onSubmit:p})]})})})}):S.jsx("div",{children:"Loading Copilot..."}):null},Y_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{mode:r,status:s,isModalFullscreen:a}=tr(),{copilot:u,isLoading:c,handleUserInput:d,handleSuggestion:f,resetConversation:p}=Ir(),{isOpen:m}=s||{},T=r==="standalone",y=dp(),_=({open:v})=>{if(v){ni(!0);return}w()},w=()=>{ni(!1),Nf()};return y?u?S.jsx(i_,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:_,initialFocusEl:vf,children:S.jsx(V_,{children:S.jsxs("div",{className:W(e,`${H}-modal-container`),style:t,children:[S.jsx(ZT,{className:W(e,`${H}-modal-backdrop`)}),S.jsx(ap,{className:W(e,`${H}-container`,`${H}-modal`,{fullscreen:a,standalone:T,embedded:!T}),children:S.jsxs(sp,{className:W(e,`${H}-modal-content`,{standalone:T,embedded:!T}),children:[S.jsx(u_,{componentType:"modal",onClearChat:p,onClose:w}),S.jsx(op,{className:W(e,`${H}-message-container`,`container-${n}`,{standalone:T,embedded:!T}),role:"region","aria-label":"Conversation",children:S.jsx(Sp,{isWidgetStandalone:T,isLoading:c,isOpen:m,handleSuggestionClick:f,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),S.jsx(Sh,{componentType:"modal",isLoading:c,onSubmit:d})]})})]})})}):S.jsx("div",{children:"Loading Copilot..."}):null},k9=()=>{const e=tr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?S.jsx(UN,{}):t==="dialog"?S.jsx(q_,{}):t==="modal"?S.jsx(Y_,{}):S.jsx($_,{})},P9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=xf();F.useEffect(()=>{const a=u=>{const{property:c,value:d}=u.detail||{};!c||d===void 0||(c==="isOpen"&&e(d),c==="isInline"&&t(d),c==="elementId"&&n(d),c==="entryType"&&r(d),c==="params"&&s(d))};return Wv(a),()=>{Gv(a)}},[e,t,n,r,s])},O9=()=>{const{copilot:e}=Vn(),{entryType:t,activePromptsId:n,params:r}=ri(),{setIsInitialized:s,setActivePromptsId:a,setPromptsMessage:u,setResponseMessage:c,setIsResponseLoading:d}=xf(),{getCopilotSuggestions:f}=b1();P9();const p=F.useCallback(_=>{if(!t||!_)return;f(_,t,v=>{a(v.id)})},[t,f,a]);F.useEffect(()=>{!e||!t||!r||p(r)},[e,t,r,p]);const m=F.useCallback(_=>{_.eventSourceId===n&&(u(_),a(_.id),s(!0))},[n,u,a,s]),T=F.useCallback(_=>{(_==null?void 0:_.eventSourceId)===n&&(c(_),d(!1))},[n,c,d]),y=F.useCallback(()=>{s(!0),d(!1)},[s,d]);return F.useEffect(()=>{if(e)return e.on("follow_up",m),e.on("inquiry",T),e.on("error",y),()=>{e.off("follow_up",m),e.off("inquiry",T),e.off("error",y)}},[e,m,T,y]),null},W_={copilot:"Ask Copilot",messaging:"Ask a question"},I9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=tt(),{placeholder:s,isResponseLoading:a}=ri(),u=s||W_[r],[c,d]=F.useState(""),f=t||a,p=m=>{const T=c.trim();T&&(m.preventDefault(),e(T),d(""))};return S.jsxs("form",{className:W(n,`${H}-prompts-input-container`),name:`${H}-prompts-form`,onSubmit:p,children:[S.jsx("label",{htmlFor:`${H}-prompts-input`,"aria-label":u,children:S.jsx(ip,{className:W(n,`${H}-prompts-input-icon`)})}),S.jsx("input",{id:`${H}-prompts-input`,className:W(n,`${H}-prompts-input`),name:`${H}-prompts-input`,placeholder:u,type:"text",disabled:f,value:c,onChange:m=>d(m.target.value)}),S.jsx(ii,{className:W(n,`${H}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:S.jsx(Js,{}),disabled:f})]})},R9=()=>{const{globalClassName:e,mode:t}=tt(),{placeholder:n}=ri(),r=n||W_[t];return S.jsxs("div",{className:W(e,`${H}-prompts-header`),children:[S.jsx(ip,{className:W(e,`${H}-prompts-input-icon`),"aria-hidden":"true"}),S.jsx("span",{className:W(e,`${H}-prompts-header-text`),children:r})]})},G_=({label:e,disabled:t=!1,onClick:n})=>{var c;const{globalClassName:r,suggestionButtonConfig:s}=tt(),a=s==null?void 0:s.icon,u=(c=s==null?void 0:s.iconPosition)!=null?c:"left";return S.jsxs("button",{className:W(r,`${H}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&S.jsx(fp,{icon:a,className:`${H}-suggestion-button-icon`}),S.jsx("span",{children:e})]})},L9="Ask me something else",D9=({label:e,disabled:t=!1})=>S.jsx(G_,{label:e||L9,disabled:t,onClick:()=>ni(!0)}),M9=({sendCopilotPrompt:e})=>{var v,A;const{globalClassName:t}=tt(),{promptsMessage:n,isResponseLoading:r,isInitialized:s,isInline:a,askElseButtonLabel:u,staticQuestions:c,staticQuestionsStrategy:d,disableAskElseButton:f}=ri(),p=s?(A=(v=n==null?void 0:n.suggestions)==null?void 0:v.map(k=>k.displayText.trim()).filter(Boolean))!=null?A:[]:[],m=s?B0(p,c,d):[],T=!s,_=m.length>0&&!a&&!f,w=k=>()=>{const C=k.trim();C&&e(C)};return S.jsxs("div",{className:W(t,`${H}-prompts-button-group`),children:[T&&S.jsx(fc,{}),m.map(k=>S.jsx(G_,{label:k,disabled:r,onClick:w(k)},k)),_&&S.jsx(D9,{label:u,disabled:r})]})},F9=()=>{const{globalClassName:e}=tt(),{isInline:t,userPrompt:n}=ri();return!n||!t?null:S.jsx("div",{className:W(e,`${H}-prompts-user-message-container`),children:S.jsx("p",{className:W(e,`${H}-prompts-user-message`),children:n})})},B9=()=>{const{globalClassName:e,openLinksInNewTab:t}=tt(),{isInline:n,responseMessage:r,isResponseLoading:s}=ri();return!n||!r&&!s?null:s?S.jsx(fc,{}):r?S.jsx("div",{className:W(e,`${H}-prompts-response-container`,`${H}-message-container`),children:S.jsx(_p,{globalClassName:e,openLinksInNewTab:t,text:r.message})}):null},U9=()=>{const{globalClassName:e,themeVariables:t}=tt(),{connected:n,copilot:r}=Vn(),{handleCopilotRequestAck:s}=Ks(),{status:{isOpen:a}}=tr(),{isOpen:u,isInline:c,elementId:d,entryType:f,params:p,promptsDisplay:m}=ri(),T=m!=="buttons",y=m!=="input",{setActivePromptsId:_,setUserPrompt:w,setResponseMessage:v,setIsResponseLoading:A}=xf(),[k,C]=F.useState(null);F.useEffect(()=>{if(!d||k)return;const Y=document.getElementById(d);Y&&C(Y)},[d,k]);const z=F.useCallback(Y=>{if(!r||!f||!p)return;const D=ne=>{c?(v(null),w(Y),_(ne.id),A(!0)):(a||ni(!0),s(ne))},q={userPrompt:Y,clientContext:B({_cimEventSource:"prompts-extension"},c?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(q,D);break;case"search":r.search(B({searchParams:p},q),D);break;case"browse":r.browse(B({browseParams:p},q),D);break;case"pdp":r.productView(B(B({},p),q),D);break}},[r,c,f,p,a,_,v,w,A,s]);return!n||!u||!k||!f?null:Qs.createPortal(S.jsxs("div",{className:W(e,`${H}-prompts-extension-container`),style:t,children:[T&&S.jsx(I9,{onSubmit:z}),!T&&S.jsx(R9,{}),y&&S.jsx(M9,{sendCopilotPrompt:z}),S.jsxs("div",{className:W(e,`${H}-prompts-extension-messages-container`),children:[S.jsx(F9,{}),S.jsx(B9,{})]})]}),k)},H9=()=>S.jsxs(S.Fragment,{children:[S.jsx(O9,{}),S.jsx(U9,{})]}),xp=e=>S.jsxs(T1,fe(B({},e),{children:[S.jsx(k9,{}),S.jsx(H9,{})]}));var pc={},X_;function z9(){if(X_)return pc;X_=1;var e=A1();return pc.createRoot=e.createRoot,pc.hydrateRoot=e.hydrateRoot,pc}var K_=z9();const j9=r=>{var s=r,{elementId:e,timeout:t=5e3}=s,n=fn(s,["elementId","timeout"]);let a;const u=(d,f)=>{var p;for(const m of d)if(m.type==="childList"&&m.addedNodes.length)for(const T of m.addedNodes)T.nodeType===Node.ELEMENT_NODE&&T.id===e&&(Xs(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=K_.createRoot(T))==null||p.render(S.jsx(xp,B({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Xs(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},$9=r=>{var s=r,{timeout:e,elementId:t}=s,n=fn(s,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Xs(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Xs(!0,"warn","Container element not found for id:",t),Xs(!0,"warn","Beginning observation for element"),j9(B({elementId:t,timeout:e},n));return}K_.createRoot(a).render(S.jsx(xp,B({},n)))},V9={search:oN,browse:jv,pdp:{setPdpContext:s1,updatePdpProductId:Vv,updatePdpLink:qv},components:{setEntryType:pa,toggleWidgetOpen:ni,toggleWidgetMinimized:ma,toggleModalFullscreen:bf,setWidgetType:fl,setWidgetDialogPosition:Tf,togglePromptsExtensionOpen:o1,togglePromptsExtensionInline:a1,loadPromptsComponent:Zv,getAskCimPrompts:Xv,getSearchPrompts:Kv,getBrowsePrompts:Qv,getProductViewPrompts:Jv},session:eN},q9=()=>Object.freeze({search:Object.freeze(Tt.state),browse:Object.freeze(ut.state),pdp:Object.freeze(mr.state),isConnected:Je.state.connected,isOpen:Je.isOpen,entryType:Je.entryType});De.CopilotDialog=q_,De.CopilotEmbed=$_,De.CopilotModal=Y_,De.CopilotWidget=xp,De.CopilotWidgetProvider=T1,De.eventHandlers=V9,De.injectCopilotWidget=$9,De.state=q9,De.useCopilot=Ir,Object.defineProperty(De,Symbol.toStringTag,{value:"Module"})}));