@cimulate/copilot-widget 1.46.1 → 1.46.2

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,46 +1,46 @@
1
- (function(qe,je){typeof exports=="object"&&typeof module!="undefined"?module.exports=je():typeof define=="function"&&define.amd?define(je):(qe=typeof globalThis!="undefined"?globalThis:qe||self,qe["cimulate-copilot-widget"]=je())})(this,(function(){"use strict";var B7=Object.defineProperty,U7=Object.defineProperties;var H7=Object.getOwnPropertyDescriptors;var _d=Object.getOwnPropertySymbols;var R2=Object.prototype.hasOwnProperty,L2=Object.prototype.propertyIsEnumerable;var Ko=(qe,je)=>(je=Symbol[qe])?je:Symbol.for("Symbol."+qe),z7=qe=>{throw TypeError(qe)},Fu=Math.pow,u0=(qe,je,Ke)=>je in qe?B7(qe,je,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):qe[je]=Ke,B=(qe,je)=>{for(var Ke in je||(je={}))R2.call(je,Ke)&&u0(qe,Ke,je[Ke]);if(_d)for(var Ke of _d(je))L2.call(je,Ke)&&u0(qe,Ke,je[Ke]);return qe},de=(qe,je)=>U7(qe,H7(je));var dn=(qe,je)=>{var Ke={};for(var ot in qe)R2.call(qe,ot)&&je.indexOf(ot)<0&&(Ke[ot]=qe[ot]);if(qe!=null&&_d)for(var ot of _d(qe))je.indexOf(ot)<0&&L2.call(qe,ot)&&(Ke[ot]=qe[ot]);return Ke};var Te=(qe,je,Ke)=>u0(qe,typeof je!="symbol"?je+"":je,Ke);var Ze=(qe,je,Ke)=>new Promise((ot,Dt)=>{var Re=mt=>{try{fn(Ke.next(mt))}catch(hn){Dt(hn)}},rn=mt=>{try{fn(Ke.throw(mt))}catch(hn){Dt(hn)}},fn=mt=>mt.done?ot(mt.value):Promise.resolve(mt.value).then(Re,rn);fn((Ke=Ke.apply(qe,je)).next())}),Kr=function(qe,je){this[0]=qe,this[1]=je},Sd=(qe,je,Ke)=>{var ot=(fn,mt,hn,Cr)=>{try{var Ms=Ke[fn](mt),Xi=(mt=Ms.value)instanceof Kr,Qo=Ms.done;Promise.resolve(Xi?mt[0]:mt).then(S=>Xi?ot(fn==="return"?fn:"next",mt[1]?{done:S.done,value:S.value}:S,hn,Cr):hn({value:S,done:Qo})).catch(S=>ot("throw",S,hn,Cr))}catch(S){Cr(S)}},Dt=(fn,mt,hn,Cr)=>rn[fn]=Ms=>(mt=new Promise((Xi,Qo,S)=>(S=()=>ot(fn,Ms,Xi,Qo),Re?Re.then(S):S())),Cr=()=>Re===hn&&(Re=0),Re=hn=mt.then(Cr,Cr),mt),Re,rn={};return Ke=Ke.apply(qe,je),rn[Ko("asyncIterator")]=()=>rn,Dt("next"),Dt("throw"),Dt("return"),rn},l0=qe=>{var je=qe[Ko("asyncIterator")],Ke=!1,ot,Dt={};return je==null?(je=qe[Ko("iterator")](),ot=Re=>Dt[Re]=rn=>je[Re](rn)):(je=je.call(qe),ot=Re=>Dt[Re]=rn=>{if(Ke){if(Ke=!1,Re==="throw")throw rn;return rn}return Ke=!0,{done:!1,value:new Kr(new Promise(fn=>{var mt=je[Re](rn);mt instanceof Object||z7("Object expected"),fn(mt)}),1)}}),Dt[Ko("iterator")]=()=>Dt,ot("next"),"throw"in je?ot("throw"):Dt.throw=Re=>{throw Re},"return"in je&&ot("return"),Dt},D2=(qe,je,Ke)=>(je=qe[Ko("asyncIterator")])?je.call(qe):(qe=qe[Ko("iterator")](),je={},Ke=(ot,Dt)=>(Dt=qe[ot])&&(je[ot]=Re=>new Promise((rn,fn,mt)=>(Re=Dt.call(qe,Re),mt=Re.done,Promise.resolve(Re.value).then(hn=>rn({value:hn,done:mt}),fn)))),Ke("next"),Ke("return"),je);var qe=document.createElement("style");qe.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);&.drag-over{outline:2px dashed var(--cim-widget-primary-color);outline-offset:2px}}.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-attach-error{color:#e53e3e;font-size:.75rem;padding:4px 8px 0}.cim-widget-messaging-input-group{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:4px;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius);&:focus-within{border-color:var(--cim-widget-primary-color, #3182ce)}& input.cim-widget-search-input{flex:1 1 auto;width:auto;border:none;border-radius:0}& button.cim-widget-image-upload-button{flex:0 0 auto}.cim-widget-image-upload-label{font-size:1.25rem;line-height:1}}.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(qe);function je(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ke={exports:{}},ot={},Dt={exports:{}},Re={};var rn;function fn(){if(rn)return Re;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(D){return D===null||typeof D!="object"?null:(D=m&&D[m]||D["@@iterator"],typeof D=="function"?D:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,w={};function C(D,ee,O){this.props=D,this.context=ee,this.refs=w,this.updater=O||y}C.prototype.isReactComponent={},C.prototype.setState=function(D,ee){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,ee,"setState")},C.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function A(){}A.prototype=C.prototype;function N(D,ee,O){this.props=D,this.context=ee,this.refs=w,this.updater=O||y}var v=N.prototype=new A;v.constructor=N,_(v,C.prototype),v.isPureReactComponent=!0;var H=Array.isArray,q=Object.prototype.hasOwnProperty,R={current:null},Y={key:!0,ref:!0,__self:!0,__source:!0};function re(D,ee,O){var Se,Me={},ye=null,De=null;if(ee!=null)for(Se in ee.ref!==void 0&&(De=ee.ref),ee.key!==void 0&&(ye=""+ee.key),ee)q.call(ee,Se)&&!Y.hasOwnProperty(Se)&&(Me[Se]=ee[Se]);var Be=arguments.length-2;if(Be===1)Me.children=O;else if(1<Be){for(var Ge=Array(Be),ht=0;ht<Be;ht++)Ge[ht]=arguments[ht+2];Me.children=Ge}if(D&&D.defaultProps)for(Se in Be=D.defaultProps,Be)Me[Se]===void 0&&(Me[Se]=Be[Se]);return{$$typeof:e,type:D,key:ye,ref:De,props:Me,_owner:R.current}}function Ee(D,ee){return{$$typeof:e,type:D.type,key:ee,ref:D.ref,props:D.props,_owner:D._owner}}function V(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function se(D){var ee={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(O){return ee[O]})}var he=/\/+/g;function Ce(D,ee){return typeof D=="object"&&D!==null&&D.key!=null?se(""+D.key):ee.toString(36)}function ne(D,ee,O,Se,Me){var ye=typeof D;(ye==="undefined"||ye==="boolean")&&(D=null);var De=!1;if(D===null)De=!0;else switch(ye){case"string":case"number":De=!0;break;case"object":switch(D.$$typeof){case e:case t:De=!0}}if(De)return De=D,Me=Me(De),D=Se===""?"."+Ce(De,0):Se,H(Me)?(O="",D!=null&&(O=D.replace(he,"$&/")+"/"),ne(Me,ee,O,"",function(ht){return ht})):Me!=null&&(V(Me)&&(Me=Ee(Me,O+(!Me.key||De&&De.key===Me.key?"":(""+Me.key).replace(he,"$&/")+"/")+D)),ee.push(Me)),1;if(De=0,Se=Se===""?".":Se+":",H(D))for(var Be=0;Be<D.length;Be++){ye=D[Be];var Ge=Se+Ce(ye,Be);De+=ne(ye,ee,O,Ge,Me)}else if(Ge=T(D),typeof Ge=="function")for(D=Ge.call(D),Be=0;!(ye=D.next()).done;)ye=ye.value,Ge=Se+Ce(ye,Be++),De+=ne(ye,ee,O,Ge,Me);else if(ye==="object")throw ee=String(D),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.");return De}function ae(D,ee,O){if(D==null)return D;var Se=[],Me=0;return ne(D,Se,"","",function(ye){return ee.call(O,ye,Me++)}),Se}function xe(D){if(D._status===-1){var ee=D._result;ee=ee(),ee.then(function(O){(D._status===0||D._status===-1)&&(D._status=1,D._result=O)},function(O){(D._status===0||D._status===-1)&&(D._status=2,D._result=O)}),D._status===-1&&(D._status=0,D._result=ee)}if(D._status===1)return D._result.default;throw D._result}var oe={current:null},Q={transition:null},ie={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:Q,ReactCurrentOwner:R};function k(){throw Error("act(...) is not supported in production builds of React.")}return Re.Children={map:ae,forEach:function(D,ee,O){ae(D,function(){ee.apply(this,arguments)},O)},count:function(D){var ee=0;return ae(D,function(){ee++}),ee},toArray:function(D){return ae(D,function(ee){return ee})||[]},only:function(D){if(!V(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Re.Component=C,Re.Fragment=n,Re.Profiler=s,Re.PureComponent=N,Re.StrictMode=r,Re.Suspense=d,Re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ie,Re.act=k,Re.cloneElement=function(D,ee,O){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var Se=_({},D.props),Me=D.key,ye=D.ref,De=D._owner;if(ee!=null){if(ee.ref!==void 0&&(ye=ee.ref,De=R.current),ee.key!==void 0&&(Me=""+ee.key),D.type&&D.type.defaultProps)var Be=D.type.defaultProps;for(Ge in ee)q.call(ee,Ge)&&!Y.hasOwnProperty(Ge)&&(Se[Ge]=ee[Ge]===void 0&&Be!==void 0?Be[Ge]:ee[Ge])}var Ge=arguments.length-2;if(Ge===1)Se.children=O;else if(1<Ge){Be=Array(Ge);for(var ht=0;ht<Ge;ht++)Be[ht]=arguments[ht+2];Se.children=Be}return{$$typeof:e,type:D.type,key:Me,ref:ye,props:Se,_owner:De}},Re.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:a,_context:D},D.Consumer=D},Re.createElement=re,Re.createFactory=function(D){var ee=re.bind(null,D);return ee.type=D,ee},Re.createRef=function(){return{current:null}},Re.forwardRef=function(D){return{$$typeof:c,render:D}},Re.isValidElement=V,Re.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:xe}},Re.memo=function(D,ee){return{$$typeof:f,type:D,compare:ee===void 0?null:ee}},Re.startTransition=function(D){var ee=Q.transition;Q.transition={};try{D()}finally{Q.transition=ee}},Re.unstable_act=k,Re.useCallback=function(D,ee){return oe.current.useCallback(D,ee)},Re.useContext=function(D){return oe.current.useContext(D)},Re.useDebugValue=function(){},Re.useDeferredValue=function(D){return oe.current.useDeferredValue(D)},Re.useEffect=function(D,ee){return oe.current.useEffect(D,ee)},Re.useId=function(){return oe.current.useId()},Re.useImperativeHandle=function(D,ee,O){return oe.current.useImperativeHandle(D,ee,O)},Re.useInsertionEffect=function(D,ee){return oe.current.useInsertionEffect(D,ee)},Re.useLayoutEffect=function(D,ee){return oe.current.useLayoutEffect(D,ee)},Re.useMemo=function(D,ee){return oe.current.useMemo(D,ee)},Re.useReducer=function(D,ee,O){return oe.current.useReducer(D,ee,O)},Re.useRef=function(D){return oe.current.useRef(D)},Re.useState=function(D){return oe.current.useState(D)},Re.useSyncExternalStore=function(D,ee,O){return oe.current.useSyncExternalStore(D,ee,O)},Re.useTransition=function(){return oe.current.useTransition()},Re.version="18.3.1",Re}var mt;function hn(){return mt||(mt=1,Dt.exports=fn()),Dt.exports}var Cr;function Ms(){if(Cr)return ot;Cr=1;var e=hn(),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 Xi;function Qo(){return Xi||(Xi=1,Ke.exports=Ms()),Ke.exports}var S=Qo();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 Bu=Object.create(null);Object.keys(kr).forEach(e=>{Bu[kr[e]]=e});const xd={type:"error",data:"parser error"},c0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",d0=typeof ArrayBuffer=="function",f0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,wd=({type:e,data:t},n,r)=>c0&&t instanceof Blob?n?r(t):h0(t,r):d0&&(t instanceof ArrayBuffer||f0(t))?n?r(t):h0(new Blob([t]),r):r(kr[e]+(t||"")),h0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function p0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Ad;function U2(e,t){if(c0&&e.data instanceof Blob)return e.data.arrayBuffer().then(p0).then(t);if(d0&&(e.data instanceof ArrayBuffer||f0(e.data)))return t(p0(e.data));wd(e,!1,n=>{Ad||(Ad=new TextEncoder),t(Ad.encode(n))})}const m0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<m0.length;e++)Jo[m0.charCodeAt(e)]=e;const H2=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=Jo[e.charCodeAt(r)],u=Jo[e.charCodeAt(r+1)],c=Jo[e.charCodeAt(r+2)],d=Jo[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},z2=typeof ArrayBuffer=="function",vd=(e,t)=>{if(typeof e!="string")return{type:"message",data:g0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:j2(e.substring(1),t)}:Bu[n]?e.length>1?{type:Bu[n],data:e.substring(1)}:{type:Bu[n]}:xd},j2=(e,t)=>{if(z2){const n=H2(e);return g0(n,t)}else return{base64:!0,data:e}},g0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,E0="",$2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{wd(a,!1,c=>{r[u]=c,++s===n&&t(r.join(E0))})})},V2=(e,t)=>{const n=e.split(E0),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 q2(){return new TransformStream({transform(e,t){U2(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const a=new DataView(s.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{s=new Uint8Array(9);const a=new DataView(s.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let Cd;function Uu(e){return e.reduce((t,n)=>t+n.length,0)}function Hu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Y2(e,t){Cd||(Cd=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(Uu(n)<1)break;const d=Hu(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(Uu(n)<2)break;const d=Hu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Uu(n)<8)break;const d=Hu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(xd);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Uu(n)<s)break;const d=Hu(n,s);c.enqueue(vd(a?d:Cd.decode(d),t)),r=0}if(s===0||s>e){c.enqueue(xd);break}}}})}const y0=4;function Mt(e){if(e)return G2(e)}function G2(e){for(var t in Mt.prototype)e[t]=Mt.prototype[t];return e}Mt.prototype.on=Mt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Mt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Mt.prototype.off=Mt.prototype.removeListener=Mt.prototype.removeAllListeners=Mt.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},Mt.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},Mt.prototype.emitReserved=Mt.prototype.emit,Mt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Mt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const zu=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")(),W2="arraybuffer";function j7(){}function b0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const X2=Zn.setTimeout,K2=Zn.clearTimeout;function ju(e,t){t.useNativeTimers?(e.setTimeoutFn=X2.bind(Zn),e.clearTimeoutFn=K2.bind(Zn)):(e.setTimeoutFn=Zn.setTimeout.bind(Zn),e.clearTimeoutFn=Zn.clearTimeout.bind(Zn))}const Q2=1.33;function J2(e){return typeof e=="string"?Z2(e):Math.ceil((e.byteLength||e.size)*Q2)}function Z2(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function T0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function ew(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function tw(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 nw extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class kd extends Mt{constructor(t){super(),this.writable=!1,ju(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 nw(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=ew(t);return n.length?"?"+n:""}}class rw 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)};V2(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,$2(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=T0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let _0=!1;try{_0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const iw=_0;function sw(){}class ow extends rw{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 Nr extends Mt{constructor(t,n,r){super(),this.createRequest=t,ju(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=b0(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=Nr.requestsCount++,Nr.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=sw,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Nr.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(Nr.requestsCount=0,Nr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",S0);else if(typeof addEventListener=="function"){const e="onpagehide"in Zn?"pagehide":"unload";addEventListener(e,S0,!1)}}function S0(){for(let e in Nr.requests)Nr.requests.hasOwnProperty(e)&&Nr.requests[e].abort()}const aw=(function(){const e=x0({xdomain:!1});return e&&e.responseType!==null})();class uw extends ow{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=aw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Nr(x0,this.uri(),t)}}function x0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||iw))return new XMLHttpRequest}catch(n){}if(!t)try{return new Zn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const w0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class lw extends kd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=w0?{}:b0(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;wd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&zu(()=>{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]=T0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Nd=Zn.WebSocket||Zn.MozWebSocket;class cw extends lw{createSocket(t,n,r){return w0?new Nd(t,n,r):n?new Nd(t,n):new Nd(t)}doWrite(t,n){this.ws.send(n)}}class dw 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=Y2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=q2();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const a=()=>{r.read().then(({done: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&&zu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const fw={websocket:cw,webtransport:dw,polling:uw},hw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,pw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Pd(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=hw.exec(e||""),a={},u=14;for(;u--;)a[pw[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=mw(a,a.path),a.queryKey=gw(a,a.query),a}function mw(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 gw(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const Od=typeof addEventListener=="function"&&typeof removeEventListener=="function",$u=[];Od&&addEventListener("offline",()=>{$u.forEach(e=>e())},!1);class yi extends Mt{constructor(t,n){if(super(),this.binaryType=W2,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=Pd(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=Pd(n.host).host);ju(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=tw(this.opts.query)),Od&&(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"})},$u.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=y0,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&&yi.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",yi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=J2(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,zu(()=>{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(yi.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(),Od&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=$u.indexOf(this._offlineEventListener);r!==-1&&$u.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}yi.protocol=y0;class Ew extends yi{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;yi.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;yi.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 yw=class extends Ew{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=>fw[a]).filter(a=>!!a)),super(r?s:t,s)}};function bw(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=Pd(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 Tw=typeof ArrayBuffer=="function",_w=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,A0=Object.prototype.toString,Sw=typeof Blob=="function"||typeof Blob!="undefined"&&A0.call(Blob)==="[object BlobConstructor]",xw=typeof File=="function"||typeof File!="undefined"&&A0.call(File)==="[object FileConstructor]";function Id(e){return Tw&&(e instanceof ArrayBuffer||_w(e))||Sw&&e instanceof Blob||xw&&e instanceof File}function Vu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Vu(e[n]))return!0;return!1}if(Id(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Vu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Vu(e[n]))return!0;return!1}function ww(e){const t=[],n=e.data,r=e;return r.data=qu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function qu(e,t,n){if(!e)return e;if(Id(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]=qu(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return qu(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=qu(e[s],t));return r}return e}function Aw(e,t){return e.data=Rd(e.data,t),delete e.attachments,e}function Rd(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]=Rd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Rd(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 Cw{constructor(t){this.replacer=t}encode(t){return(t.type===et.EVENT||t.type===et.ACK)&&Vu(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=ww(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Ld extends Mt{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(Id(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(!Nw(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(Ld.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=Aw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Nw=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 Pw=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ld,Encoder:Cw,get PacketType(){return et}},Symbol.toStringTag,{value:"Module"}));function fr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Ow=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class C0 extends Mt{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=[fr(t,"open",this.onopen.bind(this)),fr(t,"packet",this.onpacket.bind(this)),fr(t,"error",this.onerror.bind(this)),fr(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(Ow.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 Fs(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}Fs.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},Fs.prototype.reset=function(){this.attempts=0},Fs.prototype.setMin=function(e){this.ms=e},Fs.prototype.setMax=function(e){this.max=e},Fs.prototype.setJitter=function(e){this.jitter=e};class Dd extends Mt{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,ju(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 Fs({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||Pw;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 yw(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=fr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=fr(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(fr(t,"ping",this.onping.bind(this)),fr(t,"data",this.ondata.bind(this)),fr(t,"error",this.onerror.bind(this)),fr(t,"close",this.onclose.bind(this)),fr(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){zu(()=>{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 C0(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 Zo={};function Yu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=bw(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=Zo[s]&&a in Zo[s].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Dd(r,t):(Zo[s]||(Zo[s]=new Dd(r,t)),d=Zo[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Yu,{Manager:Dd,Socket:C0,io:Yu,connect:Yu});var Iw=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===Rw})(t)})(e)},Rw=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ea(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Bs((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Lw(e,t,n){return e.concat(t).map((function(r){return ea(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 N0(e,t){try{return t in e}catch(n){return!1}}function Dw(e,t,n){var r={};return n.isMergeableObject(e)&&k0(e).forEach((function(s){r[s]=ea(e[s],n)})),k0(t).forEach((function(s){(function(a,u){return N0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,s)||(N0(e,s)&&n.isMergeableObject(t[s])?r[s]=(function(a,u){if(!u.customMerge)return Bs;var c=u.customMerge(a);return typeof c=="function"?c:Bs})(s,n)(e[s],t[s],n):r[s]=ea(t[s],n))})),r}function Bs(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Lw,n.isMergeableObject=n.isMergeableObject||Iw,n.cloneUnlessOtherwiseSpecified=ea;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Dw(e,t,n):ea(t,n)}Bs.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Bs(n,r,t)}),{})};var Mw=Bs;let Fw=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 Bw=typeof ArrayBuffer=="function",P0=Object.prototype.toString,Uw=typeof Blob=="function"||typeof Blob!="undefined"&&P0.call(Blob)==="[object BlobConstructor]",Hw=typeof File=="function"||typeof File!="undefined"&&P0.call(File)==="[object FileConstructor]";function Md(e){return Bw&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||Uw&&e instanceof Blob||Hw&&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(Md(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 zw(e){const t=[],n=e.data,r=e;return r.data=Fd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Fd(e,t){if(!e)return e;if(Md(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]=Fd(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]=Fd(e[r],t));return n}return e}function jw(e,t){return e.data=Bd(e.data,t),delete e.attachments,e}function Bd(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Bd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Bd(e[n],t));return e}const $w=["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 Vw{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=zw(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Ud 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 qw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!Md(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(!Yw(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(!Ud.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 O0(n);case vt.DISCONNECT:return n===void 0;case vt.CONNECT_ERROR:return typeof n=="string"||O0(n);case vt.EVENT:case vt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&$w.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 qw{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=jw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Yw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function O0(e){return Object.prototype.toString.call(e)==="[object Object]"}const I0=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],R0=(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)},L0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),Gw=R0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),I0),D0=R0(L0,L0,I0),Ww={Encoder:class extends Vw{encode(e){var t,n;return super.encode(de(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 Ud{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?D0(r):r)):n instanceof Object?D0(n):n)):t))}}},Xw={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class Kw{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=[Xw,c,{parser:Ww,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=Yu(d,Mw.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*Fu(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 Ze(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return Ze(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return Ze(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return Ze(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return Ze(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 Ze(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return Ze(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return Ze(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return Ze(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return Ze(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return Ze(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 Ze(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let s="";const a=(function(u){return Sd(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Kr(u({emit:m=>{c.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Kr(new Promise((m=>{f=m})));for(;c.length>0;)yield c.shift()}finally{yield new Kr(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),()=>Ze(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 Fw(d)):(s=d==null?void 0:d.id,u(d))})))),events:a}})}}const M0=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),F0=(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=hn();const Ki=je(F);var B0=Symbol.for("immer-nothing"),U0=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function er(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Us=Object.getPrototypeOf;function Hs(e){return!!e&&!!e[at]}function Qr(e){var t;return e?H0(e)||Array.isArray(e)||!!e[U0]||!!((t=e.constructor)!=null&&t[U0])||na(e)||Xu(e):!1}var Qw=Object.prototype.constructor.toString();function H0(e){if(!e||typeof e!="object")return!1;const t=Us(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)===Qw}function ta(e,t){Wu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Wu(e){const t=e[at];return t?t.type_:Array.isArray(e)?1:na(e)?2:Xu(e)?3:0}function Hd(e,t){return Wu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function z0(e,t,n){const r=Wu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Jw(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function na(e){return e instanceof Map}function Xu(e){return e instanceof Set}function Wt(e){return e.copy_||e.base_}function zd(e,t){if(na(e))return new Map(e);if(Xu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=H0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[at];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(Us(e),r)}else{const r=Us(e);if(r!==null&&n)return B({},e);const s=Object.create(r);return Object.assign(s,e)}}function jd(e,t=!1){return Qu(e)||Hs(e)||!Qr(e)||(Wu(e)>1&&Object.defineProperties(e,{set:{value:Ku},add:{value:Ku},clear:{value:Ku},delete:{value:Ku}}),Object.freeze(e),t&&Object.values(e).forEach(n=>jd(n,!0))),e}function Ku(){er(2)}function Qu(e){return Object.isFrozen(e)}var $d={};function Qi(e){const t=$d[e];return t||er(0,e),t}function Zw(e,t){$d[e]||($d[e]=t)}var ra;function Ju(){return ra}function eA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function j0(e,t){t&&(Qi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Vd(e){qd(e),e.drafts_.forEach(tA),e.drafts_=null}function qd(e){e===ra&&(ra=e.parent_)}function $0(e){return ra=eA(ra,e)}function tA(e){const t=e[at];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function V0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[at].modified_&&(Vd(t),er(4)),Qr(e)&&(e=Zu(t,e),t.parent_||el(t,e)),t.patches_&&Qi("Patches").generateReplacementPatches_(n[at].base_,e,t.patches_,t.inversePatches_)):e=Zu(t,n,[]),Vd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==B0?e:void 0}function Zu(e,t,n){if(Qu(t))return t;const r=t[at];if(!r)return ta(t,(s,a)=>q0(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return el(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),ta(a,(c,d)=>q0(e,r,s,c,d,n,u)),el(e,s,!1),n&&e.patches_&&Qi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function q0(e,t,n,r,s,a,u){if(Hs(s)){const c=a&&t&&t.type_!==3&&!Hd(t.assigned_,r)?a.concat(r):void 0,d=Zu(e,s,c);if(z0(n,r,d),Hs(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Qr(s)&&!Qu(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Zu(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(na(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&el(e,s)}}function el(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&jd(t,n)}function nA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Ju(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=Yd;n&&(s=[r],a=ia);const{revoke:u,proxy:c}=Proxy.revocable(s,a);return r.draft_=c,r.revoke_=u,c}var Yd={get(e,t){if(t===at)return e;const n=Wt(e);if(!Hd(n,t))return rA(e,n,t);const r=n[t];return e.finalized_||!Qr(r)?r:r===Gd(e.base_,t)?(Wd(e),e.copy_[t]=sa(r,e)):r},has(e,t){return t in Wt(e)},ownKeys(e){return Reflect.ownKeys(Wt(e))},set(e,t,n){const r=Y0(Wt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Gd(Wt(e),t),a=s==null?void 0:s[at];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Jw(n,s)&&(n!==void 0||Hd(e.base_,t)))return!0;Wd(e),Jr(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,Wd(e),Jr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Wt(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 Us(e.base_)},setPrototypeOf(){er(12)}},ia={};ta(Yd,(e,t)=>{ia[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ia.deleteProperty=function(e,t){return ia.set.call(this,e,t,void 0)},ia.set=function(e,t,n){return Yd.set.call(this,e[0],t,n,e[0])};function Gd(e,t){const n=e[at];return(n?Wt(n):e)[t]}function rA(e,t,n){var s;const r=Y0(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function Y0(e,t){if(!(t in e))return;let n=Us(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Us(n)}}function Jr(e){e.modified_||(e.modified_=!0,e.parent_&&Jr(e.parent_))}function Wd(e){e.copy_||(e.copy_=zd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var iA=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(Qr(t)){const a=$0(this),u=sa(t,void 0);let c=!0;try{s=n(u),c=!1}finally{c?Vd(a):qd(a)}return j0(a,r),V0(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===B0&&(s=void 0),this.autoFreeze_&&jd(s,!0),r){const a=[],u=[];Qi("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){Qr(e)||er(8),Hs(e)&&(e=sA(e));const t=$0(this),n=sa(e,void 0);return n[at].isManual_=!0,qd(t),n}finishDraft(e,t){const n=e&&e[at];(!n||!n.isManual_)&&er(9);const{scope_:r}=n;return j0(r,t),V0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Qi("Patches").applyPatches_;return Hs(e)?r(e,t):this.produce(e,s=>r(s,t))}};function sa(e,t){const n=na(e)?Qi("MapSet").proxyMap_(e,t):Xu(e)?Qi("MapSet").proxySet_(e,t):nA(e,t);return(t?t.scope_:Ju()).drafts_.push(n),n}function sA(e){return Hs(e)||er(10,e),G0(e)}function G0(e){if(!Qr(e)||Qu(e))return e;const t=e[at];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=zd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=zd(e,!0);return ta(n,(r,s)=>{z0(n,r,G0(s))}),t&&(t.finalized_=!1),n}function oA(){class e extends Map{constructor(d,f){super(),this[at]={type_:2,parent_:f,scope_:f?f.scope_:Ju(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Wt(this[at]).size}has(d){return Wt(this[at]).has(d)}set(d,f){const p=this[at];return u(p),(!Wt(p).has(d)||Wt(p).get(d)!==f)&&(n(p),Jr(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[at];return u(f),n(f),Jr(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[at];u(d),Wt(d).size&&(n(d),Jr(d),d.assigned_=new Map,ta(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[at];Wt(p).forEach((m,T,y)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[at];u(f);const p=Wt(f).get(d);if(f.finalized_||!Qr(p)||p!==f.base_.get(d))return p;const m=sa(p,f);return n(f),f.copy_.set(d,m),m}keys(){return Wt(this[at]).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[at]={type_:3,parent_:f,scope_:f?f.scope_:Ju(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Wt(this[at]).size}has(d){const f=this[at];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[at];return u(f),this.has(d)||(a(f),Jr(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),a(f),Jr(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[at];u(d),Wt(d).size&&(a(d),Jr(d),d.copy_.clear())}values(){const d=this[at];return u(d),a(d),d.copy_.values()}entries(){const d=this[at];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(Qr(d)){const f=sa(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(Wt(c)))}Zw("MapSet",{proxyMap_:t,proxySet_:s})}var aA=new iA,uA=aA.produce;function W0(e,t,n){var r=F.useMemo(function(){return uA(e)},[e]);return F.useReducer(r,t,n)}const X0={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"},gt={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"},Ji={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},K0=["ask_cim","search","browse","pdp"],lA=e=>K0.includes(e),Q0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(Q0));const cA=new Map(Object.entries(Q0).map(([e,t])=>[t,e])),dA=e=>{var t;return(t=cA.get(e))!=null?t:null},zs="cimulate",Xd=`${zs}:pdp-update`,Kd=`${zs}:browse-update`,Qd=`${zs}:search-update`,Jd=`${zs}:ui-state-update`,Zd=`${zs}:prompts-state-update`,ef=`${zs}:session-state`,Pr=B({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},X0),fA={"browse-context":Pr.CONTEXT_UPDATED,categoryId:Pr.CATEGORY_ID_CHANGED,categoryName:Pr.CATEGORY_NAME_CHANGED,page:Pr.PAGE_CHANGED,pageSize:Pr.PAGE_SIZE_CHANGED,includeFacets:Pr.FACET_FILTERS_CHANGED,facetFilters:Pr.FACET_FILTERS_CHANGED,rangeFilters:Pr.RANGE_FILTERS_CHANGED,catalogSegment:Pr.CATALOG_SEGMENT_CHANGED,pricebooks:Pr.PRICEBOOKS_CHANGED},Zr=B({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},X0),hA={"search-context":Zr.SEARCH_CONTEXT_UPDATED,query:Zr.QUERY_CHANGED,page:Zr.PAGE_CHANGED,pageSize:Zr.PAGE_SIZE_CHANGED,includeFacets:Zr.FACET_FILTERS_CHANGED,facetFilters:Zr.FACET_FILTERS_CHANGED,rangeFilters:Zr.RANGE_FILTERS_CHANGED,catalogSegment:Zr.CATALOG_SEGMENT_CHANGED,pricebooks:Zr.PRICEBOOKS_CHANGED},z="cim-widget",$n=`--${z}`,bi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},pA=(e=bi)=>({[`${$n}-primary-color`]:e.primaryColor||bi.primaryColor,[`${$n}-secondary-color`]:e.secondaryColor||bi.secondaryColor,[`${$n}-font-color`]:e.fontColor||bi.fontColor,[`${$n}-font-family`]:e.fontFamily||bi.fontFamily,[`${$n}-background-color`]:e.backgroundColor||bi.backgroundColor,[`${$n}-border-color`]:e.borderColor||bi.borderColor,[`${$n}-border-radius`]:e.borderRadius||bi.borderRadius}),ei={RESET_CONVERSATION:"reset-conversation",END_CONVERSATION:"end-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},J0=F.createContext(null),Z0=F.createContext(null),Et={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"},eg={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 tg(e,t){return function(){return e.apply(t,arguments)}}const{toString:mA}=Object.prototype,{getPrototypeOf:js}=Object,{iterator:oa,toStringTag:ng}=Symbol,tl=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),aa=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),tl(n,t))return!0;n=js(n)}return!1},gA=(e,t)=>e!=null&&aa(e,t)?e[t]:void 0,tf=(e=>t=>{const n=mA.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),hr=e=>(e=e.toLowerCase(),t=>tf(t)===e),nl=e=>t=>typeof t===e,{isArray:Zi}=Array,$s=nl("undefined");function Vs(e){return e!==null&&!$s(e)&&e.constructor!==null&&!$s(e.constructor)&&On(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const rg=hr("ArrayBuffer");function EA(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&rg(e.buffer),t}const yA=nl("string"),On=nl("function"),ig=nl("number"),qs=e=>e!==null&&typeof e=="object",bA=e=>e===!0||e===!1,rl=e=>{if(!qs(e))return!1;const t=js(e);return(t===null||t===Object.prototype||js(t)===null)&&!aa(e,ng)&&!aa(e,oa)},TA=e=>{if(!qs(e)||Vs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},_A=hr("Date"),SA=hr("File"),xA=e=>!!(e&&typeof e.uri!="undefined"),wA=e=>e&&typeof e.getParts!="undefined",AA=hr("Blob"),vA=hr("FileList"),CA=e=>qs(e)&&On(e.pipe);function kA(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const sg=kA(),og=typeof sg.FormData!="undefined"?sg.FormData:void 0,NA=e=>{if(!e)return!1;if(og&&e instanceof og)return!0;const t=js(e);if(!t||t===Object.prototype||!On(e.append))return!1;const n=tf(e);return n==="formdata"||n==="object"&&On(e.toString)&&e.toString()==="[object FormData]"},PA=hr("URLSearchParams"),[OA,IA,RA,LA]=["ReadableStream","Request","Response","Headers"].map(hr),DA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ua(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),Zi(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Vs(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 ag(e,t){if(Vs(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 es=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,ug=e=>!$s(e)&&e!==es;function nf(...e){const{caseless:t,skipUndefined:n}=ug(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&typeof u=="string"&&ag(r,u)||u,d=tl(r,c)?r[c]:void 0;rl(d)&&rl(a)?r[c]=nf(d,a):rl(a)?r[c]=nf({},a):Zi(a)?r[c]=a.slice():(!n||!$s(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++){const c=e[a];if(!c||Vs(c)||(ua(c,s),typeof c!="object"||Zi(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 MA=(e,t,n,{allOwnKeys:r}={})=>(ua(t,(s,a)=>{n&&On(s)?Object.defineProperty(e,a,{__proto__:null,value:tg(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),FA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),BA=(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)},UA=(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&&js(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},HA=(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},zA=e=>{if(!e)return null;if(Zi(e))return e;let t=e.length;if(!ig(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},jA=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&js(Uint8Array)),$A=(e,t)=>{const r=(e&&e[oa]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},VA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},qA=hr("HTMLFormElement"),YA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:GA}=Object.prototype,WA=hr("RegExp"),lg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ua(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},XA=e=>{lg(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+"'")})}})},KA=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return Zi(e)?r(e):r(String(e).split(t)),n},QA=()=>{},JA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ZA(e){return!!(e&&On(e.append)&&e[ng]==="FormData"&&e[oa])}const ev=e=>{const t=new WeakSet,n=r=>{if(qs(r)){if(t.has(r))return;if(Vs(r))return r;if(!("toJSON"in r)){t.add(r);const s=Zi(r)?[]:{};return ua(r,(a,u)=>{const c=n(a);!$s(c)&&(s[u]=c)}),t.delete(r),s}}return r};return n(e)},tv=hr("AsyncFunction"),nv=e=>e&&(qs(e)||On(e))&&On(e.then)&&On(e.catch),cg=((e,t)=>e?setImmediate:t?((n,r)=>(es.addEventListener("message",({source:s,data:a})=>{s===es&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),es.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",On(es.postMessage)),rv=typeof queueMicrotask!="undefined"?queueMicrotask.bind(es):typeof process!="undefined"&&process.nextTick||cg,dg=e=>e!=null&&On(e[oa]),$={isArray:Zi,isArrayBuffer:rg,isBuffer:Vs,isFormData:NA,isArrayBufferView:EA,isString:yA,isNumber:ig,isBoolean:bA,isObject:qs,isPlainObject:rl,isEmptyObject:TA,isReadableStream:OA,isRequest:IA,isResponse:RA,isHeaders:LA,isUndefined:$s,isDate:_A,isFile:SA,isReactNativeBlob:xA,isReactNative:wA,isBlob:AA,isRegExp:WA,isFunction:On,isStream:CA,isURLSearchParams:PA,isTypedArray:jA,isFileList:vA,forEach:ua,merge:nf,extend:MA,trim:DA,stripBOM:FA,inherits:BA,toFlatObject:UA,kindOf:tf,kindOfTest:hr,endsWith:HA,toArray:zA,forEachEntry:$A,matchAll:VA,isHTMLForm:qA,hasOwnProperty:tl,hasOwnProp:tl,hasOwnInPrototypeChain:aa,getSafeProp:gA,reduceDescriptors:lg,freezeMethods:XA,toObjectSet:KA,toCamelCase:YA,noop:QA,toFiniteNumber:JA,findKey:ag,global:es,isContextDefined:ug,isSpecCompliantForm:ZA,toJSONObject:ev,isAsyncFn:tv,isThenable:nv,setImmediate:cg,asap:rv,isIterable:dg,isSafeIterable:e=>e!=null&&aa(e,oa)&&dg(e)},iv=$.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"]),sv=e=>{const t={};let n,r,s;return e&&e.split(`
3
- `).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&iv[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function ov(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 av=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),uv=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function rf(e,t){return $.isArray(e)?e.map(n=>rf(n,t)):ov(String(e).replace(t,""))}const lv=e=>rf(e,av),cv=e=>rf(e,uv);function fg(e){const t=Object.create(null);return $.forEach(e.toJSON(),(n,r)=>{t[r]=cv(n)}),t}const hg=Symbol("internals");function la(e){return e&&String(e).trim().toLowerCase()}function il(e){return e===!1||e==null?e:$.isArray(e)?e.map(il):lv(String(e))}function dv(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 fv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function sf(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 hv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function pv(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 pn=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(c,d,f){const p=la(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]=il(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())&&!fv(t))u(sv(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=la(t),t){const r=$.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return dv(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=la(t),t){const r=$.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||sf(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(u){if(u=la(u),u){const c=$.findKey(r,u);c&&(!n||sf(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||sf(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]=il(s),delete n[a];return}const c=t?hv(a):String(a).trim();c!==a&&delete n[a],n[c]=il(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[hg]=this[hg]={accessors:{}}).accessors,s=this.prototype;function a(u){const c=la(u);r[c]||(pv(s,u),r[c]=!0)}return $.isArray(t)?t.forEach(a):a(t),this}};pn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(pn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),$.freezeMethods(pn);const mv="[REDACTED ****]";function gv(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 Ev(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 pn&&(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)&&gv(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?mv:s(d);$.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return s(e)}let _e=class M2 extends Error{static from(t,n,r,s,a,u){const c=new M2(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?Ev(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 yv=null,pg=100;function of(e){return $.isPlainObject(e)||$.isArray(e)}function mg(e){return $.endsWith(e,"[]")?e.slice(0,-2):e}function af(e,t,n){return e?e.concat(t).map(function(s,a){return s=mg(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function bv(e){return $.isArray(e)&&!e.some(of)}const Tv=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function sl(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,v){return!$.isUndefined(v[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?pg: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 v=[];return JSON.stringify(A,function(q,R){if(!$.isObject(R))return R;for(;v.length&&v[v.length-1]!==this;)v.pop();return v.push(R),T(N+v.length-1),R})}function _(A,N,v){let H=A;if($.isReactNative(t)&&$.isReactNativeBlob(A))return t.append(af(v,N,a),m(A)),!1;if(A&&!v&&typeof A=="object"){if($.endsWith(N,"{}"))N=r?N:N.slice(0,-2),A=y(A,1);else if($.isArray(A)&&bv(A)||($.isFileList(A)||$.endsWith(N,"[]"))&&(H=$.toArray(A)))return N=mg(N),H.forEach(function(R,Y){!($.isUndefined(R)||R===null)&&t.append(u===!0?af([N],Y,a):u===null?N:N+"[]",m(R))}),!1}return of(A)?!0:(t.append(af(v,N,a),m(A)),!1)}const w=Object.assign(Tv,{defaultVisitor:_,convertValue:m,isVisitable:of});function C(A,N,v=0){if(!$.isUndefined(A)){if(T(v),p.indexOf(A)!==-1)throw new Error("Circular reference detected in "+N.join("."));p.push(A),$.forEach(A,function(q,R){(!($.isUndefined(q)||q===null)&&s.call(t,q,$.isString(R)?R.trim():R,N,w))===!0&&C(q,N?N.concat(R):[R],v+1)}),p.pop()}}if(!$.isObject(e))throw new TypeError("data must be an object");return C(e),t}function gg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function uf(e,t){this._pairs=[],e&&sl(e,this,t)}const Eg=uf.prototype;Eg.append=function(t,n){this._pairs.push([t,n])},Eg.toString=function(t){const n=t?r=>t.call(this,r,gg):gg;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function _v(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function yg(e,t,n){if(!t)return e;e=e||"";const r=$.isFunction(n)?{serialize:n}:n,s=$.getSafeProp(r,"encode")||_v,a=$.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=$.isURLSearchParams(t)?t.toString():new uf(t,r).toString(s),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class bg{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 lf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Sv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:uf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},cf=typeof window!="undefined"&&typeof document!="undefined",df=typeof navigator=="object"&&navigator||void 0,xv=cf&&(!df||["ReactNative","NativeScript","NS"].indexOf(df.product)<0),wv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Av=cf&&window.location.href||"http://localhost",sn=B(B({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:cf,hasStandardBrowserEnv:xv,hasStandardBrowserWebWorkerEnv:wv,navigator:df,origin:Av},Symbol.toStringTag,{value:"Module"}))),Sv);function vv(e,t){return sl(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 Tg=pg;function _g(e){if(e>Tg)throw new _e("FormData field is too deeply nested ("+e+" levels). Max depth: "+Tg,_e.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Cv(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)_g(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function kv(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 Sg(e){function t(n,r,s,a){_g(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]=kv(s[u])),!c)}if($.isFormData(e)&&$.isFunction(e.entries)){const n={};return $.forEachEntry(e,(r,s)=>{t(Cv(r),s,n,0)}),n}return null}const Ys=(e,t)=>e!=null&&$.hasOwnProp(e,t)?e[t]:void 0;function Nv(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 ca={transitional:lf,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(Sg(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=Ys(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return vv(t,d).toString();if((c=$.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Ys(this,"env"),p=f&&f.FormData;return sl(c?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),Nv(t)):t}],transformResponse:[function(t){const n=Ys(this,"transitional")||ca.transitional,r=n&&n.forcedJSONParsing,s=Ys(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,Ys(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?_e.from(d,_e.ERR_BAD_RESPONSE,this,null,Ys(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=>{ca.headers[e]={}});function ff(e,t){const n=this||ca,r=t||n,s=pn.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 xg(e){return!!(e&&e.__CANCEL__)}let da=class extends _e{constructor(t,n,r){super(t==null?"canceled":t,_e.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function wg(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 Pv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Ov(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 Iv(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 ol=(e,t,n=3)=>{let r=0;const s=Ov(50,250);return Iv(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)},Ag=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},vg=e=>(...t)=>$.asap(()=>e(...t)),Rv=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,Lv=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 Dv(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Mv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const Fv=/^https?:(?!\/\/)/i,Bv=/[\t\n\r]/g;function Uv(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Hv(e){return Uv(e).replace(Bv,"")}function Cg(e,t){if(typeof e=="string"&&Fv.test(Hv(e)))throw new _e('Invalid URL: missing "//" after protocol',_e.ERR_INVALID_URL,t)}function kg(e,t,n,r){Cg(t,r);let s=!Dv(t);return e&&(s||n===!1)?(Cg(e,r),Mv(e,t)):t}const Ng=e=>e instanceof pn?B({},e):e;function ts(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(Ng(p),Ng(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 zv=["content-type","content-length"];function jv(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{zv.includes(r.toLowerCase())&&e.set(r,s)})}const $v=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Pg(e){const t=ts({},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=pn.from(c),t.url=yg(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?$v(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)&&jv(c,r.getHeaders(),n("formDataHeaderPolicy"))),sn.hasStandardBrowserEnv&&($.isFunction(s)&&(s=s(t)),s===!0||s==null&&Rv(t.url))){const y=a&&u&&Lv.read(u);y&&c.set(a,y)}return t}const Vv=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=Pg(e);let a=s.data;const u=pn.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 C=new XMLHttpRequest;C.open(s.method.toUpperCase(),s.url,!0),C.timeout=s.timeout;function A(){if(!C)return;const v=pn.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),q={data:!c||c==="text"||c==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:v,config:e,request:C};wg(function(Y){n(Y),w()},function(Y){r(Y),w()},q),C=null}"onloadend"in C?C.onloadend=A:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.startsWith("file:"))||setTimeout(A)},C.onabort=function(){C&&(r(new _e("Request aborted",_e.ECONNABORTED,e,C)),w(),C=null)},C.onerror=function(H){const q=H&&H.message?H.message:"Network Error",R=new _e(q,_e.ERR_NETWORK,e,C);R.event=H||null,r(R),w(),C=null},C.ontimeout=function(){let H=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const q=s.transitional||lf;s.timeoutErrorMessage&&(H=s.timeoutErrorMessage),r(new _e(H,q.clarifyTimeoutError?_e.ETIMEDOUT:_e.ECONNABORTED,e,C)),w(),C=null},a===void 0&&u.setContentType(null),"setRequestHeader"in C&&$.forEach(fg(u),function(H,q){C.setRequestHeader(q,H)}),$.isUndefined(s.withCredentials)||(C.withCredentials=!!s.withCredentials),c&&c!=="json"&&(C.responseType=s.responseType),f&&([T,_]=ol(f,!0),C.addEventListener("progress",T)),d&&C.upload&&([m,y]=ol(d),C.upload.addEventListener("progress",m),C.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=v=>{C&&(r(!v||v.type?new da(null,e,C):v),C.abort(),w(),C=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const N=Pv(s.url);if(N&&!sn.protocols.includes(N)){r(new _e("Unsupported protocol "+N+":",_e.ERR_BAD_REQUEST,e)),w();return}C.send(a||null)})},qv=(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 da(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},Yv=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},Gv=function(e,t){return Sd(this,null,function*(){try{for(var n=D2(Wv(e)),r,s,a;r=!(s=yield new Kr(n.next())).done;r=!1){const u=s.value;yield*l0(Yv(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new Kr(s.call(n)))}finally{if(a)throw a[0]}}})},Wv=function(e){return Sd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*l0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Kr(t.read());if(n)break;yield r}}finally{yield new Kr(t.cancel())}})},Og=(e,t,n,r)=>{const s=Gv(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return Ze(this,null,function*(){try{const{done:p,value:m}=yield s.next();if(p){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})},al=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Xv=(e,t,n)=>t+2<n&&al(e.charCodeAt(t+1))&&al(e.charCodeAt(t+2));function Kv(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);al(_)&&al(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&&Xv(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 hf="1.18.1",Ig=64*1024,{isFunction:ul}=$,Qv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Rg=e=>{if(!$.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Lg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Jv=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},Zv=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?ul(s):typeof fetch=="function",d=ul(a),f=ul(u);if(!c)return!1;const p=c&&ul(n),m=c&&(typeof r=="function"?(A=>N=>A.encode(N))(new r):A=>Ze(null,null,function*(){return new Uint8Array(yield new a(A).arrayBuffer())})),T=d&&p&&Lg(()=>{let A=!1;const N=new a(sn.origin,{body:new n,method:"POST",get duplex(){return A=!0,"half"}}),v=N.headers.has("Content-Type");return N.body!=null&&N.body.cancel(),A&&!v}),y=f&&p&&Lg(()=>$.isReadableStream(new u("").body)),_={stream:y&&(A=>A.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(A=>{!_[A]&&(_[A]=(N,v)=>{let H=N&&N[A];if(H)return H.call(N);throw new _e(`Response type '${A}' is not supported`,_e.ERR_NOT_SUPPORT,v)})});const w=A=>Ze(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}),C=(A,N)=>Ze(null,null,function*(){const v=$.toFiniteNumber(A.getContentLength());return v==null?w(N):v});return A=>Ze(null,null,function*(){let{url:N,method:v,data:H,signal:q,cancelToken:R,timeout:Y,onDownloadProgress:re,onUploadProgress:Ee,responseType:V,headers:se,withCredentials:he="same-origin",fetchOptions:Ce,maxContentLength:ne,maxBodyLength:ae}=Pg(A);const xe=$.isNumber(ne)&&ne>-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=qv([q,R&&R.toAbortSignal()],Y),D=null;const ee=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let O,Se=null;const Me=()=>new _e("Request body larger than maxBodyLength limit",_e.ERR_BAD_REQUEST,A,D);try{let ye;const De=Q("auth");if(De){const $e=$.getSafeProp(De,"username")||"",Ct=$.getSafeProp(De,"password")||"";ye={username:$e,password:Ct}}if(Jv(N)){const $e=new URL(N,sn.origin);if(!ye&&($e.username||$e.password)){const Ct=Rg($e.username),kn=Rg($e.password);ye={username:Ct,password:kn}}($e.username||$e.password)&&($e.username="",$e.password="",N=$e.href)}if(ye&&(se.delete("authorization"),se.set("Authorization","Basic "+btoa(Qv((ye.username||"")+":"+(ye.password||""))))),xe&&typeof N=="string"&&N.startsWith("data:")&&Kv(N)>ne)throw new _e("maxContentLength size of "+ne+" exceeded",_e.ERR_BAD_RESPONSE,A,D);if(oe&&v!=="get"&&v!=="head"){const $e=yield w(H);if(typeof $e=="number"&&isFinite($e)&&(O=$e,$e>ae))throw Me()}const Be=oe&&($.isReadableStream(H)||$.isStream(H)),Ge=($e,Ct,kn)=>Og($e,Ig,on=>{if(oe&&on>ae)throw Se=Me();Ct&&Ct(on)},kn);if(T&&v!=="get"&&v!=="head"&&(Ee||Be)){if(O=O==null?yield C(se,H):O,O!==0||Be){let $e=new a(N,{method:"POST",body:H,duplex:"half"}),Ct;if($.isFormData(H)&&(Ct=$e.headers.get("content-type"))&&se.setContentType(Ct),$e.body){const[kn,on]=Ee&&Ag(O,ol(vg(Ee)))||[];H=Ge($e.body,kn,on)}}}else if(Be&&!d&&p&&v!=="get"&&v!=="head")H=Ge(H);else if(Be&&d&&!T&&v!=="get"&&v!=="head")throw new _e("Stream request bodies are not supported by the current fetch implementation",_e.ERR_NOT_SUPPORT,A,D);$.isString(he)||(he=he?"include":"omit");const ht=d&&"credentials"in a.prototype;if($.isFormData(H)){const $e=se.getContentType();$e&&/^multipart\/form-data/i.test($e)&&!/boundary=/i.test($e)&&se.delete("content-type")}se.set("User-Agent","axios/"+hf,!1);const Ut=de(B({},Ce),{signal:k,method:v.toUpperCase(),headers:fg(se.normalize()),body:H,duplex:"half",credentials:ht?he:void 0});D=d&&new a(N,Ut);let Vt=yield d?ie(D,Ce):ie(N,Ut);const Cn=pn.from(Vt.headers);if(xe){const $e=$.toFiniteNumber(Cn.getContentLength());if($e!=null&&$e>ne)throw new _e("maxContentLength size of "+ne+" exceeded",_e.ERR_BAD_RESPONSE,A,D)}const sr=y&&(V==="stream"||V==="response");if(y&&Vt.body&&(re||xe||sr&&ee)){const $e={};["status","statusText","headers"].forEach(Pe=>{$e[Pe]=Vt[Pe]});const Ct=$.toFiniteNumber(Cn.getContentLength()),[kn,on]=re&&Ag(Ct,ol(vg(re),!0))||[];let Fn=0;const we=Pe=>{if(xe&&(Fn=Pe,Fn>ne))throw new _e("maxContentLength size of "+ne+" exceeded",_e.ERR_BAD_RESPONSE,A,D);kn&&kn(Pe)};Vt=new u(Og(Vt.body,Ig,we,()=>{on&&on(),ee&&ee()}),$e)}V=V||"text";let Zt=yield _[$.findKey(_,V)||"text"](Vt,A);if(xe&&!y&&!sr){let $e;if(Zt!=null&&(typeof Zt.byteLength=="number"?$e=Zt.byteLength:typeof Zt.size=="number"?$e=Zt.size:typeof Zt=="string"&&($e=typeof r=="function"?new r().encode(Zt).byteLength:Zt.length)),typeof $e=="number"&&$e>ne)throw new _e("maxContentLength size of "+ne+" exceeded",_e.ERR_BAD_RESPONSE,A,D)}return!sr&&ee&&ee(),yield new Promise(($e,Ct)=>{wg($e,Ct,{data:Zt,headers:pn.from(Vt.headers),status:Vt.status,statusText:Vt.statusText,config:A,request:D})})}catch(ye){if(ee&&ee(),k&&k.aborted&&k.reason instanceof _e){const De=k.reason;throw De.config=A,D&&(De.request=D),ye!==De&&Object.defineProperty(De,"cause",{__proto__:null,value:ye,writable:!0,enumerable:!1,configurable:!0}),De}if(Se)throw D&&!Se.request&&(Se.request=D),Se;if(ye instanceof _e)throw D&&!ye.request&&(ye.request=D),ye;if(ye&&ye.name==="TypeError"&&/Load failed|fetch/i.test(ye.message)){const De=new _e("Network Error",_e.ERR_NETWORK,A,D,ye&&ye.response);throw Object.defineProperty(De,"cause",{__proto__:null,value:ye.cause||ye,writable:!0,enumerable:!1,configurable:!0}),De}throw _e.from(ye,ye&&ye.code,A,D,ye&&ye.response)}})},eC=new Map,Dg=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=eC;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:Zv(t)),p=f;return f};Dg();const pf={http:yv,xhr:Vv,fetch:{get:Dg}};$.forEach(pf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Mg=e=>`- ${e}`,tC=e=>$.isFunction(e)||e===null||e===!1;function nC(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,!tC(r)&&(s=pf[(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 :
5
- `+u.map(Mg).join(`
6
- `):" "+Mg(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 Fg={getAdapter:nC,adapters:pf};function mf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new da(null,e)}function Bg(e){return mf(e),e.headers=pn.from(e.headers),e.data=ff.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Fg.getAdapter(e.adapter||ca.adapter,e)(e).then(function(r){mf(e),e.response=r;try{r.data=ff.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=pn.from(r.headers),r},function(r){if(!xg(r)&&(mf(e),r&&r.response)){e.response=r.response;try{r.response.data=ff.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=pn.from(r.response.headers)}return Promise.reject(r)})}const ll={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ll[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ug={};ll.transitional=function(t,n,r){function s(a,u){return"[Axios v"+hf+"] 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&&!Ug[u]&&(Ug[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}},ll.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function rC(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 cl={assertOptions:rC,validators:ll},mn=cl.validators;let ns=class{constructor(t){this.defaults=t||{},this.interceptors={request:new bg,response:new bg}}request(t,n){return Ze(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=(()=>{if(!s.stack)return"";const u=s.stack.indexOf(`
7
- `);return u===-1?"":s.stack.slice(u+1)})();try{if(!r.stack)r.stack=a;else if(a){const u=a.indexOf(`
8
- `),c=u===-1?-1:a.indexOf(`
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=ts(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&cl.assertOptions(r,{silentJSONParsing:mn.transitional(mn.boolean),forcedJSONParsing:mn.transitional(mn.boolean),clarifyTimeoutError:mn.transitional(mn.boolean),legacyInterceptorReqResOrdering:mn.transitional(mn.boolean),advertiseZstdAcceptEncoding:mn.transitional(mn.boolean),validateStatusUndefinedResolves:mn.transitional(mn.boolean)},!1),s!=null&&($.isFunction(s)?n.paramsSerializer={serialize:s}:cl.assertOptions(s,{encode:mn.function,serialize:mn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),cl.assertOptions(n,{baseUrl:mn.spelling("baseURL"),withXsrfToken:mn.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=pn.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 C=n.transitional||lf;C&&C.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 _=[Bg.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(C){w.call(this,C);break}}try{p=Bg.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=ts(this.defaults,t);const n=kg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return yg(n,t.params,t.paramsSerializer)}};$.forEach(["delete","get","head","options"],function(t){ns.prototype[t]=function(n,r){return this.request(ts(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(ts(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}ns.prototype[t]=n(),t!=="query"&&(ns.prototype[t+"Form"]=n(!0))});let iC=class F2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(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 da(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 F2(function(s){t=s}),cancel:t}}};function sC(e){return function(n){return e.apply(null,n)}}function oC(e){return $.isObject(e)&&e.isAxiosError===!0}const gf={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(gf).forEach(([e,t])=>{gf[t]=e});function Hg(e){const t=new ns(e),n=tg(ns.prototype.request,t);return $.extend(n,ns.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Hg(ts(e,s))},n}const Ot=Hg(ca);Ot.Axios=ns,Ot.CanceledError=da,Ot.CancelToken=iC,Ot.isCancel=xg,Ot.VERSION=hf,Ot.toFormData=sl,Ot.AxiosError=_e,Ot.Cancel=Ot.CanceledError,Ot.all=function(t){return Promise.all(t)},Ot.spread=sC,Ot.isAxiosError=oC,Ot.mergeConfig=ts,Ot.AxiosHeaders=pn,Ot.formToJSON=e=>Sg($.isHTMLForm(e)?new FormData(e):e),Ot.getAdapter=Fg.getAdapter,Ot.HttpStatusCode=gf,Ot.default=Ot;const{Axios:X7,AxiosError:K7,CanceledError:Q7,isCancel:J7,CancelToken:Z7,VERSION:eU,all:tU,Cancel:nU,isAxiosError:rU,spread:iU,toFormData:sU,AxiosHeaders:oU,HttpStatusCode:aU,formToJSON:uU,getAdapter:lU,mergeConfig:cU,create:dU}=Ot;class aC{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",()=>Ze(this,null,function*(){try{const t=yield Ot.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 uC{constructor(t,n,r,s=!1,a,u){Te(this,"apiService");Te(this,"config",null);Te(this,"getConfig",()=>Ze(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));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 aC(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 Gs=(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 lC{constructor(t=!1){Te(this,"isDevelopment");Te(this,"_log",(t,n,...r)=>{Gs(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 cC={copilot:"Your Search Assistant",messaging:"Commerce Client"},zg=F.createContext(null),dC=({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:C="start",autoScroll:A=!0,showProductDescription:N=!1,componentConfig:v,conversationHistory:H,resetConversationMessage:q="",apiKey:R,apiToken:Y,baseUrl:re,customerId:Ee,tenantId:V,theme:se,isDevelopment:he,__features:Ce,routingAttributes:ne,enableDownloadTranscript:ae=!0,enablePageContext:xe=!1,enableEscalationToAgent:oe=!1,enableImageUpload:Q=!1,showProductCaptions:ie=!1,staticQuestions:k,staticQuestionsStrategy:D="append",children:ee})=>{const O=e==="messaging",Se=F.useMemo(()=>{const Ut=ne==null?void 0:ne.isCartMgmtSupported;return Ut===!0||Ut==="true"},[ne]),Me=F.useMemo(()=>O?{config:null}:new uC(re,R,Y,he,Ee,V),[O,re,R,Y,he,Ee,V]),ye=F.useMemo(()=>new lC(he),[he]);F.useEffect(()=>{O||!Me||Me.config||Me.getConfig()},[Me,O]);const De=F.useMemo(()=>pA(se),[se]),Be=F.useMemo(()=>{const Ut=(y==null?void 0:y.placeholder)||m,Vt=(y==null?void 0:y.buttonLabel)||T;let Cn="icon";return y!=null&&y.buttonType?Cn=y.buttonType:T&&(Cn="text"),de(B({},y||{}),{placeholder:Ut,buttonLabel:Vt,buttonType:Cn})},[y,m,T]),Ge=F.useMemo(()=>de(B({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||cC[e!=null?e:"copilot"]}),[r,t,n,e]),ht=F.useMemo(()=>({configModule:Me,mode:e!=null?e:"copilot",headerConfig:Ge,entryMessage:a,staticQuestions:k||[],staticQuestionsStrategy:D,globalClassName:s,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:De,logger:ye,searchConfig:Be,suggestionButtonConfig:_,progressStepsLimit:w,messageAlignment:C,autoScroll:A,showProductDescription:!!N,enableMinimize:!!(v!=null&&v.enableMinimize),launcherAriaLabel:v==null?void 0:v.launcherAriaLabel,enableDownloadTranscript:ae,enablePageContext:xe,enableEscalationToAgent:oe,enableImageUpload:Q,showProductCaptions:!!ie,resetConversationMessage:q,conversationHistory:{sinceHours:typeof(H==null?void 0:H.sinceHours)=="number"?H.sinceHours:O?24:1,limit:H==null?void 0:H.limit},features:Ce,isCartMgmtSupported:Se}),[Me,e,Ge,a,k,D,s,f,p,c,d,u,Be,_,C,A,N,v,ae,xe,oe,Q,w,ie,q,ye,De,H,Ce,Se,O]);return S.jsx(zg.Provider,{value:ht,children:ee})},tt=()=>{const e=F.useContext(zg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class fC{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 EC(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 Qe=new fC,rs=()=>Qe.connected,fa=()=>Qe.isOpen,Ef="cimulate.widget.minimizedOnNav";function hC(){try{const e=sessionStorage.getItem(Ef)==="1";return sessionStorage.removeItem(Ef),e}catch(e){return!1}}function pC(){try{sessionStorage.removeItem(Ef)}catch(e){return}}const mC=e=>{window.addEventListener(Jd,e)},gC=e=>{window.removeEventListener(Jd,e)},EC=(e,t)=>{const n=new CustomEvent(Jd,{detail:{property:e,value:t}});window.dispatchEvent(n)},yC=e=>{Qe.connectedProxy.connected=e},ha=e=>{if(!lA(e)){const t=K0.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}Qe.entryTypeProxy.entryType=e},ti=e=>{const t=Qe.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;Qe.statusProxy.isOpen=n,n&&(Qe.statusProxy.isMinimized=!1,pC())},pa=e=>{const t=Qe.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Qe.statusProxy.isMinimized=n,n&&(Qe.statusProxy.isOpen=!1)},yf=e=>{Qe.modalProxy.isFullscreen=e},dl=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);Qe.statusProxy.type=e,e==="dialog"||e==="chat"?Qe.modeProxy.mode="embedded":Qe.modeProxy.mode="standalone"},bf=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(", ")}.`);Qe.dialogProxy.position=e},bC=e=>{const t=Qe.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Qe.dialogProxy.isFullHeight=n},TC=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=tt(),s=F.useCallback(v=>{n({type:gt.SET_COPILOT,payload:v})},[n]),a=F.useCallback(v=>{yC(v),n({type:gt.SET_CONNECTED,payload:v})},[n]),u=F.useCallback(()=>{n({type:gt.RESET_COPILOT,payload:{}})},[n]),c=F.useCallback(()=>{n({type:gt.RESET_STATE,payload:{}})},[n]),d=F.useCallback(v=>{r==null||r.log(`${v.name} event received`,v),n({type:gt.ADD_MESSAGE,payload:v}),v.bypassHandlers||e==null||e(v)},[e,r,n]),f=F.useCallback(v=>{n({type:gt.ADD_LOADING_MESSAGE,payload:v})},[n]),p=F.useCallback(v=>{n({type:gt.REMOVE_LOADING_MESSAGE,payload:v})},[n]),m=F.useCallback(v=>{d(v),f(v.id)},[d,f]),T=F.useCallback(v=>{n({type:gt.SET_ACTIVE_CONVERSATION_ID,payload:v})},[n]),y=F.useCallback(v=>{n({type:gt.ADD_CONVERSATION_ID,payload:v})},[n]),_=F.useCallback(v=>{n({type:gt.SET_CONVERSATION_IDS,payload:v})},[n]),w=F.useCallback(v=>{n({type:gt.SET_IMAGE_FILE,payload:v})},[n]),C=F.useCallback(v=>{n({type:gt.SET_ASK_CIM_PROMPTS,payload:v})},[n]),A=F.useCallback(v=>{n({type:gt.SET_CONVERSATION_HISTORY_LOADED,payload:v})},[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:C,setConversationHistoryLoaded:A}),[s,a,u,c,d,f,p,m,T,y,_,w,C,A]);return S.jsx(Z0.Provider,{value:N,children:t})};oA();const _C=(e,t)=>{const{type:n,payload:r}=t;if(n===gt.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 gt.RESET_STATE:e.messages=Ji.messages,e.groupedMessages=Ji.groupedMessages,e.loadingMessages=Ji.loadingMessages,e.imageFile=Ji.imageFile,e.askCimPrompts=Ji.askCimPrompts,e.conversationHistoryLoaded=Ji.conversationHistoryLoaded;break;case gt.RESET_COPILOT:e.copilot=null;break;case gt.SET_COPILOT:e.copilot=r;break;case gt.SET_CONNECTED:e.connected=r;break;case gt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case gt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case gt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case gt.ADD_CONVERSATION_ID:{const s=r;e.conversationIds.includes(s)||e.conversationIds.push(s)}break;case gt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case gt.SET_IMAGE_FILE:e.imageFile=r;break;case gt.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 gt.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},SC=({onCopilotEvent:e,children:t})=>{const[n,r]=W0(_C,Ji);return S.jsx(J0.Provider,{value:n,children:S.jsx(TC,{onCopilotEvent:e,dispatch:r,children:t})})};function xC(){var e=F.useRef(!0);return e.current?(e.current=!1,!0):e.current}function wC(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function AC(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Tf=typeof window!="undefined",ma=function(e){F.useEffect(e,[])},vC=function(e){var t=F.useRef(e);t.current=e,ma(function(){return function(){return t.current()}})},CC=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 vC(function(){cancelAnimationFrame(t.current)}),[r,a]},kC=function(e,t){return e===t};function NC(e,t){t===void 0&&(t=kC);var n=F.useRef(),r=F.useRef(e),s=xC();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var PC=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=CC({width:Tf?window.innerWidth:r,height:Tf?window.innerHeight:a}),d=c[0],f=c[1];return F.useEffect(function(){if(Tf){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return wC(window,"resize",p),function(){AC(window,"resize",p)}}},[]),d};class OC{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(gn.size).fill(1).forEach(()=>{const r=gn.first();r&&(t(r),gn.remove())})})}get size(){return this.items.length}}const gn=new OC,jg=e=>{window.addEventListener(Qd,e)},$g=e=>{window.removeEventListener(Qd,e)},IC=(e,t,n)=>{const r=new CustomEvent(Qd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Vg=e=>{window.addEventListener(Kd,e)},qg=e=>{window.removeEventListener(Kd,e)},RC=(e,t,n)=>{const r=new CustomEvent(Kd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Yg=e=>{window.addEventListener(Xd,e)},Gg=e=>{window.removeEventListener(Xd,e)},_f=(e,t,n)=>{const r=new CustomEvent(Xd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},LC=e=>{window.addEventListener(ef,e)},DC=e=>{window.removeEventListener(ef,e)},ga=(e,t,n)=>{const r=new CustomEvent(ef,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class MC{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=fA[n];return RC(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 ut=new MC,Wg=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},Xg=(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},Kg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},Qg=({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},Jg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},Zg=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},FC=e=>{if(!rs()||!fa()){rs()&&gn.clear(),gn.add({context:"browse",payload:de(B({},ut.state),{categoryId:e})});return}ut.categoryIdProxy.categoryId=e},e1=e=>{Wg(e,ut)},BC=(e,t)=>{Xg(e,t,ut)},t1=e=>{Kg(e,ut)},UC=({field:e,value:t})=>{Qg({field:e,value:t},ut)},HC=e=>{Jg(e,ut)},n1=e=>{Zg(e,ut)},r1=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=rs(),n=fa();if(!t||!n){t&&gn.clear(),gn.add({context:"browse",payload:B({},e)});return}"facetFilters"in e&&e1(e.facetFilters||{}),"rangeFilters"in e&&t1(e.rangeFilters||[]),"catalogSegment"in e&&(ut.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&n1(e.pricebooks||[]),"categoryName"in e&&(ut.categoryIdProxy.categoryName=e.categoryName||""),ut.categoryIdProxy.categoryId=e.categoryId},zC=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:r1,updateBrowseCategoryId:FC,updateCatalogSegment:HC,updateFacetFilter:BC,updateFacetFilters:e1,updatePricebooks:n1,updateRangeFilter:UC,updateRangeFilters:t1},Symbol.toStringTag,{value:"Module"}));class jC{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)=>(_f(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",()=>{_f("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 pr=new jC,i1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=rs(),n=fa();if(!t||!n){t&&gn.clear(),gn.add({context:"pdp",payload:B({},e)});return}pr.updateProxy(e),_f("pdp-context",e)},$C=e=>{pr.proxy.productId=e,rs()||gn.add({context:"pdp",payload:B({},pr.state)})},VC=e=>{pr.proxy.pdpLink=e};class qC{constructor(){Te(this,"initialState",eg);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 Ea(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 Ft=new qC,YC=e=>{window.addEventListener(Zd,e)},GC=e=>{window.removeEventListener(Zd,e)},Ea=(e,t)=>{const n=new CustomEvent(Zd,{detail:{property:e,value:t}});window.dispatchEvent(n)},s1=e=>{const t=Ft.isOpen,n=typeof e=="boolean"?e:!t;Ft.promptsStateProxy.isOpen=n},o1=e=>{const t=Ft.isInline,n=typeof e=="boolean"?e:!t;Ft.promptsStateProxy.isInline=n},WC=e=>{Ft.promptsParamsProxy=Ft.updatePromptsParamsProxy(e),Ea("params",e),Ft.promptsStateProxy.entryType="ask_cim"},XC=e=>{Ft.promptsParamsProxy=Ft.updatePromptsParamsProxy(e),Ea("params",e),Ft.promptsStateProxy.entryType="search"},KC=e=>{Ft.promptsParamsProxy=Ft.updatePromptsParamsProxy(e),Ea("params",e),Ft.promptsStateProxy.entryType="browse"},QC=e=>{Ft.promptsParamsProxy=Ft.updatePromptsParamsProxy(e),Ea("params",e),Ft.promptsStateProxy.entryType="pdp"},JC=({elementId:e,entryType:t,params:n,isInline:r})=>{Ft.promptsStateProxy.elementId=e,t&&(Ft.promptsStateProxy.entryType=t),typeof r=="boolean"&&o1(r),n&&Ft.updatePromptsParamsProxy(n),Ft.isOpen||s1(!0)},ZC=Object.freeze(Object.defineProperty({__proto__:null,endConversation:()=>{ga("endConversation",!0,ei.END_CONVERSATION)},getConversationMessages:({payload:e,callback:t})=>{ga("getConversationMessages",{payload:e,callback:t},ei.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{ga("getSessionInformation",{callback:e},ei.GET_SESSION_INFORMATION)},loadConversation:e=>{ga("loadConversation",e,ei.LOAD_CONVERSATION)},resetConversation:()=>{ga("resetConversation",!0,ei.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class ek{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=hA[n];return IC(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 bt=new ek,tk=e=>{const t=fa(),n=rs();if(!n||!t){n&&gn.clear(),gn.add({context:"search",payload:de(B({},bt.state),{query:e})});return}bt.queryProxy.query=e},a1=e=>{Wg(e,bt)},nk=(e,t)=>{Xg(e,t,bt)},u1=e=>{Kg(e,bt)},rk=({field:e,value:t})=>{Qg({field:e,value:t},bt)},ik=e=>{Jg(e,bt)},l1=e=>{Zg(e,bt)},c1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=fa(),n=rs();if(!n||!t){n&&gn.clear(),gn.add({context:"search",payload:B({},e)});return}"facetFilters"in e&&a1(e.facetFilters||{}),"rangeFilters"in e&&u1(e.rangeFilters||[]),"catalogSegment"in e&&(bt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&l1(e.pricebooks||[]),bt.queryProxy.query=e.query},sk=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:c1,updateCatalogSegment:ik,updateFacetFilter:nk,updateFacetFilters:a1,updatePricebooks:l1,updateRangeFilter:rk,updateRangeFilters:u1,updateSearchQuery:tk},Symbol.toStringTag,{value:"Module"})),ok={categoryId:ut.categoryId,categoryName:ut.categoryIdProxy.categoryName||"",facetFilters:ut.facetFilters,rangeFilters:ut.rangeFilters,catalogSegment:ut.catalogSegment,pricebooks:ut.pricebooks},d1=F.createContext(ok),ak=({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 Vg(_),()=>{qg(_)}},[]);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(d1.Provider,{value:y,children:e})},uk=()=>{const e=F.useContext(d1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},lk={searchQuery:bt.query,facetFilters:bt.facetFilters,rangeFilters:bt.rangeFilters,catalogSegment:bt.catalogSegment,pricebooks:bt.pricebooks},f1=F.createContext(lk),ck=({children:e})=>{const[t,n]=F.useState(bt.query),[r,s]=F.useState(bt.facetFilters),[a,u]=F.useState(bt.rangeFilters),[c,d]=F.useState(bt.catalogSegment),[f,p]=F.useState(bt.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 jg(T),()=>{$g(T)}},[]);const m=F.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return S.jsx(f1.Provider,{value:m,children:e})},dk=()=>{const e=F.useContext(f1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},fk={productId:pr.productId,pdpLink:pr.pdpLink},h1=F.createContext(fk),hk=({children:e})=>{const[t,n]=F.useState(pr.productId),[r,s]=F.useState(pr.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 Yg(u),()=>{Gg(u)}},[]);const a=F.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return S.jsx(h1.Provider,{value:a,children:e})},pk=()=>{const e=F.useContext(h1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},p1=F.createContext({mode:Qe.modeProxy.mode,entryType:Qe.entryType,status:Qe.statusProxy,dialogPosition:Qe.dialogProxy.position,isDialogFullHeight:Qe.dialogProxy.isFullHeight,dialogWidth:Qe.dialogProxy.width,isModalFullscreen:Qe.modalProxy.isFullscreen,previousComponentType:Qe.statusProxy.type}),mk=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=F.useState(e!=null?e:Qe.entryTypeProxy.entryType),[u,c]=F.useState(Qe.modeProxy.mode),[d,f]=F.useState({type:n||Qe.statusProxy.type,isOpen:t&&"isOpen"in t?!!t.isOpen:Qe.statusProxy.isOpen,isMinimized:t&&"isMinimized"in t?!!t.isMinimized:Qe.statusProxy.isMinimized}),[p,m]=F.useState(Qe.dialogProxy.position),[T,y]=F.useState(Qe.dialogProxy.isFullHeight),[_,w]=F.useState(Qe.dialogProxy.width),[C,A]=F.useState(Qe.modalProxy.isFullscreen),N=F.useRef(!1),v=NC(d.type);F.useEffect(()=>{const q=R=>{const{property:Y,value:re}=R.detail||{};if(!(!Y||re===void 0)){if(Y==="mode"){c(re);return}if(Y==="entryType"){a(re);return}if(Y==="isMinimized"){f(Ee=>de(B({},Ee),{isMinimized:re}));return}if(Y==="isOpen"){f(Ee=>de(B({},Ee),{isOpen:re}));return}if(Y==="type"){f(Ee=>de(B({},Ee),{type:re}));return}if(Y==="position"){m(re);return}if(Y==="isFullHeight"){y(re);return}if(Y==="width"){w(re);return}if(Y==="isFullscreen"){A(re);return}}};return mC(q),()=>{gC(q)}},[]),ma(()=>{e&&ha(e)}),ma(()=>{if(N.current)return;N.current=!0;const q=n||(t==null?void 0:t.type);q&&dl(q);const R=hC();t&&"isOpen"in t&&ti(!!t.isOpen),t&&"isMinimized"in t&&pa(!!t.isMinimized),R&&pa(!0)}),ma(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:q}=t.options;q&&bf(q),"dialogFullHeight"in t.options&&bC(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&w(t.options.dialogWidth),"isModalFullscreen"in t.options&&yf(!!t.options.isModalFullscreen)});const H=F.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:v||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:_,isModalFullscreen:C}),[u,s,d,v,p,T,_,C]);return S.jsx(p1.Provider,{value:H,children:r})},tr=()=>{const e=F.useContext(p1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},m1=F.createContext(null),g1=F.createContext(null),Sf=()=>{const e=F.useContext(g1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},ni=()=>{const e=F.useContext(m1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},Ws=()=>{const e=F.useContext(Z0);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Vn=()=>{const e=F.useContext(J0);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},gk=({copilot:e})=>{const{logger:t,conversationHistory:n}=tt(),{isInline:r}=ni(),{addCopilotEvent:s,setConversationHistoryLoaded:a}=Ws(),{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 C=T.find(N=>N.id===w.eventSourceId);(A=C==null?void 0:C.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}},E1=F.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),Ek=({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(),on=dk(),{searchQuery:y}=on,_=dn(on,["searchQuery"]),Fn=uk(),{categoryId:w}=Fn,C=dn(Fn,["categoryId"]),{productId:A,pdpLink:N}=pk(),{setCopilot:v,setConnected:H,resetCopilot:q,resetCopilotState:R,addCopilotEvent:Y,removeLoadingMessage:re,handleCopilotRequestAck:Ee,setActiveConversationId:V,setConversationIds:se,setAskCimPrompts:he}=Ws(),{connected:Ce,copilot:ne,messages:ae,groupedMessages:xe,loadingMessages:oe,askCimPrompts:Q}=Vn(),{status:ie,entryType:k}=tr(),{isInline:D}=ni(),{getConversationMessages:ee,getSessionInformation:O}=gk({copilot:ne}),Se=F.useMemo(()=>oe.size>0,[oe]),Me=F.useCallback(we=>oe.has(we),[oe]),ye=F.useCallback(({query:we,facetFilters:Pe,rangeFilters:Fe,catalogSegment:rt,pricebooks:pt,userPrompt:J,imageFile:me})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}if(!we)return;const ve={searchParams:{query:we}};J&&(ve.userPrompt=J),me&&(ve.attachments={image:me}),Pe&&Object.keys(Pe).length>0&&(ve.searchParams.facetFilters=Pe),Fe&&Fe.length>0&&(ve.searchParams.rangeFilters=Fe),rt&&(ve.searchParams.catalogSegment=rt),pt&&(ve.searchParams.pricebooks=pt),m&&(ve.clientContext=m),ha("search"),ne.search(ve,Ve=>{const Ie=B({},Ve);Ee(Ie)})},[p,Ee,ne,m]),De=F.useCallback(({categoryId:we,categoryName:Pe,facetFilters:Fe,rangeFilters:rt,catalogSegment:pt,pricebooks:J,userPrompt:me,imageFile:ve})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}const Ve=Fe&&Object.keys(Fe).length>0;if(we===""&&!Ve){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const Ie={browseParams:{categoryId:we||""}};me&&(Ie.userPrompt=me),ve&&(Ie.attachments={image:ve}),Ve&&(Ie.browseParams.facetFilters=Fe),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)),ha("browse"),ne.browse(Ie,lt=>{var $r;const qt=B({},lt),Ht=(($r=qt.request)==null?void 0:$r.clientContext)||{},an=(Ht==null?void 0:Ht.cimLabel)||Pe;an&&qt.request&&(qt.request.label=an),Ee(qt)})},[p,Ee,ne,m]),Be=F.useCallback(({productId:we,productName:Pe,pdpLink:Fe,userPrompt:rt,imageFile:pt})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}if(!we)return;const J={productId:we};rt&&(J.userPrompt=rt),Fe&&(J.pdpLink=Fe),pt&&(J.attachments={image:pt}),(m||Pe)&&(J.clientContext={},m&&(J.clientContext=B({},m)),Pe&&(J.clientContext.cimLabel=Pe)),T&&(J.baseCatalogParams=T),ha("pdp"),ne.productView(J,me=>{var lt;const ve=B({},me),Ve=((lt=ve.request)==null?void 0:lt.clientContext)||{},Ie=(Ve==null?void 0:Ve.cimLabel)||Pe;Ie&&ve.request&&(ve.request.label=Ie),Ee(ve)})},[p,ne,Ee,m,T]),Ge=F.useCallback(({userPrompt:we,imageFile:Pe})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Fe={userPrompt:we};Pe&&(Fe.attachments={image:Pe}),m&&(Fe.clientContext=m),T&&(Fe.baseCatalogParams=T),ne.askCim(Fe,rt=>{const pt=B({},rt);Ee(pt)})},[p,ne,Ee,m,T]),ht=F.useCallback(we=>{Y(we),c==null||c(we)},[Y,c]),Ut=F.useCallback(we=>{Y(we),d==null||d(we)},[Y,d]),Vt=F.useCallback(we=>{u==null||u(we),H(!0)},[u,H]);F.useEffect(()=>{!ne||!Ce||!ie.isOpen||gn.size>0&&gn.processQueue(we=>{if(we.context==="search"){const Pe=B({},we.payload);c1(Pe)}if(we.context==="browse"){const Pe=B({},we.payload);r1(Pe)}if(we.context==="pdp"){const Pe=B({},we.payload);i1(Pe)}})},[ie.isOpen,ne,Ce]);const Cn=F.useCallback(we=>{const Pe=Fe=>{const rt=de(B({},Fe),{id:Fe.inquiryLinkId||Fe.id});Y(rt)};we.on("connect_ack",Vt),we.on("partial_inquiry",Pe),we.on("display_products",Y),we.on("progress",Y),we.on("refined_search",ht),we.on("refined_browse",Ut),we.on("done",Fe=>{re(Fe.eventSourceId)}),we.on("error",Fe=>{Y(Fe),re(Fe.eventSourceId)}),we.onDisconnect(Fe=>{const rt=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Fe),!rt.includes(Fe)){H(!1);return}p==null||p.log("De-registering event listeners");const pt=new Date().toISOString();Y({name:"error",message:"Connection was lost. Please try again.",createdAt:pt,id:`error-${pt}`,sessionId:"session"}),we.off()})},[p,H,re,ht,Ut,Y,Vt]);F.useEffect(()=>{if(!ne)return;const we=Pe=>{if(!D){if(!Pe.message&&Pe.eventSourceId&&Pe.eventSourceId===Q.requestId){he({requestId:Pe.eventSourceId,message:Pe});return}Y(Pe)}};return ne.on("follow_up",we),()=>{ne.off("follow_up",we)}},[ne,ae,Q.requestId,D,Y,he]),F.useEffect(()=>{if(!ne)return;const we=Pe=>{if(D)return;const Fe=de(B({},Pe),{id:Pe.inquiryLinkId||Pe.id});Y(Fe)};return ne.on("inquiry",we),()=>{ne.off("inquiry",we)}},[ne,D,Y]),ma(()=>{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 Fe=new Kw(Pe);return v(Fe),Cn(Fe),Fe.connect(),Fe.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)}),()=>{Fe.disconnect(),Fe.off(),q()}});const sr=F.useCallback(we=>{if(!ne)return;const Pe={eventId:we,reason:"User cancelled the request"};ne.cancelRequest(Pe,Fe=>{Y(Fe),re(we)})},[Y,re,ne]),Zt=F.useCallback(()=>{ne&&ne.conversationReset({},we=>{R(),Y(we),ne.requestSessionInformation(Pe=>{p==null||p.log("Session Information: ",Pe);const{activeConversationId:Fe,conversationIds:rt}=Pe.data||{};Fe&&V(Fe),rt!=null&&rt.length&&se(rt)})})},[ne,p,Y,R,V,se]),$e=F.useCallback((we,Pe)=>{if(!we)return;const Fe={userPrompt:we};switch(Pe&&(Fe.imageFile=Pe),k){case"ask_cim":Ge(Fe);return;case"search":y?ye(B(B({query:y},_),Fe)):Ge(Fe);return;case"browse":De(B(B({categoryId:w},C),Fe));return;case"pdp":A?Be(B({productId:A,pdpLink:N||""},Fe)):Ge(Fe);return}},[k,y,_,ye,Ge,w,C,De,Be,A,N]),Ct=F.useCallback((we,Pe)=>{var me,ve,Ve;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"){Ge({userPrompt:rt});return}if(J==="copilot_search"){const Ie=((me=pt.request)==null?void 0:me.searchParams)||{},qt=Ie.query===y;ye(de(B({query:Ie.query||y},qt?_:{}),{userPrompt:rt}));return}if(J==="copilot_browse"){const Ie=pt.request,lt=Ie.browseParams||{},Ht=lt.categoryId===w,an=((ve=Ie.clientContext)==null?void 0:ve.cimLabel)||"";De(de(B({categoryId:lt.categoryId||w||""},Ht?C:{}),{categoryName:an,userPrompt:rt}));return}if(J==="product_view"){const Ie=pt.request||{},lt=Ie.productId,qt=lt===A,Ht=((Ve=Ie.clientContext)==null?void 0:Ve.cimLabel)||"";let an="";qt?an=N||"":an=Ie.pdpLink||"",Be({productId:lt||A,pdpLink:an,productName:Ht,userPrompt:rt})}},[ae,y,_,ye,Ge,w,C,De,Be,A,N]),kn=F.useMemo(()=>({copilot:ne,messages:ae,groupedMessages:xe,isLoading:Se,isResponseLoading:Me,handleAskCim:Ge,handleSearch:ye,handleBrowse:De,handlePdp:Be,handleUserInput:$e,handleSuggestion:Ct,handleCancel:sr,resetConversation:Zt,getSessionInformation:O,getConversationMessages:ee}),[ne,ae,xe,Se,Me,Ge,ye,De,Be,$e,Ct,sr,Zt,O,ee]);return S.jsx(E1.Provider,{value:kn,children:f})},y1=()=>{const{copilot:e}=Vn(),{addCopilotEvent:t}=Ws();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])}},Or=()=>{const e=F.useContext(E1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},yk=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=Vn(),{entryType:s}=tr(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:c}=Ws(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:T,getConversationMessages:y}=Or(),{getCopilotSuggestions:_}=y1();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:v}=bt.facetFiltersProxy,{rangeFilters:H}=bt.rangeFiltersProxy,{catalogSegment:q}=bt.catalogSegmentProxy,{pricebooks:R}=bt.pricebooksProxy,Y={query:N};Y.facetFilters=v||{},Y.rangeFilters=H||[],Y.catalogSegment=q||"",Y.pricebooks=R||[],d(B({},Y))},[e,d]),C=F.useCallback(({categoryId:N})=>{if(!e)return;const v=ut.categoryIdProxy.categoryName,{facetFilters:H}=ut.facetFiltersProxy,{rangeFilters:q}=ut.rangeFiltersProxy,{catalogSegment:R}=ut.catalogSegmentProxy,{pricebooks:Y}=ut.pricebooksProxy,re={categoryId:N};re.categoryName=v||"",re.facetFilters=H||{},re.rangeFilters=q||[],re.catalogSegment=R||"",re.pricebooks=Y||[],f(B({},re))},[e,f]),A=F.useCallback(({productId:N})=>{if(!e||!N)return;const v={productId:N,pdpLink:pr.pdpLink,productName:pr.proxy.productName||""};p(v)},[e,p]);return F.useEffect(()=>{const N=({detail:v})=>{(v==null?void 0:v.property)==="query"&&w({query:v.value})};return jg(N),()=>{$g(N)}},[w]),F.useEffect(()=>{const N=({detail:v})=>{if((v==null?void 0:v.property)==="pdp-context"){const H=v.value;A({productId:H.productId});return}(v==null?void 0:v.property)==="productId"&&A({productId:v.value})};return Yg(N),()=>{Gg(N)}},[A]),F.useEffect(()=>{const N=({detail:v})=>{(v==null?void 0:v.property)==="categoryId"&&C({categoryId:v.value})};return Vg(N),()=>{qg(N)}},[C]),F.useEffect(()=>{const N=({detail:v})=>{if((v==null?void 0:v.event)==ei.RESET_CONVERSATION&&m(),(v==null?void 0:v.event)==ei.GET_SESSION_INFORMATION){const H=v.value.callback;T(H)}if((v==null?void 0:v.event)==ei.GET_CONVERSATION_MESSAGES){const{payload:H,callback:q}=v.value;if(!H.conversationId||typeof q!="function")return;y(H,q)}if((v==null?void 0:v.event)==ei.LOAD_CONVERSATION){const H=v.value;if(!H.conversationId)return;y(H,R=>{a(),R.forEach(Y=>{u(Y)})})}};return LC(N),()=>{DC(N)}},[m,T,y,a,u]),null},bk=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>S.jsxs(Ek,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:[S.jsx(yk,{}),f]}),Tk=({children:e,dispatch:t})=>{const n=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),s=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),c=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),m=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),T=F.useCallback(_=>{t({type:Et.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(g1.Provider,{value:y,children:e})},_k=(e,t)=>{const{type:n,payload:r}=t;switch(n){case Et.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case Et.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case Et.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case Et.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case Et.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case Et.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case Et.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case Et.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case Et.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case Et.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case Et.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case Et.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case Et.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case Et.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case Et.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},Sk=({promptsConfig:e,children:t})=>{const[n,r]=W0(_k,de(B(B({},eg),e||{}),{staticQuestions:M0((e==null?void 0:e.staticQuestions)||[])}));return S.jsx(m1.Provider,{value:n,children:S.jsx(Tk,{dispatch:r,children:t})})},b1=({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:C,entryMessage:A,disclaimerText:N,disclaimerMarkdown:v,clientContext:H,baseCatalogParams:q,searchPlaceholder:R,searchButtonLabel:Y,searchConfig:re,suggestionButtonConfig:Ee,messageAlignment:V,autoScroll:se,promptsConfig:he,resetConversationMessage:Ce,conversationHistory:ne,onConnect:ae,onCopilotEvent:xe,onRefinedSearch:oe,onRefinedBrowse:Q,__features:ie,children:k})=>{const D=C==null?void 0:C.params;return S.jsx(dC,{mode:e,baseUrl:r,apiKey:t,apiToken:n,customerId:s,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,entryMessage:A,staticQuestions:M0(D==null?void 0:D.staticQuestions),staticQuestionsStrategy:D==null?void 0:D.staticQuestionsStrategy,theme:f,globalClassName:m,openLinksInNewTab:p,searchPlaceholder:R,searchButtonLabel:Y,searchConfig:re,suggestionButtonConfig:Ee,messageAlignment:V,autoScroll:se,componentConfig:_,clientContext:H,baseCatalogParams:q,disclaimerMarkdown:v,disclaimerText:N,resetConversationMessage:Ce,conversationHistory:ne,isDevelopment:T,__features:ie,children:S.jsx(mk,{entryType:w!=null?w:C==null?void 0:C.type,componentConfig:_,componentType:y,children:S.jsx(SC,{onCopilotEvent:xe,children:S.jsx(hk,{children:S.jsx(ak,{children:S.jsx(ck,{children:S.jsx(Sk,{promptsConfig:he,children:S.jsx(bk,{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 xf={exports:{}},In={},wf={exports:{}},Af={};var T1;function xk(){return T1||(T1=1,(function(e){function t(Q,ie){var k=Q.length;Q.push(ie);e:for(;0<k;){var D=k-1>>>1,ee=Q[D];if(0<s(ee,ie))Q[D]=ie,Q[k]=ee,k=D;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 D=0,ee=Q.length,O=ee>>>1;D<O;){var Se=2*(D+1)-1,Me=Q[Se],ye=Se+1,De=Q[ye];if(0>s(Me,k))ye<ee&&0>s(De,Me)?(Q[D]=De,Q[ye]=k,D=ye):(Q[D]=Me,Q[Se]=k,D=Se);else if(ye<ee&&0>s(De,k))Q[D]=De,Q[ye]=k,D=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,C=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 v(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 H(Q){if(w=!1,v(Q),!_)if(n(d)!==null)_=!0,xe(q);else{var ie=n(f);ie!==null&&oe(H,ie.startTime-Q)}}function q(Q,ie){_=!1,w&&(w=!1,A(re),re=-1),y=!0;var k=T;try{for(v(ie),m=n(d);m!==null&&(!(m.expirationTime>ie)||Q&&!se());){var D=m.callback;if(typeof D=="function"){m.callback=null,T=m.priorityLevel;var ee=D(m.expirationTime<=ie);ie=e.unstable_now(),typeof ee=="function"?m.callback=ee:m===n(d)&&r(d),v(ie)}else r(d);m=n(d)}if(m!==null)var O=!0;else{var Se=n(f);Se!==null&&oe(H,Se.startTime-ie),O=!1}return O}finally{m=null,T=k,y=!1}}var R=!1,Y=null,re=-1,Ee=5,V=-1;function se(){return!(e.unstable_now()-V<Ee)}function he(){if(Y!==null){var Q=e.unstable_now();V=Q;var ie=!0;try{ie=Y(!0,Q)}finally{ie?Ce():(R=!1,Y=null)}}else R=!1}var Ce;if(typeof N=="function")Ce=function(){N(he)};else if(typeof MessageChannel!="undefined"){var ne=new MessageChannel,ae=ne.port2;ne.port1.onmessage=he,Ce=function(){ae.postMessage(null)}}else Ce=function(){C(he,0)};function xe(Q){Y=Q,R||(R=!0,Ce())}function oe(Q,ie){re=C(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(q))},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"):Ee=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 D=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?D+k:D):k=D,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>D?(Q.sortIndex=k,t(f,Q),n(d)===null&&Q===n(f)&&(w?(A(re),re=-1):w=!0,oe(H,k-D))):(Q.sortIndex=ee,t(d,Q),_||y||(_=!0,xe(q))),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}}}})(Af)),Af}var _1;function wk(){return _1||(_1=1,wf.exports=xk()),wf.exports}var S1;function Ak(){if(S1)return In;S1=1;var e=hn(),t=wk();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 C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){C[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];C[o]=new w(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){C[i]=new w(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){C[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){C[i]=new w(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){C[i]=new w(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){C[i]=new w(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){C[i]=new w(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){C[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);C[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);C[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);C[o]=new w(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){C[i]=new w(i,1,!1,i.toLowerCase(),null,!1,!1)}),C.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){C[i]=new w(i,1,!1,i.toLowerCase(),null,!0,!0)});function v(i,o,l,h){var E=C.hasOwnProperty(o)?C[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 H=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=Symbol.for("react.element"),R=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),re=Symbol.for("react.strict_mode"),Ee=Symbol.for("react.profiler"),V=Symbol.for("react.provider"),se=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),Ce=Symbol.for("react.suspense"),ne=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,D;function ee(i){if(D===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);D=o&&o[1]||""}return`
11
- `+D+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(`
1
+ (function(qe,ze){typeof exports=="object"&&typeof module!="undefined"?module.exports=ze():typeof define=="function"&&define.amd?define(ze):(qe=typeof globalThis!="undefined"?globalThis:qe||self,qe["cimulate-copilot-widget"]=ze())})(this,(function(){"use strict";var cU=Object.defineProperty,dU=Object.defineProperties;var fU=Object.getOwnPropertyDescriptors;var wd=Object.getOwnPropertySymbols;var W2=Object.prototype.hasOwnProperty,G2=Object.prototype.propertyIsEnumerable;var Ko=(qe,ze)=>(ze=Symbol[qe])?ze:Symbol.for("Symbol."+qe),hU=qe=>{throw TypeError(qe)},Hu=Math.pow,h0=(qe,ze,Qe)=>ze in qe?cU(qe,ze,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):qe[ze]=Qe,B=(qe,ze)=>{for(var Qe in ze||(ze={}))W2.call(ze,Qe)&&h0(qe,Qe,ze[Qe]);if(wd)for(var Qe of wd(ze))G2.call(ze,Qe)&&h0(qe,Qe,ze[Qe]);return qe},me=(qe,ze)=>dU(qe,fU(ze));var hn=(qe,ze)=>{var Qe={};for(var ot in qe)W2.call(qe,ot)&&ze.indexOf(ot)<0&&(Qe[ot]=qe[ot]);if(qe!=null&&wd)for(var ot of wd(qe))ze.indexOf(ot)<0&&G2.call(qe,ot)&&(Qe[ot]=qe[ot]);return Qe};var Te=(qe,ze,Qe)=>h0(qe,typeof ze!="symbol"?ze+"":ze,Qe);var et=(qe,ze,Qe)=>new Promise((ot,Ft)=>{var Le=mt=>{try{pn(Qe.next(mt))}catch(mn){Ft(mn)}},un=mt=>{try{pn(Qe.throw(mt))}catch(mn){Ft(mn)}},pn=mt=>mt.done?ot(mt.value):Promise.resolve(mt.value).then(Le,un);pn((Qe=Qe.apply(qe,ze)).next())}),Kr=function(qe,ze){this[0]=qe,this[1]=ze},Ad=(qe,ze,Qe)=>{var ot=(pn,mt,mn,Cr)=>{try{var Bs=Qe[pn](mt),Ki=(mt=Bs.value)instanceof Kr,Qo=Bs.done;Promise.resolve(Ki?mt[0]:mt).then(S=>Ki?ot(pn==="return"?pn:"next",mt[1]?{done:S.done,value:S.value}:S,mn,Cr):mn({value:S,done:Qo})).catch(S=>ot("throw",S,mn,Cr))}catch(S){Cr(S)}},Ft=(pn,mt,mn,Cr)=>un[pn]=Bs=>(mt=new Promise((Ki,Qo,S)=>(S=()=>ot(pn,Bs,Ki,Qo),Le?Le.then(S):S())),Cr=()=>Le===mn&&(Le=0),Le=mn=mt.then(Cr,Cr),mt),Le,un={};return Qe=Qe.apply(qe,ze),un[Ko("asyncIterator")]=()=>un,Ft("next"),Ft("throw"),Ft("return"),un},p0=qe=>{var ze=qe[Ko("asyncIterator")],Qe=!1,ot,Ft={};return ze==null?(ze=qe[Ko("iterator")](),ot=Le=>Ft[Le]=un=>ze[Le](un)):(ze=ze.call(qe),ot=Le=>Ft[Le]=un=>{if(Qe){if(Qe=!1,Le==="throw")throw un;return un}return Qe=!0,{done:!1,value:new Kr(new Promise(pn=>{var mt=ze[Le](un);mt instanceof Object||hU("Object expected"),pn(mt)}),1)}}),Ft[Ko("iterator")]=()=>Ft,ot("next"),"throw"in ze?ot("throw"):Ft.throw=Le=>{throw Le},"return"in ze&&ot("return"),Ft},X2=(qe,ze,Qe)=>(ze=qe[Ko("asyncIterator")])?ze.call(qe):(qe=qe[Ko("iterator")](),ze={},Qe=(ot,Ft)=>(Ft=qe[ot])&&(ze[ot]=Le=>new Promise((un,pn,mt)=>(Le=Ft.call(qe,Le),mt=Le.done,Promise.resolve(Le.value).then(mn=>un({value:mn,done:mt}),pn)))),Qe("next"),Qe("return"),ze);var qe=document.createElement("style");qe.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);&.drag-over{outline:2px dashed var(--cim-widget-primary-color);outline-offset:2px}}.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-attach-error{color:#e53e3e;font-size:.75rem;padding:4px 8px 0}.cim-widget-messaging-input-group{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:4px;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius);&:focus-within{border-color:var(--cim-widget-primary-color, #3182ce)}& input.cim-widget-search-input{flex:1 1 auto;width:auto;border:none;border-radius:0}& button.cim-widget-image-upload-button{flex:0 0 auto}.cim-widget-image-upload-label{font-size:1.25rem;line-height:1}}.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(qe);function ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qe={exports:{}},ot={},Ft={exports:{}},Le={};var un;function pn(){if(un)return Le;un=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(D){return D===null||typeof D!="object"?null:(D=m&&D[m]||D["@@iterator"],typeof D=="function"?D:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,A={};function P(D,Q,O){this.props=D,this.context=Q,this.refs=A,this.updater=O||y}P.prototype.isReactComponent={},P.prototype.setState=function(D,Q){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,Q,"setState")},P.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function w(){}w.prototype=P.prototype;function C(D,Q,O){this.props=D,this.context=Q,this.refs=A,this.updater=O||y}var v=C.prototype=new w;v.constructor=C,_(v,P.prototype),v.isPureReactComponent=!0;var U=Array.isArray,q=Object.prototype.hasOwnProperty,L={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function ne(D,Q,O){var Se,Fe={},ke=null,xe=null;if(Q!=null)for(Se in Q.ref!==void 0&&(xe=Q.ref),Q.key!==void 0&&(ke=""+Q.key),Q)q.call(Q,Se)&&!V.hasOwnProperty(Se)&&(Fe[Se]=Q[Se]);var Ie=arguments.length-2;if(Ie===1)Fe.children=O;else if(1<Ie){for(var Ye=Array(Ie),dt=0;dt<Ie;dt++)Ye[dt]=arguments[dt+2];Fe.children=Ye}if(D&&D.defaultProps)for(Se in Ie=D.defaultProps,Ie)Fe[Se]===void 0&&(Fe[Se]=Ie[Se]);return{$$typeof:e,type:D,key:ke,ref:xe,props:Fe,_owner:L.current}}function fe(D,Q){return{$$typeof:e,type:D.type,key:Q,ref:D.ref,props:D.props,_owner:D._owner}}function Y(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function oe(D){var Q={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(O){return Q[O]})}var he=/\/+/g;function Ce(D,Q){return typeof D=="object"&&D!==null&&D.key!=null?oe(""+D.key):Q.toString(36)}function re(D,Q,O,Se,Fe){var ke=typeof D;(ke==="undefined"||ke==="boolean")&&(D=null);var xe=!1;if(D===null)xe=!0;else switch(ke){case"string":case"number":xe=!0;break;case"object":switch(D.$$typeof){case e:case t:xe=!0}}if(xe)return xe=D,Fe=Fe(xe),D=Se===""?"."+Ce(xe,0):Se,U(Fe)?(O="",D!=null&&(O=D.replace(he,"$&/")+"/"),re(Fe,Q,O,"",function(dt){return dt})):Fe!=null&&(Y(Fe)&&(Fe=fe(Fe,O+(!Fe.key||xe&&xe.key===Fe.key?"":(""+Fe.key).replace(he,"$&/")+"/")+D)),Q.push(Fe)),1;if(xe=0,Se=Se===""?".":Se+":",U(D))for(var Ie=0;Ie<D.length;Ie++){ke=D[Ie];var Ye=Se+Ce(ke,Ie);xe+=re(ke,Q,O,Ye,Fe)}else if(Ye=T(D),typeof Ye=="function")for(D=Ye.call(D),Ie=0;!(ke=D.next()).done;)ke=ke.value,Ye=Se+Ce(ke,Ie++),xe+=re(ke,Q,O,Ye,Fe);else if(ke==="object")throw Q=String(D),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return xe}function ae(D,Q,O){if(D==null)return D;var Se=[],Fe=0;return re(D,Se,"","",function(ke){return Q.call(O,ke,Fe++)}),Se}function Ae(D){if(D._status===-1){var Q=D._result;Q=Q(),Q.then(function(O){(D._status===0||D._status===-1)&&(D._status=1,D._result=O)},function(O){(D._status===0||D._status===-1)&&(D._status=2,D._result=O)}),D._status===-1&&(D._status=0,D._result=Q)}if(D._status===1)return D._result.default;throw D._result}var se={current:null},J={transition:null},ie={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:J,ReactCurrentOwner:L};function k(){throw Error("act(...) is not supported in production builds of React.")}return Le.Children={map:ae,forEach:function(D,Q,O){ae(D,function(){Q.apply(this,arguments)},O)},count:function(D){var Q=0;return ae(D,function(){Q++}),Q},toArray:function(D){return ae(D,function(Q){return Q})||[]},only:function(D){if(!Y(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Le.Component=P,Le.Fragment=n,Le.Profiler=s,Le.PureComponent=C,Le.StrictMode=r,Le.Suspense=d,Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ie,Le.act=k,Le.cloneElement=function(D,Q,O){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var Se=_({},D.props),Fe=D.key,ke=D.ref,xe=D._owner;if(Q!=null){if(Q.ref!==void 0&&(ke=Q.ref,xe=L.current),Q.key!==void 0&&(Fe=""+Q.key),D.type&&D.type.defaultProps)var Ie=D.type.defaultProps;for(Ye in Q)q.call(Q,Ye)&&!V.hasOwnProperty(Ye)&&(Se[Ye]=Q[Ye]===void 0&&Ie!==void 0?Ie[Ye]:Q[Ye])}var Ye=arguments.length-2;if(Ye===1)Se.children=O;else if(1<Ye){Ie=Array(Ye);for(var dt=0;dt<Ye;dt++)Ie[dt]=arguments[dt+2];Se.children=Ie}return{$$typeof:e,type:D.type,key:Fe,ref:ke,props:Se,_owner:xe}},Le.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:a,_context:D},D.Consumer=D},Le.createElement=ne,Le.createFactory=function(D){var Q=ne.bind(null,D);return Q.type=D,Q},Le.createRef=function(){return{current:null}},Le.forwardRef=function(D){return{$$typeof:c,render:D}},Le.isValidElement=Y,Le.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:Ae}},Le.memo=function(D,Q){return{$$typeof:f,type:D,compare:Q===void 0?null:Q}},Le.startTransition=function(D){var Q=J.transition;J.transition={};try{D()}finally{J.transition=Q}},Le.unstable_act=k,Le.useCallback=function(D,Q){return se.current.useCallback(D,Q)},Le.useContext=function(D){return se.current.useContext(D)},Le.useDebugValue=function(){},Le.useDeferredValue=function(D){return se.current.useDeferredValue(D)},Le.useEffect=function(D,Q){return se.current.useEffect(D,Q)},Le.useId=function(){return se.current.useId()},Le.useImperativeHandle=function(D,Q,O){return se.current.useImperativeHandle(D,Q,O)},Le.useInsertionEffect=function(D,Q){return se.current.useInsertionEffect(D,Q)},Le.useLayoutEffect=function(D,Q){return se.current.useLayoutEffect(D,Q)},Le.useMemo=function(D,Q){return se.current.useMemo(D,Q)},Le.useReducer=function(D,Q,O){return se.current.useReducer(D,Q,O)},Le.useRef=function(D){return se.current.useRef(D)},Le.useState=function(D){return se.current.useState(D)},Le.useSyncExternalStore=function(D,Q,O){return se.current.useSyncExternalStore(D,Q,O)},Le.useTransition=function(){return se.current.useTransition()},Le.version="18.3.1",Le}var mt;function mn(){return mt||(mt=1,Ft.exports=pn()),Ft.exports}var Cr;function Bs(){if(Cr)return ot;Cr=1;var e=mn(),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 Ki;function Qo(){return Ki||(Ki=1,Qe.exports=Bs()),Qe.exports}var S=Qo();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 ju=Object.create(null);Object.keys(kr).forEach(e=>{ju[kr[e]]=e});const vd={type:"error",data:"parser error"},m0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",g0=typeof ArrayBuffer=="function",E0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Cd=({type:e,data:t},n,r)=>m0&&t instanceof Blob?n?r(t):y0(t,r):g0&&(t instanceof ArrayBuffer||E0(t))?n?r(t):y0(new Blob([t]),r):r(kr[e]+(t||"")),y0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function b0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let kd;function Z2(e,t){if(m0&&e.data instanceof Blob)return e.data.arrayBuffer().then(b0).then(t);if(g0&&(e.data instanceof ArrayBuffer||E0(e.data)))return t(b0(e.data));Cd(e,!1,n=>{kd||(kd=new TextEncoder),t(kd.encode(n))})}const T0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<T0.length;e++)Jo[T0.charCodeAt(e)]=e;const ew=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=Jo[e.charCodeAt(r)],u=Jo[e.charCodeAt(r+1)],c=Jo[e.charCodeAt(r+2)],d=Jo[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},tw=typeof ArrayBuffer=="function",Nd=(e,t)=>{if(typeof e!="string")return{type:"message",data:_0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:nw(e.substring(1),t)}:ju[n]?e.length>1?{type:ju[n],data:e.substring(1)}:{type:ju[n]}:vd},nw=(e,t)=>{if(tw){const n=ew(e);return _0(n,t)}else return{base64:!0,data:e}},_0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,S0="",rw=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{Cd(a,!1,c=>{r[u]=c,++s===n&&t(r.join(S0))})})},iw=(e,t)=>{const n=e.split(S0),r=[];for(let s=0;s<n.length;s++){const a=Nd(n[s],t);if(r.push(a),a.type==="error")break}return r};function sw(){return new TransformStream({transform(e,t){Z2(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 Pd;function zu(e){return e.reduce((t,n)=>t+n.length,0)}function $u(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 ow(e,t){Pd||(Pd=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(zu(n)<1)break;const d=$u(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(zu(n)<2)break;const d=$u(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(zu(n)<8)break;const d=$u(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(vd);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(zu(n)<s)break;const d=$u(n,s);c.enqueue(Nd(a?d:Pd.decode(d),t)),r=0}if(s===0||s>e){c.enqueue(vd);break}}}})}const x0=4;function Bt(e){if(e)return aw(e)}function aw(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 Vu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Jn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),uw="arraybuffer";function pU(){}function w0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const lw=Jn.setTimeout,cw=Jn.clearTimeout;function qu(e,t){t.useNativeTimers?(e.setTimeoutFn=lw.bind(Jn),e.clearTimeoutFn=cw.bind(Jn)):(e.setTimeoutFn=Jn.setTimeout.bind(Jn),e.clearTimeoutFn=Jn.clearTimeout.bind(Jn))}const dw=1.33;function fw(e){return typeof e=="string"?hw(e):Math.ceil((e.byteLength||e.size)*dw)}function hw(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 A0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function pw(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function mw(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 gw extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Od extends Bt{constructor(t){super(),this.writable=!1,qu(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 gw(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=Nd(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=pw(t);return n.length?"?"+n:""}}class Ew extends Od{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)};iw(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,rw(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]=A0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let v0=!1;try{v0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const yw=v0;function bw(){}class Tw extends Ew{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 Nr extends Bt{constructor(t,n,r){super(),this.createRequest=t,qu(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=w0(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=Nr.requestsCount++,Nr.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=bw,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Nr.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(Nr.requestsCount=0,Nr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",C0);else if(typeof addEventListener=="function"){const e="onpagehide"in Jn?"pagehide":"unload";addEventListener(e,C0,!1)}}function C0(){for(let e in Nr.requests)Nr.requests.hasOwnProperty(e)&&Nr.requests[e].abort()}const _w=(function(){const e=k0({xdomain:!1});return e&&e.responseType!==null})();class Sw extends Tw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=_w&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Nr(k0,this.uri(),t)}}function k0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||yw))return new XMLHttpRequest}catch(n){}if(!t)try{return new Jn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const N0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class xw extends Od{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=N0?{}:w0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;Cd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Vu(()=>{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]=A0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Id=Jn.WebSocket||Jn.MozWebSocket;class ww extends xw{createSocket(t,n,r){return N0?new Id(t,n,r):n?new Id(t,n):new Id(t)}doWrite(t,n){this.ws.send(n)}}class Aw extends Od{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=ow(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=sw();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&&Vu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const vw={websocket:ww,webtransport:Aw,polling:Sw},Cw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,kw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Rd(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=Cw.exec(e||""),a={},u=14;for(;u--;)a[kw[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=Nw(a,a.path),a.queryKey=Pw(a,a.query),a}function Nw(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 Pw(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const Ld=typeof addEventListener=="function"&&typeof removeEventListener=="function",Yu=[];Ld&&addEventListener("offline",()=>{Yu.forEach(e=>e())},!1);class yi extends Bt{constructor(t,n){if(super(),this.binaryType=uw,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=Rd(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=Rd(n.host).host);qu(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=mw(this.opts.query)),Ld&&(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"})},Yu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=x0,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&&yi.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",yi.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+=fw(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,Vu(()=>{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(yi.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(),Ld&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Yu.indexOf(this._offlineEventListener);r!==-1&&Yu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}yi.protocol=x0;class Ow extends yi{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;yi.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;yi.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 Iw=class extends Ow{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=>vw[a]).filter(a=>!!a)),super(r?s:t,s)}};function Rw(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=Rd(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 Lw=typeof ArrayBuffer=="function",Dw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,P0=Object.prototype.toString,Mw=typeof Blob=="function"||typeof Blob!="undefined"&&P0.call(Blob)==="[object BlobConstructor]",Fw=typeof File=="function"||typeof File!="undefined"&&P0.call(File)==="[object FileConstructor]";function Dd(e){return Lw&&(e instanceof ArrayBuffer||Dw(e))||Mw&&e instanceof Blob||Fw&&e instanceof File}function Wu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Wu(e[n]))return!0;return!1}if(Dd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Wu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Wu(e[n]))return!0;return!1}function Bw(e){const t=[],n=e.data,r=e;return r.data=Gu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Gu(e,t,n){if(!e)return e;if(Dd(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]=Gu(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Gu(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Gu(e[s],t));return r}return e}function Uw(e,t){return e.data=Md(e.data,t),delete e.attachments,e}function Md(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]=Md(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Md(e[n],t));return e}const Hw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var tt;(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"})(tt||(tt={}));class jw{constructor(t){this.replacer=t}encode(t){return(t.type===tt.EVENT||t.type===tt.ACK)&&Wu(t)?this.encodeAsBinary({type:t.type===tt.EVENT?tt.BINARY_EVENT:tt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===tt.BINARY_EVENT||t.type===tt.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=Bw(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Fd 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===tt.BINARY_EVENT;r||n.type===tt.BINARY_ACK?(n.type=r?tt.EVENT:tt.ACK,this.reconstructor=new zw(n)):super.emitReserved("decoded",n)}else if(Dd(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(tt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===tt.BINARY_EVENT||r.type===tt.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(!$w(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(Fd.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 tt.CONNECT:return O0(n);case tt.DISCONNECT:return n===void 0;case tt.CONNECT_ERROR:return typeof n=="string"||O0(n);case tt.EVENT:case tt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Hw.indexOf(n[0])===-1);case tt.ACK:case tt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class zw{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=Uw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const $w=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function O0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Vw=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Fd,Encoder:jw,get PacketType(){return tt}},Symbol.toStringTag,{value:"Module"}));function fr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const qw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class I0 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=[fr(t,"open",this.onopen.bind(this)),fr(t,"packet",this.onpacket.bind(this)),fr(t,"error",this.onerror.bind(this)),fr(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(qw.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:tt.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:tt.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 tt.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 tt.EVENT:case tt.BINARY_EVENT:this.onevent(t);break;case tt.ACK:case tt.BINARY_ACK:this.onack(t);break;case tt.DISCONNECT:this.ondisconnect();break;case tt.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:tt.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:tt.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 Bd 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,qu(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||Vw;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 Iw(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=fr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=fr(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(fr(t,"ping",this.onping.bind(this)),fr(t,"data",this.ondata.bind(this)),fr(t,"error",this.onerror.bind(this)),fr(t,"close",this.onclose.bind(this)),fr(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){Vu(()=>{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 I0(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 Zo={};function Xu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Rw(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=Zo[s]&&a in Zo[s].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Bd(r,t):(Zo[s]||(Zo[s]=new Bd(r,t)),d=Zo[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Xu,{Manager:Bd,Socket:I0,io:Xu,connect:Xu});var Yw=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===Ww})(t)})(e)},Ww=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ea(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Hs((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Gw(e,t,n){return e.concat(t).map((function(r){return ea(r,n)}))}function R0(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 L0(e,t){try{return t in e}catch(n){return!1}}function Xw(e,t,n){var r={};return n.isMergeableObject(e)&&R0(e).forEach((function(s){r[s]=ea(e[s],n)})),R0(t).forEach((function(s){(function(a,u){return L0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,s)||(L0(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]=ea(t[s],n))})),r}function Hs(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Gw,n.isMergeableObject=n.isMergeableObject||Yw,n.cloneUnlessOtherwiseSpecified=ea;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Xw(e,t,n):ea(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 Kw=Hs;let Qw=class{constructor(t){Object.assign(this,t)}};function Cn(e){if(e)return(function(t){for(var n in Cn.prototype)t[n]=Cn.prototype[n];return t})(e)}Cn.prototype.on=Cn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Cn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Cn.prototype.off=Cn.prototype.removeListener=Cn.prototype.removeAllListeners=Cn.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},Cn.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},Cn.prototype.emitReserved=Cn.prototype.emit,Cn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Cn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Jw=typeof ArrayBuffer=="function",D0=Object.prototype.toString,Zw=typeof Blob=="function"||typeof Blob!="undefined"&&D0.call(Blob)==="[object BlobConstructor]",eA=typeof File=="function"||typeof File!="undefined"&&D0.call(File)==="[object FileConstructor]";function Ud(e){return Jw&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||Zw&&e instanceof Blob||eA&&e instanceof File}function Ku(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ku(e[n]))return!0;return!1}if(Ud(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ku(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ku(e[n]))return!0;return!1}function tA(e){const t=[],n=e.data,r=e;return r.data=Hd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Hd(e,t){if(!e)return e;if(Ud(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]=Hd(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]=Hd(e[r],t));return n}return e}function nA(e,t){return e.data=jd(e.data,t),delete e.attachments,e}function jd(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]=jd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=jd(e[n],t));return e}const rA=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ct;(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"})(Ct||(Ct={}));class iA{constructor(t){this.replacer=t}encode(t){return t.type!==Ct.EVENT&&t.type!==Ct.ACK||!Ku(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Ct.EVENT?Ct.BINARY_EVENT:Ct.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==Ct.BINARY_EVENT&&t.type!==Ct.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=tA(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class zd extends Cn{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===Ct.BINARY_EVENT;r||n.type===Ct.BINARY_ACK?(n.type=r?Ct.EVENT:Ct.ACK,this.reconstructor=new sA(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!Ud(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(Ct[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ct.BINARY_EVENT||r.type===Ct.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(!oA(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(!zd.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 Ct.CONNECT:return M0(n);case Ct.DISCONNECT:return n===void 0;case Ct.CONNECT_ERROR:return typeof n=="string"||M0(n);case Ct.EVENT:case Ct.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&rA.indexOf(n[0])===-1);case Ct.ACK:case Ct.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class sA{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=nA(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const oA=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function M0(e){return Object.prototype.toString.call(e)==="[object Object]"}const F0=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],B0=(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)},U0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),aA=B0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),F0),H0=B0(U0,U0,F0),uA={Encoder:class extends iA{encode(e){var t,n;return super.encode(me(B({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],aA(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 zd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?H0(r):r)):n instanceof Object?H0(n):n)):t))}}},lA={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class cA{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=[lA,c,{parser:uA,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=Xu(d,Kw.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*Hu(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 et(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return et(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 et(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return et(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return et(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return et(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 et(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let s="";const a=(function(u){return Ad(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Kr(u({emit:m=>{c.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Kr(new Promise((m=>{f=m})));for(;c.length>0;)yield c.shift()}finally{yield new Kr(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),()=>et(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 Qw(d)):(s=d==null?void 0:d.id,u(d))})))),events:a}})}}const j0=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),z0=(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=mn();const Qi=ze(F);var $0=Symbol.for("immer-nothing"),V0=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function Zn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var js=Object.getPrototypeOf;function zs(e){return!!e&&!!e[at]}function Qr(e){var t;return e?q0(e)||Array.isArray(e)||!!e[V0]||!!((t=e.constructor)!=null&&t[V0])||na(e)||Ju(e):!1}var dA=Object.prototype.constructor.toString();function q0(e){if(!e||typeof e!="object")return!1;const t=js(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===dA}function ta(e,t){Qu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Qu(e){const t=e[at];return t?t.type_:Array.isArray(e)?1:na(e)?2:Ju(e)?3:0}function $d(e,t){return Qu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Y0(e,t,n){const r=Qu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function fA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function na(e){return e instanceof Map}function Ju(e){return e instanceof Set}function Qt(e){return e.copy_||e.base_}function Vd(e,t){if(na(e))return new Map(e);if(Ju(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=q0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[at];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(js(e),r)}else{const r=js(e);if(r!==null&&n)return B({},e);const s=Object.create(r);return Object.assign(s,e)}}function qd(e,t=!1){return el(e)||zs(e)||!Qr(e)||(Qu(e)>1&&Object.defineProperties(e,{set:{value:Zu},add:{value:Zu},clear:{value:Zu},delete:{value:Zu}}),Object.freeze(e),t&&Object.values(e).forEach(n=>qd(n,!0))),e}function Zu(){Zn(2)}function el(e){return Object.isFrozen(e)}var Yd={};function Ji(e){const t=Yd[e];return t||Zn(0,e),t}function hA(e,t){Yd[e]||(Yd[e]=t)}var ra;function tl(){return ra}function pA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function W0(e,t){t&&(Ji("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Wd(e){Gd(e),e.drafts_.forEach(mA),e.drafts_=null}function Gd(e){e===ra&&(ra=e.parent_)}function G0(e){return ra=pA(ra,e)}function mA(e){const t=e[at];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function X0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[at].modified_&&(Wd(t),Zn(4)),Qr(e)&&(e=nl(t,e),t.parent_||rl(t,e)),t.patches_&&Ji("Patches").generateReplacementPatches_(n[at].base_,e,t.patches_,t.inversePatches_)):e=nl(t,n,[]),Wd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==$0?e:void 0}function nl(e,t,n){if(el(t))return t;const r=t[at];if(!r)return ta(t,(s,a)=>K0(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return rl(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),ta(a,(c,d)=>K0(e,r,s,c,d,n,u)),rl(e,s,!1),n&&e.patches_&&Ji("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function K0(e,t,n,r,s,a,u){if(zs(s)){const c=a&&t&&t.type_!==3&&!$d(t.assigned_,r)?a.concat(r):void 0,d=nl(e,s,c);if(Y0(n,r,d),zs(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Qr(s)&&!el(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;nl(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(na(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&rl(e,s)}}function rl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&qd(t,n)}function gA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:tl(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=Xd;n&&(s=[r],a=ia);const{revoke:u,proxy:c}=Proxy.revocable(s,a);return r.draft_=c,r.revoke_=u,c}var Xd={get(e,t){if(t===at)return e;const n=Qt(e);if(!$d(n,t))return EA(e,n,t);const r=n[t];return e.finalized_||!Qr(r)?r:r===Kd(e.base_,t)?(Qd(e),e.copy_[t]=sa(r,e)):r},has(e,t){return t in Qt(e)},ownKeys(e){return Reflect.ownKeys(Qt(e))},set(e,t,n){const r=Q0(Qt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Kd(Qt(e),t),a=s==null?void 0:s[at];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(fA(n,s)&&(n!==void 0||$d(e.base_,t)))return!0;Qd(e),Jr(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 Kd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Qd(e),Jr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Qt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Zn(11)},getPrototypeOf(e){return js(e.base_)},setPrototypeOf(){Zn(12)}},ia={};ta(Xd,(e,t)=>{ia[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ia.deleteProperty=function(e,t){return ia.set.call(this,e,t,void 0)},ia.set=function(e,t,n){return Xd.set.call(this,e[0],t,n,e[0])};function Kd(e,t){const n=e[at];return(n?Qt(n):e)[t]}function EA(e,t,n){var s;const r=Q0(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function Q0(e,t){if(!(t in e))return;let n=js(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=js(n)}}function Jr(e){e.modified_||(e.modified_=!0,e.parent_&&Jr(e.parent_))}function Qd(e){e.copy_||(e.copy_=Vd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var yA=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"&&Zn(6),r!==void 0&&typeof r!="function"&&Zn(7);let s;if(Qr(t)){const a=G0(this),u=sa(t,void 0);let c=!0;try{s=n(u),c=!1}finally{c?Wd(a):Gd(a)}return W0(a,r),X0(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===$0&&(s=void 0),this.autoFreeze_&&qd(s,!0),r){const a=[],u=[];Ji("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else Zn(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){Qr(e)||Zn(8),zs(e)&&(e=bA(e));const t=G0(this),n=sa(e,void 0);return n[at].isManual_=!0,Gd(t),n}finishDraft(e,t){const n=e&&e[at];(!n||!n.isManual_)&&Zn(9);const{scope_:r}=n;return W0(r,t),X0(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 zs(e)?r(e,t):this.produce(e,s=>r(s,t))}};function sa(e,t){const n=na(e)?Ji("MapSet").proxyMap_(e,t):Ju(e)?Ji("MapSet").proxySet_(e,t):gA(e,t);return(t?t.scope_:tl()).drafts_.push(n),n}function bA(e){return zs(e)||Zn(10,e),J0(e)}function J0(e){if(!Qr(e)||el(e))return e;const t=e[at];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Vd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Vd(e,!0);return ta(n,(r,s)=>{Y0(n,r,J0(s))}),t&&(t.finalized_=!1),n}function TA(){class e extends Map{constructor(d,f){super(),this[at]={type_:2,parent_:f,scope_:f?f.scope_:tl(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Qt(this[at]).size}has(d){return Qt(this[at]).has(d)}set(d,f){const p=this[at];return u(p),(!Qt(p).has(d)||Qt(p).get(d)!==f)&&(n(p),Jr(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[at];return u(f),n(f),Jr(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[at];u(d),Qt(d).size&&(n(d),Jr(d),d.assigned_=new Map,ta(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[at];Qt(p).forEach((m,T,y)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[at];u(f);const p=Qt(f).get(d);if(f.finalized_||!Qr(p)||p!==f.base_.get(d))return p;const m=sa(p,f);return n(f),f.copy_.set(d,m),m}keys(){return Qt(this[at]).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[at]={type_:3,parent_:f,scope_:f?f.scope_:tl(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Qt(this[at]).size}has(d){const f=this[at];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[at];return u(f),this.has(d)||(a(f),Jr(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),a(f),Jr(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[at];u(d),Qt(d).size&&(a(d),Jr(d),d.copy_.clear())}values(){const d=this[at];return u(d),a(d),d.copy_.values()}entries(){const d=this[at];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(Qr(d)){const f=sa(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&Zn(3,JSON.stringify(Qt(c)))}hA("MapSet",{proxyMap_:t,proxySet_:s})}var _A=new yA,SA=_A.produce;function Z0(e,t,n){var r=F.useMemo(function(){return SA(e)},[e]);return F.useReducer(r,t,n)}const eg={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"},gt={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}},tg=["ask_cim","search","browse","pdp"],xA=e=>tg.includes(e),ng={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(ng));const wA=new Map(Object.entries(ng).map(([e,t])=>[t,e])),AA=e=>{var t;return(t=wA.get(e))!=null?t:null},$s="cimulate",Jd=`${$s}:pdp-update`,Zd=`${$s}:browse-update`,ef=`${$s}:search-update`,tf=`${$s}:ui-state-update`,nf=`${$s}:prompts-state-update`,rf=`${$s}:session-state`,Pr=B({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},eg),vA={"browse-context":Pr.CONTEXT_UPDATED,categoryId:Pr.CATEGORY_ID_CHANGED,categoryName:Pr.CATEGORY_NAME_CHANGED,page:Pr.PAGE_CHANGED,pageSize:Pr.PAGE_SIZE_CHANGED,includeFacets:Pr.FACET_FILTERS_CHANGED,facetFilters:Pr.FACET_FILTERS_CHANGED,rangeFilters:Pr.RANGE_FILTERS_CHANGED,catalogSegment:Pr.CATALOG_SEGMENT_CHANGED,pricebooks:Pr.PRICEBOOKS_CHANGED},Zr=B({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},eg),CA={"search-context":Zr.SEARCH_CONTEXT_UPDATED,query:Zr.QUERY_CHANGED,page:Zr.PAGE_CHANGED,pageSize:Zr.PAGE_SIZE_CHANGED,includeFacets:Zr.FACET_FILTERS_CHANGED,facetFilters:Zr.FACET_FILTERS_CHANGED,rangeFilters:Zr.RANGE_FILTERS_CHANGED,catalogSegment:Zr.CATALOG_SEGMENT_CHANGED,pricebooks:Zr.PRICEBOOKS_CHANGED},j="cim-widget",zn=`--${j}`,bi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},kA=(e=bi)=>({[`${zn}-primary-color`]:e.primaryColor||bi.primaryColor,[`${zn}-secondary-color`]:e.secondaryColor||bi.secondaryColor,[`${zn}-font-color`]:e.fontColor||bi.fontColor,[`${zn}-font-family`]:e.fontFamily||bi.fontFamily,[`${zn}-background-color`]:e.backgroundColor||bi.backgroundColor,[`${zn}-border-color`]:e.borderColor||bi.borderColor,[`${zn}-border-radius`]:e.borderRadius||bi.borderRadius}),ei={RESET_CONVERSATION:"reset-conversation",END_CONVERSATION:"end-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},rg=F.createContext(null),ig=F.createContext(null),Et={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"},sg={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 og(e,t){return function(){return e.apply(t,arguments)}}const{toString:NA}=Object.prototype,{getPrototypeOf:Ti}=Object,{iterator:oa,toStringTag:ag}=Symbol,aa=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ug=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),lg=(e,t,n)=>e===Object.prototype||!n&&t===null,PA=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(ug(n))return!1;const r=Object.getOwnPropertyDescriptor(e,n);return!!r&&r.configurable&&r.writable===!0})},ua=(e,t)=>{let n=e;const r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);const s=Ti(n);if(lg(n,s,n===e))return!1;if(aa(n,t))return!0;n=s}return!1},OA=(e,t)=>e!=null&&ua(e,t)?e[t]:void 0,IA=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=Ti(e);if(t===null&&PA(e))return e;const n=Object.create(null),r=Object.create(null),s=[];let a=e;for(;a!=null&&s.indexOf(a)===-1;){s.push(a);const u=a===e?t:Ti(a);if(lg(a,u,a===e))break;const c=Object.getOwnPropertyNames(a);Object.getOwnPropertySymbols&&c.push(...Object.getOwnPropertySymbols(a));for(const d of c)ug(d)||aa(r,d)||(n[d]=e[d],r[d]=!0);a=u}return n},sf=(e=>t=>{const n=NA.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),er=e=>(e=e.toLowerCase(),t=>sf(t)===e),il=e=>t=>typeof t===e,{isArray:es}=Array,ts=il("undefined");function Vs(e){return e!==null&&!ts(e)&&e.constructor!==null&&!ts(e.constructor)&&On(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const cg=er("ArrayBuffer");function RA(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&cg(e.buffer),t}const LA=il("string"),On=il("function"),dg=il("number"),qs=e=>e!==null&&typeof e=="object",DA=e=>e===!0||e===!1,sl=e=>{if(!qs(e))return!1;const t=Ti(e);return(t===null||t===Object.prototype||Ti(t)===null)&&!ua(e,ag)&&!ua(e,oa)},MA=e=>{if(!qs(e)||Vs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},FA=er("Date"),BA=er("File"),UA=e=>!!(e&&typeof e.uri!="undefined"),HA=e=>e&&typeof e.getParts!="undefined",jA=er("Blob"),zA=er("FileList"),$A=er("Set"),VA=e=>qs(e)&&On(e.pipe);function qA(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const fg=qA(),hg=typeof fg.FormData!="undefined"?fg.FormData:void 0,YA=e=>{if(!e)return!1;if(hg&&e instanceof hg)return!0;const t=Ti(e);if(!t||t===Object.prototype||!On(e.append))return!1;const n=sf(e);return n==="formdata"||n==="object"&&On(e.toString)&&e.toString()==="[object FormData]"},WA=er("URLSearchParams"),[GA,XA,KA,QA]=["ReadableStream","Request","Response","Headers"].map(er),JA=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(Vs(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 pg(e,t){if(Vs(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 ns=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,mg=e=>!ts(e)&&e!==ns;function of(...e){const{caseless:t,skipUndefined:n}=mg(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&typeof u=="string"&&pg(r,u)||u,d=aa(r,c)?r[c]:void 0;sl(d)&&sl(a)?r[c]=of(d,a):sl(a)?r[c]=of({},a):es(a)?r[c]=a.slice():(!n||!ts(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++){const c=e[a];if(!c||Vs(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];cv.call(c,p)&&s(c[p],p)}}return r}const ZA=(e,t,n,{allOwnKeys:r}={})=>(la(t,(s,a)=>{n&&On(s)?Object.defineProperty(e,a,{__proto__:null,value:og(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),ev=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),tv=(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)},nv=(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&&Ti(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},rv=(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},iv=e=>{if(!e)return null;if(es(e))return e;let t=e.length;if(!dg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},sv=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Ti(Uint8Array)),ov=(e,t)=>{const r=(e&&e[oa]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},av=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},uv=er("HTMLFormElement"),lv=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:cv}=Object.prototype,dv=er("RegExp"),gg=(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)},fv=e=>{gg(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+"'")})}})},hv=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return es(e)?r(e):r(String(e).split(t)),n},pv=()=>{},mv=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function gv(e){return!!(e&&On(e.append)&&e[ag]==="FormData"&&e[oa])}const Ev=e=>{const t=new WeakSet,n=r=>{if(qs(r)){if(t.has(r))return;if(Vs(r))return r;if(!("toJSON"in r)){t.add(r);let s;if($A(r)){s=[];for(const a of r){const u=n(a);!ts(u)&&s.push(u)}}else s=es(r)?[]:{},la(r,(a,u)=>{const c=n(a);!ts(c)&&(s[u]=c)});return t.delete(r),s}}return r};return n(e)},yv=er("AsyncFunction"),bv=e=>e&&(qs(e)||On(e))&&On(e.then)&&On(e.catch),Eg=((e,t)=>e?setImmediate:t?((n,r)=>(ns.addEventListener("message",({source:s,data:a})=>{s===ns&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),ns.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",On(ns.postMessage)),Tv=typeof queueMicrotask!="undefined"?queueMicrotask.bind(ns):typeof process!="undefined"&&process.nextTick||Eg,yg=e=>e!=null&&On(e[oa]),z={isArray:es,isArrayBuffer:cg,isBuffer:Vs,isFormData:YA,isArrayBufferView:RA,isString:LA,isNumber:dg,isBoolean:DA,isObject:qs,isPlainObject:sl,isEmptyObject:MA,isReadableStream:GA,isRequest:XA,isResponse:KA,isHeaders:QA,isUndefined:ts,isDate:FA,isFile:BA,isReactNativeBlob:UA,isReactNative:HA,isBlob:jA,isRegExp:dv,isFunction:On,isStream:VA,isURLSearchParams:WA,isTypedArray:sv,isFileList:zA,forEach:la,merge:of,extend:ZA,trim:JA,stripBOM:ev,inherits:tv,toFlatObject:nv,kindOf:sf,kindOfTest:er,endsWith:rv,toArray:iv,forEachEntry:ov,matchAll:av,isHTMLForm:uv,hasOwnProperty:aa,hasOwnProp:aa,hasOwnInPrototypeChain:ua,getSafeProp:OA,toSafeFlatObject:IA,reduceDescriptors:gg,freezeMethods:fv,toObjectSet:hv,toCamelCase:lv,noop:pv,toFiniteNumber:mv,findKey:pg,global:ns,isContextDefined:mg,isSpecCompliantForm:gv,toJSONObject:Ev,isAsyncFn:yv,isThenable:bv,setImmediate:Eg,asap:Tv,isIterable:yg,isSafeIterable:e=>e!=null&&ua(e,oa)&&yg(e)},_v=z.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"]),Sv=e=>{const t={};let n,r,s;return e&&e.split(`
3
+ `).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim();const c=z.hasOwnProp(t,n);!n||c&&z.hasOwnProp(_v,n)||(n==="set-cookie"?c?t[n].push(r):t[n]=[r]:t[n]=c?t[n]+", "+r:r)}),t};function xv(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 wv=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Av=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function af(e,t){return z.isArray(e)?e.map(n=>af(n,t)):xv(String(e).replace(t,""))}const vv=e=>af(e,wv),Cv=e=>af(e,Av);function bg(e){const t=Object.create(null);return z.forEach(e.toJSON(),(n,r)=>{t[r]=Cv(n)}),t}const Tg=Symbol("internals");function ca(e){return e&&String(e).trim().toLowerCase()}function ol(e){return e===!1||e==null?e:z.isArray(e)?e.map(ol):vv(String(e))}function kv(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Nv=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function uf(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)}function Pv(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r<t;r++){const s=e.charCodeAt(r);if(s===34||s===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function Ov(e){const t=Object.create(null),n=String(e);let r=0,s=!1,a=!1;function u(c){const d=uf(n.slice(r,c)),f=d.indexOf("=");if(f<1)return;const p=uf(d.slice(0,f));if(!Nv.test(p))return;const m=p.toLowerCase();if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=uf(d.slice(f+1));t[m]=Pv(T)}for(let c=0;c<n.length;c++){const d=n.charCodeAt(c);s?a?a=!1:d===92?a=!0:d===34&&(s=!1):d===34?s=!0:(d===44||d===59)&&(u(c),r=c+1)}return u(n.length),t}const Iv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function lf(e,t,n,r,s){if(z.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!z.isString(t)){if(z.isString(r))return t.indexOf(r)!==-1;if(z.isRegExp(r))return r.test(t)}}function Rv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Lv(e,t){const n=z.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 gn=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=z.findKey(s,p);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||d]=ol(c))}const u=(c,d)=>z.forEach(c,(f,p)=>a(f,p,d));if(z.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(z.isString(t)&&(t=t.trim())&&!Iv(t))u(Sv(t),n);else if(z.isObject(t)&&z.isSafeIterable(t)){let c=Object.create(null),d,f;for(const p of t){if(!z.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],z.hasOwnProp(c,f)?(d=c[f],c[f]=z.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=z.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return kv(s);if(z.isFunction(n))return n.call(this,s,r);if(z.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=z.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||lf(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=z.findKey(r,u);c&&(!n||lf(r,r[c],c,n))&&(delete r[c],s=!0)}}return z.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||lf(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return z.forEach(this,(s,a)=>{const u=z.findKey(r,a);if(u){n[u]=ol(s),delete n[a];return}const c=t?Rv(a):String(a).trim();c!==a&&delete n[a],n[c]=ol(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return z.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&z.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(){const t=this.get("set-cookie");return z.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return Ov(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Tg]=this[Tg]={accessors:{}}).accessors,s=this.prototype;function a(u){const c=ca(u);r[c]||(Lv(s,u),r[c]=!0)}return z.isArray(t)?t.forEach(a):a(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),z.freezeMethods(gn);const al="[REDACTED ****]";function Dv(e){if(z.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(z.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Mv(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||z.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof gn&&(a=a.toJSON()),r.push(a);let u;if(z.isArray(a))u=[],a.forEach((c,d)=>{const f=s(c);z.isUndefined(f)||(u[d]=f)});else{if(!z.isPlainObject(a)&&Dv(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?al:s(d);z.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return s(e)}function _g(e){try{return String(e)}catch(t){return""}}function Fv(e){return e.errors.map(n=>{try{return n&&n.message?_g(n.message):_g(n)}catch(r){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let be=class K2 extends Error{static from(t,n,r,s,a,u){let c=t.message;!c&&z.isArray(t.errors)&&t.errors.length&&(c=Fv(t));const d=new K2(c,n||t.code,r,s,a);return Object.defineProperty(d,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),d.name=t.name,t.status!=null&&d.status==null&&(d.status=t.status),u&&Object.assign(d,u),d}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&&z.hasOwnProp(t,"redact")?t.redact:void 0,r=z.isArray(n)&&n.length>0?Mv(t,n):z.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}}};be.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",be.ERR_BAD_OPTION="ERR_BAD_OPTION",be.ECONNABORTED="ECONNABORTED",be.ETIMEDOUT="ETIMEDOUT",be.ECONNREFUSED="ECONNREFUSED",be.ERR_NETWORK="ERR_NETWORK",be.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",be.ERR_DEPRECATED="ERR_DEPRECATED",be.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",be.ERR_BAD_REQUEST="ERR_BAD_REQUEST",be.ERR_CANCELED="ERR_CANCELED",be.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",be.ERR_INVALID_URL="ERR_INVALID_URL",be.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Bv=null,Sg=100;function cf(e){return z.isPlainObject(e)||z.isArray(e)}function xg(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function df(e,t,n){return e?e.concat(t).map(function(s,a){return s=xg(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function Uv(e){return z.isArray(e)&&!e.some(cf)}const Hv=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function ul(e,t,n){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(C,v)=>{const U=z.getSafeProp(n,C);return z.isUndefined(U)?v:U},s=r("metaTokens",!0),a=r("visitor")||A,u=r("dots",!1),c=r("indexes",!1),d=r("Blob")||typeof Blob!="undefined"&&Blob,f=r("maxDepth",Sg),p=d&&z.isSpecCompliantForm(t),m=[];if(!z.isFunction(a))throw new TypeError("visitor must be a function");function T(C){if(C===null)return"";if(z.isDate(C))return C.toISOString();if(z.isBoolean(C))return C.toString();if(!p&&z.isBlob(C))throw new be("Blob is not supported. Use a Buffer instead.");if(z.isArrayBuffer(C)||z.isTypedArray(C)){if(p&&typeof d=="function")return new d([C]);throw new be("Blob is not supported. Use a Buffer instead.",be.ERR_NOT_SUPPORT)}return C}function y(C){if(C>f)throw new be("Object is too deeply nested ("+C+" levels). Max depth: "+f,be.ERR_FORM_DATA_DEPTH_EXCEEDED)}function _(C,v){if(f===1/0)return JSON.stringify(C);const U=[];return JSON.stringify(C,function(L,V){if(!z.isObject(V))return V;for(;U.length&&U[U.length-1]!==this;)U.pop();return U.push(V),y(v+U.length-1),V})}function A(C,v,U){let q=C;if(z.isReactNative(t)&&z.isReactNativeBlob(C))return t.append(df(U,v,u),T(C)),!1;if(C&&!U&&typeof C=="object"){if(z.endsWith(v,"{}"))v=s?v:v.slice(0,-2),C=_(C,1);else if(z.isArray(C)&&Uv(C)||(z.isFileList(C)||z.endsWith(v,"[]"))&&(q=z.toArray(C)))return v=xg(v),q.forEach(function(V,ne){!(z.isUndefined(V)||V===null)&&t.append(c===!0?df([v],ne,u):c===null?v:v+"[]",T(V))}),!1}return cf(C)?!0:(t.append(df(U,v,u),T(C)),!1)}const P=Object.assign(Hv,{defaultVisitor:A,convertValue:T,isVisitable:cf});function w(C,v,U=0){if(!z.isUndefined(C)){if(y(U),m.indexOf(C)!==-1)throw new Error("Circular reference detected in "+v.join("."));m.push(C),z.forEach(C,function(L,V){(!(z.isUndefined(L)||L===null)&&a.call(t,L,z.isString(V)?V.trim():V,v,P))===!0&&w(L,v?v.concat(V):[V],U+1)}),m.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return w(e),t}function wg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function ff(e,t){this._pairs=[],e&&ul(e,this,t)}const Ag=ff.prototype;Ag.append=function(t,n){this._pairs.push([t,n])},Ag.toString=function(t){const n=t?r=>t.call(this,r,wg):wg;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function jv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function vg(e,t,n){if(!t)return e;e=e||"";const r=z.isFunction(n)?{serialize:n}:n,s=z.getSafeProp(r,"encode")||jv,a=z.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=z.isURLSearchParams(t)?t.toString():new ff(t,r).toString(s),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}const da=Symbol("internals");function Cg(e){return e?e.length:0}function kg(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function fa(e,t){const n=e.handlers,r=Cg(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(a,u){n[a.index]!==a.handler&&t.handlerEntries.delete(u)}):t.handlerEntries.clear()),t.handlersLength=r}class Ng{constructor(){this.handlers=[],this[da]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,n,r){const s={fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null},a=this[da];this.handlers==null&&(this.handlers=[]),fa(this,a);const u=a.nextId++;return this.handlers.push(s),a.handlerEntries.set(u,{handler:s,index:this.handlers.length-1}),a.handlersLength=this.handlers.length,u}eject(t){const n=this[da];fa(this,n);const r=n.handlerEntries.get(t);if(r){if(n.handlerEntries.delete(t),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,n.iterationDepth||(kg(this.handlers),n.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],fa(this,this[da]))}forEach(t){const n=this[da];fa(this,n),n.iterationDepth++;try{z.forEach(this.handlers,function(s){s!==null&&t(s)})}finally{--n.iterationDepth||(fa(this,n),kg(this.handlers),n.handlersLength=Cg(this.handlers))}}}const hf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},zv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:ff,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},pf=typeof window!="undefined"&&typeof document!="undefined",mf=typeof navigator=="object"&&navigator||void 0,$v=pf&&(!mf||["ReactNative","NativeScript","NS"].indexOf(mf.product)<0),Vv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qv=pf&&window.location.href||"http://localhost",Jt=B(B({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pf,hasStandardBrowserEnv:$v,hasStandardBrowserWebWorkerEnv:Vv,navigator:mf,origin:qv},Symbol.toStringTag,{value:"Module"}))),zv);function Yv(e,t){return ul(e,new Jt.classes.URLSearchParams,B({visitor:function(n,r,s,a){return Jt.isNode&&z.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const Pg=Sg;function Og(e){if(e>Pg)throw new be("FormData field is too deeply nested ("+e+" levels). Max depth: "+Pg,be.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Wv(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)Og(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function Gv(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 Ig(e){function t(n,r,s,a){Og(a);let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&z.isArray(s)?s.length:u,d?(z.hasOwnProp(s,u)?s[u]=z.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!c):((!z.hasOwnProp(s,u)||!z.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&z.isArray(s[u])&&(s[u]=Gv(s[u])),!c)}if(z.isFormData(e)&&z.isFunction(e.entries)){const n={};return z.forEachEntry(e,(r,s)=>{t(Wv(r),s,n,0)}),n}return null}const Rg=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Ys=(e,t)=>e!=null&&z.hasOwnProp(e,t)?e[t]:void 0;function Xv(e,t,n){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ha={transitional:hf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=z.isObject(t);if(a&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return s?JSON.stringify(Ig(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t)||z.isReadableStream(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=Ys(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Yv(t,d).toString();if((c=z.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Ys(this,"env"),p=f&&f.FormData;return ul(c?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),Xv(t)):t}],transformResponse:[function(t){const n=Ys(this,"transitional")||ha.transitional,r=n&&n.forcedJSONParsing,s=Ys(this,"responseType"),a=s==="json";if(z.isResponse(t)||z.isReadableStream(t))return t;if(t&&z.isString(t)&&(r&&!s||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Ys(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?be.from(d,be.ERR_BAD_RESPONSE,this,null,Ys(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Jt.classes.FormData,Blob:Jt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(Rg,e=>{ha.headers[e]={}});function gf(e,t){const n=this||ha,r=t||n,s=gn.from(r.headers);let a=r.data;return z.forEach(e,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Lg(e){return!!(e&&e.__CANCEL__)}let pa=class extends be{constructor(t,n,r){super(t==null?"canceled":t,be.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Dg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new be("Request failed with status code "+n.status,n.status>=400&&n.status<500?be.ERR_BAD_REQUEST:be.ERR_BAD_RESPONSE,n.config,n.request,n))}const Kv=/[\t\n\r]/g;function Mg(e){if(typeof e!="string")return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(Kv,"")}function Ef(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Qv(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 Jv(e,t){let n=0,r=1e3/t,s,a;const u=(p,m=Date.now())=>{n=m,s=null,a&&(clearTimeout(a),a=null),e(...p)};return[(...p)=>{const m=Date.now(),T=m-n;T>=r?u(p,m):(s=p,a||(a=setTimeout(()=>{a=null,u(s)},r-T)))},()=>s&&u(s),(...p)=>u(p)]}const ll=(e,t,n=3)=>{let r=0;const s=Qv(50,250);return Jv(a=>{if(!a||!z.isNumber(a.loaded))return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=Math.max(0,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)},Fg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Bg=(e,t=z.asap)=>(...n)=>t(()=>e(...n)),Zv=Jt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Jt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Jt.origin),Jt.navigator&&/(msie|trident)/i.test(Jt.navigator.userAgent)):()=>!0,eC=Jt.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];z.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),z.isString(r)&&c.push(`path=${r}`),z.isString(s)&&c.push(`domain=${s}`),a===!0&&c.push("secure"),z.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 tC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function nC(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const rC=/^https?:(?!\/\/)/i;function iC(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${al}`)}function sC(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${al}@`),n=t.indexOf("#"),s=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${al}`);return n===-1?s:`${s}#${iC(t.slice(n+1))}`}function Ug(e,t){if(typeof e=="string"){const n=Mg(e);if(rC.test(n))throw new be(`Invalid URL ${JSON.stringify(sC(n))}: missing "//" after protocol`,be.ERR_INVALID_URL,t)}}function Hg(e,t,n,r){Ug(t,r);let s=!tC(t);return e&&(s||n===!1)?(Ug(e,r),nC(e,t)):t}const jg=e=>e instanceof gn?B({},e):e,oC=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function rs(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 z.isPlainObject(p)&&z.isPlainObject(m)?z.merge.call({caseless:y},p,m):z.isPlainObject(m)?z.merge({},m):z.isArray(m)?m.slice():m}function s(p,m,T,y){if(z.isUndefined(m)){if(!z.isUndefined(p))return r(void 0,p,T,y)}else return r(p,m,T,y)}function a(p,m){if(!z.isUndefined(m))return r(void 0,m)}function u(p,m){if(z.isUndefined(m)){if(!z.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function c(p){const m=z.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!z.isUndefined(m))if(z.isPlainObject(m)){if(z.hasOwnProp(m,p))return m[p]}else return;const T=z.hasOwnProp(e,"transitional")?e.transitional:void 0;if(z.isPlainObject(T)&&z.hasOwnProp(T,p))return T[p]}function d(p,m,T){if(z.hasOwnProp(t,T))return r(p,m);if(z.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,timeoutErrorMessage: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(jg(p),jg(m),T,!0)};return z.forEach(oC(B(B({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=z.hasOwnProp(f,m)?f[m]:s,y=z.hasOwnProp(e,m)?e[m]:void 0,_=z.hasOwnProp(t,m)?t[m]:void 0,A=T(y,_,m);z.isUndefined(A)&&T!==d||(n[m]=A)}),z.hasOwnProp(t,"validateStatus")&&z.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(z.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const aC=["content-type","content-length"];function uC(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{aC.includes(r.toLowerCase())&&e.set(r,s)})}const lC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function zg(e){const t=rs({},e),n=T=>z.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=gn.from(c),t.url=vg(Hg(f,m,p,t),n("params"),n("paramsSerializer")),d){const T=z.getSafeProp(d,"username")||"",y=z.getSafeProp(d,"password")||"";try{c.set("Authorization","Basic "+btoa(T+":"+(y?lC(y):"")))}catch(_){throw be.from(_,be.ERR_BAD_OPTION_VALUE,e)}}if(z.isFormData(r)){const T=z.getSafeProp(r,"getHeaders");Jt.hasStandardBrowserEnv||Jt.hasStandardBrowserWebWorkerEnv||z.isReactNative(r)?c.setContentType(void 0):z.isFunction(T)&&uC(c,T.call(r),n("formDataHeaderPolicy"))}if(Jt.hasStandardBrowserEnv&&(z.isFunction(s)&&(s=s(t)),s===!0||s==null&&Zv(t.url))){const y=a&&u&&eC.read(u);y&&c.set(a,y)}return t}const cC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=zg(e);let a=s.data;const u=gn.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=s,p,m,T,y,_,A;function P(){y&&y(),_&&_(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let w=new XMLHttpRequest;w.open(s.method.toUpperCase(),s.url,!0),w.timeout=s.timeout;function C(U){if(!w)return;if(w.status===0&&(Ef(Mg(s.url))||Ef(Jt.origin))!=="file"&&!(w.responseURL&&w.responseURL.startsWith("file:"))){r(new be("Request aborted",be.ECONNABORTED,e,w)),P(),w=null;return}try{U?A&&A(U):_&&_()}catch(ne){setTimeout(()=>{throw ne})}if(!w)return;const q=gn.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),V={data:!c||c==="text"||c==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:q,config:e,request:w};Dg(function(fe){n(fe),P()},function(fe){r(fe),P()},V),w=null}"onloadend"in w?w.onloadend=C:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.startsWith("file:"))||setTimeout(C)},w.onabort=function(){w&&(r(new be("Request aborted",be.ECONNABORTED,e,w)),P(),w=null)},w.onerror=function(q){const L=q&&q.message?q.message:"Network Error",V=new be(L,be.ERR_NETWORK,e,w);V.event=q||null,r(V),P(),w=null},w.ontimeout=function(){let q=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const L=s.transitional||hf;s.timeoutErrorMessage&&(q=s.timeoutErrorMessage),r(new be(q,L.clarifyTimeoutError?be.ETIMEDOUT:be.ECONNABORTED,e,w)),P(),w=null},a===void 0&&u.setContentType(null),"setRequestHeader"in w&&z.forEach(bg(u),function(q,L){w.setRequestHeader(L,q)}),z.isUndefined(s.withCredentials)||(w.withCredentials=!!s.withCredentials),c&&c!=="json"&&(w.responseType=s.responseType),f&&([T,_,A]=ll(f,!0),w.addEventListener("progress",T)),d&&w.upload&&([m,y]=ll(d),w.upload.addEventListener("progress",m),w.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=U=>{w&&(r(!U||U.type?new pa(null,e,w):U),w.abort(),P(),w=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const v=Ef(s.url);if(v&&!Jt.protocols.includes(v)){r(new be("Unsupported protocol "+v+":",be.ERR_BAD_REQUEST,e)),P();return}w.send(a||null)})},dC=(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 be?f:new pa(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new be(`timeout of ${t}ms exceeded`,be.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=>{if(!r){if(d.aborted){s.call(d);return}d.addEventListener("abort",s,{once:!0})}});const{signal:c}=n;return c.unsubscribe=()=>z.asap(u),c},fC=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},hC=function(e,t){return Ad(this,null,function*(){try{for(var n=X2(pC(e)),r,s,a;r=!(s=yield new Kr(n.next())).done;r=!1){const u=s.value;yield*p0(fC(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new Kr(s.call(n)))}finally{if(a)throw a[0]}}})},pC=function(e){return Ad(this,null,function*(){if(e[Symbol.asyncIterator]){yield*p0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Kr(t.read());if(n)break;yield r}}finally{yield new Kr(t.cancel())}})},$g=(e,t,n,r)=>{const s=hC(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return et(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})},Vg=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,qg=(e,t,n)=>t+2<n&&Vg(e.charCodeAt(t+1))&&Vg(e.charCodeAt(t+2)),Yg=e=>e<=57?e-48:(e&223)-55,mC=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,gC=e=>e===9||e===10||e===12||e===13||e===32,EC=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},yC=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},bC=e=>{const t=e.length;let n=0,r=0,s=!1;for(let a=0;a<t;a++){let u=e.charCodeAt(a);if(u===37&&qg(e,a,t)&&(u=Yg(e.charCodeAt(a+1))*16+Yg(e.charCodeAt(a+2)),a+=2),!gC(u)){if(u===61){r++;continue}if(!mC(u)||r>0){s=!0;continue}n++}}return s||r>2||r>0&&(n+r)%4!==0||n%4===1?yC(e):EC(n)},TC=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),s=e.slice(n+1);if(/;base64/i.test(r))return t(s);let u=0;for(let c=0,d=s.length;c<d;c++){const f=s.charCodeAt(c);if(f===37&&qg(s,c,d))u+=1,c+=2;else if(f<128)u+=1;else if(f<2048)u+=2;else if(f>=55296&&f<=56319&&c+1<d){const p=s.charCodeAt(c+1);p>=56320&&p<=57343?(u+=4,c++):u+=3}else u+=3}return u};function _C(e){const t=typeof e=="string"?e.indexOf("#"):-1;return TC(t===-1?e:e.slice(0,t),bC)}const yf="1.20.0",Wg=64*1024,SC={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:cl}=z,xC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Gg=e=>{if(!z.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Xg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},wC=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},AC=e=>{const t=z.global!==void 0&&z.global!==null?z.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=z.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,c=s?cl(s):typeof fetch=="function",d=cl(a),f=cl(u);if(!c)return!1;const p=c&&cl(n),m=c&&(typeof r=="function"?(w=>C=>w.encode(C))(new r):w=>et(null,null,function*(){return new Uint8Array(yield new a(w).arrayBuffer())})),T=d&&p&&Xg(()=>{let w=!1;const C=new a(Jt.origin,{body:new n,method:"POST",get duplex(){return w=!0,"half"}}),v=C.headers.has("Content-Type");return C.body!=null&&C.body.cancel(),w&&!v}),y=f&&p&&Xg(()=>z.isReadableStream(new u("").body)),_={stream:y&&(w=>w.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!_[w]&&(_[w]=(C,v)=>{let U=C&&C[w];if(U)return U.call(C);throw new be(`Response type '${w}' is not supported`,be.ERR_NOT_SUPPORT,v)})});const A=w=>et(null,null,function*(){if(w==null)return 0;if(z.isBlob(w))return w.size;if(z.isSpecCompliantForm(w))return(yield new a(Jt.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(z.isArrayBufferView(w)||z.isArrayBuffer(w))return w.byteLength;if(z.isURLSearchParams(w)&&(w=w+""),z.isString(w))return(yield m(w)).byteLength}),P=(w,C)=>et(null,null,function*(){const v=z.toFiniteNumber(w.getContentLength());return v==null?A(C):v});return w=>et(null,null,function*(){let{url:C,method:v,data:U,signal:q,cancelToken:L,timeout:V,onDownloadProgress:ne,onUploadProgress:fe,responseType:Y,headers:oe,withCredentials:he="same-origin",fetchOptions:Ce,maxContentLength:re,maxBodyLength:ae,maxRedirects:Ae}=zg(w);const se=z.isNumber(re)&&re>-1,J=z.isNumber(ae)&&ae>-1,ie=xe=>z.hasOwnProp(w,xe)?w[xe]:void 0;let k=s||fetch;Y=Y?(Y+"").toLowerCase():"text";let D=dC([q,L&&L.toAbortSignal()],V),Q=null;const O=D&&D.unsubscribe&&(()=>{D.unsubscribe()});let Se,Fe=null;const ke=()=>new be("Request body larger than maxBodyLength limit",be.ERR_BAD_REQUEST,w,Q);try{let xe;const Ie=ie("auth");if(Ie){const $e=z.getSafeProp(Ie,"username")||"",yt=z.getSafeProp(Ie,"password")||"";xe={username:$e,password:yt}}if(wC(C)){const $e=new URL(C,Jt.origin);if(!xe&&($e.username||$e.password)){const yt=Gg($e.username),jt=Gg($e.password);xe={username:yt,password:jt}}($e.username||$e.password)&&($e.username="",$e.password="",C=$e.href)}if(xe&&(oe.delete("authorization"),oe.set("Authorization","Basic "+btoa(xC((xe.username||"")+":"+(xe.password||""))))),se&&typeof C=="string"&&C.startsWith("data:")&&_C(C)>re)throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,Q);if(J&&v!=="get"&&v!=="head"){const $e=yield A(U);if(typeof $e=="number"&&isFinite($e)&&(Se=$e,$e>ae))throw ke()}const Ye=J&&(z.isReadableStream(U)||z.isStream(U)),dt=($e,yt,jt)=>$g($e,Wg,_e=>{if(J&&_e>ae)throw Fe=ke();yt&&yt(_e)},jt);if(T&&v!=="get"&&v!=="head"&&(fe||Ye)){if(Se=Se==null?yield P(oe,U):Se,Se!==0||Ye){let $e=new a(C,{method:"POST",body:U,duplex:"half"}),yt;if(z.isFormData(U)&&(yt=$e.headers.get("content-type"))&&oe.setContentType(yt),$e.body){const[jt,_e]=fe&&Fg(Se,ll(Bg(fe)))||[];U=dt($e.body,jt,_e)}}}else if(Ye&&!d&&p&&v!=="get"&&v!=="head")U=dt(U);else if(Ye&&d&&!T&&v!=="get"&&v!=="head")throw new be("Stream request bodies are not supported by the current fetch implementation",be.ERR_NOT_SUPPORT,w,Q);z.isString(he)||(he=he?"include":"omit");const Yt=d&&"credentials"in a.prototype;if(z.isFormData(U)){const $e=oe.getContentType();$e&&/^multipart\/form-data/i.test($e)&&!/boundary=/i.test($e)&&oe.delete("content-type")}oe.set("User-Agent","axios/"+yf,!1);const Lt=Ce==null?Ce:Object.assign(Object.create(null),Ce);Lt&&(delete Lt.body,delete Lt.headers,delete Lt.method,delete Lt.signal,delete Lt.duplex,delete Lt.credentials);const Pt=Object.assign(Object.create(null),Lt,{signal:D,method:v.toUpperCase(),headers:bg(oe.normalize()),body:U,duplex:"half",credentials:Yt?he:void 0});d&&(z.forEach(SC,($e,yt)=>{Pt[yt]===void 0&&(Pt[yt]=$e)}),Pt.signal===void 0&&(Pt.signal=null),Pt.body===void 0&&(Pt.body=null)),Ae===0&&(Pt.redirect="manual",Lt&&(Lt.redirect="manual")),Q=d&&new a(C,Pt);let rn=yield d?k(Q,Lt):k(C,Pt);const br=gn.from(rn.headers);if(se){const $e=z.toFiniteNumber(br.getContentLength());if($e!=null&&$e>re)throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,Q)}const sr=y&&(Y==="stream"||Y==="response");if(y&&rn.body&&(ne||se||sr&&O)){const $e={};["status","statusText","headers"].forEach(Xe=>{$e[Xe]=rn[Xe]});const yt=z.toFiniteNumber(br.getContentLength()),[jt,_e]=ne&&Fg(yt,ll(Bg(ne),!0))||[];let De=0;const Be=Xe=>{if(se&&(De=Xe,De>re))throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,Q);jt&&jt(Xe)};rn=new u($g(rn.body,Wg,Be,()=>{_e&&_e(),O&&O()}),$e)}Y=Y||"text";let Wt=yield _[z.findKey(_,Y)||"text"](rn,w);if(se&&!y&&!sr){let $e;if(Wt!=null&&(typeof Wt.byteLength=="number"?$e=Wt.byteLength:typeof Wt.size=="number"?$e=Wt.size:typeof Wt=="string"&&($e=typeof r=="function"?new r().encode(Wt).byteLength:Wt.length)),typeof $e=="number"&&$e>re)throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,Q)}return!sr&&O&&O(),yield new Promise(($e,yt)=>{Dg($e,yt,{data:Wt,headers:gn.from(rn.headers),status:rn.status,statusText:rn.statusText,config:w,request:Q})})}catch(xe){if(O&&O(),D&&D.aborted&&D.reason instanceof be){const Ie=D.reason;throw Ie.config=w,Q&&(Ie.request=Q),xe!==Ie&&Object.defineProperty(Ie,"cause",{__proto__:null,value:xe,writable:!0,enumerable:!1,configurable:!0}),Ie}if(Fe)throw Q&&!Fe.request&&(Fe.request=Q),Fe;if(xe instanceof be)throw Q&&!xe.request&&(xe.request=Q),xe;if(xe&&xe.name==="TypeError"&&/Load failed|fetch/i.test(xe.message)){const Ie=new be("Network Error",be.ERR_NETWORK,w,Q,xe&&xe.response);throw Object.defineProperty(Ie,"cause",{__proto__:null,value:xe.cause||xe,writable:!0,enumerable:!1,configurable:!0}),Ie}throw be.from(xe,xe&&xe.code,w,Q,xe&&xe.response)}})},vC=new Map,Kg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let u=a.length,c=u,d,f,p=vC;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:AC(t)),p=f;return f};Kg();const bf={http:Bv,xhr:cC,fetch:{get:Kg}};z.forEach(bf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Qg=e=>`- ${e}`,CC=e=>z.isFunction(e)||e===null||e===!1;function kC(e,t){e=z.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,!CC(r)&&(s=bf[(c=String(r)).toLowerCase()],s===void 0))throw new be(`Unknown adapter '${c}'`);if(s&&(z.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
+ `+u.map(Qg).join(`
6
+ `):" "+Qg(u[0]):"as no adapter specified";throw new be("There is no suitable adapter to dispatch the request "+c,be.ERR_NOT_SUPPORT)}return s}const Jg={getAdapter:kC,adapters:bf};function Tf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pa(null,e)}function _f(e){const t=z.toSafeFlatObject(e);return Tf(t),t.headers=gn.from(z.getSafeProp(t,"headers")),t.data=gf.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Jg.getAdapter(t.adapter||ha.adapter,t)(t).then(function(s){Tf(t),t.response=s;try{s.data=gf.call(t,t.transformResponse,s)}finally{delete t.response}return s.headers=gn.from(s.headers),s},function(s){if(!Lg(s)&&(Tf(t),s&&s.response)){t.response=s.response;try{s.response.data=gf.call(t,t.transformResponse,s.response)}finally{delete t.response}s.response.headers=gn.from(s.response.headers)}return Promise.reject(s)})}const dl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{dl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Zg={};dl.transitional=function(t,n,r){function s(a,u){return"[Axios v"+yf+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new be(s(u," has been removed"+(n?" in "+n:"")),be.ERR_DEPRECATED);return n&&!Zg[u]&&(Zg[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}},dl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function NC(e,t,n){if(typeof e!="object"||e===null)throw new be("options must be an object",be.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 be("option "+a+" must be "+d,be.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new be("Unknown option "+a,be.ERR_BAD_OPTION)}}const fl={assertOptions:NC,validators:dl},En=fl.validators;let is=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ng,response:new Ng}}request(t,n){return et(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error)try{let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=s.stack;let u="";if(typeof a=="string"){const c=a.indexOf(`
7
+ `);u=c===-1?"":a.slice(c+1)}if(!r.stack)r.stack=u;else if(u){const c=u.indexOf(`
8
+ `),d=c===-1?-1:u.indexOf(`
9
+ `,c+1),f=d===-1?"":u.slice(d+1);String(r.stack).endsWith(f)||(r.stack+=`
10
+ `+u)}}catch(s){}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=rs(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&fl.assertOptions(r,{silentJSONParsing:En.transitional(En.boolean),forcedJSONParsing:En.transitional(En.boolean),clarifyTimeoutError:En.transitional(En.boolean),legacyInterceptorReqResOrdering:En.transitional(En.boolean),advertiseZstdAcceptEncoding:En.transitional(En.boolean),validateStatusUndefinedResolves:En.transitional(En.boolean)},!1),s!=null&&(z.isFunction(s)?n.paramsSerializer={serialize:s}:fl.assertOptions(s,{encode:En.function,serialize:En.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),fl.assertOptions(n,{baseUrl:En.spelling("baseURL"),withXsrfToken:En.spelling("withXSRFToken")},!0),n.method=(z.getSafeProp(n,"method")||z.getSafeProp(this.defaults,"method")||"get").toLowerCase();let u=a&&z.merge(a.common,a[n.method]);a&&z.forEach(Rg.concat("common"),_=>{delete a[_]}),n.headers=gn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(A){if(typeof A.runWhen=="function"&&A.runWhen(n)===!1)return;d=d&&A.synchronous;const P=n.transitional||hf;P&&P.legacyInterceptorReqResOrdering?c.unshift(A.fulfilled,A.rejected):c.push(A.fulfilled,A.rejected)});const f=[];this.interceptors.response.forEach(function(A){f.push(A.fulfilled,A.rejected)});let p,m=0,T;if(!d){const _=[_f.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++],A=c[m++];try{y=_?_(y):y}catch(P){if(!A){p=Promise.reject(P);break}try{const w=A.call(this,P);z.isThenable(w)&&(p=Promise.resolve(w).then(()=>_f.call(this,y)))}catch(w){p=Promise.reject(w)}break}}if(!p)try{p=_f.call(this,y)}catch(_){p=Promise.reject(_)}for(m=0,T=f.length;m<T;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=rs(this.defaults,t);const n=Hg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return vg(n,t.params,t.paramsSerializer)}};z.forEach(["delete","get","head","options"],function(t){is.prototype[t]=function(n,r){return this.request(rs(r||{},{method:t,url:n,data:r&&z.hasOwnProp(r,"data")?r.data:void 0}))}}),z.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(rs(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}is.prototype[t]=n(),t!=="query"&&(is.prototype[t+"Form"]=n(!0))});let PC=class Q2{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 pa(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 Q2(function(s){t=s}),cancel:t}}};function OC(e){return function(n){return e.apply(null,n)}}function IC(e){return z.isObject(e)&&e.isAxiosError===!0}const hl={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,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent: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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(hl).forEach(([e,t])=>{hl[t]===void 0&&(hl[t]=e)});function e1(e){const t=new is(e),n=og(is.prototype.request,t);return z.extend(n,is.prototype,t,{allOwnKeys:!0}),z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return e1(rs(e,s))},n}const It=e1(ha);It.Axios=is,It.CanceledError=pa,It.CancelToken=PC,It.isCancel=Lg,It.VERSION=yf,It.toFormData=ul,It.AxiosError=be,It.Cancel=It.CanceledError,It.all=function(t){return Promise.all(t)},It.spread=OC,It.isAxiosError=IC,It.mergeConfig=rs,It.AxiosHeaders=gn,It.formToJSON=e=>Ig(z.isHTMLForm(e)?new FormData(e):e),It.getAdapter=Jg.getAdapter,It.HttpStatusCode=hl,It.default=It;const{Axios:_U,AxiosError:SU,CanceledError:xU,isCancel:wU,CancelToken:AU,VERSION:vU,all:CU,Cancel:kU,isAxiosError:NU,spread:PU,toFormData:OU,AxiosHeaders:IU,HttpStatusCode:RU,formToJSON:LU,getAdapter:DU,mergeConfig:MU,create:FU}=It;class RC{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",()=>et(this,null,function*(){try{const t=yield It.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 LC{constructor(t,n,r,s=!1,a,u){Te(this,"apiService");Te(this,"config",null);Te(this,"getConfig",()=>et(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 RC(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 Ws=(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 DC{constructor(t=!1){Te(this,"isDevelopment");Te(this,"_log",(t,n,...r)=>{Ws(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 MC={copilot:"Your Search Assistant",messaging:"Commerce Client"},t1=F.createContext(null),FC=({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:A=3,messageAlignment:P="start",autoScroll:w=!0,showProductDescription:C=!1,componentConfig:v,conversationHistory:U,resetConversationMessage:q="",apiKey:L,apiToken:V,baseUrl:ne,customerId:fe,tenantId:Y,theme:oe,isDevelopment:he,__features:Ce,routingAttributes:re,enableDownloadTranscript:ae=!0,enablePageContext:Ae=!1,enableEscalationToAgent:se=!1,enableImageUpload:J=!1,showProductCaptions:ie=!1,staticQuestions:k,staticQuestionsStrategy:D="append",children:Q})=>{const O=e==="messaging",Se=F.useMemo(()=>{const Yt=re==null?void 0:re.isCartMgmtSupported;return Yt===!0||Yt==="true"},[re]),Fe=F.useMemo(()=>O?{config:null}:new LC(ne,L,V,he,fe,Y),[O,ne,L,V,he,fe,Y]),ke=F.useMemo(()=>new DC(he),[he]);F.useEffect(()=>{O||!Fe||Fe.config||Fe.getConfig()},[Fe,O]);const xe=F.useMemo(()=>kA(oe),[oe]),Ie=F.useMemo(()=>{const Yt=(y==null?void 0:y.placeholder)||m,Lt=(y==null?void 0:y.buttonLabel)||T;let Pt="icon";return y!=null&&y.buttonType?Pt=y.buttonType:T&&(Pt="text"),me(B({},y||{}),{placeholder:Yt,buttonLabel:Lt,buttonType:Pt})},[y,m,T]),Ye=F.useMemo(()=>me(B({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||MC[e!=null?e:"copilot"]}),[r,t,n,e]),dt=F.useMemo(()=>({configModule:Fe,mode:e!=null?e:"copilot",headerConfig:Ye,entryMessage:a,staticQuestions:k||[],staticQuestionsStrategy:D,globalClassName:s,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:xe,logger:ke,searchConfig:Ie,suggestionButtonConfig:_,progressStepsLimit:A,messageAlignment:P,autoScroll:w,showProductDescription:!!C,enableMinimize:!!(v!=null&&v.enableMinimize),launcherAriaLabel:v==null?void 0:v.launcherAriaLabel,enableDownloadTranscript:ae,enablePageContext:Ae,enableEscalationToAgent:se,enableImageUpload:J,showProductCaptions:!!ie,resetConversationMessage:q,conversationHistory:{sinceHours:typeof(U==null?void 0:U.sinceHours)=="number"?U.sinceHours:O?24:1,limit:U==null?void 0:U.limit},features:Ce,isCartMgmtSupported:Se}),[Fe,e,Ye,a,k,D,s,f,p,c,d,u,Ie,_,P,w,C,v,ae,Ae,se,J,A,ie,q,ke,xe,U,Ce,Se,O]);return S.jsx(t1.Provider,{value:dt,children:Q})},nt=()=>{const e=F.useContext(t1);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class BC{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 $C(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 BC,ss=()=>Je.connected,ma=()=>Je.isOpen,Sf="cimulate.widget.minimizedOnNav";function UC(){try{const e=sessionStorage.getItem(Sf)==="1";return sessionStorage.removeItem(Sf),e}catch(e){return!1}}function HC(){try{sessionStorage.removeItem(Sf)}catch(e){return}}const jC=e=>{window.addEventListener(tf,e)},zC=e=>{window.removeEventListener(tf,e)},$C=(e,t)=>{const n=new CustomEvent(tf,{detail:{property:e,value:t}});window.dispatchEvent(n)},VC=e=>{Je.connectedProxy.connected=e},ga=e=>{if(!xA(e)){const t=tg.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},ti=e=>{const t=Je.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;Je.statusProxy.isOpen=n,n&&(Je.statusProxy.isMinimized=!1,HC())},Ea=e=>{const t=Je.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Je.statusProxy.isMinimized=n,n&&(Je.statusProxy.isOpen=!1)},xf=e=>{Je.modalProxy.isFullscreen=e},pl=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"},wf=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},qC=e=>{const t=Je.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Je.dialogProxy.isFullHeight=n},YC=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=nt(),s=F.useCallback(v=>{n({type:gt.SET_COPILOT,payload:v})},[n]),a=F.useCallback(v=>{VC(v),n({type:gt.SET_CONNECTED,payload:v})},[n]),u=F.useCallback(()=>{n({type:gt.RESET_COPILOT,payload:{}})},[n]),c=F.useCallback(()=>{n({type:gt.RESET_STATE,payload:{}})},[n]),d=F.useCallback(v=>{r==null||r.log(`${v.name} event received`,v),n({type:gt.ADD_MESSAGE,payload:v}),v.bypassHandlers||e==null||e(v)},[e,r,n]),f=F.useCallback(v=>{n({type:gt.ADD_LOADING_MESSAGE,payload:v})},[n]),p=F.useCallback(v=>{n({type:gt.REMOVE_LOADING_MESSAGE,payload:v})},[n]),m=F.useCallback(v=>{d(v),f(v.id)},[d,f]),T=F.useCallback(v=>{n({type:gt.SET_ACTIVE_CONVERSATION_ID,payload:v})},[n]),y=F.useCallback(v=>{n({type:gt.ADD_CONVERSATION_ID,payload:v})},[n]),_=F.useCallback(v=>{n({type:gt.SET_CONVERSATION_IDS,payload:v})},[n]),A=F.useCallback(v=>{n({type:gt.SET_IMAGE_FILE,payload:v})},[n]),P=F.useCallback(v=>{n({type:gt.SET_ASK_CIM_PROMPTS,payload:v})},[n]),w=F.useCallback(v=>{n({type:gt.SET_CONVERSATION_HISTORY_LOADED,payload:v})},[n]),C=F.useMemo(()=>({setCopilot:s,setConnected:a,resetCopilot:u,resetCopilotState:c,addCopilotEvent:d,addLoadingMessage:f,removeLoadingMessage:p,handleCopilotRequestAck:m,setActiveConversationId:T,addConversationId:y,setConversationIds:_,setImageFile:A,setAskCimPrompts:P,setConversationHistoryLoaded:w}),[s,a,u,c,d,f,p,m,T,y,_,A,P,w]);return S.jsx(ig.Provider,{value:C,children:t})};TA();const WC=(e,t)=>{const{type:n,payload:r}=t;if(n===gt.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 gt.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 gt.RESET_COPILOT:e.copilot=null;break;case gt.SET_COPILOT:e.copilot=r;break;case gt.SET_CONNECTED:e.connected=r;break;case gt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case gt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case gt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case gt.ADD_CONVERSATION_ID:{const s=r;e.conversationIds.includes(s)||e.conversationIds.push(s)}break;case gt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case gt.SET_IMAGE_FILE:e.imageFile=r;break;case gt.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 gt.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},GC=({onCopilotEvent:e,children:t})=>{const[n,r]=Z0(WC,Zi);return S.jsx(rg.Provider,{value:n,children:S.jsx(YC,{onCopilotEvent:e,dispatch:r,children:t})})};function XC(){var e=F.useRef(!0);return e.current?(e.current=!1,!0):e.current}function KC(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function QC(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Af=typeof window!="undefined",ya=function(e){F.useEffect(e,[])},JC=function(e){var t=F.useRef(e);t.current=e,ya(function(){return function(){return t.current()}})},ZC=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 JC(function(){cancelAnimationFrame(t.current)}),[r,a]},ek=function(e,t){return e===t};function tk(e,t){t===void 0&&(t=ek);var n=F.useRef(),r=F.useRef(e),s=XC();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var nk=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=ZC({width:Af?window.innerWidth:r,height:Af?window.innerHeight:a}),d=c[0],f=c[1];return F.useEffect(function(){if(Af){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return KC(window,"resize",p),function(){QC(window,"resize",p)}}},[]),d};class rk{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(yn.size).fill(1).forEach(()=>{const r=yn.first();r&&(t(r),yn.remove())})})}get size(){return this.items.length}}const yn=new rk,n1=e=>{window.addEventListener(ef,e)},r1=e=>{window.removeEventListener(ef,e)},ik=(e,t,n)=>{const r=new CustomEvent(ef,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},i1=e=>{window.addEventListener(Zd,e)},s1=e=>{window.removeEventListener(Zd,e)},sk=(e,t,n)=>{const r=new CustomEvent(Zd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},o1=e=>{window.addEventListener(Jd,e)},a1=e=>{window.removeEventListener(Jd,e)},vf=(e,t,n)=>{const r=new CustomEvent(Jd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},ok=e=>{window.addEventListener(rf,e)},ak=e=>{window.removeEventListener(rf,e)},ba=(e,t,n)=>{const r=new CustomEvent(rf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class uk{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=vA[n];return sk(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 ut=new uk,u1=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},l1=(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},c1=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},d1=({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},f1=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},h1=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},lk=e=>{if(!ss()||!ma()){ss()&&yn.clear(),yn.add({context:"browse",payload:me(B({},ut.state),{categoryId:e})});return}ut.categoryIdProxy.categoryId=e},p1=e=>{u1(e,ut)},ck=(e,t)=>{l1(e,t,ut)},m1=e=>{c1(e,ut)},dk=({field:e,value:t})=>{d1({field:e,value:t},ut)},fk=e=>{f1(e,ut)},g1=e=>{h1(e,ut)},E1=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=ss(),n=ma();if(!t||!n){t&&yn.clear(),yn.add({context:"browse",payload:B({},e)});return}"facetFilters"in e&&p1(e.facetFilters||{}),"rangeFilters"in e&&m1(e.rangeFilters||[]),"catalogSegment"in e&&(ut.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&g1(e.pricebooks||[]),"categoryName"in e&&(ut.categoryIdProxy.categoryName=e.categoryName||""),ut.categoryIdProxy.categoryId=e.categoryId},hk=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:E1,updateBrowseCategoryId:lk,updateCatalogSegment:fk,updateFacetFilter:ck,updateFacetFilters:p1,updatePricebooks:g1,updateRangeFilter:dk,updateRangeFilters:m1},Symbol.toStringTag,{value:"Module"}));class pk{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)=>(vf(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",()=>{vf("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 hr=new pk,y1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=ss(),n=ma();if(!t||!n){t&&yn.clear(),yn.add({context:"pdp",payload:B({},e)});return}hr.updateProxy(e),vf("pdp-context",e)},mk=e=>{hr.proxy.productId=e,ss()||yn.add({context:"pdp",payload:B({},hr.state)})},gk=e=>{hr.proxy.pdpLink=e};class Ek{constructor(){Te(this,"initialState",sg);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 Ta(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 Ut=new Ek,yk=e=>{window.addEventListener(nf,e)},bk=e=>{window.removeEventListener(nf,e)},Ta=(e,t)=>{const n=new CustomEvent(nf,{detail:{property:e,value:t}});window.dispatchEvent(n)},b1=e=>{const t=Ut.isOpen,n=typeof e=="boolean"?e:!t;Ut.promptsStateProxy.isOpen=n},T1=e=>{const t=Ut.isInline,n=typeof e=="boolean"?e:!t;Ut.promptsStateProxy.isInline=n},Tk=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),Ta("params",e),Ut.promptsStateProxy.entryType="ask_cim"},_k=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),Ta("params",e),Ut.promptsStateProxy.entryType="search"},Sk=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),Ta("params",e),Ut.promptsStateProxy.entryType="browse"},xk=e=>{Ut.promptsParamsProxy=Ut.updatePromptsParamsProxy(e),Ta("params",e),Ut.promptsStateProxy.entryType="pdp"},wk=({elementId:e,entryType:t,params:n,isInline:r})=>{Ut.promptsStateProxy.elementId=e,t&&(Ut.promptsStateProxy.entryType=t),typeof r=="boolean"&&T1(r),n&&Ut.updatePromptsParamsProxy(n),Ut.isOpen||b1(!0)},Ak=Object.freeze(Object.defineProperty({__proto__:null,endConversation:()=>{ba("endConversation",!0,ei.END_CONVERSATION)},getConversationMessages:({payload:e,callback:t})=>{ba("getConversationMessages",{payload:e,callback:t},ei.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{ba("getSessionInformation",{callback:e},ei.GET_SESSION_INFORMATION)},loadConversation:e=>{ba("loadConversation",e,ei.LOAD_CONVERSATION)},resetConversation:()=>{ba("resetConversation",!0,ei.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class vk{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=CA[n];return ik(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 vk,Ck=e=>{const t=ma(),n=ss();if(!n||!t){n&&yn.clear(),yn.add({context:"search",payload:me(B({},Tt.state),{query:e})});return}Tt.queryProxy.query=e},_1=e=>{u1(e,Tt)},kk=(e,t)=>{l1(e,t,Tt)},S1=e=>{c1(e,Tt)},Nk=({field:e,value:t})=>{d1({field:e,value:t},Tt)},Pk=e=>{f1(e,Tt)},x1=e=>{h1(e,Tt)},w1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=ma(),n=ss();if(!n||!t){n&&yn.clear(),yn.add({context:"search",payload:B({},e)});return}"facetFilters"in e&&_1(e.facetFilters||{}),"rangeFilters"in e&&S1(e.rangeFilters||[]),"catalogSegment"in e&&(Tt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&x1(e.pricebooks||[]),Tt.queryProxy.query=e.query},Ok=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:w1,updateCatalogSegment:Pk,updateFacetFilter:kk,updateFacetFilters:_1,updatePricebooks:x1,updateRangeFilter:Nk,updateRangeFilters:S1,updateSearchQuery:Ck},Symbol.toStringTag,{value:"Module"})),Ik={categoryId:ut.categoryId,categoryName:ut.categoryIdProxy.categoryName||"",facetFilters:ut.facetFilters,rangeFilters:ut.rangeFilters,catalogSegment:ut.catalogSegment,pricebooks:ut.pricebooks},A1=F.createContext(Ik),Rk=({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:A})=>{(A==null?void 0:A.property)==="categoryId"&&n(A.value),(A==null?void 0:A.property)==="categoryName"&&s(A.value),(A==null?void 0:A.property)==="facetFilters"&&u(A.value),(A==null?void 0:A.property)==="rangeFilters"&&d(A.value),(A==null?void 0:A.property)==="catalogSegment"&&p(A.value),(A==null?void 0:A.property)==="pricebooks"&&T(A.value)};return i1(_),()=>{s1(_)}},[]);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(A1.Provider,{value:y,children:e})},Lk=()=>{const e=F.useContext(A1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},Dk={searchQuery:Tt.query,facetFilters:Tt.facetFilters,rangeFilters:Tt.rangeFilters,catalogSegment:Tt.catalogSegment,pricebooks:Tt.pricebooks},v1=F.createContext(Dk),Mk=({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 n1(T),()=>{r1(T)}},[]);const m=F.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return S.jsx(v1.Provider,{value:m,children:e})},Fk=()=>{const e=F.useContext(v1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},Bk={productId:hr.productId,pdpLink:hr.pdpLink},C1=F.createContext(Bk),Uk=({children:e})=>{const[t,n]=F.useState(hr.productId),[r,s]=F.useState(hr.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 o1(u),()=>{a1(u)}},[]);const a=F.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return S.jsx(C1.Provider,{value:a,children:e})},Hk=()=>{const e=F.useContext(C1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},k1=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}),jk=({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),[_,A]=F.useState(Je.dialogProxy.width),[P,w]=F.useState(Je.modalProxy.isFullscreen),C=F.useRef(!1),v=tk(d.type);F.useEffect(()=>{const q=L=>{const{property:V,value:ne}=L.detail||{};if(!(!V||ne===void 0)){if(V==="mode"){c(ne);return}if(V==="entryType"){a(ne);return}if(V==="isMinimized"){f(fe=>me(B({},fe),{isMinimized:ne}));return}if(V==="isOpen"){f(fe=>me(B({},fe),{isOpen:ne}));return}if(V==="type"){f(fe=>me(B({},fe),{type:ne}));return}if(V==="position"){m(ne);return}if(V==="isFullHeight"){y(ne);return}if(V==="width"){A(ne);return}if(V==="isFullscreen"){w(ne);return}}};return jC(q),()=>{zC(q)}},[]),ya(()=>{e&&ga(e)}),ya(()=>{if(C.current)return;C.current=!0;const q=n||(t==null?void 0:t.type);q&&pl(q);const L=UC();t&&"isOpen"in t&&ti(!!t.isOpen),t&&"isMinimized"in t&&Ea(!!t.isMinimized),L&&Ea(!0)}),ya(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:q}=t.options;q&&wf(q),"dialogFullHeight"in t.options&&qC(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&A(t.options.dialogWidth),"isModalFullscreen"in t.options&&xf(!!t.options.isModalFullscreen)});const U=F.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:v||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:_,isModalFullscreen:P}),[u,s,d,v,p,T,_,P]);return S.jsx(k1.Provider,{value:U,children:r})},tr=()=>{const e=F.useContext(k1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},N1=F.createContext(null),P1=F.createContext(null),Cf=()=>{const e=F.useContext(P1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},ni=()=>{const e=F.useContext(N1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},Gs=()=>{const e=F.useContext(ig);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},$n=()=>{const e=F.useContext(rg);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},zk=({copilot:e})=>{const{logger:t,conversationHistory:n}=nt(),{isInline:r}=ni(),{addCopilotEvent:s,setConversationHistoryLoaded:a}=Gs(),{activeConversationId:u}=$n(),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(A=>{var w;const P=T.find(C=>C.id===A.eventSourceId);(w=P==null?void 0:P.name)!=null&&w.endsWith("_suggestions")||(A.bypassHandlers=!0,y.unshift(A))}),y.forEach(A=>{s(A)}),a(!0)})},[t,r,u,d,s,a,n]),{getSessionInformation:c,getConversationMessages:d}},O1=F.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),$k=({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}=nt(),yt=Fk(),{searchQuery:y}=yt,_=hn(yt,["searchQuery"]),jt=Lk(),{categoryId:A}=jt,P=hn(jt,["categoryId"]),{productId:w,pdpLink:C}=Hk(),{setCopilot:v,setConnected:U,resetCopilot:q,resetCopilotState:L,addCopilotEvent:V,removeLoadingMessage:ne,handleCopilotRequestAck:fe,setActiveConversationId:Y,setConversationIds:oe,setAskCimPrompts:he}=Gs(),{connected:Ce,copilot:re,messages:ae,groupedMessages:Ae,loadingMessages:se,askCimPrompts:J}=$n(),{status:ie,entryType:k}=tr(),{isInline:D}=ni(),{getConversationMessages:Q,getSessionInformation:O}=zk({copilot:re}),Se=F.useMemo(()=>se.size>0,[se]),Fe=F.useCallback(_e=>se.has(_e),[se]),ke=F.useCallback(({query:_e,facetFilters:De,rangeFilters:Be,catalogSegment:Xe,pricebooks:pt,userPrompt:Z,imageFile:ge})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!_e)return;const ve={searchParams:{query:_e}};Z&&(ve.userPrompt=Z),ge&&(ve.attachments={image:ge}),De&&Object.keys(De).length>0&&(ve.searchParams.facetFilters=De),Be&&Be.length>0&&(ve.searchParams.rangeFilters=Be),Xe&&(ve.searchParams.catalogSegment=Xe),pt&&(ve.searchParams.pricebooks=pt),m&&(ve.clientContext=m),ga("search"),re.search(ve,Ve=>{const Re=B({},Ve);fe(Re)})},[p,fe,re,m]),xe=F.useCallback(({categoryId:_e,categoryName:De,facetFilters:Be,rangeFilters:Xe,catalogSegment:pt,pricebooks:Z,userPrompt:ge,imageFile:ve})=>{if(!re){p==null||p.error("Copilot is not initialized");return}const Ve=Be&&Object.keys(Be).length>0;if(_e===""&&!Ve){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const Re={browseParams:{categoryId:_e||""}};ge&&(Re.userPrompt=ge),ve&&(Re.attachments={image:ve}),Ve&&(Re.browseParams.facetFilters=Be),Xe&&Xe.length>0&&(Re.browseParams.rangeFilters=Xe),pt&&(Re.browseParams.catalogSegment=pt),Array.isArray(Z)&&Z.length>0&&(Re.browseParams.pricebooks=Z),(m||De)&&(Re.clientContext={},m&&(Re.clientContext=B({},m)),De&&(Re.clientContext.cimLabel=De)),ga("browse"),re.browse(Re,lt=>{var $r;const Gt=B({},lt),zt=(($r=Gt.request)==null?void 0:$r.clientContext)||{},ln=(zt==null?void 0:zt.cimLabel)||De;ln&&Gt.request&&(Gt.request.label=ln),fe(Gt)})},[p,fe,re,m]),Ie=F.useCallback(({productId:_e,productName:De,pdpLink:Be,userPrompt:Xe,imageFile:pt})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!_e)return;const Z={productId:_e};Xe&&(Z.userPrompt=Xe),Be&&(Z.pdpLink=Be),pt&&(Z.attachments={image:pt}),(m||De)&&(Z.clientContext={},m&&(Z.clientContext=B({},m)),De&&(Z.clientContext.cimLabel=De)),T&&(Z.baseCatalogParams=T),ga("pdp"),re.productView(Z,ge=>{var lt;const ve=B({},ge),Ve=((lt=ve.request)==null?void 0:lt.clientContext)||{},Re=(Ve==null?void 0:Ve.cimLabel)||De;Re&&ve.request&&(ve.request.label=Re),fe(ve)})},[p,re,fe,m,T]),Ye=F.useCallback(({userPrompt:_e,imageFile:De})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!_e)return;const Be={userPrompt:_e};De&&(Be.attachments={image:De}),m&&(Be.clientContext=m),T&&(Be.baseCatalogParams=T),re.askCim(Be,Xe=>{const pt=B({},Xe);fe(pt)})},[p,re,fe,m,T]),dt=F.useCallback(_e=>{V(_e),c==null||c(_e)},[V,c]),Yt=F.useCallback(_e=>{V(_e),d==null||d(_e)},[V,d]),Lt=F.useCallback(_e=>{u==null||u(_e),U(!0)},[u,U]);F.useEffect(()=>{!re||!Ce||!ie.isOpen||yn.size>0&&yn.processQueue(_e=>{if(_e.context==="search"){const De=B({},_e.payload);w1(De)}if(_e.context==="browse"){const De=B({},_e.payload);E1(De)}if(_e.context==="pdp"){const De=B({},_e.payload);y1(De)}})},[ie.isOpen,re,Ce]);const Pt=F.useCallback(_e=>{const De=Be=>{const Xe=me(B({},Be),{id:Be.inquiryLinkId||Be.id});V(Xe)};_e.on("connect_ack",Lt),_e.on("partial_inquiry",De),_e.on("display_products",V),_e.on("progress",V),_e.on("refined_search",dt),_e.on("refined_browse",Yt),_e.on("done",Be=>{ne(Be.eventSourceId)}),_e.on("error",Be=>{V(Be),ne(Be.eventSourceId)}),_e.onDisconnect(Be=>{const Xe=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Be),!Xe.includes(Be)){U(!1);return}p==null||p.log("De-registering event listeners");const pt=new Date().toISOString();V({name:"error",message:"Connection was lost. Please try again.",createdAt:pt,id:`error-${pt}`,sessionId:"session"}),_e.off()})},[p,U,ne,dt,Yt,V,Lt]);F.useEffect(()=>{if(!re)return;const _e=De=>{if(!D){if(!De.message&&De.eventSourceId&&De.eventSourceId===J.requestId){he({requestId:De.eventSourceId,message:De});return}V(De)}};return re.on("follow_up",_e),()=>{re.off("follow_up",_e)}},[re,ae,J.requestId,D,V,he]),F.useEffect(()=>{if(!re)return;const _e=De=>{if(D)return;const Be=me(B({},De),{id:De.inquiryLinkId||De.id});V(Be)};return re.on("inquiry",_e),()=>{re.off("inquiry",_e)}},[re,D,V]),ya(()=>{let _e;n?_e=n:_e=a?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const De={baseUrl:_e};e?De.apiKey=e:t&&(De.apiToken=t),r&&(De.customerId=r),s&&(De.tenantId=s);const Be=new cA(De);return v(Be),Pt(Be),Be.connect(),Be.requestSessionInformation(Xe=>{p==null||p.log("Session Information: ",Xe);const{activeConversationId:pt,conversationIds:Z}=Xe.data||{};pt&&Y(pt),Z!=null&&Z.length&&oe(Z)}),()=>{Be.disconnect(),Be.off(),q()}});const rn=F.useCallback(_e=>{if(!re)return;const De={eventId:_e,reason:"User cancelled the request"};re.cancelRequest(De,Be=>{V(Be),ne(_e)})},[V,ne,re]),br=F.useCallback(()=>{re&&re.conversationReset({},_e=>{L(),V(_e),re.requestSessionInformation(De=>{p==null||p.log("Session Information: ",De);const{activeConversationId:Be,conversationIds:Xe}=De.data||{};Be&&Y(Be),Xe!=null&&Xe.length&&oe(Xe)})})},[re,p,V,L,Y,oe]),sr=F.useCallback((_e,De)=>{if(!_e)return;const Be={userPrompt:_e};switch(De&&(Be.imageFile=De),k){case"ask_cim":Ye(Be);return;case"search":y?ke(B(B({query:y},_),Be)):Ye(Be);return;case"browse":xe(B(B({categoryId:A},P),Be));return;case"pdp":w?Ie(B({productId:w,pdpLink:C||""},Be)):Ye(Be);return}},[k,y,_,ke,Ye,A,P,xe,Ie,w,C]),Wt=F.useCallback((_e,De)=>{var ge,ve,Ve;const Xe=_e.params.userPrompt||"";if(!Xe)return;const pt=ae.find(Re=>Re.id===De);if(!pt)return;const Z=pt.name.replace("_suggestions","");if(Z==="ask_cim"){Ye({userPrompt:Xe});return}if(Z==="copilot_search"){const Re=((ge=pt.request)==null?void 0:ge.searchParams)||{},Gt=Re.query===y;ke(me(B({query:Re.query||y},Gt?_:{}),{userPrompt:Xe}));return}if(Z==="copilot_browse"){const Re=pt.request,lt=Re.browseParams||{},zt=lt.categoryId===A,ln=((ve=Re.clientContext)==null?void 0:ve.cimLabel)||"";xe(me(B({categoryId:lt.categoryId||A||""},zt?P:{}),{categoryName:ln,userPrompt:Xe}));return}if(Z==="product_view"){const Re=pt.request||{},lt=Re.productId,Gt=lt===w,zt=((Ve=Re.clientContext)==null?void 0:Ve.cimLabel)||"";let ln="";Gt?ln=C||"":ln=Re.pdpLink||"",Ie({productId:lt||w,pdpLink:ln,productName:zt,userPrompt:Xe})}},[ae,y,_,ke,Ye,A,P,xe,Ie,w,C]),$e=F.useMemo(()=>({copilot:re,messages:ae,groupedMessages:Ae,isLoading:Se,isResponseLoading:Fe,handleAskCim:Ye,handleSearch:ke,handleBrowse:xe,handlePdp:Ie,handleUserInput:sr,handleSuggestion:Wt,handleCancel:rn,resetConversation:br,getSessionInformation:O,getConversationMessages:Q}),[re,ae,Ae,Se,Fe,Ye,ke,xe,Ie,sr,Wt,rn,br,O,Q]);return S.jsx(O1.Provider,{value:$e,children:f})},I1=()=>{const{copilot:e}=$n(),{addCopilotEvent:t}=Gs();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])}},Or=()=>{const e=F.useContext(O1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},Vk=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=$n(),{entryType:s}=tr(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:c}=Gs(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:T,getConversationMessages:y}=Or(),{getCopilotSuggestions:_}=I1();F.useEffect(()=>{!e||!s||!t||!r||n.requestId||s==="ask_cim"&&_({},s,C=>{c({requestId:C.id,message:null})})},[e,t,n.requestId,s,r,_,c]);const A=F.useCallback(({query:C})=>{if(!e||!C)return;const{facetFilters:v}=Tt.facetFiltersProxy,{rangeFilters:U}=Tt.rangeFiltersProxy,{catalogSegment:q}=Tt.catalogSegmentProxy,{pricebooks:L}=Tt.pricebooksProxy,V={query:C};V.facetFilters=v||{},V.rangeFilters=U||[],V.catalogSegment=q||"",V.pricebooks=L||[],d(B({},V))},[e,d]),P=F.useCallback(({categoryId:C})=>{if(!e)return;const v=ut.categoryIdProxy.categoryName,{facetFilters:U}=ut.facetFiltersProxy,{rangeFilters:q}=ut.rangeFiltersProxy,{catalogSegment:L}=ut.catalogSegmentProxy,{pricebooks:V}=ut.pricebooksProxy,ne={categoryId:C};ne.categoryName=v||"",ne.facetFilters=U||{},ne.rangeFilters=q||[],ne.catalogSegment=L||"",ne.pricebooks=V||[],f(B({},ne))},[e,f]),w=F.useCallback(({productId:C})=>{if(!e||!C)return;const v={productId:C,pdpLink:hr.pdpLink,productName:hr.proxy.productName||""};p(v)},[e,p]);return F.useEffect(()=>{const C=({detail:v})=>{(v==null?void 0:v.property)==="query"&&A({query:v.value})};return n1(C),()=>{r1(C)}},[A]),F.useEffect(()=>{const C=({detail:v})=>{if((v==null?void 0:v.property)==="pdp-context"){const U=v.value;w({productId:U.productId});return}(v==null?void 0:v.property)==="productId"&&w({productId:v.value})};return o1(C),()=>{a1(C)}},[w]),F.useEffect(()=>{const C=({detail:v})=>{(v==null?void 0:v.property)==="categoryId"&&P({categoryId:v.value})};return i1(C),()=>{s1(C)}},[P]),F.useEffect(()=>{const C=({detail:v})=>{if((v==null?void 0:v.event)==ei.RESET_CONVERSATION&&m(),(v==null?void 0:v.event)==ei.GET_SESSION_INFORMATION){const U=v.value.callback;T(U)}if((v==null?void 0:v.event)==ei.GET_CONVERSATION_MESSAGES){const{payload:U,callback:q}=v.value;if(!U.conversationId||typeof q!="function")return;y(U,q)}if((v==null?void 0:v.event)==ei.LOAD_CONVERSATION){const U=v.value;if(!U.conversationId)return;y(U,L=>{a(),L.forEach(V=>{u(V)})})}};return ok(C),()=>{ak(C)}},[m,T,y,a,u]),null},qk=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>S.jsxs($k,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:[S.jsx(Vk,{}),f]}),Yk=({children:e,dispatch:t})=>{const n=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),s=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),c=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),m=F.useCallback(_=>{t({type:Et.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),T=F.useCallback(_=>{t({type:Et.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(P1.Provider,{value:y,children:e})},Wk=(e,t)=>{const{type:n,payload:r}=t;switch(n){case Et.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case Et.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case Et.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case Et.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case Et.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case Et.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case Et.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case Et.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case Et.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case Et.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case Et.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case Et.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case Et.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case Et.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case Et.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},Gk=({promptsConfig:e,children:t})=>{const[n,r]=Z0(Wk,me(B(B({},sg),e||{}),{staticQuestions:j0((e==null?void 0:e.staticQuestions)||[])}));return S.jsx(N1.Provider,{value:n,children:S.jsx(Yk,{dispatch:r,children:t})})},R1=({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:A,initialEntry:P,entryMessage:w,disclaimerText:C,disclaimerMarkdown:v,clientContext:U,baseCatalogParams:q,searchPlaceholder:L,searchButtonLabel:V,searchConfig:ne,suggestionButtonConfig:fe,messageAlignment:Y,autoScroll:oe,promptsConfig:he,resetConversationMessage:Ce,conversationHistory:re,onConnect:ae,onCopilotEvent:Ae,onRefinedSearch:se,onRefinedBrowse:J,__features:ie,children:k})=>{const D=P==null?void 0:P.params;return S.jsx(FC,{mode:e,baseUrl:r,apiKey:t,apiToken:n,customerId:s,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,entryMessage:w,staticQuestions:j0(D==null?void 0:D.staticQuestions),staticQuestionsStrategy:D==null?void 0:D.staticQuestionsStrategy,theme:f,globalClassName:m,openLinksInNewTab:p,searchPlaceholder:L,searchButtonLabel:V,searchConfig:ne,suggestionButtonConfig:fe,messageAlignment:Y,autoScroll:oe,componentConfig:_,clientContext:U,baseCatalogParams:q,disclaimerMarkdown:v,disclaimerText:C,resetConversationMessage:Ce,conversationHistory:re,isDevelopment:T,__features:ie,children:S.jsx(jk,{entryType:A!=null?A:P==null?void 0:P.type,componentConfig:_,componentType:y,children:S.jsx(GC,{onCopilotEvent:Ae,children:S.jsx(Uk,{children:S.jsx(Rk,{children:S.jsx(Mk,{children:S.jsx(Gk,{promptsConfig:he,children:S.jsx(qk,{apiKey:t,apiToken:n,baseUrl:r,customerId:s,tenantId:a,isDevelopment:T,entryType:A,onConnect:ae,onRefinedSearch:se,onRefinedBrowse:J,onCopilotEvent:Ae,children:k})})})})})})})})};var kf={exports:{}},In={},Nf={exports:{}},Pf={};var L1;function Xk(){return L1||(L1=1,(function(e){function t(J,ie){var k=J.length;J.push(ie);e:for(;0<k;){var D=k-1>>>1,Q=J[D];if(0<s(Q,ie))J[D]=ie,J[k]=Q,k=D;else break e}}function n(J){return J.length===0?null:J[0]}function r(J){if(J.length===0)return null;var ie=J[0],k=J.pop();if(k!==ie){J[0]=k;e:for(var D=0,Q=J.length,O=Q>>>1;D<O;){var Se=2*(D+1)-1,Fe=J[Se],ke=Se+1,xe=J[ke];if(0>s(Fe,k))ke<Q&&0>s(xe,Fe)?(J[D]=xe,J[ke]=k,D=ke):(J[D]=Fe,J[Se]=k,D=Se);else if(ke<Q&&0>s(xe,k))J[D]=xe,J[ke]=k,D=ke;else break e}}return ie}function s(J,ie){var k=J.sortIndex-ie.sortIndex;return k!==0?k:J.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,A=!1,P=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(J){for(var ie=n(f);ie!==null;){if(ie.callback===null)r(f);else if(ie.startTime<=J)r(f),ie.sortIndex=ie.expirationTime,t(d,ie);else break;ie=n(f)}}function U(J){if(A=!1,v(J),!_)if(n(d)!==null)_=!0,Ae(q);else{var ie=n(f);ie!==null&&se(U,ie.startTime-J)}}function q(J,ie){_=!1,A&&(A=!1,w(ne),ne=-1),y=!0;var k=T;try{for(v(ie),m=n(d);m!==null&&(!(m.expirationTime>ie)||J&&!oe());){var D=m.callback;if(typeof D=="function"){m.callback=null,T=m.priorityLevel;var Q=D(m.expirationTime<=ie);ie=e.unstable_now(),typeof Q=="function"?m.callback=Q:m===n(d)&&r(d),v(ie)}else r(d);m=n(d)}if(m!==null)var O=!0;else{var Se=n(f);Se!==null&&se(U,Se.startTime-ie),O=!1}return O}finally{m=null,T=k,y=!1}}var L=!1,V=null,ne=-1,fe=5,Y=-1;function oe(){return!(e.unstable_now()-Y<fe)}function he(){if(V!==null){var J=e.unstable_now();Y=J;var ie=!0;try{ie=V(!0,J)}finally{ie?Ce():(L=!1,V=null)}}else L=!1}var Ce;if(typeof C=="function")Ce=function(){C(he)};else if(typeof MessageChannel!="undefined"){var re=new MessageChannel,ae=re.port2;re.port1.onmessage=he,Ce=function(){ae.postMessage(null)}}else Ce=function(){P(he,0)};function Ae(J){V=J,L||(L=!0,Ce())}function se(J,ie){ne=P(function(){J(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(J){J.callback=null},e.unstable_continueExecution=function(){_||y||(_=!0,Ae(q))},e.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):fe=0<J?Math.floor(1e3/J):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(J){switch(T){case 1:case 2:case 3:var ie=3;break;default:ie=T}var k=T;T=ie;try{return J()}finally{T=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(J,ie){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var k=T;T=J;try{return ie()}finally{T=k}},e.unstable_scheduleCallback=function(J,ie,k){var D=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?D+k:D):k=D,J){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=k+Q,J={id:p++,callback:ie,priorityLevel:J,startTime:k,expirationTime:Q,sortIndex:-1},k>D?(J.sortIndex=k,t(f,J),n(d)===null&&J===n(f)&&(A?(w(ne),ne=-1):A=!0,se(U,k-D))):(J.sortIndex=Q,t(d,J),_||y||(_=!0,Ae(q))),J},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(J){var ie=T;return function(){var k=T;T=ie;try{return J.apply(this,arguments)}finally{T=k}}}})(Pf)),Pf}var D1;function Kk(){return D1||(D1=1,Nf.exports=Xk()),Nf.exports}var M1;function Qk(){if(M1)return In;M1=1;var e=mn(),t=Kk();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 A(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 P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){P[i]=new A(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];P[o]=new A(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){P[i]=new A(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){P[i]=new A(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){P[i]=new A(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){P[i]=new A(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){P[i]=new A(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){P[i]=new A(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){P[i]=new A(i,5,!1,i.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function C(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var o=i.replace(w,C);P[o]=new A(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(w,C);P[o]=new A(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(w,C);P[o]=new A(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){P[i]=new A(i,1,!1,i.toLowerCase(),null,!1,!1)}),P.xlinkHref=new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){P[i]=new A(i,1,!1,i.toLowerCase(),null,!0,!0)});function v(i,o,l,h){var E=P.hasOwnProperty(o)?P[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 U=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=Symbol.for("react.element"),L=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),ne=Symbol.for("react.strict_mode"),fe=Symbol.for("react.profiler"),Y=Symbol.for("react.provider"),oe=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),Ce=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),Ae=Symbol.for("react.lazy"),se=Symbol.for("react.offscreen"),J=Symbol.iterator;function ie(i){return i===null||typeof i!="object"?null:(i=J&&i[J]||i["@@iterator"],typeof i=="function"?i:null)}var k=Object.assign,D;function Q(i){if(D===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);D=o&&o[1]||""}return`
11
+ `+D+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(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 Me(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 Y:return"Fragment";case R:return"Portal";case Ee:return"Profiler";case re:return"StrictMode";case Ce:return"Suspense";case ne: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 he: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 De(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===re?"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 ht(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 Ut(i){i._valueTracker||(i._valueTracker=ht(i))}function Vt(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 Cn(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=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 $e(i,o){o=o.checked,o!=null&&v(i,"checked",o,!1)}function Ct(i,o){$e(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")?on(i,o.type,l):o.hasOwnProperty("defaultValue")&&on(i,o.type,Be(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function kn(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 on(i,o,l){(o!=="number"||Cn(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 k({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Fe(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 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 me(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 ve,Ve=(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(ve=ve||document.createElement("div"),ve.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=ve.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function 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 Ht(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 an(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 $r=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 un(i,o){if(o){if($r[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 Vr(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 Wn=null;function xp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var wp=null,vo=null,Co=null;function K_(i){if(i=Su(i)){if(typeof wp!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Mc(o),wp(i.stateNode,i.type,o))}}function Q_(i){vo?Co?Co.push(i):Co=[i]:vo=i}function J_(){if(vo){var i=vo,o=Co;if(Co=vo=null,K_(i),o)for(i=0;i<o.length;i++)K_(o[i])}}function Z_(i,o){return i(o)}function eS(){}var Ap=!1;function tS(i,o,l){if(Ap)return i(o,l);Ap=!0;try{return Z_(i,o,l)}finally{Ap=!1,(vo!==null||Co!==null)&&(eS(),J_())}}function tu(i,o){var l=i.stateNode;if(l===null)return null;var h=Mc(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 nu={};Object.defineProperty(nu,"passive",{get:function(){vp=!0}}),window.addEventListener("test",nu,nu),window.removeEventListener("test",nu,nu)}catch(i){vp=!1}function V9(i,o,l,h,E,b,x,L,U){var Z=Array.prototype.slice.call(arguments,3);try{o.apply(l,Z)}catch(ce){this.onError(ce)}}var ru=!1,pc=null,mc=!1,Cp=null,q9={onError:function(i){ru=!0,pc=i}};function Y9(i,o,l,h,E,b,x,L,U){ru=!1,pc=null,V9.apply(q9,arguments)}function G9(i,o,l,h,E,b,x,L,U){if(Y9.apply(this,arguments),ru){if(ru){var Z=pc;ru=!1,pc=null}else throw Error(n(198));mc||(mc=!0,Cp=Z)}}function xs(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 nS(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 rS(i){if(xs(i)!==i)throw Error(n(188))}function W9(i){var o=i.alternate;if(!o){if(o=xs(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 rS(E),i;if(b===h)return rS(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 iS(i){return i=W9(i),i!==null?sS(i):null}function sS(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=sS(i);if(o!==null)return o;i=i.sibling}return null}var oS=t.unstable_scheduleCallback,aS=t.unstable_cancelCallback,X9=t.unstable_shouldYield,K9=t.unstable_requestPaint,Rt=t.unstable_now,Q9=t.unstable_getCurrentPriorityLevel,kp=t.unstable_ImmediatePriority,uS=t.unstable_UserBlockingPriority,gc=t.unstable_NormalPriority,J9=t.unstable_LowPriority,lS=t.unstable_IdlePriority,Ec=null,qr=null;function Z9(i){if(qr&&typeof qr.onCommitFiberRoot=="function")try{qr.onCommitFiberRoot(Ec,i,void 0,(i.current.flags&128)===128)}catch(o){}}var Tr=Math.clz32?Math.clz32:nB,eB=Math.log,tB=Math.LN2;function nB(i){return i>>>=0,i===0?32:31-(eB(i)/tB|0)|0}var yc=64,bc=4194304;function iu(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 Tc(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=iu(L):(b&=x,b!==0&&(h=iu(b)))}else x=l&~E,x!==0?h=iu(x):b!==0&&(h=iu(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-Tr(o),E=1<<l,h|=i[l],o&=~E;return h}function rB(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 iB(i,o){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var x=31-Tr(b),L=1<<x,U=E[x];U===-1?((L&l)===0||(L&h)!==0)&&(E[x]=rB(L,o)):U<=o&&(i.expiredLanes|=L),b&=~L}}function Np(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function cS(){var i=yc;return yc<<=1,(yc&4194240)===0&&(yc=64),i}function Pp(i){for(var o=[],l=0;31>l;l++)o.push(i);return o}function su(i,o,l){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-Tr(o),i[o]=l}function sB(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-Tr(l),b=1<<E;o[E]=0,h[E]=-1,i[E]=-1,l&=~b}}function Op(i,o){var l=i.entangledLanes|=o;for(i=i.entanglements;l;){var h=31-Tr(l),E=1<<h;E&o|i[h]&o&&(i[h]|=o),l&=~E}}var ct=0;function dS(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var fS,Ip,hS,pS,mS,Rp=!1,_c=[],Pi=null,Oi=null,Ii=null,ou=new Map,au=new Map,Ri=[],oB="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 gS(i,o){switch(i){case"focusin":case"focusout":Pi=null;break;case"dragenter":case"dragleave":Oi=null;break;case"mouseover":case"mouseout":Ii=null;break;case"pointerover":case"pointerout":ou.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":au.delete(o.pointerId)}}function uu(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=Su(o),o!==null&&Ip(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function aB(i,o,l,h,E){switch(o){case"focusin":return Pi=uu(Pi,i,o,l,h,E),!0;case"dragenter":return Oi=uu(Oi,i,o,l,h,E),!0;case"mouseover":return Ii=uu(Ii,i,o,l,h,E),!0;case"pointerover":var b=E.pointerId;return ou.set(b,uu(ou.get(b)||null,i,o,l,h,E)),!0;case"gotpointercapture":return b=E.pointerId,au.set(b,uu(au.get(b)||null,i,o,l,h,E)),!0}return!1}function ES(i){var o=ws(i.target);if(o!==null){var l=xs(o);if(l!==null){if(o=l.tag,o===13){if(o=nS(l),o!==null){i.blockedOn=o,mS(i.priority,function(){hS(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 Sc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var l=Dp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Wn=h,l.target.dispatchEvent(h),Wn=null}else return o=Su(l),o!==null&&Ip(o),i.blockedOn=l,!1;o.shift()}return!0}function yS(i,o,l){Sc(i)&&l.delete(o)}function uB(){Rp=!1,Pi!==null&&Sc(Pi)&&(Pi=null),Oi!==null&&Sc(Oi)&&(Oi=null),Ii!==null&&Sc(Ii)&&(Ii=null),ou.forEach(yS),au.forEach(yS)}function lu(i,o){i.blockedOn===o&&(i.blockedOn=null,Rp||(Rp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,uB)))}function cu(i){function o(E){return lu(E,i)}if(0<_c.length){lu(_c[0],i);for(var l=1;l<_c.length;l++){var h=_c[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Pi!==null&&lu(Pi,i),Oi!==null&&lu(Oi,i),Ii!==null&&lu(Ii,i),ou.forEach(o),au.forEach(o),l=0;l<Ri.length;l++)h=Ri[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ri.length&&(l=Ri[0],l.blockedOn===null);)ES(l),l.blockedOn===null&&Ri.shift()}var ko=H.ReactCurrentBatchConfig,xc=!0;function lB(i,o,l,h){var E=ct,b=ko.transition;ko.transition=null;try{ct=1,Lp(i,o,l,h)}finally{ct=E,ko.transition=b}}function cB(i,o,l,h){var E=ct,b=ko.transition;ko.transition=null;try{ct=4,Lp(i,o,l,h)}finally{ct=E,ko.transition=b}}function Lp(i,o,l,h){if(xc){var E=Dp(i,o,l,h);if(E===null)Jp(i,o,h,wc,l),gS(i,h);else if(aB(E,i,o,l,h))h.stopPropagation();else if(gS(i,h),o&4&&-1<oB.indexOf(i)){for(;E!==null;){var b=Su(E);if(b!==null&&fS(b),b=Dp(i,o,l,h),b===null&&Jp(i,o,h,wc,l),b===E)break;E=b}E!==null&&h.stopPropagation()}else Jp(i,o,h,null,l)}}var wc=null;function Dp(i,o,l,h){if(wc=null,i=xp(h),i=ws(i),i!==null)if(o=xs(i),o===null)i=null;else if(l=o.tag,l===13){if(i=nS(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 wc=i,null}function bS(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Q9()){case kp:return 1;case uS:return 4;case gc:case J9:return 16;case lS:return 536870912;default:return 16}default:return 16}}var Li=null,Mp=null,Ac=null;function TS(){if(Ac)return Ac;var i,o=Mp,l=o.length,h,E="value"in Li?Li.value:Li.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 Ac=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 Cc(){return!0}function _S(){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)?Cc:_S,this.isPropagationStopped=_S,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=Cc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Cc)},persist:function(){},isPersistent:Cc}),o}var No={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fp=Xn(No),du=k({},No,{view:0,detail:0}),dB=Xn(du),Bp,Up,fu,kc=k({},du,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zp,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!==fu&&(fu&&i.type==="mousemove"?(Bp=i.screenX-fu.screenX,Up=i.screenY-fu.screenY):Up=Bp=0,fu=i),Bp)},movementY:function(i){return"movementY"in i?i.movementY:Up}}),SS=Xn(kc),fB=k({},kc,{dataTransfer:0}),hB=Xn(fB),pB=k({},du,{relatedTarget:0}),Hp=Xn(pB),mB=k({},No,{animationName:0,elapsedTime:0,pseudoElement:0}),gB=Xn(mB),EB=k({},No,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),yB=Xn(EB),bB=k({},No,{data:0}),xS=Xn(bB),TB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_B={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"},SB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xB(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=SB[i])?!!o[i]:!1}function zp(){return xB}var wB=k({},du,{key:function(i){if(i.key){var o=TB[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"?_B[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zp,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}}),AB=Xn(wB),vB=k({},kc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wS=Xn(vB),CB=k({},du,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zp}),kB=Xn(CB),NB=k({},No,{propertyName:0,elapsedTime:0,pseudoElement:0}),PB=Xn(NB),OB=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}),IB=Xn(OB),RB=[9,13,27,32],jp=c&&"CompositionEvent"in window,hu=null;c&&"documentMode"in document&&(hu=document.documentMode);var LB=c&&"TextEvent"in window&&!hu,AS=c&&(!jp||hu&&8<hu&&11>=hu),vS=" ",CS=!1;function kS(i,o){switch(i){case"keyup":return RB.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function NS(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Po=!1;function DB(i,o){switch(i){case"compositionend":return NS(o);case"keypress":return o.which!==32?null:(CS=!0,vS);case"textInput":return i=o.data,i===vS&&CS?null:i;default:return null}}function MB(i,o){if(Po)return i==="compositionend"||!jp&&kS(i,o)?(i=TS(),Ac=Mp=Li=null,Po=!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 AS&&o.locale!=="ko"?null:o.data;default:return null}}var FB={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 PS(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!FB[i.type]:o==="textarea"}function OS(i,o,l,h){Q_(h),o=Rc(o,"onChange"),0<o.length&&(l=new Fp("onChange","change",null,l,h),i.push({event:l,listeners:o}))}var pu=null,mu=null;function BB(i){XS(i,0)}function Nc(i){var o=Do(i);if(Vt(o))return i}function UB(i,o){if(i==="change")return o}var IS=!1;if(c){var $p;if(c){var Vp="oninput"in document;if(!Vp){var RS=document.createElement("div");RS.setAttribute("oninput","return;"),Vp=typeof RS.oninput=="function"}$p=Vp}else $p=!1;IS=$p&&(!document.documentMode||9<document.documentMode)}function LS(){pu&&(pu.detachEvent("onpropertychange",DS),mu=pu=null)}function DS(i){if(i.propertyName==="value"&&Nc(mu)){var o=[];OS(o,mu,i,xp(i)),tS(BB,o)}}function HB(i,o,l){i==="focusin"?(LS(),pu=o,mu=l,pu.attachEvent("onpropertychange",DS)):i==="focusout"&&LS()}function zB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Nc(mu)}function jB(i,o){if(i==="click")return Nc(o)}function $B(i,o){if(i==="input"||i==="change")return Nc(o)}function VB(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var _r=typeof Object.is=="function"?Object.is:VB;function gu(i,o){if(_r(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)||!_r(i[E],o[E]))return!1}return!0}function MS(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function FS(i,o){var l=MS(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=MS(l)}}function BS(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?BS(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function US(){for(var i=window,o=Cn();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=Cn(i.document)}return o}function qp(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 qB(i){var o=US(),l=i.focusedElem,h=i.selectionRange;if(o!==l&&l&&l.ownerDocument&&BS(l.ownerDocument.documentElement,l)){if(h!==null&&qp(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=FS(l,b);var x=FS(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 YB=c&&"documentMode"in document&&11>=document.documentMode,Oo=null,Yp=null,Eu=null,Gp=!1;function HS(i,o,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Gp||Oo==null||Oo!==Cn(h)||(h=Oo,"selectionStart"in h&&qp(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}),Eu&&gu(Eu,h)||(Eu=h,h=Rc(Yp,"onSelect"),0<h.length&&(o=new Fp("onSelect","select",null,o,l),i.push({event:o,listeners:h}),o.target=Oo)))}function Pc(i,o){var l={};return l[i.toLowerCase()]=o.toLowerCase(),l["Webkit"+i]="webkit"+o,l["Moz"+i]="moz"+o,l}var Io={animationend:Pc("Animation","AnimationEnd"),animationiteration:Pc("Animation","AnimationIteration"),animationstart:Pc("Animation","AnimationStart"),transitionend:Pc("Transition","TransitionEnd")},Wp={},zS={};c&&(zS=document.createElement("div").style,"AnimationEvent"in window||(delete Io.animationend.animation,delete Io.animationiteration.animation,delete Io.animationstart.animation),"TransitionEvent"in window||delete Io.transitionend.transition);function Oc(i){if(Wp[i])return Wp[i];if(!Io[i])return i;var o=Io[i],l;for(l in o)if(o.hasOwnProperty(l)&&l in zS)return Wp[i]=o[l];return i}var jS=Oc("animationend"),$S=Oc("animationiteration"),VS=Oc("animationstart"),qS=Oc("transitionend"),YS=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 Di(i,o){YS.set(i,o),a(o,[i])}for(var Xp=0;Xp<GS.length;Xp++){var Kp=GS[Xp],GB=Kp.toLowerCase(),WB=Kp[0].toUpperCase()+Kp.slice(1);Di(GB,"on"+WB)}Di(jS,"onAnimationEnd"),Di($S,"onAnimationIteration"),Di(VS,"onAnimationStart"),Di("dblclick","onDoubleClick"),Di("focusin","onFocus"),Di("focusout","onBlur"),Di(qS,"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 yu="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(" "),XB=new Set("cancel close invalid load scroll toggle".split(" ").concat(yu));function WS(i,o,l){var h=i.type||"unknown-event";i.currentTarget=l,G9(h,o,void 0,i),i.currentTarget=null}function XS(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;WS(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;WS(E,L,Z),b=U}}}if(mc)throw i=Cp,mc=!1,Cp=null,i}function _t(i,o){var l=o[im];l===void 0&&(l=o[im]=new Set);var h=i+"__bubble";l.has(h)||(KS(o,i,2,!1),l.add(h))}function Qp(i,o,l){var h=0;o&&(h|=4),KS(l,i,h,o)}var Ic="_reactListening"+Math.random().toString(36).slice(2);function bu(i){if(!i[Ic]){i[Ic]=!0,r.forEach(function(l){l!=="selectionchange"&&(XB.has(l)||Qp(l,!1,i),Qp(l,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Ic]||(o[Ic]=!0,Qp("selectionchange",!1,o))}}function KS(i,o,l,h){switch(bS(o)){case 1:var E=lB;break;case 4:E=cB;break;default:E=Lp}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 Jp(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=ws(L),x===null)return;if(U=x.tag,U===5||U===6){h=b=x;continue e}L=L.parentNode}}h=h.return}tS(function(){var Z=b,ce=xp(l),pe=[];e:{var ue=YS.get(i);if(ue!==void 0){var Ae=Fp,Ne=i;switch(i){case"keypress":if(vc(l)===0)break e;case"keydown":case"keyup":Ae=AB;break;case"focusin":Ne="focus",Ae=Hp;break;case"focusout":Ne="blur",Ae=Hp;break;case"beforeblur":case"afterblur":Ae=Hp;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=SS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ae=hB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ae=kB;break;case jS:case $S:case VS:Ae=gB;break;case qS:Ae=PB;break;case"scroll":Ae=dB;break;case"wheel":Ae=IB;break;case"copy":case"cut":case"paste":Ae=yB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ae=wS}var Oe=(o&4)!==0,Lt=!Oe&&i==="scroll",W=Oe?ue!==null?ue+"Capture":null:ue;Oe=[];for(var j=Z,K;j!==null;){K=j;var be=K.stateNode;if(K.tag===5&&be!==null&&(K=be,W!==null&&(be=tu(j,W),be!=null&&Oe.push(Tu(j,be,K)))),Lt)break;j=j.return}0<Oe.length&&(ue=new Ae(ue,Ne,null,l,ce),pe.push({event:ue,listeners:Oe}))}}if((o&7)===0){e:{if(ue=i==="mouseover"||i==="pointerover",Ae=i==="mouseout"||i==="pointerout",ue&&l!==Wn&&(Ne=l.relatedTarget||l.fromElement)&&(ws(Ne)||Ne[ci]))break e;if((Ae||ue)&&(ue=ce.window===ce?ce:(ue=ce.ownerDocument)?ue.defaultView||ue.parentWindow:window,Ae?(Ne=l.relatedTarget||l.toElement,Ae=Z,Ne=Ne?ws(Ne):null,Ne!==null&&(Lt=xs(Ne),Ne!==Lt||Ne.tag!==5&&Ne.tag!==6)&&(Ne=null)):(Ae=null,Ne=Z),Ae!==Ne)){if(Oe=SS,be="onMouseLeave",W="onMouseEnter",j="mouse",(i==="pointerout"||i==="pointerover")&&(Oe=wS,be="onPointerLeave",W="onPointerEnter",j="pointer"),Lt=Ae==null?ue:Do(Ae),K=Ne==null?ue:Do(Ne),ue=new Oe(be,j+"leave",Ae,l,ce),ue.target=Lt,ue.relatedTarget=K,be=null,ws(ce)===Z&&(Oe=new Oe(W,j+"enter",Ne,l,ce),Oe.target=K,Oe.relatedTarget=Lt,be=Oe),Lt=be,Ae&&Ne)t:{for(Oe=Ae,W=Ne,j=0,K=Oe;K;K=Ro(K))j++;for(K=0,be=W;be;be=Ro(be))K++;for(;0<j-K;)Oe=Ro(Oe),j--;for(;0<K-j;)W=Ro(W),K--;for(;j--;){if(Oe===W||W!==null&&Oe===W.alternate)break t;Oe=Ro(Oe),W=Ro(W)}Oe=null}else Oe=null;Ae!==null&&QS(pe,ue,Ae,Oe,!1),Ne!==null&&Lt!==null&&QS(pe,Lt,Ne,Oe,!0)}}e:{if(ue=Z?Do(Z):window,Ae=ue.nodeName&&ue.nodeName.toLowerCase(),Ae==="select"||Ae==="input"&&ue.type==="file")var Le=UB;else if(PS(ue))if(IS)Le=$B;else{Le=zB;var He=HB}else(Ae=ue.nodeName)&&Ae.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(Le=jB);if(Le&&(Le=Le(i,Z))){OS(pe,Le,l,ce);break e}He&&He(i,ue,Z),i==="focusout"&&(He=ue._wrapperState)&&He.controlled&&ue.type==="number"&&on(ue,"number",ue.value)}switch(He=Z?Do(Z):window,i){case"focusin":(PS(He)||He.contentEditable==="true")&&(Oo=He,Yp=Z,Eu=null);break;case"focusout":Eu=Yp=Oo=null;break;case"mousedown":Gp=!0;break;case"contextmenu":case"mouseup":case"dragend":Gp=!1,HS(pe,l,ce);break;case"selectionchange":if(YB)break;case"keydown":case"keyup":HS(pe,l,ce)}var ze;if(jp)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 Po?kS(i,l)&&(Ye="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ye="onCompositionStart");Ye&&(AS&&l.locale!=="ko"&&(Po||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&Po&&(ze=TS()):(Li=ce,Mp="value"in Li?Li.value:Li.textContent,Po=!0)),He=Rc(Z,Ye),0<He.length&&(Ye=new xS(Ye,i,null,l,ce),pe.push({event:Ye,listeners:He}),ze?Ye.data=ze:(ze=NS(l),ze!==null&&(Ye.data=ze)))),(ze=LB?DB(i,l):MB(i,l))&&(Z=Rc(Z,"onBeforeInput"),0<Z.length&&(ce=new xS("onBeforeInput","beforeinput",null,l,ce),pe.push({event:ce,listeners:Z}),ce.data=ze))}XS(pe,o)})}function Tu(i,o,l){return{instance:i,listener:o,currentTarget:l}}function Rc(i,o){for(var l=o+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=tu(i,l),b!=null&&h.unshift(Tu(i,b,E)),b=tu(i,o),b!=null&&h.push(Tu(i,b,E))),i=i.return}return h}function Ro(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function QS(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=tu(l,b),U!=null&&x.unshift(Tu(l,U,L))):E||(U=tu(l,b),U!=null&&x.push(Tu(l,U,L)))),l=l.return}x.length!==0&&i.push({event:o,listeners:x})}var KB=/\r\n?/g,QB=/\u0000|\uFFFD/g;function JS(i){return(typeof i=="string"?i:""+i).replace(KB,`
15
- `).replace(QB,"")}function Lc(i,o,l){if(o=JS(o),JS(i)!==o&&l)throw Error(n(425))}function Dc(){}var Zp=null,em=null;function tm(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 nm=typeof setTimeout=="function"?setTimeout:void 0,JB=typeof clearTimeout=="function"?clearTimeout:void 0,ZS=typeof Promise=="function"?Promise:void 0,ZB=typeof queueMicrotask=="function"?queueMicrotask:typeof ZS!="undefined"?function(i){return ZS.resolve(null).then(i).catch(e7)}:nm;function e7(i){setTimeout(function(){throw i})}function rm(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),cu(o);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);cu(o)}function Mi(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 ex(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 Lo=Math.random().toString(36).slice(2),Yr="__reactFiber$"+Lo,_u="__reactProps$"+Lo,ci="__reactContainer$"+Lo,im="__reactEvents$"+Lo,t7="__reactListeners$"+Lo,n7="__reactHandles$"+Lo;function ws(i){var o=i[Yr];if(o)return o;for(var l=i.parentNode;l;){if(o=l[ci]||l[Yr]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(i=ex(i);i!==null;){if(l=i[Yr])return l;i=ex(i)}return o}i=l,l=i.parentNode}return null}function Su(i){return i=i[Yr]||i[ci],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Do(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Mc(i){return i[_u]||null}var sm=[],Mo=-1;function Fi(i){return{current:i}}function St(i){0>Mo||(i.current=sm[Mo],sm[Mo]=null,Mo--)}function yt(i,o){Mo++,sm[Mo]=i.current,i.current=o}var Bi={},_n=Fi(Bi),Bn=Fi(!1),As=Bi;function Fo(i,o){var l=i.type.contextTypes;if(!l)return Bi;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 Fc(){St(Bn),St(_n)}function tx(i,o,l){if(_n.current!==Bi)throw Error(n(168));yt(_n,o),yt(Bn,l)}function nx(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,De(i)||"Unknown",E));return k({},l,h)}function Bc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Bi,As=_n.current,yt(_n,i),yt(Bn,Bn.current),!0}function rx(i,o,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=nx(i,o,As),h.__reactInternalMemoizedMergedChildContext=i,St(Bn),St(_n),yt(_n,i)):St(Bn),yt(Bn,l)}var di=null,Uc=!1,om=!1;function ix(i){di===null?di=[i]:di.push(i)}function r7(i){Uc=!0,ix(i)}function Ui(){if(!om&&di!==null){om=!0;var i=0,o=ct;try{var l=di;for(ct=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}di=null,Uc=!1}catch(E){throw di!==null&&(di=di.slice(i+1)),oS(kp,Ui),E}finally{ct=o,om=!1}}return null}var Bo=[],Uo=0,Hc=null,zc=0,or=[],ar=0,vs=null,fi=1,hi="";function Cs(i,o){Bo[Uo++]=zc,Bo[Uo++]=Hc,Hc=i,zc=o}function sx(i,o,l){or[ar++]=fi,or[ar++]=hi,or[ar++]=vs,vs=i;var h=fi;i=hi;var E=32-Tr(h)-1;h&=~(1<<E),l+=1;var b=32-Tr(o)+E;if(30<b){var x=E-E%5;b=(h&(1<<x)-1).toString(32),h>>=x,E-=x,fi=1<<32-Tr(o)+E|l<<E|h,hi=b+i}else fi=1<<b|l<<E|h,hi=i}function am(i){i.return!==null&&(Cs(i,1),sx(i,1,0))}function um(i){for(;i===Hc;)Hc=Bo[--Uo],Bo[Uo]=null,zc=Bo[--Uo],Bo[Uo]=null;for(;i===vs;)vs=or[--ar],or[ar]=null,hi=or[--ar],or[ar]=null,fi=or[--ar],or[ar]=null}var Kn=null,Qn=null,At=!1,Sr=null;function ox(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 ax(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=Mi(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:fi,overflow:hi}: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 lm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function cm(i){if(At){var o=Qn;if(o){var l=o;if(!ax(i,o)){if(lm(i))throw Error(n(418));o=Mi(l.nextSibling);var h=Kn;o&&ax(i,o)?ox(h,l):(i.flags=i.flags&-4097|2,At=!1,Kn=i)}}else{if(lm(i))throw Error(n(418));i.flags=i.flags&-4097|2,At=!1,Kn=i}}}function ux(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Kn=i}function jc(i){if(i!==Kn)return!1;if(!At)return ux(i),At=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!tm(i.type,i.memoizedProps)),o&&(o=Qn)){if(lm(i))throw lx(),Error(n(418));for(;o;)ox(i,o),o=Mi(o.nextSibling)}if(ux(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=Mi(i.nextSibling);break e}o--}else l!=="$"&&l!=="$!"&&l!=="$?"||o++}i=i.nextSibling}Qn=null}}else Qn=Kn?Mi(i.stateNode.nextSibling):null;return!0}function lx(){for(var i=Qn;i;)i=Mi(i.nextSibling)}function Ho(){Qn=Kn=null,At=!1}function dm(i){Sr===null?Sr=[i]:Sr.push(i)}var i7=H.ReactCurrentBatchConfig;function xu(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 $c(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function cx(i){var o=i._init;return o(i._payload)}function dx(i){function o(W,j){if(i){var K=W.deletions;K===null?(W.deletions=[j],W.flags|=16):K.push(j)}}function l(W,j){if(!i)return null;for(;j!==null;)o(W,j),j=j.sibling;return null}function h(W,j){for(W=new Map;j!==null;)j.key!==null?W.set(j.key,j):W.set(j.index,j),j=j.sibling;return W}function E(W,j){return W=Gi(W,j),W.index=0,W.sibling=null,W}function b(W,j,K){return W.index=K,i?(K=W.alternate,K!==null?(K=K.index,K<j?(W.flags|=2,j):K):(W.flags|=2,j)):(W.flags|=1048576,j)}function x(W){return i&&W.alternate===null&&(W.flags|=2),W}function L(W,j,K,be){return j===null||j.tag!==6?(j=n0(K,W.mode,be),j.return=W,j):(j=E(j,K),j.return=W,j)}function U(W,j,K,be){var Le=K.type;return Le===Y?ce(W,j,K.props.children,be,K.key):j!==null&&(j.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===xe&&cx(Le)===j.type)?(be=E(j,K.props),be.ref=xu(W,j,K),be.return=W,be):(be=hd(K.type,K.key,K.props,null,W.mode,be),be.ref=xu(W,j,K),be.return=W,be)}function Z(W,j,K,be){return j===null||j.tag!==4||j.stateNode.containerInfo!==K.containerInfo||j.stateNode.implementation!==K.implementation?(j=r0(K,W.mode,be),j.return=W,j):(j=E(j,K.children||[]),j.return=W,j)}function ce(W,j,K,be,Le){return j===null||j.tag!==7?(j=Ds(K,W.mode,be,Le),j.return=W,j):(j=E(j,K),j.return=W,j)}function pe(W,j,K){if(typeof j=="string"&&j!==""||typeof j=="number")return j=n0(""+j,W.mode,K),j.return=W,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case q:return K=hd(j.type,j.key,j.props,null,W.mode,K),K.ref=xu(W,null,j),K.return=W,K;case R:return j=r0(j,W.mode,K),j.return=W,j;case xe:var be=j._init;return pe(W,be(j._payload),K)}if(Fn(j)||ie(j))return j=Ds(j,W.mode,K,null),j.return=W,j;$c(W,j)}return null}function ue(W,j,K,be){var Le=j!==null?j.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return Le!==null?null:L(W,j,""+K,be);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case q:return K.key===Le?U(W,j,K,be):null;case R:return K.key===Le?Z(W,j,K,be):null;case xe:return Le=K._init,ue(W,j,Le(K._payload),be)}if(Fn(K)||ie(K))return Le!==null?null:ce(W,j,K,be,null);$c(W,K)}return null}function Ae(W,j,K,be,Le){if(typeof be=="string"&&be!==""||typeof be=="number")return W=W.get(K)||null,L(j,W,""+be,Le);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case q:return W=W.get(be.key===null?K:be.key)||null,U(j,W,be,Le);case R:return W=W.get(be.key===null?K:be.key)||null,Z(j,W,be,Le);case xe:var He=be._init;return Ae(W,j,K,He(be._payload),Le)}if(Fn(be)||ie(be))return W=W.get(K)||null,ce(j,W,be,Le,null);$c(j,be)}return null}function Ne(W,j,K,be){for(var Le=null,He=null,ze=j,Ye=j=0,nn=null;ze!==null&&Ye<K.length;Ye++){ze.index>Ye?(nn=ze,ze=null):nn=ze.sibling;var st=ue(W,ze,K[Ye],be);if(st===null){ze===null&&(ze=nn);break}i&&ze&&st.alternate===null&&o(W,ze),j=b(st,j,Ye),He===null?Le=st:He.sibling=st,He=st,ze=nn}if(Ye===K.length)return l(W,ze),At&&Cs(W,Ye),Le;if(ze===null){for(;Ye<K.length;Ye++)ze=pe(W,K[Ye],be),ze!==null&&(j=b(ze,j,Ye),He===null?Le=ze:He.sibling=ze,He=ze);return At&&Cs(W,Ye),Le}for(ze=h(W,ze);Ye<K.length;Ye++)nn=Ae(ze,W,Ye,K[Ye],be),nn!==null&&(i&&nn.alternate!==null&&ze.delete(nn.key===null?Ye:nn.key),j=b(nn,j,Ye),He===null?Le=nn:He.sibling=nn,He=nn);return i&&ze.forEach(function(Wi){return o(W,Wi)}),At&&Cs(W,Ye),Le}function Oe(W,j,K,be){var Le=ie(K);if(typeof Le!="function")throw Error(n(150));if(K=Le.call(K),K==null)throw Error(n(151));for(var He=Le=null,ze=j,Ye=j=0,nn=null,st=K.next();ze!==null&&!st.done;Ye++,st=K.next()){ze.index>Ye?(nn=ze,ze=null):nn=ze.sibling;var Wi=ue(W,ze,st.value,be);if(Wi===null){ze===null&&(ze=nn);break}i&&ze&&Wi.alternate===null&&o(W,ze),j=b(Wi,j,Ye),He===null?Le=Wi:He.sibling=Wi,He=Wi,ze=nn}if(st.done)return l(W,ze),At&&Cs(W,Ye),Le;if(ze===null){for(;!st.done;Ye++,st=K.next())st=pe(W,st.value,be),st!==null&&(j=b(st,j,Ye),He===null?Le=st:He.sibling=st,He=st);return At&&Cs(W,Ye),Le}for(ze=h(W,ze);!st.done;Ye++,st=K.next())st=Ae(ze,W,Ye,st.value,be),st!==null&&(i&&st.alternate!==null&&ze.delete(st.key===null?Ye:st.key),j=b(st,j,Ye),He===null?Le=st:He.sibling=st,He=st);return i&&ze.forEach(function(F7){return o(W,F7)}),At&&Cs(W,Ye),Le}function Lt(W,j,K,be){if(typeof K=="object"&&K!==null&&K.type===Y&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case q:e:{for(var Le=K.key,He=j;He!==null;){if(He.key===Le){if(Le=K.type,Le===Y){if(He.tag===7){l(W,He.sibling),j=E(He,K.props.children),j.return=W,W=j;break e}}else if(He.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===xe&&cx(Le)===He.type){l(W,He.sibling),j=E(He,K.props),j.ref=xu(W,He,K),j.return=W,W=j;break e}l(W,He);break}else o(W,He);He=He.sibling}K.type===Y?(j=Ds(K.props.children,W.mode,be,K.key),j.return=W,W=j):(be=hd(K.type,K.key,K.props,null,W.mode,be),be.ref=xu(W,j,K),be.return=W,W=be)}return x(W);case R:e:{for(He=K.key;j!==null;){if(j.key===He)if(j.tag===4&&j.stateNode.containerInfo===K.containerInfo&&j.stateNode.implementation===K.implementation){l(W,j.sibling),j=E(j,K.children||[]),j.return=W,W=j;break e}else{l(W,j);break}else o(W,j);j=j.sibling}j=r0(K,W.mode,be),j.return=W,W=j}return x(W);case xe:return He=K._init,Lt(W,j,He(K._payload),be)}if(Fn(K))return Ne(W,j,K,be);if(ie(K))return Oe(W,j,K,be);$c(W,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,j!==null&&j.tag===6?(l(W,j.sibling),j=E(j,K),j.return=W,W=j):(l(W,j),j=n0(K,W.mode,be),j.return=W,W=j),x(W)):l(W,j)}return Lt}var zo=dx(!0),fx=dx(!1),Vc=Fi(null),qc=null,jo=null,fm=null;function hm(){fm=jo=qc=null}function pm(i){var o=Vc.current;St(Vc),i._currentValue=o}function mm(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 $o(i,o){qc=i,fm=jo=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(fm!==i)if(i={context:i,memoizedValue:o,next:null},jo===null){if(qc===null)throw Error(n(308));jo=i,qc.dependencies={lanes:0,firstContext:i}}else jo=jo.next=i;return o}var ks=null;function gm(i){ks===null?ks=[i]:ks.push(i)}function hx(i,o,l,h){var E=o.interleaved;return E===null?(l.next=l,gm(o)):(l.next=E.next,E.next=l),o.interleaved=l,pi(i,h)}function pi(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 Hi=!1;function Em(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function px(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 mi(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function zi(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,pi(i,l)}return E=h.interleaved,E===null?(o.next=o,gm(h)):(o.next=E.next,E.next=o),h.interleaved=o,pi(i,l)}function Yc(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,Op(i,l)}}function mx(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;Hi=!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 ce=i.alternate;ce!==null&&(ce=ce.updateQueue,L=ce.lastBaseUpdate,L!==x&&(L===null?ce.firstBaseUpdate=Z:L.next=Z,ce.lastBaseUpdate=U))}if(b!==null){var pe=E.baseState;x=0,ce=Z=U=null,L=b;do{var ue=L.lane,Ae=L.eventTime;if((h&ue)===ue){ce!==null&&(ce=ce.next={eventTime:Ae,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var Ne=i,Oe=L;switch(ue=o,Ae=l,Oe.tag){case 1:if(Ne=Oe.payload,typeof Ne=="function"){pe=Ne.call(Ae,pe,ue);break e}pe=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Oe.payload,ue=typeof Ne=="function"?Ne.call(Ae,pe,ue):Ne,ue==null)break e;pe=k({},pe,ue);break e;case 2:Hi=!0}}L.callback!==null&&L.lane!==0&&(i.flags|=64,ue=E.effects,ue===null?E.effects=[L]:ue.push(L))}else Ae={eventTime:Ae,lane:ue,tag:L.tag,payload:L.payload,callback:L.callback,next:null},ce===null?(Z=ce=Ae,U=pe):ce=ce.next=Ae,x|=ue;if(L=L.next,L===null){if(L=E.shared.pending,L===null)break;ue=L,L=ue.next,ue.next=null,E.lastBaseUpdate=ue,E.shared.pending=null}}while(!0);if(ce===null&&(U=pe),E.baseState=U,E.firstBaseUpdate=Z,E.lastBaseUpdate=ce,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);Os|=x,i.lanes=x,i.memoizedState=pe}}function gx(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 wu={},Gr=Fi(wu),Au=Fi(wu),vu=Fi(wu);function Ns(i){if(i===wu)throw Error(n(174));return i}function ym(i,o){switch(yt(vu,o),yt(Au,i),yt(Gr,wu),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:me(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=me(o,i)}St(Gr),yt(Gr,o)}function Vo(){St(Gr),St(Au),St(vu)}function Ex(i){Ns(vu.current);var o=Ns(Gr.current),l=me(o,i.type);o!==l&&(yt(Au,i),yt(Gr,l))}function bm(i){Au.current===i&&(St(Gr),St(Au))}var kt=Fi(0);function Wc(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 Tm=[];function _m(){for(var i=0;i<Tm.length;i++)Tm[i]._workInProgressVersionPrimary=null;Tm.length=0}var Xc=H.ReactCurrentDispatcher,Sm=H.ReactCurrentBatchConfig,Ps=0,Nt=null,Yt=null,en=null,Kc=!1,Cu=!1,ku=0,s7=0;function Sn(){throw Error(n(321))}function xm(i,o){if(o===null)return!1;for(var l=0;l<o.length&&l<i.length;l++)if(!_r(i[l],o[l]))return!1;return!0}function wm(i,o,l,h,E,b){if(Ps=b,Nt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Xc.current=i===null||i.memoizedState===null?l7:c7,i=l(h,E),Cu){b=0;do{if(Cu=!1,ku=0,25<=b)throw Error(n(301));b+=1,en=Yt=null,o.updateQueue=null,Xc.current=d7,i=l(h,E)}while(Cu)}if(Xc.current=Zc,o=Yt!==null&&Yt.next!==null,Ps=0,en=Yt=Nt=null,Kc=!1,o)throw Error(n(300));return i}function Am(){var i=ku!==0;return ku=0,i}function Wr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return en===null?Nt.memoizedState=en=i:en=en.next=i,en}function lr(){if(Yt===null){var i=Nt.alternate;i=i!==null?i.memoizedState:null}else i=Yt.next;var o=en===null?Nt.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?Nt.memoizedState=en=i:en=en.next=i}return en}function Nu(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 ce=Z.lane;if((Ps&ce)===ce)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 pe={lane:ce,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};U===null?(L=U=pe,x=h):U=U.next=pe,Nt.lanes|=ce,Os|=ce}Z=Z.next}while(Z!==null&&Z!==b);U===null?x=h:U.next=L,_r(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,Nt.lanes|=b,Os|=b,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[o.memoizedState,l.dispatch]}function Cm(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);_r(b,o.memoizedState)||(Hn=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),l.lastRenderedState=b}return[b,h]}function yx(){}function bx(i,o){var l=Nt,h=lr(),E=o(),b=!_r(h.memoizedState,E);if(b&&(h.memoizedState=E,Hn=!0),h=h.queue,km(Sx.bind(null,l,h,i),[i]),h.getSnapshot!==o||b||en!==null&&en.memoizedState.tag&1){if(l.flags|=2048,Pu(9,_x.bind(null,l,h,E,o),void 0,null),tn===null)throw Error(n(349));(Ps&30)!==0||Tx(l,o,E)}return E}function Tx(i,o,l){i.flags|=16384,i={getSnapshot:o,value:l},o=Nt.updateQueue,o===null?(o={lastEffect:null,stores:null},Nt.updateQueue=o,o.stores=[i]):(l=o.stores,l===null?o.stores=[i]:l.push(i))}function _x(i,o,l,h){o.value=l,o.getSnapshot=h,xx(o)&&wx(i)}function Sx(i,o,l){return l(function(){xx(o)&&wx(i)})}function xx(i){var o=i.getSnapshot;i=i.value;try{var l=o();return!_r(i,l)}catch(h){return!0}}function wx(i){var o=pi(i,1);o!==null&&vr(o,i,1,-1)}function Ax(i){var o=Wr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Nu,lastRenderedState:i},o.queue=i,i=i.dispatch=u7.bind(null,Nt,i),[o.memoizedState,i]}function Pu(i,o,l,h){return i={tag:i,create:o,destroy:l,deps:h,next:null},o=Nt.updateQueue,o===null?(o={lastEffect:null,stores:null},Nt.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 Qc(i,o,l,h){var E=Wr();Nt.flags|=i,E.memoizedState=Pu(1|o,l,void 0,h===void 0?null:h)}function Jc(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&&xm(h,x.deps)){E.memoizedState=Pu(o,l,b,h);return}}Nt.flags|=i,E.memoizedState=Pu(1|o,l,b,h)}function Cx(i,o){return Qc(8390656,8,i,o)}function km(i,o){return Jc(2048,8,i,o)}function kx(i,o){return Jc(4,2,i,o)}function Nx(i,o){return Jc(4,4,i,o)}function Px(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 Ox(i,o,l){return l=l!=null?l.concat([i]):null,Jc(4,4,Px.bind(null,o,i),l)}function Nm(){}function Ix(i,o){var l=lr();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&xm(o,h[1])?h[0]:(l.memoizedState=[i,o],i)}function Rx(i,o){var l=lr();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&xm(o,h[1])?h[0]:(i=i(),l.memoizedState=[i,o],i)}function Lx(i,o,l){return(Ps&21)===0?(i.baseState&&(i.baseState=!1,Hn=!0),i.memoizedState=l):(_r(l,o)||(l=cS(),Nt.lanes|=l,Os|=l,i.baseState=!0),o)}function o7(i,o){var l=ct;ct=l!==0&&4>l?l:4,i(!0);var h=Sm.transition;Sm.transition={};try{i(!1),o()}finally{ct=l,Sm.transition=h}}function Dx(){return lr().memoizedState}function a7(i,o,l){var h=qi(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},Mx(i))Fx(o,l);else if(l=hx(i,o,l,h),l!==null){var E=Pn();vr(l,i,h,E),Bx(l,o,h)}}function u7(i,o,l){var h=qi(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(Mx(i))Fx(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,_r(L,x)){var U=o.interleaved;U===null?(E.next=E,gm(o)):(E.next=U.next,U.next=E),o.interleaved=E;return}}catch(Z){}l=hx(i,o,E,h),l!==null&&(E=Pn(),vr(l,i,h,E),Bx(l,o,h))}}function Mx(i){var o=i.alternate;return i===Nt||o!==null&&o===Nt}function Fx(i,o){Cu=Kc=!0;var l=i.pending;l===null?o.next=o:(o.next=l.next,l.next=o),i.pending=o}function Bx(i,o,l){if((l&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,Op(i,l)}}var Zc={readContext:ur,useCallback:Sn,useContext:Sn,useEffect:Sn,useImperativeHandle:Sn,useInsertionEffect:Sn,useLayoutEffect:Sn,useMemo:Sn,useReducer:Sn,useRef:Sn,useState:Sn,useDebugValue:Sn,useDeferredValue:Sn,useTransition:Sn,useMutableSource:Sn,useSyncExternalStore:Sn,useId:Sn,unstable_isNewReconciler:!1},l7={readContext:ur,useCallback:function(i,o){return Wr().memoizedState=[i,o===void 0?null:o],i},useContext:ur,useEffect:Cx,useImperativeHandle:function(i,o,l){return l=l!=null?l.concat([i]):null,Qc(4194308,4,Px.bind(null,o,i),l)},useLayoutEffect:function(i,o){return Qc(4194308,4,i,o)},useInsertionEffect:function(i,o){return Qc(4,2,i,o)},useMemo:function(i,o){var l=Wr();return o=o===void 0?null:o,i=i(),l.memoizedState=[i,o],i},useReducer:function(i,o,l){var h=Wr();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=a7.bind(null,Nt,i),[h.memoizedState,i]},useRef:function(i){var o=Wr();return i={current:i},o.memoizedState=i},useState:Ax,useDebugValue:Nm,useDeferredValue:function(i){return Wr().memoizedState=i},useTransition:function(){var i=Ax(!1),o=i[0];return i=o7.bind(null,i[1]),Wr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,l){var h=Nt,E=Wr();if(At){if(l===void 0)throw Error(n(407));l=l()}else{if(l=o(),tn===null)throw Error(n(349));(Ps&30)!==0||Tx(h,o,l)}E.memoizedState=l;var b={value:l,getSnapshot:o};return E.queue=b,Cx(Sx.bind(null,h,b,i),[i]),h.flags|=2048,Pu(9,_x.bind(null,h,b,l,o),void 0,null),l},useId:function(){var i=Wr(),o=tn.identifierPrefix;if(At){var l=hi,h=fi;l=(h&~(1<<32-Tr(h)-1)).toString(32)+l,o=":"+o+"R"+l,l=ku++,0<l&&(o+="H"+l.toString(32)),o+=":"}else l=s7++,o=":"+o+"r"+l.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},c7={readContext:ur,useCallback:Ix,useContext:ur,useEffect:km,useImperativeHandle:Ox,useInsertionEffect:kx,useLayoutEffect:Nx,useMemo:Rx,useReducer:vm,useRef:vx,useState:function(){return vm(Nu)},useDebugValue:Nm,useDeferredValue:function(i){var o=lr();return Lx(o,Yt.memoizedState,i)},useTransition:function(){var i=vm(Nu)[0],o=lr().memoizedState;return[i,o]},useMutableSource:yx,useSyncExternalStore:bx,useId:Dx,unstable_isNewReconciler:!1},d7={readContext:ur,useCallback:Ix,useContext:ur,useEffect:km,useImperativeHandle:Ox,useInsertionEffect:kx,useLayoutEffect:Nx,useMemo:Rx,useReducer:Cm,useRef:vx,useState:function(){return Cm(Nu)},useDebugValue:Nm,useDeferredValue:function(i){var o=lr();return Yt===null?o.memoizedState=i:Lx(o,Yt.memoizedState,i)},useTransition:function(){var i=Cm(Nu)[0],o=lr().memoizedState;return[i,o]},useMutableSource:yx,useSyncExternalStore:bx,useId:Dx,unstable_isNewReconciler:!1};function xr(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 Pm(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 ed={isMounted:function(i){return(i=i._reactInternals)?xs(i)===i:!1},enqueueSetState:function(i,o,l){i=i._reactInternals;var h=Pn(),E=qi(i),b=mi(h,E);b.payload=o,l!=null&&(b.callback=l),o=zi(i,b,E),o!==null&&(vr(o,i,E,h),Yc(o,i,E))},enqueueReplaceState:function(i,o,l){i=i._reactInternals;var h=Pn(),E=qi(i),b=mi(h,E);b.tag=1,b.payload=o,l!=null&&(b.callback=l),o=zi(i,b,E),o!==null&&(vr(o,i,E,h),Yc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var l=Pn(),h=qi(i),E=mi(l,h);E.tag=2,o!=null&&(E.callback=o),o=zi(i,E,h),o!==null&&(vr(o,i,h,l),Yc(o,i,h))}};function Ux(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?!gu(l,h)||!gu(E,b):!0}function Hx(i,o,l){var h=!1,E=Bi,b=o.contextType;return typeof b=="object"&&b!==null?b=ur(b):(E=Un(o)?As:_n.current,h=o.contextTypes,b=(h=h!=null)?Fo(i,E):Bi),o=new o(l,b),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=ed,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),o}function zx(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&&ed.enqueueReplaceState(o,o.state,null)}function Om(i,o,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},Em(i);var b=o.contextType;typeof b=="object"&&b!==null?E.context=ur(b):(b=Un(o)?As:_n.current,E.context=Fo(i,b)),E.state=i.memoizedState,b=o.getDerivedStateFromProps,typeof b=="function"&&(Pm(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&&ed.enqueueReplaceState(E,E.state,null),Gc(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function qo(i,o){try{var l="",h=o;do l+=Me(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 H=`
14
+ `+E[x].replace(" at new "," at ");return i.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",i.displayName)),H}while(1<=x&&0<=R);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?Q(i):""}function Fe(i){switch(i.tag){case 5:return Q(i.type);case 16:return Q("Lazy");case 13:return Q("Suspense");case 19:return Q("SuspenseList");case 0:case 2:case 15:return i=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 ke(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case V:return"Fragment";case L:return"Portal";case fe:return"Profiler";case ne:return"StrictMode";case Ce:return"Suspense";case re:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case oe:return(i.displayName||"Context")+".Consumer";case Y:return(i._context.displayName||"Context")+".Provider";case he: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:ke(i.type)||"Memo";case Ae:o=i._payload,i=i._init;try{return ke(i(o))}catch(l){}}return null}function xe(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 ke(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 Ie(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 dt(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 Yt(i){i._valueTracker||(i._valueTracker=dt(i))}function Lt(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 Pt(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 rn(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 br(i,o){var l=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;l=Ie(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 sr(i,o){o=o.checked,o!=null&&v(i,"checked",o,!1)}function Wt(i,o){sr(i,o);var l=Ie(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")?yt(i,o.type,l):o.hasOwnProperty("defaultValue")&&yt(i,o.type,Ie(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function $e(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 yt(i,o,l){(o!=="number"||Pt(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var jt=Array.isArray;function _e(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=""+Ie(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 De(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Be(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(jt(l)){if(1<l.length)throw Error(n(93));l=l[0]}o=l}o==null&&(o=""),l=o}i._wrapperState={initialValue:Ie(l)}}function Xe(i,o){var l=Ie(o.value),h=Ie(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 ve,Ve=(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(ve=ve||document.createElement("div"),ve.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=ve.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function Re(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},Gt=["Webkit","ms","Moz","O"];Object.keys(lt).forEach(function(i){Gt.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 ln(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 $r=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 cn(i,o){if(o){if($r[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 Vr(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 Wn=null;function kp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Np=null,vo=null,Co=null;function cS(i){if(i=Au(i)){if(typeof Np!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Uc(o),Np(i.stateNode,i.type,o))}}function dS(i){vo?Co?Co.push(i):Co=[i]:vo=i}function fS(){if(vo){var i=vo,o=Co;if(Co=vo=null,cS(i),o)for(i=0;i<o.length;i++)cS(o[i])}}function hS(i,o){return i(o)}function pS(){}var Pp=!1;function mS(i,o,l){if(Pp)return i(o,l);Pp=!0;try{return hS(i,o,l)}finally{Pp=!1,(vo!==null||Co!==null)&&(pS(),fS())}}function iu(i,o){var l=i.stateNode;if(l===null)return null;var h=Uc(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 Op=!1;if(c)try{var su={};Object.defineProperty(su,"passive",{get:function(){Op=!0}}),window.addEventListener("test",su,su),window.removeEventListener("test",su,su)}catch(i){Op=!1}function gB(i,o,l,h,E,b,x,R,H){var ee=Array.prototype.slice.call(arguments,3);try{o.apply(l,ee)}catch(ce){this.onError(ce)}}var ou=!1,Ec=null,yc=!1,Ip=null,EB={onError:function(i){ou=!0,Ec=i}};function yB(i,o,l,h,E,b,x,R,H){ou=!1,Ec=null,gB.apply(EB,arguments)}function bB(i,o,l,h,E,b,x,R,H){if(yB.apply(this,arguments),ou){if(ou){var ee=Ec;ou=!1,Ec=null}else throw Error(n(198));yc||(yc=!0,Ip=ee)}}function As(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 gS(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 ES(i){if(As(i)!==i)throw Error(n(188))}function TB(i){var o=i.alternate;if(!o){if(o=As(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 ES(E),i;if(b===h)return ES(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 yS(i){return i=TB(i),i!==null?bS(i):null}function bS(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=bS(i);if(o!==null)return o;i=i.sibling}return null}var TS=t.unstable_scheduleCallback,_S=t.unstable_cancelCallback,_B=t.unstable_shouldYield,SB=t.unstable_requestPaint,Dt=t.unstable_now,xB=t.unstable_getCurrentPriorityLevel,Rp=t.unstable_ImmediatePriority,SS=t.unstable_UserBlockingPriority,bc=t.unstable_NormalPriority,wB=t.unstable_LowPriority,xS=t.unstable_IdlePriority,Tc=null,qr=null;function AB(i){if(qr&&typeof qr.onCommitFiberRoot=="function")try{qr.onCommitFiberRoot(Tc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var Tr=Math.clz32?Math.clz32:kB,vB=Math.log,CB=Math.LN2;function kB(i){return i>>>=0,i===0?32:31-(vB(i)/CB|0)|0}var _c=64,Sc=4194304;function au(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 xc(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=au(R):(b&=x,b!==0&&(h=au(b)))}else x=l&~E,x!==0?h=au(x):b!==0&&(h=au(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-Tr(o),E=1<<l,h|=i[l],o&=~E;return h}function NB(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 PB(i,o){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var x=31-Tr(b),R=1<<x,H=E[x];H===-1?((R&l)===0||(R&h)!==0)&&(E[x]=NB(R,o)):H<=o&&(i.expiredLanes|=R),b&=~R}}function Lp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function wS(){var i=_c;return _c<<=1,(_c&4194240)===0&&(_c=64),i}function Dp(i){for(var o=[],l=0;31>l;l++)o.push(i);return o}function uu(i,o,l){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-Tr(o),i[o]=l}function OB(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-Tr(l),b=1<<E;o[E]=0,h[E]=-1,i[E]=-1,l&=~b}}function Mp(i,o){var l=i.entangledLanes|=o;for(i=i.entanglements;l;){var h=31-Tr(l),E=1<<h;E&o|i[h]&o&&(i[h]|=o),l&=~E}}var ct=0;function AS(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var vS,Fp,CS,kS,NS,Bp=!1,wc=[],Oi=null,Ii=null,Ri=null,lu=new Map,cu=new Map,Li=[],IB="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function PS(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":lu.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":cu.delete(o.pointerId)}}function du(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=Au(o),o!==null&&Fp(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function RB(i,o,l,h,E){switch(o){case"focusin":return Oi=du(Oi,i,o,l,h,E),!0;case"dragenter":return Ii=du(Ii,i,o,l,h,E),!0;case"mouseover":return Ri=du(Ri,i,o,l,h,E),!0;case"pointerover":var b=E.pointerId;return lu.set(b,du(lu.get(b)||null,i,o,l,h,E)),!0;case"gotpointercapture":return b=E.pointerId,cu.set(b,du(cu.get(b)||null,i,o,l,h,E)),!0}return!1}function OS(i){var o=vs(i.target);if(o!==null){var l=As(o);if(l!==null){if(o=l.tag,o===13){if(o=gS(l),o!==null){i.blockedOn=o,NS(i.priority,function(){CS(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 Ac(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var l=Hp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Wn=h,l.target.dispatchEvent(h),Wn=null}else return o=Au(l),o!==null&&Fp(o),i.blockedOn=l,!1;o.shift()}return!0}function IS(i,o,l){Ac(i)&&l.delete(o)}function LB(){Bp=!1,Oi!==null&&Ac(Oi)&&(Oi=null),Ii!==null&&Ac(Ii)&&(Ii=null),Ri!==null&&Ac(Ri)&&(Ri=null),lu.forEach(IS),cu.forEach(IS)}function fu(i,o){i.blockedOn===o&&(i.blockedOn=null,Bp||(Bp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,LB)))}function hu(i){function o(E){return fu(E,i)}if(0<wc.length){fu(wc[0],i);for(var l=1;l<wc.length;l++){var h=wc[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Oi!==null&&fu(Oi,i),Ii!==null&&fu(Ii,i),Ri!==null&&fu(Ri,i),lu.forEach(o),cu.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);)OS(l),l.blockedOn===null&&Li.shift()}var ko=U.ReactCurrentBatchConfig,vc=!0;function DB(i,o,l,h){var E=ct,b=ko.transition;ko.transition=null;try{ct=1,Up(i,o,l,h)}finally{ct=E,ko.transition=b}}function MB(i,o,l,h){var E=ct,b=ko.transition;ko.transition=null;try{ct=4,Up(i,o,l,h)}finally{ct=E,ko.transition=b}}function Up(i,o,l,h){if(vc){var E=Hp(i,o,l,h);if(E===null)rm(i,o,h,Cc,l),PS(i,h);else if(RB(E,i,o,l,h))h.stopPropagation();else if(PS(i,h),o&4&&-1<IB.indexOf(i)){for(;E!==null;){var b=Au(E);if(b!==null&&vS(b),b=Hp(i,o,l,h),b===null&&rm(i,o,h,Cc,l),b===E)break;E=b}E!==null&&h.stopPropagation()}else rm(i,o,h,null,l)}}var Cc=null;function Hp(i,o,l,h){if(Cc=null,i=kp(h),i=vs(i),i!==null)if(o=As(i),o===null)i=null;else if(l=o.tag,l===13){if(i=gS(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 Cc=i,null}function RS(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(xB()){case Rp:return 1;case SS:return 4;case bc:case wB:return 16;case xS:return 536870912;default:return 16}default:return 16}}var Di=null,jp=null,kc=null;function LS(){if(kc)return kc;var i,o=jp,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 kc=E.slice(i,1<h?1-h:void 0)}function Nc(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 Pc(){return!0}function DS(){return!1}function Gn(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)?Pc:DS,this.isPropagationStopped=DS,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=Pc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Pc)},persist:function(){},isPersistent:Pc}),o}var No={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zp=Gn(No),pu=k({},No,{view:0,detail:0}),FB=Gn(pu),$p,Vp,mu,Oc=k({},pu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yp,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!==mu&&(mu&&i.type==="mousemove"?($p=i.screenX-mu.screenX,Vp=i.screenY-mu.screenY):Vp=$p=0,mu=i),$p)},movementY:function(i){return"movementY"in i?i.movementY:Vp}}),MS=Gn(Oc),BB=k({},Oc,{dataTransfer:0}),UB=Gn(BB),HB=k({},pu,{relatedTarget:0}),qp=Gn(HB),jB=k({},No,{animationName:0,elapsedTime:0,pseudoElement:0}),zB=Gn(jB),$B=k({},No,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),VB=Gn($B),qB=k({},No,{data:0}),FS=Gn(qB),YB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},WB={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"},GB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function XB(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=GB[i])?!!o[i]:!1}function Yp(){return XB}var KB=k({},pu,{key:function(i){if(i.key){var o=YB[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=Nc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?WB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yp,charCode:function(i){return i.type==="keypress"?Nc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Nc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),QB=Gn(KB),JB=k({},Oc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),BS=Gn(JB),ZB=k({},pu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yp}),e7=Gn(ZB),t7=k({},No,{propertyName:0,elapsedTime:0,pseudoElement:0}),n7=Gn(t7),r7=k({},Oc,{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}),i7=Gn(r7),s7=[9,13,27,32],Wp=c&&"CompositionEvent"in window,gu=null;c&&"documentMode"in document&&(gu=document.documentMode);var o7=c&&"TextEvent"in window&&!gu,US=c&&(!Wp||gu&&8<gu&&11>=gu),HS=" ",jS=!1;function zS(i,o){switch(i){case"keyup":return s7.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $S(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Po=!1;function a7(i,o){switch(i){case"compositionend":return $S(o);case"keypress":return o.which!==32?null:(jS=!0,HS);case"textInput":return i=o.data,i===HS&&jS?null:i;default:return null}}function u7(i,o){if(Po)return i==="compositionend"||!Wp&&zS(i,o)?(i=LS(),kc=jp=Di=null,Po=!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 US&&o.locale!=="ko"?null:o.data;default:return null}}var l7={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 VS(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!l7[i.type]:o==="textarea"}function qS(i,o,l,h){dS(h),o=Mc(o,"onChange"),0<o.length&&(l=new zp("onChange","change",null,l,h),i.push({event:l,listeners:o}))}var Eu=null,yu=null;function c7(i){lx(i,0)}function Ic(i){var o=Do(i);if(Lt(o))return i}function d7(i,o){if(i==="change")return o}var YS=!1;if(c){var Gp;if(c){var Xp="oninput"in document;if(!Xp){var WS=document.createElement("div");WS.setAttribute("oninput","return;"),Xp=typeof WS.oninput=="function"}Gp=Xp}else Gp=!1;YS=Gp&&(!document.documentMode||9<document.documentMode)}function GS(){Eu&&(Eu.detachEvent("onpropertychange",XS),yu=Eu=null)}function XS(i){if(i.propertyName==="value"&&Ic(yu)){var o=[];qS(o,yu,i,kp(i)),mS(c7,o)}}function f7(i,o,l){i==="focusin"?(GS(),Eu=o,yu=l,Eu.attachEvent("onpropertychange",XS)):i==="focusout"&&GS()}function h7(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Ic(yu)}function p7(i,o){if(i==="click")return Ic(o)}function m7(i,o){if(i==="input"||i==="change")return Ic(o)}function g7(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var _r=typeof Object.is=="function"?Object.is:g7;function bu(i,o){if(_r(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)||!_r(i[E],o[E]))return!1}return!0}function KS(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function QS(i,o){var l=KS(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=KS(l)}}function JS(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?JS(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function ZS(){for(var i=window,o=Pt();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=Pt(i.document)}return o}function Kp(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 E7(i){var o=ZS(),l=i.focusedElem,h=i.selectionRange;if(o!==l&&l&&l.ownerDocument&&JS(l.ownerDocument.documentElement,l)){if(h!==null&&Kp(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=QS(l,b);var x=QS(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 y7=c&&"documentMode"in document&&11>=document.documentMode,Oo=null,Qp=null,Tu=null,Jp=!1;function ex(i,o,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Jp||Oo==null||Oo!==Pt(h)||(h=Oo,"selectionStart"in h&&Kp(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}),Tu&&bu(Tu,h)||(Tu=h,h=Mc(Qp,"onSelect"),0<h.length&&(o=new zp("onSelect","select",null,o,l),i.push({event:o,listeners:h}),o.target=Oo)))}function Rc(i,o){var l={};return l[i.toLowerCase()]=o.toLowerCase(),l["Webkit"+i]="webkit"+o,l["Moz"+i]="moz"+o,l}var Io={animationend:Rc("Animation","AnimationEnd"),animationiteration:Rc("Animation","AnimationIteration"),animationstart:Rc("Animation","AnimationStart"),transitionend:Rc("Transition","TransitionEnd")},Zp={},tx={};c&&(tx=document.createElement("div").style,"AnimationEvent"in window||(delete Io.animationend.animation,delete Io.animationiteration.animation,delete Io.animationstart.animation),"TransitionEvent"in window||delete Io.transitionend.transition);function Lc(i){if(Zp[i])return Zp[i];if(!Io[i])return i;var o=Io[i],l;for(l in o)if(o.hasOwnProperty(l)&&l in tx)return Zp[i]=o[l];return i}var nx=Lc("animationend"),rx=Lc("animationiteration"),ix=Lc("animationstart"),sx=Lc("transitionend"),ox=new Map,ax="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){ox.set(i,o),a(o,[i])}for(var em=0;em<ax.length;em++){var tm=ax[em],b7=tm.toLowerCase(),T7=tm[0].toUpperCase()+tm.slice(1);Mi(b7,"on"+T7)}Mi(nx,"onAnimationEnd"),Mi(rx,"onAnimationIteration"),Mi(ix,"onAnimationStart"),Mi("dblclick","onDoubleClick"),Mi("focusin","onFocus"),Mi("focusout","onBlur"),Mi(sx,"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 _u="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(" "),_7=new Set("cancel close invalid load scroll toggle".split(" ").concat(_u));function ux(i,o,l){var h=i.type||"unknown-event";i.currentTarget=l,bB(h,o,void 0,i),i.currentTarget=null}function lx(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],H=R.instance,ee=R.currentTarget;if(R=R.listener,H!==b&&E.isPropagationStopped())break e;ux(E,R,ee),b=H}else for(x=0;x<h.length;x++){if(R=h[x],H=R.instance,ee=R.currentTarget,R=R.listener,H!==b&&E.isPropagationStopped())break e;ux(E,R,ee),b=H}}}if(yc)throw i=Ip,yc=!1,Ip=null,i}function St(i,o){var l=o[lm];l===void 0&&(l=o[lm]=new Set);var h=i+"__bubble";l.has(h)||(cx(o,i,2,!1),l.add(h))}function nm(i,o,l){var h=0;o&&(h|=4),cx(l,i,h,o)}var Dc="_reactListening"+Math.random().toString(36).slice(2);function Su(i){if(!i[Dc]){i[Dc]=!0,r.forEach(function(l){l!=="selectionchange"&&(_7.has(l)||nm(l,!1,i),nm(l,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Dc]||(o[Dc]=!0,nm("selectionchange",!1,o))}}function cx(i,o,l,h){switch(RS(o)){case 1:var E=DB;break;case 4:E=MB;break;default:E=Up}l=E.bind(null,o,l,i),E=void 0,!Op||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 rm(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 H=x.tag;if((H===3||H===4)&&(H=x.stateNode.containerInfo,H===E||H.nodeType===8&&H.parentNode===E))return;x=x.return}for(;R!==null;){if(x=vs(R),x===null)return;if(H=x.tag,H===5||H===6){h=b=x;continue e}R=R.parentNode}}h=h.return}mS(function(){var ee=b,ce=kp(l),pe=[];e:{var ue=ox.get(i);if(ue!==void 0){var we=zp,Pe=i;switch(i){case"keypress":if(Nc(l)===0)break e;case"keydown":case"keyup":we=QB;break;case"focusin":Pe="focus",we=qp;break;case"focusout":Pe="blur",we=qp;break;case"beforeblur":case"afterblur":we=qp;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":we=MS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":we=UB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":we=e7;break;case nx:case rx:case ix:we=zB;break;case sx:we=n7;break;case"scroll":we=FB;break;case"wheel":we=i7;break;case"copy":case"cut":case"paste":we=VB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":we=BS}var Oe=(o&4)!==0,Mt=!Oe&&i==="scroll",G=Oe?ue!==null?ue+"Capture":null:ue;Oe=[];for(var $=ee,K;$!==null;){K=$;var ye=K.stateNode;if(K.tag===5&&ye!==null&&(K=ye,G!==null&&(ye=iu($,G),ye!=null&&Oe.push(xu($,ye,K)))),Mt)break;$=$.return}0<Oe.length&&(ue=new we(ue,Pe,null,l,ce),pe.push({event:ue,listeners:Oe}))}}if((o&7)===0){e:{if(ue=i==="mouseover"||i==="pointerover",we=i==="mouseout"||i==="pointerout",ue&&l!==Wn&&(Pe=l.relatedTarget||l.fromElement)&&(vs(Pe)||Pe[ci]))break e;if((we||ue)&&(ue=ce.window===ce?ce:(ue=ce.ownerDocument)?ue.defaultView||ue.parentWindow:window,we?(Pe=l.relatedTarget||l.toElement,we=ee,Pe=Pe?vs(Pe):null,Pe!==null&&(Mt=As(Pe),Pe!==Mt||Pe.tag!==5&&Pe.tag!==6)&&(Pe=null)):(we=null,Pe=ee),we!==Pe)){if(Oe=MS,ye="onMouseLeave",G="onMouseEnter",$="mouse",(i==="pointerout"||i==="pointerover")&&(Oe=BS,ye="onPointerLeave",G="onPointerEnter",$="pointer"),Mt=we==null?ue:Do(we),K=Pe==null?ue:Do(Pe),ue=new Oe(ye,$+"leave",we,l,ce),ue.target=Mt,ue.relatedTarget=K,ye=null,vs(ce)===ee&&(Oe=new Oe(G,$+"enter",Pe,l,ce),Oe.target=K,Oe.relatedTarget=Mt,ye=Oe),Mt=ye,we&&Pe)t:{for(Oe=we,G=Pe,$=0,K=Oe;K;K=Ro(K))$++;for(K=0,ye=G;ye;ye=Ro(ye))K++;for(;0<$-K;)Oe=Ro(Oe),$--;for(;0<K-$;)G=Ro(G),K--;for(;$--;){if(Oe===G||G!==null&&Oe===G.alternate)break t;Oe=Ro(Oe),G=Ro(G)}Oe=null}else Oe=null;we!==null&&dx(pe,ue,we,Oe,!1),Pe!==null&&Mt!==null&&dx(pe,Mt,Pe,Oe,!0)}}e:{if(ue=ee?Do(ee):window,we=ue.nodeName&&ue.nodeName.toLowerCase(),we==="select"||we==="input"&&ue.type==="file")var Me=d7;else if(VS(ue))if(YS)Me=m7;else{Me=h7;var He=f7}else(we=ue.nodeName)&&we.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(Me=p7);if(Me&&(Me=Me(i,ee))){qS(pe,Me,l,ce);break e}He&&He(i,ue,ee),i==="focusout"&&(He=ue._wrapperState)&&He.controlled&&ue.type==="number"&&yt(ue,"number",ue.value)}switch(He=ee?Do(ee):window,i){case"focusin":(VS(He)||He.contentEditable==="true")&&(Oo=He,Qp=ee,Tu=null);break;case"focusout":Tu=Qp=Oo=null;break;case"mousedown":Jp=!0;break;case"contextmenu":case"mouseup":case"dragend":Jp=!1,ex(pe,l,ce);break;case"selectionchange":if(y7)break;case"keydown":case"keyup":ex(pe,l,ce)}var je;if(Wp)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 Po?zS(i,l)&&(We="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(We="onCompositionStart");We&&(US&&l.locale!=="ko"&&(Po||We!=="onCompositionStart"?We==="onCompositionEnd"&&Po&&(je=LS()):(Di=ce,jp="value"in Di?Di.value:Di.textContent,Po=!0)),He=Mc(ee,We),0<He.length&&(We=new FS(We,i,null,l,ce),pe.push({event:We,listeners:He}),je?We.data=je:(je=$S(l),je!==null&&(We.data=je)))),(je=o7?a7(i,l):u7(i,l))&&(ee=Mc(ee,"onBeforeInput"),0<ee.length&&(ce=new FS("onBeforeInput","beforeinput",null,l,ce),pe.push({event:ce,listeners:ee}),ce.data=je))}lx(pe,o)})}function xu(i,o,l){return{instance:i,listener:o,currentTarget:l}}function Mc(i,o){for(var l=o+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=iu(i,l),b!=null&&h.unshift(xu(i,b,E)),b=iu(i,o),b!=null&&h.push(xu(i,b,E))),i=i.return}return h}function Ro(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function dx(i,o,l,h,E){for(var b=o._reactName,x=[];l!==null&&l!==h;){var R=l,H=R.alternate,ee=R.stateNode;if(H!==null&&H===h)break;R.tag===5&&ee!==null&&(R=ee,E?(H=iu(l,b),H!=null&&x.unshift(xu(l,H,R))):E||(H=iu(l,b),H!=null&&x.push(xu(l,H,R)))),l=l.return}x.length!==0&&i.push({event:o,listeners:x})}var S7=/\r\n?/g,x7=/\u0000|\uFFFD/g;function fx(i){return(typeof i=="string"?i:""+i).replace(S7,`
15
+ `).replace(x7,"")}function Fc(i,o,l){if(o=fx(o),fx(i)!==o&&l)throw Error(n(425))}function Bc(){}var im=null,sm=null;function om(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 am=typeof setTimeout=="function"?setTimeout:void 0,w7=typeof clearTimeout=="function"?clearTimeout:void 0,hx=typeof Promise=="function"?Promise:void 0,A7=typeof queueMicrotask=="function"?queueMicrotask:typeof hx!="undefined"?function(i){return hx.resolve(null).then(i).catch(v7)}:am;function v7(i){setTimeout(function(){throw i})}function um(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),hu(o);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);hu(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 px(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 Lo=Math.random().toString(36).slice(2),Yr="__reactFiber$"+Lo,wu="__reactProps$"+Lo,ci="__reactContainer$"+Lo,lm="__reactEvents$"+Lo,C7="__reactListeners$"+Lo,k7="__reactHandles$"+Lo;function vs(i){var o=i[Yr];if(o)return o;for(var l=i.parentNode;l;){if(o=l[ci]||l[Yr]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(i=px(i);i!==null;){if(l=i[Yr])return l;i=px(i)}return o}i=l,l=i.parentNode}return null}function Au(i){return i=i[Yr]||i[ci],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Do(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Uc(i){return i[wu]||null}var cm=[],Mo=-1;function Bi(i){return{current:i}}function xt(i){0>Mo||(i.current=cm[Mo],cm[Mo]=null,Mo--)}function bt(i,o){Mo++,cm[Mo]=i.current,i.current=o}var Ui={},xn=Bi(Ui),Fn=Bi(!1),Cs=Ui;function Fo(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 Bn(i){return i=i.childContextTypes,i!=null}function Hc(){xt(Fn),xt(xn)}function mx(i,o,l){if(xn.current!==Ui)throw Error(n(168));bt(xn,o),bt(Fn,l)}function gx(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,xe(i)||"Unknown",E));return k({},l,h)}function jc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Ui,Cs=xn.current,bt(xn,i),bt(Fn,Fn.current),!0}function Ex(i,o,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=gx(i,o,Cs),h.__reactInternalMemoizedMergedChildContext=i,xt(Fn),xt(xn),bt(xn,i)):xt(Fn),bt(Fn,l)}var di=null,zc=!1,dm=!1;function yx(i){di===null?di=[i]:di.push(i)}function N7(i){zc=!0,yx(i)}function Hi(){if(!dm&&di!==null){dm=!0;var i=0,o=ct;try{var l=di;for(ct=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}di=null,zc=!1}catch(E){throw di!==null&&(di=di.slice(i+1)),TS(Rp,Hi),E}finally{ct=o,dm=!1}}return null}var Bo=[],Uo=0,$c=null,Vc=0,or=[],ar=0,ks=null,fi=1,hi="";function Ns(i,o){Bo[Uo++]=Vc,Bo[Uo++]=$c,$c=i,Vc=o}function bx(i,o,l){or[ar++]=fi,or[ar++]=hi,or[ar++]=ks,ks=i;var h=fi;i=hi;var E=32-Tr(h)-1;h&=~(1<<E),l+=1;var b=32-Tr(o)+E;if(30<b){var x=E-E%5;b=(h&(1<<x)-1).toString(32),h>>=x,E-=x,fi=1<<32-Tr(o)+E|l<<E|h,hi=b+i}else fi=1<<b|l<<E|h,hi=i}function fm(i){i.return!==null&&(Ns(i,1),bx(i,1,0))}function hm(i){for(;i===$c;)$c=Bo[--Uo],Bo[Uo]=null,Vc=Bo[--Uo],Bo[Uo]=null;for(;i===ks;)ks=or[--ar],or[ar]=null,hi=or[--ar],or[ar]=null,fi=or[--ar],or[ar]=null}var Xn=null,Kn=null,vt=!1,Sr=null;function Tx(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 _x(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,Xn=i,Kn=Fi(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Xn=i,Kn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(l=ks!==null?{id:fi,overflow:hi}:null,i.memoizedState={dehydrated:o,treeContext:l,retryLane:1073741824},l=dr(18,null,null,0),l.stateNode=o,l.return=i,i.child=l,Xn=i,Kn=null,!0):!1;default:return!1}}function pm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function mm(i){if(vt){var o=Kn;if(o){var l=o;if(!_x(i,o)){if(pm(i))throw Error(n(418));o=Fi(l.nextSibling);var h=Xn;o&&_x(i,o)?Tx(h,l):(i.flags=i.flags&-4097|2,vt=!1,Xn=i)}}else{if(pm(i))throw Error(n(418));i.flags=i.flags&-4097|2,vt=!1,Xn=i}}}function Sx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Xn=i}function qc(i){if(i!==Xn)return!1;if(!vt)return Sx(i),vt=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!om(i.type,i.memoizedProps)),o&&(o=Kn)){if(pm(i))throw xx(),Error(n(418));for(;o;)Tx(i,o),o=Fi(o.nextSibling)}if(Sx(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){Kn=Fi(i.nextSibling);break e}o--}else l!=="$"&&l!=="$!"&&l!=="$?"||o++}i=i.nextSibling}Kn=null}}else Kn=Xn?Fi(i.stateNode.nextSibling):null;return!0}function xx(){for(var i=Kn;i;)i=Fi(i.nextSibling)}function Ho(){Kn=Xn=null,vt=!1}function gm(i){Sr===null?Sr=[i]:Sr.push(i)}var P7=U.ReactCurrentBatchConfig;function vu(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 Yc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function wx(i){var o=i._init;return o(i._payload)}function Ax(i){function o(G,$){if(i){var K=G.deletions;K===null?(G.deletions=[$],G.flags|=16):K.push($)}}function l(G,$){if(!i)return null;for(;$!==null;)o(G,$),$=$.sibling;return null}function h(G,$){for(G=new Map;$!==null;)$.key!==null?G.set($.key,$):G.set($.index,$),$=$.sibling;return G}function E(G,$){return G=Gi(G,$),G.index=0,G.sibling=null,G}function b(G,$,K){return G.index=K,i?(K=G.alternate,K!==null?(K=K.index,K<$?(G.flags|=2,$):K):(G.flags|=2,$)):(G.flags|=1048576,$)}function x(G){return i&&G.alternate===null&&(G.flags|=2),G}function R(G,$,K,ye){return $===null||$.tag!==6?($=a0(K,G.mode,ye),$.return=G,$):($=E($,K),$.return=G,$)}function H(G,$,K,ye){var Me=K.type;return Me===V?ce(G,$,K.props.children,ye,K.key):$!==null&&($.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===Ae&&wx(Me)===$.type)?(ye=E($,K.props),ye.ref=vu(G,$,K),ye.return=G,ye):(ye=gd(K.type,K.key,K.props,null,G.mode,ye),ye.ref=vu(G,$,K),ye.return=G,ye)}function ee(G,$,K,ye){return $===null||$.tag!==4||$.stateNode.containerInfo!==K.containerInfo||$.stateNode.implementation!==K.implementation?($=u0(K,G.mode,ye),$.return=G,$):($=E($,K.children||[]),$.return=G,$)}function ce(G,$,K,ye,Me){return $===null||$.tag!==7?($=Fs(K,G.mode,ye,Me),$.return=G,$):($=E($,K),$.return=G,$)}function pe(G,$,K){if(typeof $=="string"&&$!==""||typeof $=="number")return $=a0(""+$,G.mode,K),$.return=G,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case q:return K=gd($.type,$.key,$.props,null,G.mode,K),K.ref=vu(G,null,$),K.return=G,K;case L:return $=u0($,G.mode,K),$.return=G,$;case Ae:var ye=$._init;return pe(G,ye($._payload),K)}if(jt($)||ie($))return $=Fs($,G.mode,K,null),$.return=G,$;Yc(G,$)}return null}function ue(G,$,K,ye){var Me=$!==null?$.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return Me!==null?null:R(G,$,""+K,ye);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case q:return K.key===Me?H(G,$,K,ye):null;case L:return K.key===Me?ee(G,$,K,ye):null;case Ae:return Me=K._init,ue(G,$,Me(K._payload),ye)}if(jt(K)||ie(K))return Me!==null?null:ce(G,$,K,ye,null);Yc(G,K)}return null}function we(G,$,K,ye,Me){if(typeof ye=="string"&&ye!==""||typeof ye=="number")return G=G.get(K)||null,R($,G,""+ye,Me);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case q:return G=G.get(ye.key===null?K:ye.key)||null,H($,G,ye,Me);case L:return G=G.get(ye.key===null?K:ye.key)||null,ee($,G,ye,Me);case Ae:var He=ye._init;return we(G,$,K,He(ye._payload),Me)}if(jt(ye)||ie(ye))return G=G.get(K)||null,ce($,G,ye,Me,null);Yc($,ye)}return null}function Pe(G,$,K,ye){for(var Me=null,He=null,je=$,We=$=0,an=null;je!==null&&We<K.length;We++){je.index>We?(an=je,je=null):an=je.sibling;var st=ue(G,je,K[We],ye);if(st===null){je===null&&(je=an);break}i&&je&&st.alternate===null&&o(G,je),$=b(st,$,We),He===null?Me=st:He.sibling=st,He=st,je=an}if(We===K.length)return l(G,je),vt&&Ns(G,We),Me;if(je===null){for(;We<K.length;We++)je=pe(G,K[We],ye),je!==null&&($=b(je,$,We),He===null?Me=je:He.sibling=je,He=je);return vt&&Ns(G,We),Me}for(je=h(G,je);We<K.length;We++)an=we(je,G,We,K[We],ye),an!==null&&(i&&an.alternate!==null&&je.delete(an.key===null?We:an.key),$=b(an,$,We),He===null?Me=an:He.sibling=an,He=an);return i&&je.forEach(function(Xi){return o(G,Xi)}),vt&&Ns(G,We),Me}function Oe(G,$,K,ye){var Me=ie(K);if(typeof Me!="function")throw Error(n(150));if(K=Me.call(K),K==null)throw Error(n(151));for(var He=Me=null,je=$,We=$=0,an=null,st=K.next();je!==null&&!st.done;We++,st=K.next()){je.index>We?(an=je,je=null):an=je.sibling;var Xi=ue(G,je,st.value,ye);if(Xi===null){je===null&&(je=an);break}i&&je&&Xi.alternate===null&&o(G,je),$=b(Xi,$,We),He===null?Me=Xi:He.sibling=Xi,He=Xi,je=an}if(st.done)return l(G,je),vt&&Ns(G,We),Me;if(je===null){for(;!st.done;We++,st=K.next())st=pe(G,st.value,ye),st!==null&&($=b(st,$,We),He===null?Me=st:He.sibling=st,He=st);return vt&&Ns(G,We),Me}for(je=h(G,je);!st.done;We++,st=K.next())st=we(je,G,We,st.value,ye),st!==null&&(i&&st.alternate!==null&&je.delete(st.key===null?We:st.key),$=b(st,$,We),He===null?Me=st:He.sibling=st,He=st);return i&&je.forEach(function(lU){return o(G,lU)}),vt&&Ns(G,We),Me}function Mt(G,$,K,ye){if(typeof K=="object"&&K!==null&&K.type===V&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case q:e:{for(var Me=K.key,He=$;He!==null;){if(He.key===Me){if(Me=K.type,Me===V){if(He.tag===7){l(G,He.sibling),$=E(He,K.props.children),$.return=G,G=$;break e}}else if(He.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===Ae&&wx(Me)===He.type){l(G,He.sibling),$=E(He,K.props),$.ref=vu(G,He,K),$.return=G,G=$;break e}l(G,He);break}else o(G,He);He=He.sibling}K.type===V?($=Fs(K.props.children,G.mode,ye,K.key),$.return=G,G=$):(ye=gd(K.type,K.key,K.props,null,G.mode,ye),ye.ref=vu(G,$,K),ye.return=G,G=ye)}return x(G);case L:e:{for(He=K.key;$!==null;){if($.key===He)if($.tag===4&&$.stateNode.containerInfo===K.containerInfo&&$.stateNode.implementation===K.implementation){l(G,$.sibling),$=E($,K.children||[]),$.return=G,G=$;break e}else{l(G,$);break}else o(G,$);$=$.sibling}$=u0(K,G.mode,ye),$.return=G,G=$}return x(G);case Ae:return He=K._init,Mt(G,$,He(K._payload),ye)}if(jt(K))return Pe(G,$,K,ye);if(ie(K))return Oe(G,$,K,ye);Yc(G,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,$!==null&&$.tag===6?(l(G,$.sibling),$=E($,K),$.return=G,G=$):(l(G,$),$=a0(K,G.mode,ye),$.return=G,G=$),x(G)):l(G,$)}return Mt}var jo=Ax(!0),vx=Ax(!1),Wc=Bi(null),Gc=null,zo=null,Em=null;function ym(){Em=zo=Gc=null}function bm(i){var o=Wc.current;xt(Wc),i._currentValue=o}function Tm(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 $o(i,o){Gc=i,Em=zo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(Un=!0),i.firstContext=null)}function ur(i){var o=i._currentValue;if(Em!==i)if(i={context:i,memoizedValue:o,next:null},zo===null){if(Gc===null)throw Error(n(308));zo=i,Gc.dependencies={lanes:0,firstContext:i}}else zo=zo.next=i;return o}var Ps=null;function _m(i){Ps===null?Ps=[i]:Ps.push(i)}function Cx(i,o,l,h){var E=o.interleaved;return E===null?(l.next=l,_m(o)):(l.next=E.next,E.next=l),o.interleaved=l,pi(i,h)}function pi(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 ji=!1;function Sm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function kx(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 mi(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function zi(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,pi(i,l)}return E=h.interleaved,E===null?(o.next=o,_m(h)):(o.next=E.next,E.next=o),h.interleaved=o,pi(i,l)}function Xc(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,Mp(i,l)}}function Nx(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 Kc(i,o,l,h){var E=i.updateQueue;ji=!1;var b=E.firstBaseUpdate,x=E.lastBaseUpdate,R=E.shared.pending;if(R!==null){E.shared.pending=null;var H=R,ee=H.next;H.next=null,x===null?b=ee:x.next=ee,x=H;var ce=i.alternate;ce!==null&&(ce=ce.updateQueue,R=ce.lastBaseUpdate,R!==x&&(R===null?ce.firstBaseUpdate=ee:R.next=ee,ce.lastBaseUpdate=H))}if(b!==null){var pe=E.baseState;x=0,ce=ee=H=null,R=b;do{var ue=R.lane,we=R.eventTime;if((h&ue)===ue){ce!==null&&(ce=ce.next={eventTime:we,lane:0,tag:R.tag,payload:R.payload,callback:R.callback,next:null});e:{var Pe=i,Oe=R;switch(ue=o,we=l,Oe.tag){case 1:if(Pe=Oe.payload,typeof Pe=="function"){pe=Pe.call(we,pe,ue);break e}pe=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=Oe.payload,ue=typeof Pe=="function"?Pe.call(we,pe,ue):Pe,ue==null)break e;pe=k({},pe,ue);break e;case 2:ji=!0}}R.callback!==null&&R.lane!==0&&(i.flags|=64,ue=E.effects,ue===null?E.effects=[R]:ue.push(R))}else we={eventTime:we,lane:ue,tag:R.tag,payload:R.payload,callback:R.callback,next:null},ce===null?(ee=ce=we,H=pe):ce=ce.next=we,x|=ue;if(R=R.next,R===null){if(R=E.shared.pending,R===null)break;ue=R,R=ue.next,ue.next=null,E.lastBaseUpdate=ue,E.shared.pending=null}}while(!0);if(ce===null&&(H=pe),E.baseState=H,E.firstBaseUpdate=ee,E.lastBaseUpdate=ce,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);Rs|=x,i.lanes=x,i.memoizedState=pe}}function Px(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 Cu={},Wr=Bi(Cu),ku=Bi(Cu),Nu=Bi(Cu);function Os(i){if(i===Cu)throw Error(n(174));return i}function xm(i,o){switch(bt(Nu,o),bt(ku,i),bt(Wr,Cu),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(Wr),bt(Wr,o)}function Vo(){xt(Wr),xt(ku),xt(Nu)}function Ox(i){Os(Nu.current);var o=Os(Wr.current),l=ge(o,i.type);o!==l&&(bt(ku,i),bt(Wr,l))}function wm(i){ku.current===i&&(xt(Wr),xt(ku))}var kt=Bi(0);function Qc(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 Am=[];function vm(){for(var i=0;i<Am.length;i++)Am[i]._workInProgressVersionPrimary=null;Am.length=0}var Jc=U.ReactCurrentDispatcher,Cm=U.ReactCurrentBatchConfig,Is=0,Nt=null,Xt=null,sn=null,Zc=!1,Pu=!1,Ou=0,O7=0;function wn(){throw Error(n(321))}function km(i,o){if(o===null)return!1;for(var l=0;l<o.length&&l<i.length;l++)if(!_r(i[l],o[l]))return!1;return!0}function Nm(i,o,l,h,E,b){if(Is=b,Nt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Jc.current=i===null||i.memoizedState===null?D7:M7,i=l(h,E),Pu){b=0;do{if(Pu=!1,Ou=0,25<=b)throw Error(n(301));b+=1,sn=Xt=null,o.updateQueue=null,Jc.current=F7,i=l(h,E)}while(Pu)}if(Jc.current=nd,o=Xt!==null&&Xt.next!==null,Is=0,sn=Xt=Nt=null,Zc=!1,o)throw Error(n(300));return i}function Pm(){var i=Ou!==0;return Ou=0,i}function Gr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return sn===null?Nt.memoizedState=sn=i:sn=sn.next=i,sn}function lr(){if(Xt===null){var i=Nt.alternate;i=i!==null?i.memoizedState:null}else i=Xt.next;var o=sn===null?Nt.memoizedState:sn.next;if(o!==null)sn=o,Xt=i;else{if(i===null)throw Error(n(310));Xt=i,i={memoizedState:Xt.memoizedState,baseState:Xt.baseState,baseQueue:Xt.baseQueue,queue:Xt.queue,next:null},sn===null?Nt.memoizedState=sn=i:sn=sn.next=i}return sn}function Iu(i,o){return typeof o=="function"?o(i):o}function Om(i){var o=lr(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=Xt,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,H=null,ee=b;do{var ce=ee.lane;if((Is&ce)===ce)H!==null&&(H=H.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 pe={lane:ce,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null};H===null?(R=H=pe,x=h):H=H.next=pe,Nt.lanes|=ce,Rs|=ce}ee=ee.next}while(ee!==null&&ee!==b);H===null?x=h:H.next=R,_r(h,o.memoizedState)||(Un=!0),o.memoizedState=h,o.baseState=x,o.baseQueue=H,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do b=E.lane,Nt.lanes|=b,Rs|=b,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[o.memoizedState,l.dispatch]}function Im(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);_r(b,o.memoizedState)||(Un=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),l.lastRenderedState=b}return[b,h]}function Ix(){}function Rx(i,o){var l=Nt,h=lr(),E=o(),b=!_r(h.memoizedState,E);if(b&&(h.memoizedState=E,Un=!0),h=h.queue,Rm(Mx.bind(null,l,h,i),[i]),h.getSnapshot!==o||b||sn!==null&&sn.memoizedState.tag&1){if(l.flags|=2048,Ru(9,Dx.bind(null,l,h,E,o),void 0,null),on===null)throw Error(n(349));(Is&30)!==0||Lx(l,o,E)}return E}function Lx(i,o,l){i.flags|=16384,i={getSnapshot:o,value:l},o=Nt.updateQueue,o===null?(o={lastEffect:null,stores:null},Nt.updateQueue=o,o.stores=[i]):(l=o.stores,l===null?o.stores=[i]:l.push(i))}function Dx(i,o,l,h){o.value=l,o.getSnapshot=h,Fx(o)&&Bx(i)}function Mx(i,o,l){return l(function(){Fx(o)&&Bx(i)})}function Fx(i){var o=i.getSnapshot;i=i.value;try{var l=o();return!_r(i,l)}catch(h){return!0}}function Bx(i){var o=pi(i,1);o!==null&&vr(o,i,1,-1)}function Ux(i){var o=Gr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Iu,lastRenderedState:i},o.queue=i,i=i.dispatch=L7.bind(null,Nt,i),[o.memoizedState,i]}function Ru(i,o,l,h){return i={tag:i,create:o,destroy:l,deps:h,next:null},o=Nt.updateQueue,o===null?(o={lastEffect:null,stores:null},Nt.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 Hx(){return lr().memoizedState}function ed(i,o,l,h){var E=Gr();Nt.flags|=i,E.memoizedState=Ru(1|o,l,void 0,h===void 0?null:h)}function td(i,o,l,h){var E=lr();h=h===void 0?null:h;var b=void 0;if(Xt!==null){var x=Xt.memoizedState;if(b=x.destroy,h!==null&&km(h,x.deps)){E.memoizedState=Ru(o,l,b,h);return}}Nt.flags|=i,E.memoizedState=Ru(1|o,l,b,h)}function jx(i,o){return ed(8390656,8,i,o)}function Rm(i,o){return td(2048,8,i,o)}function zx(i,o){return td(4,2,i,o)}function $x(i,o){return td(4,4,i,o)}function Vx(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 qx(i,o,l){return l=l!=null?l.concat([i]):null,td(4,4,Vx.bind(null,o,i),l)}function Lm(){}function Yx(i,o){var l=lr();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&km(o,h[1])?h[0]:(l.memoizedState=[i,o],i)}function Wx(i,o){var l=lr();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&km(o,h[1])?h[0]:(i=i(),l.memoizedState=[i,o],i)}function Gx(i,o,l){return(Is&21)===0?(i.baseState&&(i.baseState=!1,Un=!0),i.memoizedState=l):(_r(l,o)||(l=wS(),Nt.lanes|=l,Rs|=l,i.baseState=!0),o)}function I7(i,o){var l=ct;ct=l!==0&&4>l?l:4,i(!0);var h=Cm.transition;Cm.transition={};try{i(!1),o()}finally{ct=l,Cm.transition=h}}function Xx(){return lr().memoizedState}function R7(i,o,l){var h=Yi(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},Kx(i))Qx(o,l);else if(l=Cx(i,o,l,h),l!==null){var E=Pn();vr(l,i,h,E),Jx(l,o,h)}}function L7(i,o,l){var h=Yi(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(Kx(i))Qx(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,_r(R,x)){var H=o.interleaved;H===null?(E.next=E,_m(o)):(E.next=H.next,H.next=E),o.interleaved=E;return}}catch(ee){}l=Cx(i,o,E,h),l!==null&&(E=Pn(),vr(l,i,h,E),Jx(l,o,h))}}function Kx(i){var o=i.alternate;return i===Nt||o!==null&&o===Nt}function Qx(i,o){Pu=Zc=!0;var l=i.pending;l===null?o.next=o:(o.next=l.next,l.next=o),i.pending=o}function Jx(i,o,l){if((l&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,Mp(i,l)}}var nd={readContext:ur,useCallback:wn,useContext:wn,useEffect:wn,useImperativeHandle:wn,useInsertionEffect:wn,useLayoutEffect:wn,useMemo:wn,useReducer:wn,useRef:wn,useState:wn,useDebugValue:wn,useDeferredValue:wn,useTransition:wn,useMutableSource:wn,useSyncExternalStore:wn,useId:wn,unstable_isNewReconciler:!1},D7={readContext:ur,useCallback:function(i,o){return Gr().memoizedState=[i,o===void 0?null:o],i},useContext:ur,useEffect:jx,useImperativeHandle:function(i,o,l){return l=l!=null?l.concat([i]):null,ed(4194308,4,Vx.bind(null,o,i),l)},useLayoutEffect:function(i,o){return ed(4194308,4,i,o)},useInsertionEffect:function(i,o){return ed(4,2,i,o)},useMemo:function(i,o){var l=Gr();return o=o===void 0?null:o,i=i(),l.memoizedState=[i,o],i},useReducer:function(i,o,l){var h=Gr();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=R7.bind(null,Nt,i),[h.memoizedState,i]},useRef:function(i){var o=Gr();return i={current:i},o.memoizedState=i},useState:Ux,useDebugValue:Lm,useDeferredValue:function(i){return Gr().memoizedState=i},useTransition:function(){var i=Ux(!1),o=i[0];return i=I7.bind(null,i[1]),Gr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,l){var h=Nt,E=Gr();if(vt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=o(),on===null)throw Error(n(349));(Is&30)!==0||Lx(h,o,l)}E.memoizedState=l;var b={value:l,getSnapshot:o};return E.queue=b,jx(Mx.bind(null,h,b,i),[i]),h.flags|=2048,Ru(9,Dx.bind(null,h,b,l,o),void 0,null),l},useId:function(){var i=Gr(),o=on.identifierPrefix;if(vt){var l=hi,h=fi;l=(h&~(1<<32-Tr(h)-1)).toString(32)+l,o=":"+o+"R"+l,l=Ou++,0<l&&(o+="H"+l.toString(32)),o+=":"}else l=O7++,o=":"+o+"r"+l.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},M7={readContext:ur,useCallback:Yx,useContext:ur,useEffect:Rm,useImperativeHandle:qx,useInsertionEffect:zx,useLayoutEffect:$x,useMemo:Wx,useReducer:Om,useRef:Hx,useState:function(){return Om(Iu)},useDebugValue:Lm,useDeferredValue:function(i){var o=lr();return Gx(o,Xt.memoizedState,i)},useTransition:function(){var i=Om(Iu)[0],o=lr().memoizedState;return[i,o]},useMutableSource:Ix,useSyncExternalStore:Rx,useId:Xx,unstable_isNewReconciler:!1},F7={readContext:ur,useCallback:Yx,useContext:ur,useEffect:Rm,useImperativeHandle:qx,useInsertionEffect:zx,useLayoutEffect:$x,useMemo:Wx,useReducer:Im,useRef:Hx,useState:function(){return Im(Iu)},useDebugValue:Lm,useDeferredValue:function(i){var o=lr();return Xt===null?o.memoizedState=i:Gx(o,Xt.memoizedState,i)},useTransition:function(){var i=Im(Iu)[0],o=lr().memoizedState;return[i,o]},useMutableSource:Ix,useSyncExternalStore:Rx,useId:Xx,unstable_isNewReconciler:!1};function xr(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 Dm(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 rd={isMounted:function(i){return(i=i._reactInternals)?As(i)===i:!1},enqueueSetState:function(i,o,l){i=i._reactInternals;var h=Pn(),E=Yi(i),b=mi(h,E);b.payload=o,l!=null&&(b.callback=l),o=zi(i,b,E),o!==null&&(vr(o,i,E,h),Xc(o,i,E))},enqueueReplaceState:function(i,o,l){i=i._reactInternals;var h=Pn(),E=Yi(i),b=mi(h,E);b.tag=1,b.payload=o,l!=null&&(b.callback=l),o=zi(i,b,E),o!==null&&(vr(o,i,E,h),Xc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var l=Pn(),h=Yi(i),E=mi(l,h);E.tag=2,o!=null&&(E.callback=o),o=zi(i,E,h),o!==null&&(vr(o,i,h,l),Xc(o,i,h))}};function Zx(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?!bu(l,h)||!bu(E,b):!0}function e2(i,o,l){var h=!1,E=Ui,b=o.contextType;return typeof b=="object"&&b!==null?b=ur(b):(E=Bn(o)?Cs:xn.current,h=o.contextTypes,b=(h=h!=null)?Fo(i,E):Ui),o=new o(l,b),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=rd,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),o}function t2(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&&rd.enqueueReplaceState(o,o.state,null)}function Mm(i,o,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},Sm(i);var b=o.contextType;typeof b=="object"&&b!==null?E.context=ur(b):(b=Bn(o)?Cs:xn.current,E.context=Fo(i,b)),E.state=i.memoizedState,b=o.getDerivedStateFromProps,typeof b=="function"&&(Dm(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&&rd.enqueueReplaceState(E,E.state,null),Kc(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function qo(i,o){try{var l="",h=o;do l+=Fe(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 Im(i,o,l){return{value:i,source:null,stack:l!=null?l:null,digest:o!=null?o:null}}function Rm(i,o){try{console.error(o.value)}catch(l){setTimeout(function(){throw l})}}var f7=typeof WeakMap=="function"?WeakMap:Map;function jx(i,o,l){l=mi(-1,l),l.tag=3,l.payload={element:null};var h=o.value;return l.callback=function(){ad||(ad=!0,Wm=h),Rm(i,o)},l}function $x(i,o,l){l=mi(-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(){Rm(i,o)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(l.callback=function(){Rm(i,o),typeof h!="function"&&($i===null?$i=new Set([this]):$i.add(this));var x=o.stack;this.componentDidCatch(o.value,{componentStack:x!==null?x:""})}),l}function Vx(i,o,l){var h=i.pingCache;if(h===null){h=i.pingCache=new f7;var E=new Set;h.set(o,E)}else E=h.get(o),E===void 0&&(E=new Set,h.set(o,E));E.has(l)||(E.add(l),i=v7.bind(null,i,o,l),o.then(i,i))}function qx(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 Yx(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=mi(-1,1),o.tag=2,zi(l,o,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var h7=H.ReactCurrentOwner,Hn=!1;function Nn(i,o,l,h){o.child=i===null?fx(o,null,l,h):zo(o,i.child,l,h)}function Gx(i,o,l,h,E){l=l.render;var b=o.ref;return $o(o,E),h=wm(i,o,l,h,b,E),l=Am(),i!==null&&!Hn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,gi(i,o,E)):(At&&l&&am(o),o.flags|=1,Nn(i,o,h,E),o.child)}function Wx(i,o,l,h,E){if(i===null){var b=l.type;return typeof b=="function"&&!t0(b)&&b.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(o.tag=15,o.type=b,Xx(i,o,b,h,E)):(i=hd(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:gu,l(x,h)&&i.ref===o.ref)return gi(i,o,E)}return o.flags|=1,i=Gi(b,h),i.ref=o.ref,i.return=o,o.child=i}function Xx(i,o,l,h,E){if(i!==null){var b=i.memoizedProps;if(gu(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,gi(i,o,E)}return Lm(i,o,l,h,E)}function Kx(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},yt(Go,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,yt(Go,Jn),Jn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:l,yt(Go,Jn),Jn|=h}else b!==null?(h=b.baseLanes|l,o.memoizedState=null):h=l,yt(Go,Jn),Jn|=h;return Nn(i,o,E,l),o.child}function Qx(i,o){var l=o.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(o.flags|=512,o.flags|=2097152)}function Lm(i,o,l,h,E){var b=Un(l)?As:_n.current;return b=Fo(o,b),$o(o,E),l=wm(i,o,l,h,b,E),h=Am(),i!==null&&!Hn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,gi(i,o,E)):(At&&h&&am(o),o.flags|=1,Nn(i,o,l,E),o.child)}function Jx(i,o,l,h,E){if(Un(l)){var b=!0;Bc(o)}else b=!1;if($o(o,E),o.stateNode===null)nd(i,o),Hx(o,l,h),Om(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)?As:_n.current,Z=Fo(o,Z));var ce=l.getDerivedStateFromProps,pe=typeof ce=="function"||typeof x.getSnapshotBeforeUpdate=="function";pe||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(L!==h||U!==Z)&&zx(o,x,h,Z),Hi=!1;var ue=o.memoizedState;x.state=ue,Gc(o,h,x,E),U=o.memoizedState,L!==h||ue!==U||Bn.current||Hi?(typeof ce=="function"&&(Pm(o,l,ce,h),U=o.memoizedState),(L=Hi||Ux(o,l,L,h,ue,U,Z))?(pe||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,px(i,o),L=o.memoizedProps,Z=o.type===o.elementType?L:xr(o.type,L),x.props=Z,pe=o.pendingProps,ue=x.context,U=l.contextType,typeof U=="object"&&U!==null?U=ur(U):(U=Un(l)?As:_n.current,U=Fo(o,U));var Ae=l.getDerivedStateFromProps;(ce=typeof Ae=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(L!==pe||ue!==U)&&zx(o,x,h,U),Hi=!1,ue=o.memoizedState,x.state=ue,Gc(o,h,x,E);var Ne=o.memoizedState;L!==pe||ue!==Ne||Bn.current||Hi?(typeof Ae=="function"&&(Pm(o,l,Ae,h),Ne=o.memoizedState),(Z=Hi||Ux(o,l,Z,h,ue,Ne,U)||!1)?(ce||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,Ne,U),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,Ne,U)),typeof x.componentDidUpdate=="function"&&(o.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof x.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Ne),x.props=h,x.state=Ne,x.context=U,h=Z):(typeof x.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(o.flags|=1024),h=!1)}return Dm(i,o,l,h,b,E)}function Dm(i,o,l,h,E,b){Qx(i,o);var x=(o.flags&128)!==0;if(!h&&!x)return E&&rx(o,l,!1),gi(i,o,b);h=o.stateNode,h7.current=o;var L=x&&typeof l.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&x?(o.child=zo(o,i.child,null,b),o.child=zo(o,null,L,b)):Nn(i,o,L,b),o.memoizedState=h.state,E&&rx(o,l,!0),o.child}function Zx(i){var o=i.stateNode;o.pendingContext?tx(i,o.pendingContext,o.pendingContext!==o.context):o.context&&tx(i,o.context,!1),ym(i,o.containerInfo)}function e2(i,o,l,h,E){return Ho(),dm(E),o.flags|=256,Nn(i,o,l,h),o.child}var Mm={dehydrated:null,treeContext:null,retryLane:0};function Fm(i){return{baseLanes:i,cachePool:null,transitions:null}}function t2(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),yt(kt,E&1),i===null)return cm(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=pd(x,h,0,null),i=Ds(i,h,l,null),b.return=o,i.return=o,b.sibling=i,o.child=b,o.child.memoizedState=Fm(l),o.memoizedState=Mm,i):Bm(o,x));if(E=i.memoizedState,E!==null&&(L=E.dehydrated,L!==null))return p7(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=Ds(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?Fm(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},b.memoizedState=x,b.childLanes=i.childLanes&~l,o.memoizedState=Mm,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 Bm(i,o){return o=pd({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function td(i,o,l,h){return h!==null&&dm(h),zo(o,i.child,null,l),i=Bm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function p7(i,o,l,h,E,b,x){if(l)return o.flags&256?(o.flags&=-257,h=Im(Error(n(422))),td(i,o,x,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(b=h.fallback,E=o.mode,h=pd({mode:"visible",children:h.children},E,0,null),b=Ds(b,E,x,null),b.flags|=2,h.return=o,b.return=o,h.sibling=b,o.child=h,(o.mode&1)!==0&&zo(o,i.child,null,x),o.child.memoizedState=Fm(x),o.memoizedState=Mm,b);if((o.mode&1)===0)return td(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=Im(b,h,void 0),td(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,pi(i,E),vr(h,i,E,-1))}return e0(),h=Im(Error(n(421))),td(i,o,x,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=C7.bind(null,i),E._reactRetry=o,null):(i=b.treeContext,Qn=Mi(E.nextSibling),Kn=o,At=!0,Sr=null,i!==null&&(or[ar++]=fi,or[ar++]=hi,or[ar++]=vs,fi=i.id,hi=i.overflow,vs=o),o=Bm(o,h.children),o.flags|=4096,o)}function n2(i,o,l){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),mm(i.return,o,l)}function Um(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 r2(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&&n2(i,l,o);else if(i.tag===19)n2(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(yt(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&&Wc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=o.child,o.child=null):(E=l.sibling,l.sibling=null),Um(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&&Wc(i)===null){o.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Um(o,!0,l,null,b);break;case"together":Um(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function nd(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function gi(i,o,l){if(i!==null&&(o.dependencies=i.dependencies),Os|=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 m7(i,o,l){switch(o.tag){case 3:Zx(o),Ho();break;case 5:Ex(o);break;case 1:Un(o.type)&&Bc(o);break;case 4:ym(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;yt(Vc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(yt(kt,kt.current&1),o.flags|=128,null):(l&o.child.childLanes)!==0?t2(i,o,l):(yt(kt,kt.current&1),i=gi(i,o,l),i!==null?i.sibling:null);yt(kt,kt.current&1);break;case 19:if(h=(l&o.childLanes)!==0,(i.flags&128)!==0){if(h)return r2(i,o,l);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),yt(kt,kt.current),h)break;return null;case 22:case 23:return o.lanes=0,Kx(i,o,l)}return gi(i,o,l)}var i2,Hm,s2,o2;i2=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}},Hm=function(){},s2=function(i,o,l,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,Ns(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=Dc)}un(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"&&_t("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)}},o2=function(i,o,l,h){l!==h&&(o.flags|=4)};function Ou(i,o){if(!At)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 xn(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 g7(i,o,l){var h=o.pendingProps;switch(um(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xn(o),null;case 1:return Un(o.type)&&Fc(),xn(o),null;case 3:return h=o.stateNode,Vo(),St(Bn),St(_n),_m(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(jc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Sr!==null&&(Qm(Sr),Sr=null))),Hm(i,o),xn(o),null;case 5:bm(o);var E=Ns(vu.current);if(l=o.type,i!==null&&o.stateNode!=null)s2(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 xn(o),null}if(i=Ns(Gr.current),jc(o)){h=o.stateNode,l=o.type;var b=o.memoizedProps;switch(h[Yr]=o,h[_u]=b,i=(o.mode&1)!==0,l){case"dialog":_t("cancel",h),_t("close",h);break;case"iframe":case"object":case"embed":_t("load",h);break;case"video":case"audio":for(E=0;E<yu.length;E++)_t(yu[E],h);break;case"source":_t("error",h);break;case"img":case"image":case"link":_t("error",h),_t("load",h);break;case"details":_t("toggle",h);break;case"input":Zt(h,b),_t("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},_t("invalid",h);break;case"textarea":Fe(h,b),_t("invalid",h)}un(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&&Lc(h.textContent,L,i),E=["children",L]):typeof L=="number"&&h.textContent!==""+L&&(b.suppressHydrationWarning!==!0&&Lc(h.textContent,L,i),E=["children",""+L]):s.hasOwnProperty(x)&&L!=null&&x==="onScroll"&&_t("scroll",h)}switch(l){case"input":Ut(h),kn(h,b,!0);break;case"textarea":Ut(h),pt(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=Dc)}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[Yr]=o,i[_u]=h,i2(i,o,!1,!1),o.stateNode=i;e:{switch(x=Vr(l,h),l){case"dialog":_t("cancel",i),_t("close",i),E=h;break;case"iframe":case"object":case"embed":_t("load",i),E=h;break;case"video":case"audio":for(E=0;E<yu.length;E++)_t(yu[E],i);E=h;break;case"source":_t("error",i),E=h;break;case"img":case"image":case"link":_t("error",i),_t("load",i),E=h;break;case"details":_t("toggle",i),E=h;break;case"input":Zt(i,h),E=sr(i,h),_t("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),_t("invalid",i);break;case"textarea":Fe(i,h),E=Pe(i,h),_t("invalid",i);break;default:E=h}un(l,E),L=E;for(b in L)if(L.hasOwnProperty(b)){var U=L[b];b==="style"?an(i,U):b==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&Ve(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"&&_t("scroll",i):U!=null&&v(i,b,U,x))}switch(l){case"input":Ut(i),kn(i,h,!1);break;case"textarea":Ut(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=Dc)}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 xn(o),null;case 6:if(i&&o.stateNode!=null)o2(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(l=Ns(vu.current),Ns(Gr.current),jc(o)){if(h=o.stateNode,l=o.memoizedProps,h[Yr]=o,(b=h.nodeValue!==l)&&(i=Kn,i!==null))switch(i.tag){case 3:Lc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Lc(h.nodeValue,l,(i.mode&1)!==0)}b&&(o.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Yr]=o,o.stateNode=h}return xn(o),null;case 13:if(St(kt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(At&&Qn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)lx(),Ho(),o.flags|=98560,b=!1;else if(b=jc(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[Yr]=o}else Ho(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;xn(o),b=!1}else Sr!==null&&(Qm(Sr),Sr=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?Gt===0&&(Gt=3):e0())),o.updateQueue!==null&&(o.flags|=4),xn(o),null);case 4:return Vo(),Hm(i,o),i===null&&bu(o.stateNode.containerInfo),xn(o),null;case 10:return pm(o.type._context),xn(o),null;case 17:return Un(o.type)&&Fc(),xn(o),null;case 19:if(St(kt),b=o.memoizedState,b===null)return xn(o),null;if(h=(o.flags&128)!==0,x=b.rendering,x===null)if(h)Ou(b,!1);else{if(Gt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(x=Wc(i),x!==null){for(o.flags|=128,Ou(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 yt(kt,kt.current&1|2),o.child}i=i.sibling}b.tail!==null&&Rt()>Wo&&(o.flags|=128,h=!0,Ou(b,!1),o.lanes=4194304)}else{if(!h)if(i=Wc(x),i!==null){if(o.flags|=128,h=!0,l=i.updateQueue,l!==null&&(o.updateQueue=l,o.flags|=4),Ou(b,!0),b.tail===null&&b.tailMode==="hidden"&&!x.alternate&&!At)return xn(o),null}else 2*Rt()-b.renderingStartTime>Wo&&l!==1073741824&&(o.flags|=128,h=!0,Ou(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=Rt(),o.sibling=null,l=kt.current,yt(kt,h?l&1|2:l&1),o):(xn(o),null);case 22:case 23:return Zm(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Jn&1073741824)!==0&&(xn(o),o.subtreeFlags&6&&(o.flags|=8192)):xn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function E7(i,o){switch(um(o),o.tag){case 1:return Un(o.type)&&Fc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Vo(),St(Bn),St(_n),_m(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return bm(o),null;case 13:if(St(kt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Ho()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return St(kt),null;case 4:return Vo(),null;case 10:return pm(o.type._context),null;case 22:case 23:return Zm(),null;case 24:return null;default:return null}}var rd=!1,wn=!1,y7=typeof WeakSet=="function"?WeakSet:Set,ke=null;function Yo(i,o){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){Pt(i,o,h)}else l.current=null}function zm(i,o,l){try{l()}catch(h){Pt(i,o,h)}}var a2=!1;function b7(i,o){if(Zp=xc,i=US(),qp(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,ce=0,pe=i,ue=null;t:for(;;){for(var Ae;pe!==l||E!==0&&pe.nodeType!==3||(L=x+E),pe!==b||h!==0&&pe.nodeType!==3||(U=x+h),pe.nodeType===3&&(x+=pe.nodeValue.length),(Ae=pe.firstChild)!==null;)ue=pe,pe=Ae;for(;;){if(pe===i)break t;if(ue===l&&++Z===E&&(L=x),ue===b&&++ce===h&&(U=x),(Ae=pe.nextSibling)!==null)break;pe=ue,ue=pe.parentNode}pe=Ae}l=L===-1||U===-1?null:{start:L,end:U}}else l=null}l=l||{start:0,end:0}}else l=null;for(em={focusedElem:i,selectionRange:l},xc=!1,ke=o;ke!==null;)if(o=ke,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,ke=i;else for(;ke!==null;){o=ke;try{var Ne=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Ne!==null){var Oe=Ne.memoizedProps,Lt=Ne.memoizedState,W=o.stateNode,j=W.getSnapshotBeforeUpdate(o.elementType===o.type?Oe:xr(o.type,Oe),Lt);W.__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){Pt(o,o.return,be)}if(i=o.sibling,i!==null){i.return=o.return,ke=i;break}ke=o.return}return Ne=a2,a2=!1,Ne}function Iu(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&&zm(o,l,b)}E=E.next}while(E!==h)}}function id(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 jm(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 u2(i){var o=i.alternate;o!==null&&(i.alternate=null,u2(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Yr],delete o[_u],delete o[im],delete o[t7],delete o[n7])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function l2(i){return i.tag===5||i.tag===3||i.tag===4}function c2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||l2(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function $m(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=Dc));else if(h!==4&&(i=i.child,i!==null))for($m(i,o,l),i=i.sibling;i!==null;)$m(i,o,l),i=i.sibling}function Vm(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(Vm(i,o,l),i=i.sibling;i!==null;)Vm(i,o,l),i=i.sibling}var ln=null,wr=!1;function ji(i,o,l){for(l=l.child;l!==null;)d2(i,o,l),l=l.sibling}function d2(i,o,l){if(qr&&typeof qr.onCommitFiberUnmount=="function")try{qr.onCommitFiberUnmount(Ec,l)}catch(L){}switch(l.tag){case 5:wn||Yo(l,o);case 6:var h=ln,E=wr;ln=null,ji(i,o,l),ln=h,wr=E,ln!==null&&(wr?(i=ln,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):ln.removeChild(l.stateNode));break;case 18:ln!==null&&(wr?(i=ln,l=l.stateNode,i.nodeType===8?rm(i.parentNode,l):i.nodeType===1&&rm(i,l),cu(i)):rm(ln,l.stateNode));break;case 4:h=ln,E=wr,ln=l.stateNode.containerInfo,wr=!0,ji(i,o,l),ln=h,wr=E;break;case 0:case 11:case 14:case 15:if(!wn&&(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)&&zm(l,o,x),E=E.next}while(E!==h)}ji(i,o,l);break;case 1:if(!wn&&(Yo(l,o),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(L){Pt(l,o,L)}ji(i,o,l);break;case 21:ji(i,o,l);break;case 22:l.mode&1?(wn=(h=wn)||l.memoizedState!==null,ji(i,o,l),wn=h):ji(i,o,l);break;default:ji(i,o,l)}}function f2(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new y7),o.forEach(function(h){var E=k7.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function Ar(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:ln=L.stateNode,wr=!1;break e;case 3:ln=L.stateNode.containerInfo,wr=!0;break e;case 4:ln=L.stateNode.containerInfo,wr=!0;break e}L=L.return}if(ln===null)throw Error(n(160));d2(b,x,E),ln=null,wr=!1;var U=E.alternate;U!==null&&(U.return=null),E.return=null}catch(Z){Pt(E,o,Z)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)h2(o,i),o=o.sibling}function h2(i,o){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Ar(o,i),Xr(i),h&4){try{Iu(3,i,i.return),id(3,i)}catch(Oe){Pt(i,i.return,Oe)}try{Iu(5,i,i.return)}catch(Oe){Pt(i,i.return,Oe)}}break;case 1:Ar(o,i),Xr(i),h&512&&l!==null&&Yo(l,l.return);break;case 5:if(Ar(o,i),Xr(i),h&512&&l!==null&&Yo(l,l.return),i.flags&32){var E=i.stateNode;try{Ie(E,"")}catch(Oe){Pt(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&&$e(E,b),Vr(L,x);var Z=Vr(L,b);for(x=0;x<U.length;x+=2){var ce=U[x],pe=U[x+1];ce==="style"?an(E,pe):ce==="dangerouslySetInnerHTML"?Ve(E,pe):ce==="children"?Ie(E,pe):v(E,ce,pe,Z)}switch(L){case"input":Ct(E,b);break;case"textarea":rt(E,b);break;case"select":var ue=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var Ae=b.value;Ae!=null?we(E,!!b.multiple,Ae,!1):ue!==!!b.multiple&&(b.defaultValue!=null?we(E,!!b.multiple,b.defaultValue,!0):we(E,!!b.multiple,b.multiple?[]:"",!1))}E[_u]=b}catch(Oe){Pt(i,i.return,Oe)}}break;case 6:if(Ar(o,i),Xr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Oe){Pt(i,i.return,Oe)}}break;case 3:if(Ar(o,i),Xr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{cu(o.containerInfo)}catch(Oe){Pt(i,i.return,Oe)}break;case 4:Ar(o,i),Xr(i);break;case 13:Ar(o,i),Xr(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(Gm=Rt())),h&4&&f2(i);break;case 22:if(ce=l!==null&&l.memoizedState!==null,i.mode&1?(wn=(Z=wn)||ce,Ar(o,i),wn=Z):Ar(o,i),Xr(i),h&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!ce&&(i.mode&1)!==0)for(ke=i,ce=i.child;ce!==null;){for(pe=ke=ce;ke!==null;){switch(ue=ke,Ae=ue.child,ue.tag){case 0:case 11:case 14:case 15:Iu(4,ue,ue.return);break;case 1:Yo(ue,ue.return);var Ne=ue.stateNode;if(typeof Ne.componentWillUnmount=="function"){h=ue,l=ue.return;try{o=h,Ne.props=o.memoizedProps,Ne.state=o.memoizedState,Ne.componentWillUnmount()}catch(Oe){Pt(h,l,Oe)}}break;case 5:Yo(ue,ue.return);break;case 22:if(ue.memoizedState!==null){g2(pe);continue}}Ae!==null?(Ae.return=ue,ke=Ae):g2(pe)}ce=ce.sibling}e:for(ce=null,pe=i;;){if(pe.tag===5){if(ce===null){ce=pe;try{E=pe.stateNode,Z?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(L=pe.stateNode,U=pe.memoizedProps.style,x=U!=null&&U.hasOwnProperty("display")?U.display:null,L.style.display=Ht("display",x))}catch(Oe){Pt(i,i.return,Oe)}}}else if(pe.tag===6){if(ce===null)try{pe.stateNode.nodeValue=Z?"":pe.memoizedProps}catch(Oe){Pt(i,i.return,Oe)}}else if((pe.tag!==22&&pe.tag!==23||pe.memoizedState===null||pe===i)&&pe.child!==null){pe.child.return=pe,pe=pe.child;continue}if(pe===i)break e;for(;pe.sibling===null;){if(pe.return===null||pe.return===i)break e;ce===pe&&(ce=null),pe=pe.return}ce===pe&&(ce=null),pe.sibling.return=pe.return,pe=pe.sibling}}break;case 19:Ar(o,i),Xr(i),h&4&&f2(i);break;case 21:break;default:Ar(o,i),Xr(i)}}function Xr(i){var o=i.flags;if(o&2){try{e:{for(var l=i.return;l!==null;){if(l2(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=c2(i);Vm(i,b,E);break;case 3:case 4:var x=h.stateNode.containerInfo,L=c2(i);$m(i,L,x);break;default:throw Error(n(161))}}catch(U){Pt(i,i.return,U)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function T7(i,o,l){ke=i,p2(i)}function p2(i,o,l){for(var h=(i.mode&1)!==0;ke!==null;){var E=ke,b=E.child;if(E.tag===22&&h){var x=E.memoizedState!==null||rd;if(!x){var L=E.alternate,U=L!==null&&L.memoizedState!==null||wn;L=rd;var Z=wn;if(rd=x,(wn=U)&&!Z)for(ke=E;ke!==null;)x=ke,U=x.child,x.tag===22&&x.memoizedState!==null?E2(E):U!==null?(U.return=x,ke=U):E2(E);for(;b!==null;)ke=b,p2(b),b=b.sibling;ke=E,rd=L,wn=Z}m2(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,ke=b):m2(i)}}function m2(i){for(;ke!==null;){var o=ke;if((o.flags&8772)!==0){var l=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:wn||id(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!wn)if(l===null)h.componentDidMount();else{var E=o.elementType===o.type?l.memoizedProps:xr(o.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=o.updateQueue;b!==null&&gx(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}gx(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 ce=Z.memoizedState;if(ce!==null){var pe=ce.dehydrated;pe!==null&&cu(pe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}wn||o.flags&512&&jm(o)}catch(ue){Pt(o,o.return,ue)}}if(o===i){ke=null;break}if(l=o.sibling,l!==null){l.return=o.return,ke=l;break}ke=o.return}}function g2(i){for(;ke!==null;){var o=ke;if(o===i){ke=null;break}var l=o.sibling;if(l!==null){l.return=o.return,ke=l;break}ke=o.return}}function E2(i){for(;ke!==null;){var o=ke;try{switch(o.tag){case 0:case 11:case 15:var l=o.return;try{id(4,o)}catch(U){Pt(o,l,U)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(U){Pt(o,E,U)}}var b=o.return;try{jm(o)}catch(U){Pt(o,b,U)}break;case 5:var x=o.return;try{jm(o)}catch(U){Pt(o,x,U)}}}catch(U){Pt(o,o.return,U)}if(o===i){ke=null;break}var L=o.sibling;if(L!==null){L.return=o.return,ke=L;break}ke=o.return}}var _7=Math.ceil,sd=H.ReactCurrentDispatcher,qm=H.ReactCurrentOwner,cr=H.ReactCurrentBatchConfig,it=0,tn=null,zt=null,cn=0,Jn=0,Go=Fi(0),Gt=0,Ru=null,Os=0,od=0,Ym=0,Lu=null,zn=null,Gm=0,Wo=1/0,Ei=null,ad=!1,Wm=null,$i=null,ud=!1,Vi=null,ld=0,Du=0,Xm=null,cd=-1,dd=0;function Pn(){return(it&6)!==0?Rt():cd!==-1?cd:cd=Rt()}function qi(i){return(i.mode&1)===0?1:(it&2)!==0&&cn!==0?cn&-cn:i7.transition!==null?(dd===0&&(dd=cS()),dd):(i=ct,i!==0||(i=window.event,i=i===void 0?16:bS(i.type)),i)}function vr(i,o,l,h){if(50<Du)throw Du=0,Xm=null,Error(n(185));su(i,l,h),((it&2)===0||i!==tn)&&(i===tn&&((it&2)===0&&(od|=l),Gt===4&&Yi(i,cn)),jn(i,h),l===1&&it===0&&(o.mode&1)===0&&(Wo=Rt()+500,Uc&&Ui()))}function jn(i,o){var l=i.callbackNode;iB(i,o);var h=Tc(i,i===tn?cn:0);if(h===0)l!==null&&aS(l),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(l!=null&&aS(l),o===1)i.tag===0?r7(b2.bind(null,i)):ix(b2.bind(null,i)),ZB(function(){(it&6)===0&&Ui()}),l=null;else{switch(dS(h)){case 1:l=kp;break;case 4:l=uS;break;case 16:l=gc;break;case 536870912:l=lS;break;default:l=gc}l=C2(l,y2.bind(null,i))}i.callbackPriority=o,i.callbackNode=l}}function y2(i,o){if(cd=-1,dd=0,(it&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Xo()&&i.callbackNode!==l)return null;var h=Tc(i,i===tn?cn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=fd(i,h);else{o=h;var E=it;it|=2;var b=_2();(tn!==i||cn!==o)&&(Ei=null,Wo=Rt()+500,Rs(i,o));do try{w7();break}catch(L){T2(i,L)}while(!0);hm(),sd.current=b,it=E,zt!==null?o=0:(tn=null,cn=0,o=Gt)}if(o!==0){if(o===2&&(E=Np(i),E!==0&&(h=E,o=Km(i,E))),o===1)throw l=Ru,Rs(i,0),Yi(i,h),jn(i,Rt()),l;if(o===6)Yi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!S7(E)&&(o=fd(i,h),o===2&&(b=Np(i),b!==0&&(h=b,o=Km(i,b))),o===1))throw l=Ru,Rs(i,0),Yi(i,h),jn(i,Rt()),l;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:Ls(i,zn,Ei);break;case 3:if(Yi(i,h),(h&130023424)===h&&(o=Gm+500-Rt(),10<o)){if(Tc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){Pn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=nm(Ls.bind(null,i,zn,Ei),o);break}Ls(i,zn,Ei);break;case 4:if(Yi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var x=31-Tr(h);b=1<<x,x=o[x],x>E&&(E=x),h&=~b}if(h=E,h=Rt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*_7(h/1960))-h,10<h){i.timeoutHandle=nm(Ls.bind(null,i,zn,Ei),h);break}Ls(i,zn,Ei);break;case 5:Ls(i,zn,Ei);break;default:throw Error(n(329))}}}return jn(i,Rt()),i.callbackNode===l?y2.bind(null,i):null}function Km(i,o){var l=Lu;return i.current.memoizedState.isDehydrated&&(Rs(i,o).flags|=256),i=fd(i,o),i!==2&&(o=zn,zn=l,o!==null&&Qm(o)),i}function Qm(i){zn===null?zn=i:zn.push.apply(zn,i)}function S7(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(!_r(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 Yi(i,o){for(o&=~Ym,o&=~od,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var l=31-Tr(o),h=1<<l;i[l]=-1,o&=~h}}function b2(i){if((it&6)!==0)throw Error(n(327));Xo();var o=Tc(i,0);if((o&1)===0)return jn(i,Rt()),null;var l=fd(i,o);if(i.tag!==0&&l===2){var h=Np(i);h!==0&&(o=h,l=Km(i,h))}if(l===1)throw l=Ru,Rs(i,0),Yi(i,o),jn(i,Rt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,Ls(i,zn,Ei),jn(i,Rt()),null}function Jm(i,o){var l=it;it|=1;try{return i(o)}finally{it=l,it===0&&(Wo=Rt()+500,Uc&&Ui())}}function Is(i){Vi!==null&&Vi.tag===0&&(it&6)===0&&Xo();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&&Ui()}}function Zm(){Jn=Go.current,St(Go)}function Rs(i,o){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,JB(l)),zt!==null)for(l=zt.return;l!==null;){var h=l;switch(um(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Fc();break;case 3:Vo(),St(Bn),St(_n),_m();break;case 5:bm(h);break;case 4:Vo();break;case 13:St(kt);break;case 19:St(kt);break;case 10:pm(h.type._context);break;case 22:case 23:Zm()}l=l.return}if(tn=i,zt=i=Gi(i.current,null),cn=Jn=o,Gt=0,Ru=null,Ym=od=Os=0,zn=Lu=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 T2(i,o){do{var l=zt;try{if(hm(),Xc.current=Zc,Kc){for(var h=Nt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Kc=!1}if(Ps=0,en=Yt=Nt=null,Cu=!1,ku=0,qm.current=null,l===null||l.return===null){Gt=1,Ru=o,zt=null;break}e:{var b=i,x=l.return,L=l,U=o;if(o=cn,L.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var Z=U,ce=L,pe=ce.tag;if((ce.mode&1)===0&&(pe===0||pe===11||pe===15)){var ue=ce.alternate;ue?(ce.updateQueue=ue.updateQueue,ce.memoizedState=ue.memoizedState,ce.lanes=ue.lanes):(ce.updateQueue=null,ce.memoizedState=null)}var Ae=qx(x);if(Ae!==null){Ae.flags&=-257,Yx(Ae,x,L,b,o),Ae.mode&1&&Vx(b,Z,o),o=Ae,U=Z;var Ne=o.updateQueue;if(Ne===null){var Oe=new Set;Oe.add(U),o.updateQueue=Oe}else Ne.add(U);break e}else{if((o&1)===0){Vx(b,Z,o),e0();break e}U=Error(n(426))}}else if(At&&L.mode&1){var Lt=qx(x);if(Lt!==null){(Lt.flags&65536)===0&&(Lt.flags|=256),Yx(Lt,x,L,b,o),dm(qo(U,L));break e}}b=U=qo(U,L),Gt!==4&&(Gt=2),Lu===null?Lu=[b]:Lu.push(b),b=x;do{switch(b.tag){case 3:b.flags|=65536,o&=-o,b.lanes|=o;var W=jx(b,U,o);mx(b,W);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"&&($i===null||!$i.has(K)))){b.flags|=65536,o&=-o,b.lanes|=o;var be=$x(b,L,o);mx(b,be);break e}}b=b.return}while(b!==null)}x2(l)}catch(Le){o=Le,zt===l&&l!==null&&(zt=l=l.return);continue}break}while(!0)}function _2(){var i=sd.current;return sd.current=Zc,i===null?Zc:i}function e0(){(Gt===0||Gt===3||Gt===2)&&(Gt=4),tn===null||(Os&268435455)===0&&(od&268435455)===0||Yi(tn,cn)}function fd(i,o){var l=it;it|=2;var h=_2();(tn!==i||cn!==o)&&(Ei=null,Rs(i,o));do try{x7();break}catch(E){T2(i,E)}while(!0);if(hm(),it=l,sd.current=h,zt!==null)throw Error(n(261));return tn=null,cn=0,Gt}function x7(){for(;zt!==null;)S2(zt)}function w7(){for(;zt!==null&&!X9();)S2(zt)}function S2(i){var o=v2(i.alternate,i,Jn);i.memoizedProps=i.pendingProps,o===null?x2(i):zt=o,qm.current=null}function x2(i){var o=i;do{var l=o.alternate;if(i=o.return,(o.flags&32768)===0){if(l=g7(l,o,Jn),l!==null){zt=l;return}}else{if(l=E7(l,o),l!==null){l.flags&=32767,zt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Gt=6,zt=null;return}}if(o=o.sibling,o!==null){zt=o;return}zt=o=i}while(o!==null);Gt===0&&(Gt=5)}function Ls(i,o,l){var h=ct,E=cr.transition;try{cr.transition=null,ct=1,A7(i,o,l,h)}finally{cr.transition=E,ct=h}return null}function A7(i,o,l,h){do Xo();while(Vi!==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(sB(i,b),i===tn&&(zt=tn=null,cn=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||ud||(ud=!0,C2(gc,function(){return Xo(),null})),b=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||b){b=cr.transition,cr.transition=null;var x=ct;ct=1;var L=it;it|=4,qm.current=null,b7(i,l),h2(l,i),qB(em),xc=!!Zp,em=Zp=null,i.current=l,T7(l),K9(),it=L,ct=x,cr.transition=b}else i.current=l;if(ud&&(ud=!1,Vi=i,ld=E),b=i.pendingLanes,b===0&&($i=null),Z9(l.stateNode),jn(i,Rt()),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(ad)throw ad=!1,i=Wm,Wm=null,i;return(ld&1)!==0&&i.tag!==0&&Xo(),b=i.pendingLanes,(b&1)!==0?i===Xm?Du++:(Du=0,Xm=i):Du=0,Ui(),null}function Xo(){if(Vi!==null){var i=dS(ld),o=cr.transition,l=ct;try{if(cr.transition=null,ct=16>i?16:i,Vi===null)var h=!1;else{if(i=Vi,Vi=null,ld=0,(it&6)!==0)throw Error(n(331));var E=it;for(it|=4,ke=i.current;ke!==null;){var b=ke,x=b.child;if((ke.flags&16)!==0){var L=b.deletions;if(L!==null){for(var U=0;U<L.length;U++){var Z=L[U];for(ke=Z;ke!==null;){var ce=ke;switch(ce.tag){case 0:case 11:case 15:Iu(8,ce,b)}var pe=ce.child;if(pe!==null)pe.return=ce,ke=pe;else for(;ke!==null;){ce=ke;var ue=ce.sibling,Ae=ce.return;if(u2(ce),ce===Z){ke=null;break}if(ue!==null){ue.return=Ae,ke=ue;break}ke=Ae}}}var Ne=b.alternate;if(Ne!==null){var Oe=Ne.child;if(Oe!==null){Ne.child=null;do{var Lt=Oe.sibling;Oe.sibling=null,Oe=Lt}while(Oe!==null)}}ke=b}}if((b.subtreeFlags&2064)!==0&&x!==null)x.return=b,ke=x;else e:for(;ke!==null;){if(b=ke,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Iu(9,b,b.return)}var W=b.sibling;if(W!==null){W.return=b.return,ke=W;break e}ke=b.return}}var j=i.current;for(ke=j;ke!==null;){x=ke;var K=x.child;if((x.subtreeFlags&2064)!==0&&K!==null)K.return=x,ke=K;else e:for(x=j;ke!==null;){if(L=ke,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:id(9,L)}}catch(Le){Pt(L,L.return,Le)}if(L===x){ke=null;break e}var be=L.sibling;if(be!==null){be.return=L.return,ke=be;break e}ke=L.return}}if(it=E,Ui(),qr&&typeof qr.onPostCommitFiberRoot=="function")try{qr.onPostCommitFiberRoot(Ec,i)}catch(Le){}h=!0}return h}finally{ct=l,cr.transition=o}}return!1}function w2(i,o,l){o=qo(l,o),o=jx(i,o,1),i=zi(i,o,1),o=Pn(),i!==null&&(su(i,1,o),jn(i,o))}function Pt(i,o,l){if(i.tag===3)w2(i,i,l);else for(;o!==null;){if(o.tag===3){w2(o,i,l);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&($i===null||!$i.has(h))){i=qo(l,i),i=$x(o,i,1),o=zi(o,i,1),i=Pn(),o!==null&&(su(o,1,i),jn(o,i));break}}o=o.return}}function v7(i,o,l){var h=i.pingCache;h!==null&&h.delete(o),o=Pn(),i.pingedLanes|=i.suspendedLanes&l,tn===i&&(cn&l)===l&&(Gt===4||Gt===3&&(cn&130023424)===cn&&500>Rt()-Gm?Rs(i,0):Ym|=l),jn(i,o)}function A2(i,o){o===0&&((i.mode&1)===0?o=1:(o=bc,bc<<=1,(bc&130023424)===0&&(bc=4194304)));var l=Pn();i=pi(i,o),i!==null&&(su(i,o,l),jn(i,l))}function C7(i){var o=i.memoizedState,l=0;o!==null&&(l=o.retryLane),A2(i,l)}function k7(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),A2(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,m7(i,o,l);Hn=(i.flags&131072)!==0}else Hn=!1,At&&(o.flags&1048576)!==0&&sx(o,zc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;nd(i,o),i=o.pendingProps;var E=Fo(o,_n.current);$o(o,l),E=wm(null,o,h,i,E,l);var b=Am();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,Bc(o)):b=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Em(o),E.updater=ed,o.stateNode=E,E._reactInternals=o,Om(o,h,i,l),o=Dm(null,o,h,!0,b,l)):(o.tag=0,At&&b&&am(o),Nn(null,o,E,l),o=o.child),o;case 16:h=o.elementType;e:{switch(nd(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=P7(h),i=xr(h,i),E){case 0:o=Lm(null,o,h,i,l);break e;case 1:o=Jx(null,o,h,i,l);break e;case 11:o=Gx(null,o,h,i,l);break e;case 14:o=Wx(null,o,h,xr(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:xr(h,E),Lm(i,o,h,E,l);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:xr(h,E),Jx(i,o,h,E,l);case 3:e:{if(Zx(o),i===null)throw Error(n(387));h=o.pendingProps,b=o.memoizedState,E=b.element,px(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=qo(Error(n(423)),o),o=e2(i,o,h,l,E);break e}else if(h!==E){E=qo(Error(n(424)),o),o=e2(i,o,h,l,E);break e}else for(Qn=Mi(o.stateNode.containerInfo.firstChild),Kn=o,At=!0,Sr=null,l=fx(o,null,h,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Ho(),h===E){o=gi(i,o,l);break e}Nn(i,o,h,l)}o=o.child}return o;case 5:return Ex(o),i===null&&cm(o),h=o.type,E=o.pendingProps,b=i!==null?i.memoizedProps:null,x=E.children,tm(h,E)?x=null:b!==null&&tm(h,b)&&(o.flags|=32),Qx(i,o),Nn(i,o,x,l),o.child;case 6:return i===null&&cm(o),null;case 13:return t2(i,o,l);case 4:return ym(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=zo(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:xr(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,yt(Vc,h._currentValue),h._currentValue=x,b!==null)if(_r(b.value,x)){if(b.children===E.children&&!Bn.current){o=gi(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=mi(-1,l&-l),U.tag=2;var Z=b.updateQueue;if(Z!==null){Z=Z.shared;var ce=Z.pending;ce===null?U.next=U:(U.next=ce.next,ce.next=U),Z.pending=U}}b.lanes|=l,U=b.alternate,U!==null&&(U.lanes|=l),mm(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),mm(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,$o(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=xr(h,o.pendingProps),E=xr(h.type,E),Wx(i,o,h,E,l);case 15:return Xx(i,o,o.type,o.pendingProps,l);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:xr(h,E),nd(i,o),o.tag=1,Un(h)?(i=!0,Bc(o)):i=!1,$o(o,l),Hx(o,h,E),Om(o,h,E,l),Dm(null,o,h,!0,i,l);case 19:return r2(i,o,l);case 22:return Kx(i,o,l)}throw Error(n(156,o.tag))};function C2(i,o){return oS(i,o)}function N7(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 N7(i,o,l,h)}function t0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function P7(i){if(typeof i=="function")return t0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===he)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 hd(i,o,l,h,E,b){var x=2;if(h=i,typeof i=="function")t0(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case Y:return Ds(l.children,E,b,o);case re:x=8,E|=8;break;case Ee:return i=dr(12,l,o,E|2),i.elementType=Ee,i.lanes=b,i;case Ce:return i=dr(13,l,o,E),i.elementType=Ce,i.lanes=b,i;case ne:return i=dr(19,l,o,E),i.elementType=ne,i.lanes=b,i;case oe:return pd(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 he: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 Ds(i,o,l,h){return i=dr(7,i,h,o),i.lanes=l,i}function pd(i,o,l,h){return i=dr(22,i,h,o),i.elementType=oe,i.lanes=l,i.stateNode={isHidden:!1},i}function n0(i,o,l){return i=dr(6,i,null,o),i.lanes=l,i}function r0(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 O7(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=Pp(0),this.expirationTimes=Pp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function i0(i,o,l,h,E,b,x,L,U){return i=new O7(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},Em(b),i}function I7(i,o,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:h==null?null:""+h,children:i,containerInfo:o,implementation:l}}function k2(i){if(!i)return Bi;i=i._reactInternals;e:{if(xs(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 nx(i,l,o)}return o}function N2(i,o,l,h,E,b,x,L,U){return i=i0(l,h,!0,i,E,b,x,L,U),i.context=k2(null),l=i.current,h=Pn(),E=qi(l),b=mi(h,E),b.callback=o!=null?o:null,zi(l,b,E),i.current.lanes=E,su(i,E,h),jn(i,h),i}function md(i,o,l,h){var E=o.current,b=Pn(),x=qi(E);return l=k2(l),o.context===null?o.context=l:o.pendingContext=l,o=mi(b,x),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=zi(E,o,x),i!==null&&(vr(i,E,x,b),Yc(i,E,x)),x}function gd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function P2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<o?l:o}}function s0(i,o){P2(i,o),(i=i.alternate)&&P2(i,o)}function R7(){return null}var O2=typeof reportError=="function"?reportError:function(i){console.error(i)};function o0(i){this._internalRoot=i}Ed.prototype.render=o0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));md(i,o,null,null)},Ed.prototype.unmount=o0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Is(function(){md(null,i,null,null)}),o[ci]=null}};function Ed(i){this._internalRoot=i}Ed.prototype.unstable_scheduleHydration=function(i){if(i){var o=pS();i={blockedOn:null,target:i,priority:o};for(var l=0;l<Ri.length&&o!==0&&o<Ri[l].priority;l++);Ri.splice(l,0,i),l===0&&ES(i)}};function a0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function yd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function I2(){}function L7(i,o,l,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var Z=gd(x);b.call(Z)}}var x=N2(o,h,i,0,null,!1,!1,"",I2);return i._reactRootContainer=x,i[ci]=x.current,bu(i.nodeType===8?i.parentNode:i),Is(),x}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var L=h;h=function(){var Z=gd(U);L.call(Z)}}var U=i0(i,0,!1,null,null,!1,!1,"",I2);return i._reactRootContainer=U,i[ci]=U.current,bu(i.nodeType===8?i.parentNode:i),Is(function(){md(o,U,l,h)}),U}function bd(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=gd(x);L.call(U)}}md(o,x,i,E)}else x=L7(l,o,i,E,h);return gd(x)}fS=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var l=iu(o.pendingLanes);l!==0&&(Op(o,l|1),jn(o,Rt()),(it&6)===0&&(Wo=Rt()+500,Ui()))}break;case 13:Is(function(){var h=pi(i,1);if(h!==null){var E=Pn();vr(h,i,1,E)}}),s0(i,1)}},Ip=function(i){if(i.tag===13){var o=pi(i,134217728);if(o!==null){var l=Pn();vr(o,i,134217728,l)}s0(i,134217728)}},hS=function(i){if(i.tag===13){var o=qi(i),l=pi(i,o);if(l!==null){var h=Pn();vr(l,i,o,h)}s0(i,o)}},pS=function(){return ct},mS=function(i,o){var l=ct;try{return ct=i,o()}finally{ct=l}},wp=function(i,o,l){switch(o){case"input":if(Ct(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=Mc(h);if(!E)throw Error(n(90));Vt(h),Ct(h,E)}}}break;case"textarea":rt(i,l);break;case"select":o=l.value,o!=null&&we(i,!!l.multiple,o,!1)}},Z_=Jm,eS=Is;var D7={usingClientEntryPoint:!1,Events:[Su,Do,Mc,Q_,J_,Jm]},Mu={findFiberByHostInstance:ws,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},M7={bundleType:Mu.bundleType,version:Mu.version,rendererPackageName:Mu.rendererPackageName,rendererConfig:Mu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:H.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=iS(i),i===null?null:i.stateNode},findFiberByHostInstance:Mu.findFiberByHostInstance||R7,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 Td=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Td.isDisabled&&Td.supportsFiber)try{Ec=Td.inject(M7),qr=Td}catch(i){}}return In.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D7,In.createPortal=function(i,o){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!a0(o))throw Error(n(200));return I7(i,o,null,l)},In.createRoot=function(i,o){if(!a0(i))throw Error(n(299));var l=!1,h="",E=O2;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=i0(i,1,!1,null,null,l,!1,h,E),i[ci]=o.current,bu(i.nodeType===8?i.parentNode:i),new o0(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=iS(o),i=i===null?null:i.stateNode,i},In.flushSync=function(i){return Is(i)},In.hydrate=function(i,o,l){if(!yd(o))throw Error(n(200));return bd(null,i,o,!0,l)},In.hydrateRoot=function(i,o,l){if(!a0(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,b="",x=O2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(b=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),o=N2(o,null,i,1,l!=null?l:null,E,!1,b,x),i[ci]=o.current,bu(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 Ed(o)},In.render=function(i,o,l){if(!yd(o))throw Error(n(200));return bd(null,i,o,!1,l)},In.unmountComponentAtNode=function(i){if(!yd(i))throw Error(n(40));return i._reactRootContainer?(Is(function(){bd(null,null,i,!1,function(){i._reactRootContainer=null,i[ci]=null})}),!0):!1},In.unstable_batchedUpdates=Jm,In.unstable_renderSubtreeIntoContainer=function(i,o,l,h){if(!yd(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return bd(i,o,l,!1,h)},In.version="18.3.1-next-f1338f8080-20240426",In}var x1;function w1(){if(x1)return xf.exports;x1=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(),xf.exports=Ak(),xf.exports}var Xs=w1();function A1(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=A1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function G(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=A1(e))&&(r&&(r+=" "),r+=t);return r}const vk=()=>document.querySelector(`input[name="${z}-user-input"]:not(:disabled)`),vf=()=>{var e;return(e=vk())!=null?e:document.querySelector(`.${z}-dialog-content, .${z}-modal-content`)},Ck=()=>{var e;return(e=vf())==null?void 0:e.focus({preventScroll:!0})},Cf=()=>{const e=()=>{const n=document.querySelector(`.${z}-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},C1=Ki.createContext&&Ki.createContext(v1),kk=["attr","size","title"];function Nk(e,t){if(e==null)return{};var n=Pk(e,t),r,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pk(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function fl(){return fl=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},fl.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 hl(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){Ok(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 Ok(e,t,n){return t=Ik(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ik(e){var t=Rk(e,"string");return typeof t=="symbol"?t:t+""}function Rk(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 N1(e){return e&&e.map((t,n)=>Ki.createElement(t.tag,hl({key:n},t.attr),N1(t.child)))}function Tt(e){return t=>Ki.createElement(Lk,fl({attr:hl({},e.attr)},t),N1(e.child))}function Lk(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=Nk(e,kk),c=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Ki.createElement("svg",fl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:hl(hl({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&Ki.createElement("title",null,a),e.children)};return C1!==void 0?Ki.createElement(C1.Consumer,null,n=>t(n)):t(v1)}function Dk(e){return Tt({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 ri=({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:G(e,`${z}-icon-button`),type:r,"aria-label":s,title:a,onClick:c,disabled:u,children:t?S.jsx("img",{className:G(`${z}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),Mk="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",Fk=({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(Dk,{className:G(t,`${z}-minimized-icon`)}):S.jsx("img",{src:(n==null?void 0:n.logoUrl)||Mk,alt:"Copilot",className:G(t,`${z}-minimized-icon-img`)});return S.jsx(ri,{className:G(t,`${z}-minimized-button`),ariaLabel:c,title:c,icon:d,onClick:e})},Bk=()=>{const{globalClassName:e,themeVariables:t}=tt(),n=()=>{pa(!1),ti(!0),setTimeout(Ck)};return Xs.createPortal(S.jsx("div",{className:G(e,`${z}-minimized-container`),style:t,children:S.jsx(Fk,{onClick:n})}),document.body)},Uk=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"}),P1=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>S.jsx("button",{"aria-label":t,title:t,className:G(e,`${z}-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"})})}),Hk=({file:e,componentType:t,globalClassName:n,onRemove:r})=>{const s=e.name||"",[a,u]=F.useState("");return F.useEffect(()=>{const c=URL.createObjectURL(e);return u(c),()=>URL.revokeObjectURL(c)},[e]),S.jsxs("div",{className:G(n,`cim-${t}-component`,`${z}-image-file-preview`),children:[S.jsx("img",{className:G(n,`cim-${t}-component`,`${z}-image-preview`),src:a,alt:`${s} preview`,loading:"lazy"}),S.jsx("span",{className:G(n,`cim-${t}-component`,`${z}-image-file-name`),title:s,children:s}),S.jsx(P1,{className:G(`cim-${t}-component`,"clear-attachment"),label:"Remove image",onClick:r})]})};function O1(e){return Tt({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 Tt({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 Ks(e){return Tt({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 zk(e){return Tt({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 Tt({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 jk(e){return Tt({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 $k(e){return Tt({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 Vk(e){return Tt({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 qk(e){return Tt({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 Yk(e){return Tt({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 Gk(e){return Tt({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 Wk=({componentType:e,accept:t,disabled:n=!1,inputId:r,globalClassName:s,className:a,icon:u=S.jsx(Gk,{}),onFiles:c})=>{const d=F.useRef(null),f=F.useId(),p=r!=null?r:f,m=F.useCallback(()=>{var y;return(y=d.current)==null?void 0:y.click()},[]),T=F.useCallback(y=>{const _=y.target;c(_.files),_.value=""},[c]);return S.jsxs("button",{type:"button",className:G(s,a,`cim-${e}-component`,n&&"disabled",`${z}-image-upload-button`),disabled:n,"aria-label":"Upload an image",onClick:m,children:[S.jsx("span",{className:G(s,a,`cim-${e}-component`,n&&"disabled",`${z}-image-upload-label`),"aria-hidden":"true",children:u}),S.jsx("input",{ref:d,className:G(s,a,`cim-${e}-component`,`${z}-file-input`),type:"file",id:p,accept:t,name:`${z}-file-input`,disabled:n,onInput:T})]})},pl=({className:e,children:t,type:n,disabled:r=!1,onClick:s,"aria-label":a})=>S.jsx("button",{"aria-label":a,className:G(`${z}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),Xk=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?S.jsx("img",{className:G(`${z}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):S.jsx(Ks,{size:"16px"})},Kk=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return S.jsx(ri,{className:G(e,n,`cim-${r}-component`,`${z}-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(Ks,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return S.jsxs(pl,{className:G(e,n,`cim-${r}-component`,`${z}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&S.jsx(Xk,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function Qk(e){return Tt({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 Jk=()=>{const{messages:e}=Vn(),{handleCancel:t}=Or();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])}},Zk=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=tt(),{cancelRequest:r}=Jk();return n!=null&&n.enableCancelSearch?S.jsx(ri,{className:G(t,`${z}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:S.jsx(Qk,{}),disabled:!e,onClick:r}):null};function EU(){}function yU(){}function L1(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 D1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const eN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nN={};function M1(e,t){return(nN.jsx?tN:eN).test(e)}const rN=/[ \t\n\f\r]/g;function iN(e){return typeof e=="object"?e.type==="text"?F1(e.value):!1:F1(e)}function F1(e){return e.replace(rN,"")===""}class ya{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ya.prototype.normal={},ya.prototype.property={},ya.prototype.space=void 0;function B1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new ya(n,r,t)}function ba(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 sN=0;const We=ss(),Bt=ss(),kf=ss(),ge=ss(),dt=ss(),is=ss(),qn=ss();function ss(){return Fu(2,++sN)}const Nf=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:Bt,commaOrSpaceSeparated:qn,commaSeparated:is,number:ge,overloadedBoolean:kf,spaceSeparated:dt},Symbol.toStringTag,{value:"Module"})),Pf=Object.keys(Nf);class Of extends Rn{constructor(t,n,r,s){let a=-1;if(super(t,n),U1(this,"space",s),typeof r=="number")for(;++a<Pf.length;){const u=Pf[a];U1(this,Pf[a],(r&Nf[u])===Nf[u])}}}Of.prototype.defined=!0;function U1(e,t,n){n&&(e[t]=n)}function Qs(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new Of(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ba(r)]=r,n[ba(a.attribute)]=r}return new ya(t,n,e.space)}const H1=Qs({properties:{ariaActiveDescendant:null,ariaAtomic:Bt,ariaAutoComplete:null,ariaBusy:Bt,ariaChecked:Bt,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:dt,ariaCurrent:null,ariaDescribedBy:dt,ariaDetails:null,ariaDisabled:Bt,ariaDropEffect:dt,ariaErrorMessage:null,ariaExpanded:Bt,ariaFlowTo:dt,ariaGrabbed:Bt,ariaHasPopup:null,ariaHidden:Bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dt,ariaLevel:ge,ariaLive:null,ariaModal:Bt,ariaMultiLine:Bt,ariaMultiSelectable:Bt,ariaOrientation:null,ariaOwns:dt,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:Bt,ariaReadOnly:Bt,ariaRelevant:null,ariaRequired:Bt,ariaRoleDescription:dt,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:Bt,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function z1(e,t){return t in e?e[t]:t}function j1(e,t){return z1(e,t.toLowerCase())}const oN=Qs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:is,acceptCharset:dt,accessKey:dt,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alpha:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:dt,autoFocus:We,autoPlay:We,blocking:dt,capture:null,charSet:null,checked:We,cite:null,className:dt,closedBy:null,colorSpace:null,cols:ge,colSpan:ge,command:null,commandFor:null,content:null,contentEditable:Bt,controls:We,controlsList:dt,coords:ge|is,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:kf,draggable:Bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:dt,height:ge,hidden:kf,high:ge,href:null,hrefLang:null,htmlFor:dt,httpEquiv:dt,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:dt,itemRef:dt,itemScope:We,itemType:dt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,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:ge,pattern:null,ping:dt,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:dt,required:We,reversed:We,rows:ge,rowSpan:ge,sandbox:dt,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootCustomElementRegistry:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shadowRootSerializable:We,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:Bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:Bt,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:dt,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:Bt,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:We,disablePictureInPicture:We,disableRemotePlayback:We,exportParts:is,part:dt,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:j1}),aN=Qs({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:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className: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:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:is,g2:is,glyphName:is,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:qn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ge,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,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:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:qn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:z1}),$1=Qs({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()}}),V1=Qs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:j1}),q1=Qs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),uN={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"},lN=/[A-Z]/g,Y1=/-[a-z]/g,cN=/^data[-\w.:]+$/i;function ml(e,t){const n=ba(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"&&cN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Y1,fN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Y1.test(a)){let u=a.replace(lN,dN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=Of}return new s(r,t)}function dN(e){return"-"+e.toLowerCase()}function fN(e){return e.charAt(1).toUpperCase()}const Ta=B1([H1,oN,$1,V1,q1],"html"),Ti=B1([H1,aN,$1,V1,q1],"svg");function G1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function W1(e){return e.join(" ").trim()}var Js={},If,X1;function hN(){if(X1)return If;X1=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 _(C,A){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];A=A||{};var N=1,v=1;function H(ne){var ae=ne.match(t);ae&&(N+=ae.length);var xe=ne.lastIndexOf(d);v=~xe?ne.length-xe:v+ne.length}function q(){var ne={line:N,column:v};return function(ae){return ae.position=new R(ne),Ee(),ae}}function R(ne){this.start=ne,this.end={line:N,column:v},this.source=A.source}R.prototype.content=C;function Y(ne){var ae=new Error(A.source+":"+N+":"+v+": "+ne);if(ae.reason=ne,ae.filename=A.source,ae.line=N,ae.column=v,ae.source=C,!A.silent)throw ae}function re(ne){var ae=ne.exec(C);if(ae){var xe=ae[0];return H(xe),C=C.slice(xe.length),ae}}function Ee(){re(n)}function V(ne){var ae;for(ne=ne||[];ae=se();)ae!==!1&&ne.push(ae);return ne}function se(){var ne=q();if(!(f!=C.charAt(0)||p!=C.charAt(1))){for(var ae=2;m!=C.charAt(ae)&&(p!=C.charAt(ae)||f!=C.charAt(ae+1));)++ae;if(ae+=2,m===C.charAt(ae-1))return Y("End of comment missing");var xe=C.slice(2,ae-2);return v+=2,H(xe),C=C.slice(ae),v+=2,ne({type:T,comment:xe})}}function he(){var ne=q(),ae=re(r);if(ae){if(se(),!re(s))return Y("property missing ':'");var xe=re(a),oe=ne({type:y,property:w(ae[0].replace(e,m)),value:xe?w(xe[0].replace(e,m)):m});return re(u),oe}}function Ce(){var ne=[];V(ne);for(var ae;ae=he();)ae!==!1&&(ne.push(ae),V(ne));return ne}return Ee(),Ce()}function w(C){return C?C.replace(c,m):m}return If=_,If}var K1;function pN(){if(K1)return Js;K1=1;var e=Js&&Js.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Js,"__esModule",{value:!0}),Js.default=n;const t=e(hN());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 Js}var _a={},Q1;function mN(){if(Q1)return _a;Q1=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.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 _a.camelCase=d,_a}var Sa,J1;function gN(){if(J1)return Sa;J1=1;var e=Sa&&Sa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(pN()),n=mN();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,Sa=r,Sa}var EN=gN();const yN=je(EN),gl=Z1("end"),Ir=Z1("start");function Z1(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 eE(e){const t=Ir(e),n=gl(e);if(t&&n)return{start:t,end:n}}function xa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?tE(e.position):"start"in e||"end"in e?tE(e):"line"in e||"column"in e?Rf(e):""}function Rf(e){return nE(e&&e.line)+":"+nE(e&&e.column)}function tE(e){return Rf(e&&e.start)+"-"+Rf(e&&e.end)}function nE(e){return e&&typeof e=="number"?e:1}class En extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=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=xa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}En.prototype.file="",En.prototype.name="",En.prototype.reason="",En.prototype.message="",En.prototype.stack="",En.prototype.column=void 0,En.prototype.line=void 0,En.prototype.ancestors=void 0,En.prototype.cause=void 0,En.prototype.fatal=void 0,En.prototype.place=void 0,En.prototype.ruleId=void 0,En.prototype.source=void 0;const Lf={}.hasOwnProperty,bN=new Map,TN=/[A-Z]/g,_N=new Set(["table","tbody","thead","tfoot","tr"]),SN=new Set(["td","th"]),rE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xN(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=ON(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=PN(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"?Ti:Ta,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=iE(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function iE(e,t,n){if(t.type==="element")return wN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return AN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return CN(e,t,n);if(t.type==="mdxjsEsm")return vN(e,t);if(t.type==="root")return kN(e,t,n);if(t.type==="text")return NN(e,t)}function wN(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Ti,e.schema=s),e.ancestors.push(t);const a=oE(e,t.tagName,!1),u=IN(e,t);let c=Mf(e,t);return _N.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!iN(d):!0})),sE(e,u,a,t),Df(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function AN(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}wa(e,t.position)}function vN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wa(e,t.position)}function CN(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=Ti,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:oE(e,t.name,!0),u=RN(e,t),c=Mf(e,t);return sE(e,u,a,t),Df(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function kN(e,t,n){const r={};return Df(r,Mf(e,t)),e.create(t,e.Fragment,r,n)}function NN(e,t){return t.value}function sE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Df(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function PN(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 ON(e,t){return n;function n(r,s,a,u){const c=Array.isArray(a.children),d=Ir(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 IN(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Lf.call(t.properties,s)){const a=LN(e,s,t.properties[s]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&SN.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 RN(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 wa(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 wa(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Mf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:bN;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=iE(e,a,u);c!==void 0&&n.push(c)}return n}function LN(e,t,n){const r=ml(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?D1(n):W1(n)),r.property==="style"){let s=typeof n=="object"?n:DN(e,String(n));return e.stylePropertyNameCase==="css"&&(s=MN(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?uN[r.property]||r.property:r.attribute,n]}}function DN(e,t){try{return yN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new En("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=rE+"#cannot-parse-style-attribute",s}}function oE(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=M1(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=M1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Lf.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);wa(e)}function wa(e,t){const n=new En("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=rE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function MN(e){const t={};let n;for(n in e)Lf.call(e,n)&&(t[FN(n)]=e[n]);return t}function FN(e){let t=e.replace(TN,BN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function BN(e){return"-"+e.toLowerCase()}const Ff={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"]},UN={};function Bf(e,t){const n=UN,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return aE(e,r,s)}function aE(e,t,n){if(HN(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 uE(e.children,t,n)}return Array.isArray(e)?uE(e,t,n):""}function uE(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=aE(e[s],t,n);return r.join("")}function HN(e){return!!(e&&typeof e=="object")}const lE=document.createElement("i");function Uf(e){const t="&"+e+";";lE.innerHTML=t;const n=lE.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 cE={}.hasOwnProperty;function dE(e){const t={};let n=-1;for(;++n<e.length;)zN(t,e[n]);return t}function zN(e,t){let n;for(n in t){const s=(cE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){cE.call(s,u)||(s[u]=[]);const c=a[u];jN(s[u],Array.isArray(c)?c:c?[c]:[])}}}function jN(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 fE(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 mr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vn=_i(/[A-Za-z]/),yn=_i(/[\dA-Za-z]/),$N=_i(/[#-'*+\--9=?A-Z^-~]/);function El(e){return e!==null&&(e<32||e===127)}const Hf=_i(/\d/),VN=_i(/[\dA-Fa-f]/),qN=_i(/[!-/:-@[-`{-~]/);function Ue(e){return e!==null&&e<-2}function ft(e){return e!==null&&(e<0||e===32)}function Je(e){return e===-2||e===-1||e===32}const yl=_i(new RegExp("\\p{P}|\\p{S}","u")),os=_i(/\s/);function _i(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Zs(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&yn(e.charCodeAt(n+1))&&yn(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 Je(d)?(e.enter(n),c(d)):t(d)}function c(d){return Je(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const YN={tokenize:GN};function GN(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 WN={tokenize:XN},hE={tokenize:KN};function XN(e){const t=this,n=[];let r=0,s,a,u;return c;function c(v){if(r<n.length){const H=n[r];return t.containerState=H[1],e.attempt(H[0].continuation,d,f)(v)}return f(v)}function d(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&N();const H=t.events.length;let q=H,R;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){R=t.events[q][1].end;break}A(r);let Y=H;for(;Y<t.events.length;)t.events[Y][1].end=B({},R),Y++;return Yn(t.events,q+1,0,t.events.slice(H)),t.events.length=Y,f(v)}return c(v)}function f(v){if(r===n.length){if(!s)return T(v);if(s.currentConstruct&&s.currentConstruct.concrete)return _(v);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(hE,p,m)(v)}function p(v){return s&&N(),A(r),T(v)}function m(v){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(v)}function T(v){return t.containerState={},e.attempt(hE,y,_)(v)}function y(v){return r++,n.push([t.currentConstruct,t.containerState]),T(v)}function _(v){if(v===null){s&&N(),A(0),e.consume(v);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),w(v)}function w(v){if(v===null){C(e.exit("chunkFlow"),!0),A(0),e.consume(v);return}return Ue(v)?(e.consume(v),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(v),w)}function C(v,H){const q=t.sliceStream(v);if(H&&q.push(null),v.previous=a,a&&(a.next=v),a=v,s.defineSkip(v.start),s.write(q),t.parser.lazy[v.start.line]){let R=s.events.length;for(;R--;)if(s.events[R][1].start.offset<u&&(!s.events[R][1].end||s.events[R][1].end.offset>u))return;const Y=t.events.length;let re=Y,Ee,V;for(;re--;)if(t.events[re][0]==="exit"&&t.events[re][1].type==="chunkFlow"){if(Ee){V=t.events[re][1].end;break}Ee=!0}for(A(r),R=Y;R<t.events.length;)t.events[R][1].end=B({},V),R++;Yn(t.events,re+1,0,t.events.slice(Y)),t.events.length=R}}function A(v){let H=n.length;for(;H-- >v;){const q=n[H];t.containerState=q[1],q[0].exit.call(t,e)}n.length=v}function N(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function KN(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 eo(e){if(e===null||ft(e)||os(e))return 1;if(yl(e))return 2}function bl(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 zf={name:"attention",resolveAll:QN,tokenize:JN};function QN(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);pE(m,-d),pE(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,bl(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 JN(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=eo(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=eo(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 pE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ZN={name:"autolink",tokenize:eP};function eP(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 vn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||yn(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||yn(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||El(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):$N(y)?(e.consume(y),f):n(y)}function p(y){return yn(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||yn(y))&&r++<63){const _=y===45?T:m;return e.consume(y),_}return n(y)}}const Aa={partial:!0,tokenize:tP};function tP(e,t,n){return r;function r(a){return Je(a)?nt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Ue(a)?t(a):n(a)}}const mE={continuation:{tokenize:rP},exit:iP,name:"blockQuote",tokenize:nP};function nP(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 Je(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function rP(e,t,n){const r=this;return s;function s(u){return Je(u)?nt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(mE,t,n)(u)}}function iP(e){e.exit("blockQuote")}const gE={name:"characterEscape",tokenize:sP};function sP(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 qN(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const EE={name:"characterReference",tokenize:oP};function oP(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=yn,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=VN,p):(e.enter("characterReferenceValue"),a=7,u=Hf,p(m))}function p(m){if(m===59&&s){const T=e.exit("characterReferenceValue");return u===yn&&!Uf(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 yE={partial:!0,tokenize:uP},bE={concrete:!0,name:"codeFenced",tokenize:aP};function aP(e,t,n){const r=this,s={partial:!0,tokenize:q};let a=0,u=0,c;return d;function d(R){return f(R)}function f(R){const Y=r.events[r.events.length-1];return a=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,c=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(R)}function p(R){return R===c?(u++,e.consume(R),p):u<3?n(R):(e.exit("codeFencedFenceSequence"),Je(R)?nt(e,m,"whitespace")(R):m(R))}function m(R){return R===null||Ue(R)?(e.exit("codeFencedFence"),r.interrupt?t(R):e.check(yE,w,H)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(R))}function T(R){return R===null||Ue(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(R)):Je(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),nt(e,y,"whitespace")(R)):R===96&&R===c?n(R):(e.consume(R),T)}function y(R){return R===null||Ue(R)?m(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(R))}function _(R){return R===null||Ue(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(R)):R===96&&R===c?n(R):(e.consume(R),_)}function w(R){return e.attempt(s,H,C)(R)}function C(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),A}function A(R){return a>0&&Je(R)?nt(e,N,"linePrefix",a+1)(R):N(R)}function N(R){return R===null||Ue(R)?e.check(yE,w,H)(R):(e.enter("codeFlowValue"),v(R))}function v(R){return R===null||Ue(R)?(e.exit("codeFlowValue"),N(R)):(e.consume(R),v)}function H(R){return e.exit("codeFenced"),t(R)}function q(R,Y,re){let Ee=0;return V;function V(ae){return R.enter("lineEnding"),R.consume(ae),R.exit("lineEnding"),se}function se(ae){return R.enter("codeFencedFence"),Je(ae)?nt(R,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ae):he(ae)}function he(ae){return ae===c?(R.enter("codeFencedFenceSequence"),Ce(ae)):re(ae)}function Ce(ae){return ae===c?(Ee++,R.consume(ae),Ce):Ee>=u?(R.exit("codeFencedFenceSequence"),Je(ae)?nt(R,ne,"whitespace")(ae):ne(ae)):re(ae)}function ne(ae){return ae===null||Ue(ae)?(R.exit("codeFencedFence"),Y(ae)):re(ae)}}}function uP(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 jf={name:"codeIndented",tokenize:cP},lP={partial:!0,tokenize:dP};function cP(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(lP,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 dP(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 fP={name:"codeText",previous:pP,resolve:hP,tokenize:mP};function hP(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 pP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function mP(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 gP{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 TE(e){const t={};let n=-1,r,s,a,u,c,d,f;const p=new gP(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,EP(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 EP(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 C=[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,C.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):C.pop(),T=C.length;T--;){const A=c.slice(C[T],C[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 yP={resolve:TP,tokenize:_P},bP={partial:!0,tokenize:SP};function TP(e){return TE(e),e}function _P(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(bP,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 SP(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 _E(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||El(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||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||El(A)?n(A):(e.consume(A),A===92?C:w)}function C(A){return A===40||A===41||A===92?(e.consume(A),w):w(A)}}function SE(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=!Je(y)),y===92?T:m)}function T(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function xE(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 Ca(e,t){let n;return r;function r(s){return Ue(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Je(s)?nt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const xP={name:"definition",tokenize:AP},wP={partial:!0,tokenize:vP};function AP(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return SE.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=mr(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)?Ca(e,f)(y):f(y)}function f(y){return _E(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(wP,m,m)(y)}function m(y){return Je(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 vP(e,t,n){return r;function r(c){return ft(c)?Ca(e,s)(c):n(c)}function s(c){return xE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Je(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:kP};function kP(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:PP,tokenize:OP};function PP(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 OP(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||Ue(p)?(e.exit("atxHeading"),t(p)):Je(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 IP=["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"],wE=["pre","script","style","textarea"],RP={concrete:!0,name:"htmlFlow",resolveTo:MP,tokenize:FP},LP={partial:!0,tokenize:UP},DP={partial:!0,tokenize:BP};function MP(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 FP(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):vn(O)?(e.consume(O),u=String.fromCharCode(O),C):n(O)}function T(O){return O===45?(e.consume(O),s=2,y):O===91?(e.consume(O),s=5,c=0,_):vn(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:he:_):n(O)}function w(O){return vn(O)?(e.consume(O),u=String.fromCharCode(O),C):n(O)}function C(O){if(O===null||O===47||O===62||ft(O)){const Se=O===47,Me=u.toLowerCase();return!Se&&!a&&wE.includes(Me)?(s=1,r.interrupt?t(O):he(O)):IP.includes(u.toLowerCase())?(s=6,Se?(e.consume(O),A):r.interrupt?t(O):he(O)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?N(O):v(O))}return O===45||yn(O)?(e.consume(O),u+=String.fromCharCode(O),C):n(O)}function A(O){return O===62?(e.consume(O),r.interrupt?t:he):n(O)}function N(O){return Je(O)?(e.consume(O),N):V(O)}function v(O){return O===47?(e.consume(O),V):O===58||O===95||vn(O)?(e.consume(O),H):Je(O)?(e.consume(O),v):V(O)}function H(O){return O===45||O===46||O===58||O===95||yn(O)?(e.consume(O),H):q(O)}function q(O){return O===61?(e.consume(O),R):Je(O)?(e.consume(O),q):v(O)}function R(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,Y):Je(O)?(e.consume(O),R):re(O)}function Y(O){return O===d?(e.consume(O),d=null,Ee):O===null||Ue(O)?n(O):(e.consume(O),Y)}function re(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||ft(O)?q(O):(e.consume(O),re)}function Ee(O){return O===47||O===62||Je(O)?v(O):n(O)}function V(O){return O===62?(e.consume(O),se):n(O)}function se(O){return O===null||Ue(O)?he(O):Je(O)?(e.consume(O),se):n(O)}function he(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),D):O===63&&s===3?(e.consume(O),k):O===93&&s===5?(e.consume(O),ie):Ue(O)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(LP,ee,Ce)(O)):O===null||Ue(O)?(e.exit("htmlFlowData"),Ce(O)):(e.consume(O),he)}function Ce(O){return e.check(DP,ne,ee)(O)}function ne(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),ae}function ae(O){return O===null||Ue(O)?Ce(O):(e.enter("htmlFlowData"),he(O))}function xe(O){return O===45?(e.consume(O),k):he(O)}function oe(O){return O===47?(e.consume(O),u="",Q):he(O)}function Q(O){if(O===62){const Se=u.toLowerCase();return wE.includes(Se)?(e.consume(O),D):he(O)}return vn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),Q):he(O)}function ie(O){return O===93?(e.consume(O),k):he(O)}function k(O){return O===62?(e.consume(O),D):O===45&&s===2?(e.consume(O),k):he(O)}function D(O){return O===null||Ue(O)?(e.exit("htmlFlowData"),ee(O)):(e.consume(O),D)}function ee(O){return e.exit("htmlFlow"),t(O)}}function BP(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 UP(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Aa,t,n)}}const HP={name:"htmlText",tokenize:zP};function zP(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),q):k===63?(e.consume(k),v):vn(k)?(e.consume(k),re):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,_):vn(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):Ue(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 D="CDATA[";return k===D.charCodeAt(a++)?(e.consume(k),a===D.length?w:_):n(k)}function w(k){return k===null?n(k):k===93?(e.consume(k),C):Ue(k)?(u=w,oe(k)):(e.consume(k),w)}function C(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):Ue(k)?(u=N,oe(k)):(e.consume(k),N)}function v(k){return k===null?n(k):k===63?(e.consume(k),H):Ue(k)?(u=v,oe(k)):(e.consume(k),v)}function H(k){return k===62?xe(k):v(k)}function q(k){return vn(k)?(e.consume(k),R):n(k)}function R(k){return k===45||yn(k)?(e.consume(k),R):Y(k)}function Y(k){return Ue(k)?(u=Y,oe(k)):Je(k)?(e.consume(k),Y):xe(k)}function re(k){return k===45||yn(k)?(e.consume(k),re):k===47||k===62||ft(k)?Ee(k):n(k)}function Ee(k){return k===47?(e.consume(k),xe):k===58||k===95||vn(k)?(e.consume(k),V):Ue(k)?(u=Ee,oe(k)):Je(k)?(e.consume(k),Ee):xe(k)}function V(k){return k===45||k===46||k===58||k===95||yn(k)?(e.consume(k),V):se(k)}function se(k){return k===61?(e.consume(k),he):Ue(k)?(u=se,oe(k)):Je(k)?(e.consume(k),se):Ee(k)}function he(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),s=k,Ce):Ue(k)?(u=he,oe(k)):Je(k)?(e.consume(k),he):(e.consume(k),ne)}function Ce(k){return k===s?(e.consume(k),s=void 0,ae):k===null?n(k):Ue(k)?(u=Ce,oe(k)):(e.consume(k),Ce)}function ne(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||ft(k)?Ee(k):(e.consume(k),ne)}function ae(k){return k===47||k===62||ft(k)?Ee(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 Je(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 $f={name:"labelEnd",resolveAll:qP,resolveTo:YP,tokenize:GP},jP={tokenize:WP},$P={tokenize:XP},VP={tokenize:KP};function qP(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 YP(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,bl(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 GP(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(mr(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(jP,p,u?p:m)(T):T===91?e.attempt($P,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(VP,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)?Ca(e,a)(m):a(m)}function a(m){return m===41?p(m):_E(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return ft(m)?Ca(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?xE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return ft(m)?Ca(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 XP(e,t,n){const r=this;return s;function s(c){return SE.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(mr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function KP(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 QP={name:"labelStartImage",resolveAll:$f.resolveAll,tokenize:JP};function JP(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 ZP={name:"labelStartLink",resolveAll:$f.resolveAll,tokenize:eO};function eO(e,t,n){const r=this;return s;function s(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Vf={name:"lineEnding",tokenize:tO};function tO(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),nt(e,t,"linePrefix")}}const Tl={name:"thematicBreak",tokenize:nO};function nO(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"),Je(f)?nt(e,c,"whitespace")(f):c(f))}}const Ln={continuation:{tokenize:oO},exit:uO,name:"list",tokenize:sO},rO={partial:!0,tokenize:lO},iO={partial:!0,tokenize:aO};function sO(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:Hf(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Tl,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 Hf(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(Aa,r.interrupt?n:p,e.attempt(rO,T,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function m(y){return Je(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),T):n(y)}function T(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function oO(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Aa,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||!Je(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(iO,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 aO(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 uO(e){e.exit(this.containerState.type)}function lO(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!Je(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const AE={name:"setextUnderline",resolveTo:cO,tokenize:dO};function cO(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 dO(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"),Je(f)?nt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Ue(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const fO={tokenize:hO};function hO(e){const t=this,n=e.attempt(Aa,r,e.attempt(this.parser.constructs.flowInitial,s,nt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(yP,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 pO={resolveAll:CE()},mO=vE("string"),gO=vE("text");function vE(e){return{resolveAll:CE(e==="text"?EO: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 CE(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 EO(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 yO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:xP},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:mE},flow:{35:NP,42:Tl,45:[AE,Tl],60:RP,61:AE,95:Tl,96:bE,126:bE},flowInitial:{[-2]:jf,[-1]:jf,32:jf},insideSpan:{null:[zf,pO]},string:{38:EE,92:gE},text:{[-5]:Vf,[-4]:Vf,[-3]:Vf,33:QP,38:EE,42:zf,60:[ZN,HP],91:ZP,92:[CP,gE],93:$f,95:zf,96:fP}},Symbol.toStringTag,{value:"Module"}));function bO(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:Y(q),check:Y(R),consume:N,enter:v,exit:H,interrupt:Y(R,{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),C(),u[u.length-1]!==null?[]:(re(t,0),f.events=bl(a,f.events,f),f.events)}function T(se,he){return _O(y(se),he)}function y(se){return TO(u,se)}function _(){const{_bufferIndex:se,_index:he,line:Ce,column:ne,offset:ae}=r;return{_bufferIndex:se,_index:he,line:Ce,column:ne,offset:ae}}function w(se){s[se.line]=se.column,V()}function C(){let se;for(;r._index<u.length;){const he=u[r._index];if(typeof he=="string")for(se=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===se&&r._bufferIndex<he.length;)A(he.charCodeAt(r._bufferIndex));else A(he)}}function A(se){p=p(se)}function N(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 v(se,he){const Ce=he||{};return Ce.type=se,Ce.start=_(),f.events.push(["enter",Ce,f]),c.push(Ce),Ce}function H(se){const he=c.pop();return he.end=_(),f.events.push(["exit",he,f]),he}function q(se,he){re(se,he.from)}function R(se,he){he.restore()}function Y(se,he){return Ce;function Ce(ne,ae,xe){let oe,Q,ie,k;return Array.isArray(ne)?ee(ne):"tokenize"in ne?ee([ne]):D(ne);function D(ye){return De;function De(Be){const Ge=Be!==null&&ye[Be],ht=Be!==null&&ye.null,Ut=[...Array.isArray(Ge)?Ge:Ge?[Ge]:[],...Array.isArray(ht)?ht:ht?[ht]:[]];return ee(Ut)(Be)}}function ee(ye){return oe=ye,Q=0,ye.length===0?xe:O(ye[Q])}function O(ye){return De;function De(Be){return k=Ee(),ie=ye,ye.partial||(f.currentConstruct=ye),ye.name&&f.parser.constructs.disable.null.includes(ye.name)?Me():ye.tokenize.call(he?Object.assign(Object.create(f),he):f,d,Se,Me)(Be)}}function Se(ye){return se(ie,k),ae}function Me(ye){return k.restore(),++Q<oe.length?O(oe[Q]):xe}}}function re(se,he){se.resolveAll&&!a.includes(se)&&a.push(se),se.resolve&&Yn(f.events,he,f.events.length-he,se.resolve(f.events.slice(he),f)),se.resolveTo&&(f.events=se.resolveTo(f.events,f))}function Ee(){const se=_(),he=f.previous,Ce=f.currentConstruct,ne=f.events.length,ae=Array.from(c);return{from:ne,restore:xe};function xe(){r=se,f.previous=he,f.currentConstruct=Ce,f.events.length=ne,c=ae,V()}}function V(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function TO(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 _O(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 Fm(i,o,l){return{value:i,source:null,stack:l!=null?l:null,digest:o!=null?o:null}}function Bm(i,o){try{console.error(o.value)}catch(l){setTimeout(function(){throw l})}}var B7=typeof WeakMap=="function"?WeakMap:Map;function n2(i,o,l){l=mi(-1,l),l.tag=3,l.payload={element:null};var h=o.value;return l.callback=function(){cd||(cd=!0,Zm=h),Bm(i,o)},l}function r2(i,o,l){l=mi(-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(){Bm(i,o)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(l.callback=function(){Bm(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 i2(i,o,l){var h=i.pingCache;if(h===null){h=i.pingCache=new B7;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=J7.bind(null,i,o,l),o.then(i,i))}function s2(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 o2(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=mi(-1,1),o.tag=2,zi(l,o,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var U7=U.ReactCurrentOwner,Un=!1;function Nn(i,o,l,h){o.child=i===null?vx(o,null,l,h):jo(o,i.child,l,h)}function a2(i,o,l,h,E){l=l.render;var b=o.ref;return $o(o,E),h=Nm(i,o,l,h,b,E),l=Pm(),i!==null&&!Un?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,gi(i,o,E)):(vt&&l&&fm(o),o.flags|=1,Nn(i,o,h,E),o.child)}function u2(i,o,l,h,E){if(i===null){var b=l.type;return typeof b=="function"&&!o0(b)&&b.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(o.tag=15,o.type=b,l2(i,o,b,h,E)):(i=gd(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:bu,l(x,h)&&i.ref===o.ref)return gi(i,o,E)}return o.flags|=1,i=Gi(b,h),i.ref=o.ref,i.return=o,o.child=i}function l2(i,o,l,h,E){if(i!==null){var b=i.memoizedProps;if(bu(b,h)&&i.ref===o.ref)if(Un=!1,o.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Un=!0);else return o.lanes=i.lanes,gi(i,o,E)}return Um(i,o,l,h,E)}function c2(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},bt(Wo,Qn),Qn|=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,bt(Wo,Qn),Qn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:l,bt(Wo,Qn),Qn|=h}else b!==null?(h=b.baseLanes|l,o.memoizedState=null):h=l,bt(Wo,Qn),Qn|=h;return Nn(i,o,E,l),o.child}function d2(i,o){var l=o.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(o.flags|=512,o.flags|=2097152)}function Um(i,o,l,h,E){var b=Bn(l)?Cs:xn.current;return b=Fo(o,b),$o(o,E),l=Nm(i,o,l,h,b,E),h=Pm(),i!==null&&!Un?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,gi(i,o,E)):(vt&&h&&fm(o),o.flags|=1,Nn(i,o,l,E),o.child)}function f2(i,o,l,h,E){if(Bn(l)){var b=!0;jc(o)}else b=!1;if($o(o,E),o.stateNode===null)sd(i,o),e2(o,l,h),Mm(o,l,h,E),h=!0;else if(i===null){var x=o.stateNode,R=o.memoizedProps;x.props=R;var H=x.context,ee=l.contextType;typeof ee=="object"&&ee!==null?ee=ur(ee):(ee=Bn(l)?Cs:xn.current,ee=Fo(o,ee));var ce=l.getDerivedStateFromProps,pe=typeof ce=="function"||typeof x.getSnapshotBeforeUpdate=="function";pe||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R!==h||H!==ee)&&t2(o,x,h,ee),ji=!1;var ue=o.memoizedState;x.state=ue,Kc(o,h,x,E),H=o.memoizedState,R!==h||ue!==H||Fn.current||ji?(typeof ce=="function"&&(Dm(o,l,ce,h),H=o.memoizedState),(R=ji||Zx(o,l,R,h,ue,H,ee))?(pe||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=H),x.props=h,x.state=H,x.context=ee,h=R):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{x=o.stateNode,kx(i,o),R=o.memoizedProps,ee=o.type===o.elementType?R:xr(o.type,R),x.props=ee,pe=o.pendingProps,ue=x.context,H=l.contextType,typeof H=="object"&&H!==null?H=ur(H):(H=Bn(l)?Cs:xn.current,H=Fo(o,H));var we=l.getDerivedStateFromProps;(ce=typeof we=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R!==pe||ue!==H)&&t2(o,x,h,H),ji=!1,ue=o.memoizedState,x.state=ue,Kc(o,h,x,E);var Pe=o.memoizedState;R!==pe||ue!==Pe||Fn.current||ji?(typeof we=="function"&&(Dm(o,l,we,h),Pe=o.memoizedState),(ee=ji||Zx(o,l,ee,h,ue,Pe,H)||!1)?(ce||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,Pe,H),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,Pe,H)),typeof x.componentDidUpdate=="function"&&(o.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof x.componentDidUpdate!="function"||R===i.memoizedProps&&ue===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&ue===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Pe),x.props=h,x.state=Pe,x.context=H,h=ee):(typeof x.componentDidUpdate!="function"||R===i.memoizedProps&&ue===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&ue===i.memoizedState||(o.flags|=1024),h=!1)}return Hm(i,o,l,h,b,E)}function Hm(i,o,l,h,E,b){d2(i,o);var x=(o.flags&128)!==0;if(!h&&!x)return E&&Ex(o,l,!1),gi(i,o,b);h=o.stateNode,U7.current=o;var R=x&&typeof l.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&x?(o.child=jo(o,i.child,null,b),o.child=jo(o,null,R,b)):Nn(i,o,R,b),o.memoizedState=h.state,E&&Ex(o,l,!0),o.child}function h2(i){var o=i.stateNode;o.pendingContext?mx(i,o.pendingContext,o.pendingContext!==o.context):o.context&&mx(i,o.context,!1),xm(i,o.containerInfo)}function p2(i,o,l,h,E){return Ho(),gm(E),o.flags|=256,Nn(i,o,l,h),o.child}var jm={dehydrated:null,treeContext:null,retryLane:0};function zm(i){return{baseLanes:i,cachePool:null,transitions:null}}function m2(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),bt(kt,E&1),i===null)return mm(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=Ed(x,h,0,null),i=Fs(i,h,l,null),b.return=o,i.return=o,b.sibling=i,o.child=b,o.child.memoizedState=zm(l),o.memoizedState=jm,i):$m(o,x));if(E=i.memoizedState,E!==null&&(R=E.dehydrated,R!==null))return H7(i,o,x,h,R,E,l);if(b){b=h.fallback,x=o.mode,E=i.child,R=E.sibling;var H={mode:"hidden",children:h.children};return(x&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=H,o.deletions=null):(h=Gi(E,H),h.subtreeFlags=E.subtreeFlags&14680064),R!==null?b=Gi(R,b):(b=Fs(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?zm(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},b.memoizedState=x,b.childLanes=i.childLanes&~l,o.memoizedState=jm,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 $m(i,o){return o=Ed({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function id(i,o,l,h){return h!==null&&gm(h),jo(o,i.child,null,l),i=$m(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function H7(i,o,l,h,E,b,x){if(l)return o.flags&256?(o.flags&=-257,h=Fm(Error(n(422))),id(i,o,x,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(b=h.fallback,E=o.mode,h=Ed({mode:"visible",children:h.children},E,0,null),b=Fs(b,E,x,null),b.flags|=2,h.return=o,b.return=o,h.sibling=b,o.child=h,(o.mode&1)!==0&&jo(o,i.child,null,x),o.child.memoizedState=zm(x),o.memoizedState=jm,b);if((o.mode&1)===0)return id(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=Fm(b,h,void 0),id(i,o,x,h)}if(R=(x&i.childLanes)!==0,Un||R){if(h=on,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,pi(i,E),vr(h,i,E,-1))}return s0(),h=Fm(Error(n(421))),id(i,o,x,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=Z7.bind(null,i),E._reactRetry=o,null):(i=b.treeContext,Kn=Fi(E.nextSibling),Xn=o,vt=!0,Sr=null,i!==null&&(or[ar++]=fi,or[ar++]=hi,or[ar++]=ks,fi=i.id,hi=i.overflow,ks=o),o=$m(o,h.children),o.flags|=4096,o)}function g2(i,o,l){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),Tm(i.return,o,l)}function Vm(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 E2(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&&g2(i,l,o);else if(i.tag===19)g2(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(bt(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&&Qc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=o.child,o.child=null):(E=l.sibling,l.sibling=null),Vm(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&&Qc(i)===null){o.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Vm(o,!0,l,null,b);break;case"together":Vm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function sd(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function gi(i,o,l){if(i!==null&&(o.dependencies=i.dependencies),Rs|=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 j7(i,o,l){switch(o.tag){case 3:h2(o),Ho();break;case 5:Ox(o);break;case 1:Bn(o.type)&&jc(o);break;case 4:xm(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;bt(Wc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(bt(kt,kt.current&1),o.flags|=128,null):(l&o.child.childLanes)!==0?m2(i,o,l):(bt(kt,kt.current&1),i=gi(i,o,l),i!==null?i.sibling:null);bt(kt,kt.current&1);break;case 19:if(h=(l&o.childLanes)!==0,(i.flags&128)!==0){if(h)return E2(i,o,l);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),bt(kt,kt.current),h)break;return null;case 22:case 23:return o.lanes=0,c2(i,o,l)}return gi(i,o,l)}var y2,qm,b2,T2;y2=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}},qm=function(){},b2=function(i,o,l,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,Os(Wr.current);var b=null;switch(l){case"input":E=rn(i,E),h=rn(i,h),b=[];break;case"select":E=k({},E,{value:void 0}),h=k({},h,{value:void 0}),b=[];break;case"textarea":E=De(i,E),h=De(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Bc)}cn(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 H=h[ee];if(R=E!=null?E[ee]:void 0,h.hasOwnProperty(ee)&&H!==R&&(H!=null||R!=null))if(ee==="style")if(R){for(x in R)!R.hasOwnProperty(x)||H&&H.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in H)H.hasOwnProperty(x)&&R[x]!==H[x]&&(l||(l={}),l[x]=H[x])}else l||(b||(b=[]),b.push(ee,l)),l=H;else ee==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,R=R?R.__html:void 0,H!=null&&R!==H&&(b=b||[]).push(ee,H)):ee==="children"?typeof H!="string"&&typeof H!="number"||(b=b||[]).push(ee,""+H):ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&(s.hasOwnProperty(ee)?(H!=null&&ee==="onScroll"&&St("scroll",i),b||R===H||(b=[])):(b=b||[]).push(ee,H))}l&&(b=b||[]).push("style",l);var ee=b;(o.updateQueue=ee)&&(o.flags|=4)}},T2=function(i,o,l,h){l!==h&&(o.flags|=4)};function Lu(i,o){if(!vt)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 An(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 z7(i,o,l){var h=o.pendingProps;switch(hm(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return An(o),null;case 1:return Bn(o.type)&&Hc(),An(o),null;case 3:return h=o.stateNode,Vo(),xt(Fn),xt(xn),vm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(qc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Sr!==null&&(n0(Sr),Sr=null))),qm(i,o),An(o),null;case 5:wm(o);var E=Os(Nu.current);if(l=o.type,i!==null&&o.stateNode!=null)b2(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 An(o),null}if(i=Os(Wr.current),qc(o)){h=o.stateNode,l=o.type;var b=o.memoizedProps;switch(h[Yr]=o,h[wu]=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<_u.length;E++)St(_u[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":br(h,b),St("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},St("invalid",h);break;case"textarea":Be(h,b),St("invalid",h)}cn(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&&Fc(h.textContent,R,i),E=["children",R]):typeof R=="number"&&h.textContent!==""+R&&(b.suppressHydrationWarning!==!0&&Fc(h.textContent,R,i),E=["children",""+R]):s.hasOwnProperty(x)&&R!=null&&x==="onScroll"&&St("scroll",h)}switch(l){case"input":Yt(h),$e(h,b,!0);break;case"textarea":Yt(h),pt(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=Bc)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{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[Yr]=o,i[wu]=h,y2(i,o,!1,!1),o.stateNode=i;e:{switch(x=Vr(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<_u.length;E++)St(_u[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":br(i,h),E=rn(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":Be(i,h),E=De(i,h),St("invalid",i);break;default:E=h}cn(l,E),R=E;for(b in R)if(R.hasOwnProperty(b)){var H=R[b];b==="style"?ln(i,H):b==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&Ve(i,H)):b==="children"?typeof H=="string"?(l!=="textarea"||H!=="")&&Re(i,H):typeof H=="number"&&Re(i,""+H):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(s.hasOwnProperty(b)?H!=null&&b==="onScroll"&&St("scroll",i):H!=null&&v(i,b,H,x))}switch(l){case"input":Yt(i),$e(i,h,!1);break;case"textarea":Yt(i),pt(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Ie(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?_e(i,!!h.multiple,b,!1):h.defaultValue!=null&&_e(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Bc)}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 An(o),null;case 6:if(i&&o.stateNode!=null)T2(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(l=Os(Nu.current),Os(Wr.current),qc(o)){if(h=o.stateNode,l=o.memoizedProps,h[Yr]=o,(b=h.nodeValue!==l)&&(i=Xn,i!==null))switch(i.tag){case 3:Fc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Fc(h.nodeValue,l,(i.mode&1)!==0)}b&&(o.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Yr]=o,o.stateNode=h}return An(o),null;case 13:if(xt(kt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(vt&&Kn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)xx(),Ho(),o.flags|=98560,b=!1;else if(b=qc(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[Yr]=o}else Ho(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;An(o),b=!1}else Sr!==null&&(n0(Sr),Sr=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?Kt===0&&(Kt=3):s0())),o.updateQueue!==null&&(o.flags|=4),An(o),null);case 4:return Vo(),qm(i,o),i===null&&Su(o.stateNode.containerInfo),An(o),null;case 10:return bm(o.type._context),An(o),null;case 17:return Bn(o.type)&&Hc(),An(o),null;case 19:if(xt(kt),b=o.memoizedState,b===null)return An(o),null;if(h=(o.flags&128)!==0,x=b.rendering,x===null)if(h)Lu(b,!1);else{if(Kt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(x=Qc(i),x!==null){for(o.flags|=128,Lu(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 bt(kt,kt.current&1|2),o.child}i=i.sibling}b.tail!==null&&Dt()>Go&&(o.flags|=128,h=!0,Lu(b,!1),o.lanes=4194304)}else{if(!h)if(i=Qc(x),i!==null){if(o.flags|=128,h=!0,l=i.updateQueue,l!==null&&(o.updateQueue=l,o.flags|=4),Lu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!x.alternate&&!vt)return An(o),null}else 2*Dt()-b.renderingStartTime>Go&&l!==1073741824&&(o.flags|=128,h=!0,Lu(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,bt(kt,h?l&1|2:l&1),o):(An(o),null);case 22:case 23:return i0(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Qn&1073741824)!==0&&(An(o),o.subtreeFlags&6&&(o.flags|=8192)):An(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function $7(i,o){switch(hm(o),o.tag){case 1:return Bn(o.type)&&Hc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Vo(),xt(Fn),xt(xn),vm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return wm(o),null;case 13:if(xt(kt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Ho()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return xt(kt),null;case 4:return Vo(),null;case 10:return bm(o.type._context),null;case 22:case 23:return i0(),null;case 24:return null;default:return null}}var od=!1,vn=!1,V7=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function Yo(i,o){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){Ot(i,o,h)}else l.current=null}function Ym(i,o,l){try{l()}catch(h){Ot(i,o,h)}}var _2=!1;function q7(i,o){if(im=vc,i=ZS(),Kp(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(ye){l=null;break e}var x=0,R=-1,H=-1,ee=0,ce=0,pe=i,ue=null;t:for(;;){for(var we;pe!==l||E!==0&&pe.nodeType!==3||(R=x+E),pe!==b||h!==0&&pe.nodeType!==3||(H=x+h),pe.nodeType===3&&(x+=pe.nodeValue.length),(we=pe.firstChild)!==null;)ue=pe,pe=we;for(;;){if(pe===i)break t;if(ue===l&&++ee===E&&(R=x),ue===b&&++ce===h&&(H=x),(we=pe.nextSibling)!==null)break;pe=ue,ue=pe.parentNode}pe=we}l=R===-1||H===-1?null:{start:R,end:H}}else l=null}l=l||{start:0,end:0}}else l=null;for(sm={focusedElem:i,selectionRange:l},vc=!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 Pe=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Pe!==null){var Oe=Pe.memoizedProps,Mt=Pe.memoizedState,G=o.stateNode,$=G.getSnapshotBeforeUpdate(o.elementType===o.type?Oe:xr(o.type,Oe),Mt);G.__reactInternalSnapshotBeforeUpdate=$}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(ye){Ot(o,o.return,ye)}if(i=o.sibling,i!==null){i.return=o.return,Ne=i;break}Ne=o.return}return Pe=_2,_2=!1,Pe}function Du(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&&Ym(o,l,b)}E=E.next}while(E!==h)}}function ad(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 Wm(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 S2(i){var o=i.alternate;o!==null&&(i.alternate=null,S2(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Yr],delete o[wu],delete o[lm],delete o[C7],delete o[k7])),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 x2(i){return i.tag===5||i.tag===3||i.tag===4}function w2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||x2(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 Gm(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=Bc));else if(h!==4&&(i=i.child,i!==null))for(Gm(i,o,l),i=i.sibling;i!==null;)Gm(i,o,l),i=i.sibling}function Xm(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(Xm(i,o,l),i=i.sibling;i!==null;)Xm(i,o,l),i=i.sibling}var dn=null,wr=!1;function $i(i,o,l){for(l=l.child;l!==null;)A2(i,o,l),l=l.sibling}function A2(i,o,l){if(qr&&typeof qr.onCommitFiberUnmount=="function")try{qr.onCommitFiberUnmount(Tc,l)}catch(R){}switch(l.tag){case 5:vn||Yo(l,o);case 6:var h=dn,E=wr;dn=null,$i(i,o,l),dn=h,wr=E,dn!==null&&(wr?(i=dn,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):dn.removeChild(l.stateNode));break;case 18:dn!==null&&(wr?(i=dn,l=l.stateNode,i.nodeType===8?um(i.parentNode,l):i.nodeType===1&&um(i,l),hu(i)):um(dn,l.stateNode));break;case 4:h=dn,E=wr,dn=l.stateNode.containerInfo,wr=!0,$i(i,o,l),dn=h,wr=E;break;case 0:case 11:case 14:case 15:if(!vn&&(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)&&Ym(l,o,x),E=E.next}while(E!==h)}$i(i,o,l);break;case 1:if(!vn&&(Yo(l,o),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(R){Ot(l,o,R)}$i(i,o,l);break;case 21:$i(i,o,l);break;case 22:l.mode&1?(vn=(h=vn)||l.memoizedState!==null,$i(i,o,l),vn=h):$i(i,o,l);break;default:$i(i,o,l)}}function v2(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new V7),o.forEach(function(h){var E=eU.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function Ar(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:dn=R.stateNode,wr=!1;break e;case 3:dn=R.stateNode.containerInfo,wr=!0;break e;case 4:dn=R.stateNode.containerInfo,wr=!0;break e}R=R.return}if(dn===null)throw Error(n(160));A2(b,x,E),dn=null,wr=!1;var H=E.alternate;H!==null&&(H.return=null),E.return=null}catch(ee){Ot(E,o,ee)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)C2(o,i),o=o.sibling}function C2(i,o){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Ar(o,i),Xr(i),h&4){try{Du(3,i,i.return),ad(3,i)}catch(Oe){Ot(i,i.return,Oe)}try{Du(5,i,i.return)}catch(Oe){Ot(i,i.return,Oe)}}break;case 1:Ar(o,i),Xr(i),h&512&&l!==null&&Yo(l,l.return);break;case 5:if(Ar(o,i),Xr(i),h&512&&l!==null&&Yo(l,l.return),i.flags&32){var E=i.stateNode;try{Re(E,"")}catch(Oe){Ot(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,H=i.updateQueue;if(i.updateQueue=null,H!==null)try{R==="input"&&b.type==="radio"&&b.name!=null&&sr(E,b),Vr(R,x);var ee=Vr(R,b);for(x=0;x<H.length;x+=2){var ce=H[x],pe=H[x+1];ce==="style"?ln(E,pe):ce==="dangerouslySetInnerHTML"?Ve(E,pe):ce==="children"?Re(E,pe):v(E,ce,pe,ee)}switch(R){case"input":Wt(E,b);break;case"textarea":Xe(E,b);break;case"select":var ue=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var we=b.value;we!=null?_e(E,!!b.multiple,we,!1):ue!==!!b.multiple&&(b.defaultValue!=null?_e(E,!!b.multiple,b.defaultValue,!0):_e(E,!!b.multiple,b.multiple?[]:"",!1))}E[wu]=b}catch(Oe){Ot(i,i.return,Oe)}}break;case 6:if(Ar(o,i),Xr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Oe){Ot(i,i.return,Oe)}}break;case 3:if(Ar(o,i),Xr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{hu(o.containerInfo)}catch(Oe){Ot(i,i.return,Oe)}break;case 4:Ar(o,i),Xr(i);break;case 13:Ar(o,i),Xr(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(Jm=Dt())),h&4&&v2(i);break;case 22:if(ce=l!==null&&l.memoizedState!==null,i.mode&1?(vn=(ee=vn)||ce,Ar(o,i),vn=ee):Ar(o,i),Xr(i),h&8192){if(ee=i.memoizedState!==null,(i.stateNode.isHidden=ee)&&!ce&&(i.mode&1)!==0)for(Ne=i,ce=i.child;ce!==null;){for(pe=Ne=ce;Ne!==null;){switch(ue=Ne,we=ue.child,ue.tag){case 0:case 11:case 14:case 15:Du(4,ue,ue.return);break;case 1:Yo(ue,ue.return);var Pe=ue.stateNode;if(typeof Pe.componentWillUnmount=="function"){h=ue,l=ue.return;try{o=h,Pe.props=o.memoizedProps,Pe.state=o.memoizedState,Pe.componentWillUnmount()}catch(Oe){Ot(h,l,Oe)}}break;case 5:Yo(ue,ue.return);break;case 22:if(ue.memoizedState!==null){P2(pe);continue}}we!==null?(we.return=ue,Ne=we):P2(pe)}ce=ce.sibling}e:for(ce=null,pe=i;;){if(pe.tag===5){if(ce===null){ce=pe;try{E=pe.stateNode,ee?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(R=pe.stateNode,H=pe.memoizedProps.style,x=H!=null&&H.hasOwnProperty("display")?H.display:null,R.style.display=zt("display",x))}catch(Oe){Ot(i,i.return,Oe)}}}else if(pe.tag===6){if(ce===null)try{pe.stateNode.nodeValue=ee?"":pe.memoizedProps}catch(Oe){Ot(i,i.return,Oe)}}else if((pe.tag!==22&&pe.tag!==23||pe.memoizedState===null||pe===i)&&pe.child!==null){pe.child.return=pe,pe=pe.child;continue}if(pe===i)break e;for(;pe.sibling===null;){if(pe.return===null||pe.return===i)break e;ce===pe&&(ce=null),pe=pe.return}ce===pe&&(ce=null),pe.sibling.return=pe.return,pe=pe.sibling}}break;case 19:Ar(o,i),Xr(i),h&4&&v2(i);break;case 21:break;default:Ar(o,i),Xr(i)}}function Xr(i){var o=i.flags;if(o&2){try{e:{for(var l=i.return;l!==null;){if(x2(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&&(Re(E,""),h.flags&=-33);var b=w2(i);Xm(i,b,E);break;case 3:case 4:var x=h.stateNode.containerInfo,R=w2(i);Gm(i,R,x);break;default:throw Error(n(161))}}catch(H){Ot(i,i.return,H)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function Y7(i,o,l){Ne=i,k2(i)}function k2(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||od;if(!x){var R=E.alternate,H=R!==null&&R.memoizedState!==null||vn;R=od;var ee=vn;if(od=x,(vn=H)&&!ee)for(Ne=E;Ne!==null;)x=Ne,H=x.child,x.tag===22&&x.memoizedState!==null?O2(E):H!==null?(H.return=x,Ne=H):O2(E);for(;b!==null;)Ne=b,k2(b),b=b.sibling;Ne=E,od=R,vn=ee}N2(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,Ne=b):N2(i)}}function N2(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:vn||ad(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!vn)if(l===null)h.componentDidMount();else{var E=o.elementType===o.type?l.memoizedProps:xr(o.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=o.updateQueue;b!==null&&Px(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}Px(o,x,l)}break;case 5:var R=o.stateNode;if(l===null&&o.flags&4){l=R;var H=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&l.focus();break;case"img":H.src&&(l.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var ee=o.alternate;if(ee!==null){var ce=ee.memoizedState;if(ce!==null){var pe=ce.dehydrated;pe!==null&&hu(pe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}vn||o.flags&512&&Wm(o)}catch(ue){Ot(o,o.return,ue)}}if(o===i){Ne=null;break}if(l=o.sibling,l!==null){l.return=o.return,Ne=l;break}Ne=o.return}}function P2(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 O2(i){for(;Ne!==null;){var o=Ne;try{switch(o.tag){case 0:case 11:case 15:var l=o.return;try{ad(4,o)}catch(H){Ot(o,l,H)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(H){Ot(o,E,H)}}var b=o.return;try{Wm(o)}catch(H){Ot(o,b,H)}break;case 5:var x=o.return;try{Wm(o)}catch(H){Ot(o,x,H)}}}catch(H){Ot(o,o.return,H)}if(o===i){Ne=null;break}var R=o.sibling;if(R!==null){R.return=o.return,Ne=R;break}Ne=o.return}}var W7=Math.ceil,ud=U.ReactCurrentDispatcher,Km=U.ReactCurrentOwner,cr=U.ReactCurrentBatchConfig,it=0,on=null,$t=null,fn=0,Qn=0,Wo=Bi(0),Kt=0,Mu=null,Rs=0,ld=0,Qm=0,Fu=null,Hn=null,Jm=0,Go=1/0,Ei=null,cd=!1,Zm=null,Vi=null,dd=!1,qi=null,fd=0,Bu=0,e0=null,hd=-1,pd=0;function Pn(){return(it&6)!==0?Dt():hd!==-1?hd:hd=Dt()}function Yi(i){return(i.mode&1)===0?1:(it&2)!==0&&fn!==0?fn&-fn:P7.transition!==null?(pd===0&&(pd=wS()),pd):(i=ct,i!==0||(i=window.event,i=i===void 0?16:RS(i.type)),i)}function vr(i,o,l,h){if(50<Bu)throw Bu=0,e0=null,Error(n(185));uu(i,l,h),((it&2)===0||i!==on)&&(i===on&&((it&2)===0&&(ld|=l),Kt===4&&Wi(i,fn)),jn(i,h),l===1&&it===0&&(o.mode&1)===0&&(Go=Dt()+500,zc&&Hi()))}function jn(i,o){var l=i.callbackNode;PB(i,o);var h=xc(i,i===on?fn:0);if(h===0)l!==null&&_S(l),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(l!=null&&_S(l),o===1)i.tag===0?N7(R2.bind(null,i)):yx(R2.bind(null,i)),A7(function(){(it&6)===0&&Hi()}),l=null;else{switch(AS(h)){case 1:l=Rp;break;case 4:l=SS;break;case 16:l=bc;break;case 536870912:l=xS;break;default:l=bc}l=j2(l,I2.bind(null,i))}i.callbackPriority=o,i.callbackNode=l}}function I2(i,o){if(hd=-1,pd=0,(it&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Xo()&&i.callbackNode!==l)return null;var h=xc(i,i===on?fn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=md(i,h);else{o=h;var E=it;it|=2;var b=D2();(on!==i||fn!==o)&&(Ei=null,Go=Dt()+500,Ds(i,o));do try{K7();break}catch(R){L2(i,R)}while(!0);ym(),ud.current=b,it=E,$t!==null?o=0:(on=null,fn=0,o=Kt)}if(o!==0){if(o===2&&(E=Lp(i),E!==0&&(h=E,o=t0(i,E))),o===1)throw l=Mu,Ds(i,0),Wi(i,h),jn(i,Dt()),l;if(o===6)Wi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!G7(E)&&(o=md(i,h),o===2&&(b=Lp(i),b!==0&&(h=b,o=t0(i,b))),o===1))throw l=Mu,Ds(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:Ms(i,Hn,Ei);break;case 3:if(Wi(i,h),(h&130023424)===h&&(o=Jm+500-Dt(),10<o)){if(xc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){Pn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=am(Ms.bind(null,i,Hn,Ei),o);break}Ms(i,Hn,Ei);break;case 4:if(Wi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var x=31-Tr(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*W7(h/1960))-h,10<h){i.timeoutHandle=am(Ms.bind(null,i,Hn,Ei),h);break}Ms(i,Hn,Ei);break;case 5:Ms(i,Hn,Ei);break;default:throw Error(n(329))}}}return jn(i,Dt()),i.callbackNode===l?I2.bind(null,i):null}function t0(i,o){var l=Fu;return i.current.memoizedState.isDehydrated&&(Ds(i,o).flags|=256),i=md(i,o),i!==2&&(o=Hn,Hn=l,o!==null&&n0(o)),i}function n0(i){Hn===null?Hn=i:Hn.push.apply(Hn,i)}function G7(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(!_r(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&=~Qm,o&=~ld,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var l=31-Tr(o),h=1<<l;i[l]=-1,o&=~h}}function R2(i){if((it&6)!==0)throw Error(n(327));Xo();var o=xc(i,0);if((o&1)===0)return jn(i,Dt()),null;var l=md(i,o);if(i.tag!==0&&l===2){var h=Lp(i);h!==0&&(o=h,l=t0(i,h))}if(l===1)throw l=Mu,Ds(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,Ms(i,Hn,Ei),jn(i,Dt()),null}function r0(i,o){var l=it;it|=1;try{return i(o)}finally{it=l,it===0&&(Go=Dt()+500,zc&&Hi())}}function Ls(i){qi!==null&&qi.tag===0&&(it&6)===0&&Xo();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 i0(){Qn=Wo.current,xt(Wo)}function Ds(i,o){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,w7(l)),$t!==null)for(l=$t.return;l!==null;){var h=l;switch(hm(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Hc();break;case 3:Vo(),xt(Fn),xt(xn),vm();break;case 5:wm(h);break;case 4:Vo();break;case 13:xt(kt);break;case 19:xt(kt);break;case 10:bm(h.type._context);break;case 22:case 23:i0()}l=l.return}if(on=i,$t=i=Gi(i.current,null),fn=Qn=o,Kt=0,Mu=null,Qm=ld=Rs=0,Hn=Fu=null,Ps!==null){for(o=0;o<Ps.length;o++)if(l=Ps[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}Ps=null}return i}function L2(i,o){do{var l=$t;try{if(ym(),Jc.current=nd,Zc){for(var h=Nt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Zc=!1}if(Is=0,sn=Xt=Nt=null,Pu=!1,Ou=0,Km.current=null,l===null||l.return===null){Kt=1,Mu=o,$t=null;break}e:{var b=i,x=l.return,R=l,H=o;if(o=fn,R.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var ee=H,ce=R,pe=ce.tag;if((ce.mode&1)===0&&(pe===0||pe===11||pe===15)){var ue=ce.alternate;ue?(ce.updateQueue=ue.updateQueue,ce.memoizedState=ue.memoizedState,ce.lanes=ue.lanes):(ce.updateQueue=null,ce.memoizedState=null)}var we=s2(x);if(we!==null){we.flags&=-257,o2(we,x,R,b,o),we.mode&1&&i2(b,ee,o),o=we,H=ee;var Pe=o.updateQueue;if(Pe===null){var Oe=new Set;Oe.add(H),o.updateQueue=Oe}else Pe.add(H);break e}else{if((o&1)===0){i2(b,ee,o),s0();break e}H=Error(n(426))}}else if(vt&&R.mode&1){var Mt=s2(x);if(Mt!==null){(Mt.flags&65536)===0&&(Mt.flags|=256),o2(Mt,x,R,b,o),gm(qo(H,R));break e}}b=H=qo(H,R),Kt!==4&&(Kt=2),Fu===null?Fu=[b]:Fu.push(b),b=x;do{switch(b.tag){case 3:b.flags|=65536,o&=-o,b.lanes|=o;var G=n2(b,H,o);Nx(b,G);break e;case 1:R=H;var $=b.type,K=b.stateNode;if((b.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&(Vi===null||!Vi.has(K)))){b.flags|=65536,o&=-o,b.lanes|=o;var ye=r2(b,R,o);Nx(b,ye);break e}}b=b.return}while(b!==null)}F2(l)}catch(Me){o=Me,$t===l&&l!==null&&($t=l=l.return);continue}break}while(!0)}function D2(){var i=ud.current;return ud.current=nd,i===null?nd:i}function s0(){(Kt===0||Kt===3||Kt===2)&&(Kt=4),on===null||(Rs&268435455)===0&&(ld&268435455)===0||Wi(on,fn)}function md(i,o){var l=it;it|=2;var h=D2();(on!==i||fn!==o)&&(Ei=null,Ds(i,o));do try{X7();break}catch(E){L2(i,E)}while(!0);if(ym(),it=l,ud.current=h,$t!==null)throw Error(n(261));return on=null,fn=0,Kt}function X7(){for(;$t!==null;)M2($t)}function K7(){for(;$t!==null&&!_B();)M2($t)}function M2(i){var o=H2(i.alternate,i,Qn);i.memoizedProps=i.pendingProps,o===null?F2(i):$t=o,Km.current=null}function F2(i){var o=i;do{var l=o.alternate;if(i=o.return,(o.flags&32768)===0){if(l=z7(l,o,Qn),l!==null){$t=l;return}}else{if(l=$7(l,o),l!==null){l.flags&=32767,$t=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Kt=6,$t=null;return}}if(o=o.sibling,o!==null){$t=o;return}$t=o=i}while(o!==null);Kt===0&&(Kt=5)}function Ms(i,o,l){var h=ct,E=cr.transition;try{cr.transition=null,ct=1,Q7(i,o,l,h)}finally{cr.transition=E,ct=h}return null}function Q7(i,o,l,h){do Xo();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(OB(i,b),i===on&&($t=on=null,fn=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||dd||(dd=!0,j2(bc,function(){return Xo(),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,Km.current=null,q7(i,l),C2(l,i),E7(sm),vc=!!im,sm=im=null,i.current=l,Y7(l),SB(),it=R,ct=x,cr.transition=b}else i.current=l;if(dd&&(dd=!1,qi=i,fd=E),b=i.pendingLanes,b===0&&(Vi=null),AB(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(cd)throw cd=!1,i=Zm,Zm=null,i;return(fd&1)!==0&&i.tag!==0&&Xo(),b=i.pendingLanes,(b&1)!==0?i===e0?Bu++:(Bu=0,e0=i):Bu=0,Hi(),null}function Xo(){if(qi!==null){var i=AS(fd),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,fd=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 H=0;H<R.length;H++){var ee=R[H];for(Ne=ee;Ne!==null;){var ce=Ne;switch(ce.tag){case 0:case 11:case 15:Du(8,ce,b)}var pe=ce.child;if(pe!==null)pe.return=ce,Ne=pe;else for(;Ne!==null;){ce=Ne;var ue=ce.sibling,we=ce.return;if(S2(ce),ce===ee){Ne=null;break}if(ue!==null){ue.return=we,Ne=ue;break}Ne=we}}}var Pe=b.alternate;if(Pe!==null){var Oe=Pe.child;if(Oe!==null){Pe.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:Du(9,b,b.return)}var G=b.sibling;if(G!==null){G.return=b.return,Ne=G;break e}Ne=b.return}}var $=i.current;for(Ne=$;Ne!==null;){x=Ne;var K=x.child;if((x.subtreeFlags&2064)!==0&&K!==null)K.return=x,Ne=K;else e:for(x=$;Ne!==null;){if(R=Ne,(R.flags&2048)!==0)try{switch(R.tag){case 0:case 11:case 15:ad(9,R)}}catch(Me){Ot(R,R.return,Me)}if(R===x){Ne=null;break e}var ye=R.sibling;if(ye!==null){ye.return=R.return,Ne=ye;break e}Ne=R.return}}if(it=E,Hi(),qr&&typeof qr.onPostCommitFiberRoot=="function")try{qr.onPostCommitFiberRoot(Tc,i)}catch(Me){}h=!0}return h}finally{ct=l,cr.transition=o}}return!1}function B2(i,o,l){o=qo(l,o),o=n2(i,o,1),i=zi(i,o,1),o=Pn(),i!==null&&(uu(i,1,o),jn(i,o))}function Ot(i,o,l){if(i.tag===3)B2(i,i,l);else for(;o!==null;){if(o.tag===3){B2(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=qo(l,i),i=r2(o,i,1),o=zi(o,i,1),i=Pn(),o!==null&&(uu(o,1,i),jn(o,i));break}}o=o.return}}function J7(i,o,l){var h=i.pingCache;h!==null&&h.delete(o),o=Pn(),i.pingedLanes|=i.suspendedLanes&l,on===i&&(fn&l)===l&&(Kt===4||Kt===3&&(fn&130023424)===fn&&500>Dt()-Jm?Ds(i,0):Qm|=l),jn(i,o)}function U2(i,o){o===0&&((i.mode&1)===0?o=1:(o=Sc,Sc<<=1,(Sc&130023424)===0&&(Sc=4194304)));var l=Pn();i=pi(i,o),i!==null&&(uu(i,o,l),jn(i,l))}function Z7(i){var o=i.memoizedState,l=0;o!==null&&(l=o.retryLane),U2(i,l)}function eU(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),U2(i,l)}var H2;H2=function(i,o,l){if(i!==null)if(i.memoizedProps!==o.pendingProps||Fn.current)Un=!0;else{if((i.lanes&l)===0&&(o.flags&128)===0)return Un=!1,j7(i,o,l);Un=(i.flags&131072)!==0}else Un=!1,vt&&(o.flags&1048576)!==0&&bx(o,Vc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;sd(i,o),i=o.pendingProps;var E=Fo(o,xn.current);$o(o,l),E=Nm(null,o,h,i,E,l);var b=Pm();return o.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Bn(h)?(b=!0,jc(o)):b=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Sm(o),E.updater=rd,o.stateNode=E,E._reactInternals=o,Mm(o,h,i,l),o=Hm(null,o,h,!0,b,l)):(o.tag=0,vt&&b&&fm(o),Nn(null,o,E,l),o=o.child),o;case 16:h=o.elementType;e:{switch(sd(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=nU(h),i=xr(h,i),E){case 0:o=Um(null,o,h,i,l);break e;case 1:o=f2(null,o,h,i,l);break e;case 11:o=a2(null,o,h,i,l);break e;case 14:o=u2(null,o,h,xr(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:xr(h,E),Um(i,o,h,E,l);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:xr(h,E),f2(i,o,h,E,l);case 3:e:{if(h2(o),i===null)throw Error(n(387));h=o.pendingProps,b=o.memoizedState,E=b.element,kx(i,o),Kc(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=qo(Error(n(423)),o),o=p2(i,o,h,l,E);break e}else if(h!==E){E=qo(Error(n(424)),o),o=p2(i,o,h,l,E);break e}else for(Kn=Fi(o.stateNode.containerInfo.firstChild),Xn=o,vt=!0,Sr=null,l=vx(o,null,h,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Ho(),h===E){o=gi(i,o,l);break e}Nn(i,o,h,l)}o=o.child}return o;case 5:return Ox(o),i===null&&mm(o),h=o.type,E=o.pendingProps,b=i!==null?i.memoizedProps:null,x=E.children,om(h,E)?x=null:b!==null&&om(h,b)&&(o.flags|=32),d2(i,o),Nn(i,o,x,l),o.child;case 6:return i===null&&mm(o),null;case 13:return m2(i,o,l);case 4:return xm(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=jo(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:xr(h,E),a2(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,bt(Wc,h._currentValue),h._currentValue=x,b!==null)if(_r(b.value,x)){if(b.children===E.children&&!Fn.current){o=gi(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 H=R.firstContext;H!==null;){if(H.context===h){if(b.tag===1){H=mi(-1,l&-l),H.tag=2;var ee=b.updateQueue;if(ee!==null){ee=ee.shared;var ce=ee.pending;ce===null?H.next=H:(H.next=ce.next,ce.next=H),ee.pending=H}}b.lanes|=l,H=b.alternate,H!==null&&(H.lanes|=l),Tm(b.return,l,o),R.lanes|=l;break}H=H.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),Tm(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,$o(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=xr(h,o.pendingProps),E=xr(h.type,E),u2(i,o,h,E,l);case 15:return l2(i,o,o.type,o.pendingProps,l);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:xr(h,E),sd(i,o),o.tag=1,Bn(h)?(i=!0,jc(o)):i=!1,$o(o,l),e2(o,h,E),Mm(o,h,E,l),Hm(null,o,h,!0,i,l);case 19:return E2(i,o,l);case 22:return c2(i,o,l)}throw Error(n(156,o.tag))};function j2(i,o){return TS(i,o)}function tU(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 tU(i,o,l,h)}function o0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function nU(i){if(typeof i=="function")return o0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===he)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 gd(i,o,l,h,E,b){var x=2;if(h=i,typeof i=="function")o0(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case V:return Fs(l.children,E,b,o);case ne:x=8,E|=8;break;case fe:return i=dr(12,l,o,E|2),i.elementType=fe,i.lanes=b,i;case Ce:return i=dr(13,l,o,E),i.elementType=Ce,i.lanes=b,i;case re:return i=dr(19,l,o,E),i.elementType=re,i.lanes=b,i;case se:return Ed(l,E,b,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case Y:x=10;break e;case oe:x=9;break e;case he:x=11;break e;case ae:x=14;break e;case Ae: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 Fs(i,o,l,h){return i=dr(7,i,h,o),i.lanes=l,i}function Ed(i,o,l,h){return i=dr(22,i,h,o),i.elementType=se,i.lanes=l,i.stateNode={isHidden:!1},i}function a0(i,o,l){return i=dr(6,i,null,o),i.lanes=l,i}function u0(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 rU(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=Dp(0),this.expirationTimes=Dp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function l0(i,o,l,h,E,b,x,R,H){return i=new rU(i,o,l,R,H),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},Sm(b),i}function iU(i,o,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:h==null?null:""+h,children:i,containerInfo:o,implementation:l}}function z2(i){if(!i)return Ui;i=i._reactInternals;e:{if(As(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(Bn(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(Bn(l))return gx(i,l,o)}return o}function $2(i,o,l,h,E,b,x,R,H){return i=l0(l,h,!0,i,E,b,x,R,H),i.context=z2(null),l=i.current,h=Pn(),E=Yi(l),b=mi(h,E),b.callback=o!=null?o:null,zi(l,b,E),i.current.lanes=E,uu(i,E,h),jn(i,h),i}function yd(i,o,l,h){var E=o.current,b=Pn(),x=Yi(E);return l=z2(l),o.context===null?o.context=l:o.pendingContext=l,o=mi(b,x),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=zi(E,o,x),i!==null&&(vr(i,E,x,b),Xc(i,E,x)),x}function bd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function V2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<o?l:o}}function c0(i,o){V2(i,o),(i=i.alternate)&&V2(i,o)}function sU(){return null}var q2=typeof reportError=="function"?reportError:function(i){console.error(i)};function d0(i){this._internalRoot=i}Td.prototype.render=d0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));yd(i,o,null,null)},Td.prototype.unmount=d0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Ls(function(){yd(null,i,null,null)}),o[ci]=null}};function Td(i){this._internalRoot=i}Td.prototype.unstable_scheduleHydration=function(i){if(i){var o=kS();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&&OS(i)}};function f0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function _d(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Y2(){}function oU(i,o,l,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var ee=bd(x);b.call(ee)}}var x=$2(o,h,i,0,null,!1,!1,"",Y2);return i._reactRootContainer=x,i[ci]=x.current,Su(i.nodeType===8?i.parentNode:i),Ls(),x}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var R=h;h=function(){var ee=bd(H);R.call(ee)}}var H=l0(i,0,!1,null,null,!1,!1,"",Y2);return i._reactRootContainer=H,i[ci]=H.current,Su(i.nodeType===8?i.parentNode:i),Ls(function(){yd(o,H,l,h)}),H}function Sd(i,o,l,h,E){var b=l._reactRootContainer;if(b){var x=b;if(typeof E=="function"){var R=E;E=function(){var H=bd(x);R.call(H)}}yd(o,x,i,E)}else x=oU(l,o,i,E,h);return bd(x)}vS=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var l=au(o.pendingLanes);l!==0&&(Mp(o,l|1),jn(o,Dt()),(it&6)===0&&(Go=Dt()+500,Hi()))}break;case 13:Ls(function(){var h=pi(i,1);if(h!==null){var E=Pn();vr(h,i,1,E)}}),c0(i,1)}},Fp=function(i){if(i.tag===13){var o=pi(i,134217728);if(o!==null){var l=Pn();vr(o,i,134217728,l)}c0(i,134217728)}},CS=function(i){if(i.tag===13){var o=Yi(i),l=pi(i,o);if(l!==null){var h=Pn();vr(l,i,o,h)}c0(i,o)}},kS=function(){return ct},NS=function(i,o){var l=ct;try{return ct=i,o()}finally{ct=l}},Np=function(i,o,l){switch(o){case"input":if(Wt(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=Uc(h);if(!E)throw Error(n(90));Lt(h),Wt(h,E)}}}break;case"textarea":Xe(i,l);break;case"select":o=l.value,o!=null&&_e(i,!!l.multiple,o,!1)}},hS=r0,pS=Ls;var aU={usingClientEntryPoint:!1,Events:[Au,Do,Uc,dS,fS,r0]},Uu={findFiberByHostInstance:vs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},uU={bundleType:Uu.bundleType,version:Uu.version,rendererPackageName:Uu.rendererPackageName,rendererConfig:Uu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=yS(i),i===null?null:i.stateNode},findFiberByHostInstance:Uu.findFiberByHostInstance||sU,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 xd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xd.isDisabled&&xd.supportsFiber)try{Tc=xd.inject(uU),qr=xd}catch(i){}}return In.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=aU,In.createPortal=function(i,o){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f0(o))throw Error(n(200));return iU(i,o,null,l)},In.createRoot=function(i,o){if(!f0(i))throw Error(n(299));var l=!1,h="",E=q2;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=l0(i,1,!1,null,null,l,!1,h,E),i[ci]=o.current,Su(i.nodeType===8?i.parentNode:i),new d0(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=yS(o),i=i===null?null:i.stateNode,i},In.flushSync=function(i){return Ls(i)},In.hydrate=function(i,o,l){if(!_d(o))throw Error(n(200));return Sd(null,i,o,!0,l)},In.hydrateRoot=function(i,o,l){if(!f0(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,b="",x=q2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(b=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),o=$2(o,null,i,1,l!=null?l:null,E,!1,b,x),i[ci]=o.current,Su(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 Td(o)},In.render=function(i,o,l){if(!_d(o))throw Error(n(200));return Sd(null,i,o,!1,l)},In.unmountComponentAtNode=function(i){if(!_d(i))throw Error(n(40));return i._reactRootContainer?(Ls(function(){Sd(null,null,i,!1,function(){i._reactRootContainer=null,i[ci]=null})}),!0):!1},In.unstable_batchedUpdates=r0,In.unstable_renderSubtreeIntoContainer=function(i,o,l,h){if(!_d(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Sd(i,o,l,!1,h)},In.version="18.3.1-next-f1338f8080-20240426",In}var F1;function B1(){if(F1)return kf.exports;F1=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(),kf.exports=Qk(),kf.exports}var Xs=B1();function U1(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=U1(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=U1(e))&&(r&&(r+=" "),r+=t);return r}const Jk=()=>document.querySelector(`input[name="${j}-user-input"]:not(:disabled)`),Of=()=>{var e;return(e=Jk())!=null?e:document.querySelector(`.${j}-dialog-content, .${j}-modal-content`)},Zk=()=>{var e;return(e=Of())==null?void 0:e.focus({preventScroll:!0})},If=()=>{const e=()=>{const n=document.querySelector(`.${j}-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 H1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},j1=Qi.createContext&&Qi.createContext(H1),eN=["attr","size","title"];function tN(e,t){if(e==null)return{};var n=nN(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 nN(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 ml(){return ml=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},ml.apply(this,arguments)}function z1(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 gl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z1(Object(n),!0).forEach(function(r){rN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rN(e,t,n){return t=iN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iN(e){var t=sN(e,"string");return typeof t=="symbol"?t:t+""}function sN(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 $1(e){return e&&e.map((t,n)=>Qi.createElement(t.tag,gl({key:n},t.attr),$1(t.child)))}function _t(e){return t=>Qi.createElement(oN,ml({attr:gl({},e.attr)},t),$1(e.child))}function oN(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=tN(e,eN),c=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Qi.createElement("svg",ml({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:gl(gl({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 j1!==void 0?Qi.createElement(j1.Consumer,null,n=>t(n)):t(H1)}function aN(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 ri=({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,`${j}-icon-button`),type:r,"aria-label":s,title:a,onClick:c,disabled:u,children:t?S.jsx("img",{className:W(`${j}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),uN="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",lN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,launcherAriaLabel:r,mode:s}=nt(),a=s==="messaging",c=r||(a?"Open Commerce Client":"Open Copilot"),d=a?S.jsx(aN,{className:W(t,`${j}-minimized-icon`)}):S.jsx("img",{src:(n==null?void 0:n.logoUrl)||uN,alt:"Copilot",className:W(t,`${j}-minimized-icon-img`)});return S.jsx(ri,{className:W(t,`${j}-minimized-button`),ariaLabel:c,title:c,icon:d,onClick:e})},cN=()=>{const{globalClassName:e,themeVariables:t}=nt(),n=()=>{Ea(!1),ti(!0),setTimeout(Zk)};return Xs.createPortal(S.jsx("div",{className:W(e,`${j}-minimized-container`),style:t,children:S.jsx(lN,{onClick:n})}),document.body)},dN=e=>({[`${zn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${zn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${zn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${zn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${zn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${zn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"}),V1=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>S.jsx("button",{"aria-label":t,title:t,className:W(e,`${j}-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"})})}),fN=({file:e,componentType:t,globalClassName:n,onRemove:r})=>{const s=e.name||"",[a,u]=F.useState("");return F.useEffect(()=>{const c=URL.createObjectURL(e);return u(c),()=>URL.revokeObjectURL(c)},[e]),S.jsxs("div",{className:W(n,`cim-${t}-component`,`${j}-image-file-preview`),children:[S.jsx("img",{className:W(n,`cim-${t}-component`,`${j}-image-preview`),src:a,alt:`${s} preview`,loading:"lazy"}),S.jsx("span",{className:W(n,`cim-${t}-component`,`${j}-image-file-name`),title:s,children:s}),S.jsx(V1,{className:W(`cim-${t}-component`,"clear-attachment"),label:"Remove image",onClick:r})]})};function q1(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 Y1(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 Ks(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 W1(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 pN(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 mN(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 gN(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 EN(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 yN(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 bN(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 TN=({componentType:e,accept:t,disabled:n=!1,inputId:r,globalClassName:s,className:a,icon:u=S.jsx(bN,{}),onFiles:c})=>{const d=F.useRef(null),f=F.useId(),p=r!=null?r:f,m=F.useCallback(()=>{var y;return(y=d.current)==null?void 0:y.click()},[]),T=F.useCallback(y=>{const _=y.target;c(_.files),_.value=""},[c]);return S.jsxs("button",{type:"button",className:W(s,a,`cim-${e}-component`,n&&"disabled",`${j}-image-upload-button`),disabled:n,"aria-label":"Upload an image",onClick:m,children:[S.jsx("span",{className:W(s,a,`cim-${e}-component`,n&&"disabled",`${j}-image-upload-label`),"aria-hidden":"true",children:u}),S.jsx("input",{ref:d,className:W(s,a,`cim-${e}-component`,`${j}-file-input`),type:"file",id:p,accept:t,name:`${j}-file-input`,disabled:n,onInput:T})]})},El=({className:e,children:t,type:n,disabled:r=!1,onClick:s,"aria-label":a})=>S.jsx("button",{"aria-label":a,className:W(`${j}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),_N=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?S.jsx("img",{className:W(`${j}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):S.jsx(Ks,{size:"16px"})},SN=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return S.jsx(ri,{className:W(e,n,`cim-${r}-component`,`${j}-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(Ks,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return S.jsxs(El,{className:W(e,n,`cim-${r}-component`,`${j}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&S.jsx(_N,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function xN(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 wN=()=>{const{messages:e}=$n(),{handleCancel:t}=Or();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])}},AN=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=nt(),{cancelRequest:r}=wN();return n!=null&&n.enableCancelSearch?S.jsx(ri,{className:W(t,`${j}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:S.jsx(xN,{}),disabled:!e,onClick:r}):null};function $U(){}function VU(){}function G1(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 X1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const vN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,CN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kN={};function K1(e,t){return(kN.jsx?CN:vN).test(e)}const NN=/[ \t\n\f\r]/g;function PN(e){return typeof e=="object"?e.type==="text"?Q1(e.value):!1:Q1(e)}function Q1(e){return e.replace(NN,"")===""}class _a{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}_a.prototype.normal={},_a.prototype.property={},_a.prototype.space=void 0;function J1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new _a(n,r,t)}function Sa(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 ON=0;const Ge=as(),Ht=as(),Rf=as(),Ee=as(),ft=as(),os=as(),Vn=as();function as(){return Hu(2,++ON)}const Lf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:Ht,commaOrSpaceSeparated:Vn,commaSeparated:os,number:Ee,overloadedBoolean:Rf,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),Df=Object.keys(Lf);class Mf extends Rn{constructor(t,n,r,s){let a=-1;if(super(t,n),Z1(this,"space",s),typeof r=="number")for(;++a<Df.length;){const u=Df[a];Z1(this,Df[a],(r&Lf[u])===Lf[u])}}}Mf.prototype.defined=!0;function Z1(e,t,n){n&&(e[t]=n)}function Qs(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new Mf(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Sa(r)]=r,n[Sa(a.attribute)]=r}return new _a(t,n,e.space)}const eE=Qs({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 tE(e,t){return t in e?e[t]:t}function nE(e,t){return tE(e,t.toLowerCase())}const IN=Qs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:os,acceptCharset:ft,accessKey:ft,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alpha:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:ft,autoFocus:Ge,autoPlay:Ge,blocking:ft,capture:null,charSet:null,checked:Ge,cite:null,className:ft,closedBy:null,colorSpace:null,cols:Ee,colSpan:Ee,command:null,commandFor:null,content:null,contentEditable:Ht,controls:Ge,controlsList:ft,coords:Ee|os,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Rf,draggable:Ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:ft,height:Ee,hidden:Rf,high:Ee,href:null,hrefLang:null,htmlFor:ft,httpEquiv:ft,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:ft,itemRef:ft,itemScope:Ge,itemType:ft,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:ft,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:ft,required:Ge,reversed:Ge,rows:Ee,rowSpan:Ee,sandbox:ft,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: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:Ge,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: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: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:Ge,disablePictureInPicture:Ge,disableRemotePlayback:Ge,exportParts:os,part:ft,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:nE}),RN=Qs({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:Vn,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: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:os,g2:os,glyphName:os,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:Vn,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:Vn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Vn,rev:Vn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Vn,requiredFeatures:Vn,requiredFonts:Vn,requiredFormats:Vn,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:Vn,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:Vn,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:Vn,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:tE}),rE=Qs({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()}}),iE=Qs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:nE}),sE=Qs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),LN={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"},DN=/[A-Z]/g,oE=/-[a-z]/g,MN=/^data[-\w.:]+$/i;function yl(e,t){const n=Sa(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"&&MN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(oE,BN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!oE.test(a)){let u=a.replace(DN,FN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=Mf}return new s(r,t)}function FN(e){return"-"+e.toLowerCase()}function BN(e){return e.charAt(1).toUpperCase()}const xa=J1([eE,IN,rE,iE,sE],"html"),_i=J1([eE,RN,rE,iE,sE],"svg");function aE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function uE(e){return e.join(" ").trim()}var Js={},Ff,lE;function UN(){if(lE)return Ff;lE=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 _(P,w){if(typeof P!="string")throw new TypeError("First argument must be a string");if(!P)return[];w=w||{};var C=1,v=1;function U(re){var ae=re.match(t);ae&&(C+=ae.length);var Ae=re.lastIndexOf(d);v=~Ae?re.length-Ae:v+re.length}function q(){var re={line:C,column:v};return function(ae){return ae.position=new L(re),fe(),ae}}function L(re){this.start=re,this.end={line:C,column:v},this.source=w.source}L.prototype.content=P;function V(re){var ae=new Error(w.source+":"+C+":"+v+": "+re);if(ae.reason=re,ae.filename=w.source,ae.line=C,ae.column=v,ae.source=P,!w.silent)throw ae}function ne(re){var ae=re.exec(P);if(ae){var Ae=ae[0];return U(Ae),P=P.slice(Ae.length),ae}}function fe(){ne(n)}function Y(re){var ae;for(re=re||[];ae=oe();)ae!==!1&&re.push(ae);return re}function oe(){var re=q();if(!(f!=P.charAt(0)||p!=P.charAt(1))){for(var ae=2;m!=P.charAt(ae)&&(p!=P.charAt(ae)||f!=P.charAt(ae+1));)++ae;if(ae+=2,m===P.charAt(ae-1))return V("End of comment missing");var Ae=P.slice(2,ae-2);return v+=2,U(Ae),P=P.slice(ae),v+=2,re({type:T,comment:Ae})}}function he(){var re=q(),ae=ne(r);if(ae){if(oe(),!ne(s))return V("property missing ':'");var Ae=ne(a),se=re({type:y,property:A(ae[0].replace(e,m)),value:Ae?A(Ae[0].replace(e,m)):m});return ne(u),se}}function Ce(){var re=[];Y(re);for(var ae;ae=he();)ae!==!1&&(re.push(ae),Y(re));return re}return fe(),Ce()}function A(P){return P?P.replace(c,m):m}return Ff=_,Ff}var cE;function HN(){if(cE)return Js;cE=1;var e=Js&&Js.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Js,"__esModule",{value:!0}),Js.default=n;const t=e(UN());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 Js}var wa={},dE;function jN(){if(dE)return wa;dE=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.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 wa.camelCase=d,wa}var Aa,fE;function zN(){if(fE)return Aa;fE=1;var e=Aa&&Aa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(HN()),n=jN();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,Aa=r,Aa}var $N=zN();const VN=ze($N),bl=hE("end"),Ir=hE("start");function hE(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 pE(e){const t=Ir(e),n=bl(e);if(t&&n)return{start:t,end:n}}function va(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?mE(e.position):"start"in e||"end"in e?mE(e):"line"in e||"column"in e?Bf(e):""}function Bf(e){return gE(e&&e.line)+":"+gE(e&&e.column)}function mE(e){return Bf(e&&e.start)+"-"+Bf(e&&e.end)}function gE(e){return e&&typeof e=="number"?e:1}class bn 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=va(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}}bn.prototype.file="",bn.prototype.name="",bn.prototype.reason="",bn.prototype.message="",bn.prototype.stack="",bn.prototype.column=void 0,bn.prototype.line=void 0,bn.prototype.ancestors=void 0,bn.prototype.cause=void 0,bn.prototype.fatal=void 0,bn.prototype.place=void 0,bn.prototype.ruleId=void 0,bn.prototype.source=void 0;const Uf={}.hasOwnProperty,qN=new Map,YN=/[A-Z]/g,WN=new Set(["table","tbody","thead","tfoot","tr"]),GN=new Set(["td","th"]),EE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function XN(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=rP(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=nP(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:xa,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=yE(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function yE(e,t,n){if(t.type==="element")return KN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return QN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ZN(e,t,n);if(t.type==="mdxjsEsm")return JN(e,t);if(t.type==="root")return eP(e,t,n);if(t.type==="text")return tP(e,t)}function KN(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=TE(e,t.tagName,!1),u=iP(e,t);let c=jf(e,t);return WN.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!PN(d):!0})),bE(e,u,a,t),Hf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function QN(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)}Ca(e,t.position)}function JN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ca(e,t.position)}function ZN(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:TE(e,t.name,!0),u=sP(e,t),c=jf(e,t);return bE(e,u,a,t),Hf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function eP(e,t,n){const r={};return Hf(r,jf(e,t)),e.create(t,e.Fragment,r,n)}function tP(e,t){return t.value}function bE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Hf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function nP(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 rP(e,t){return n;function n(r,s,a,u){const c=Array.isArray(a.children),d=Ir(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 iP(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Uf.call(t.properties,s)){const a=oP(e,s,t.properties[s]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&GN.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 sP(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 Ca(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 Ca(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function jf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:qN;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=yE(e,a,u);c!==void 0&&n.push(c)}return n}function oP(e,t,n){const r=yl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?X1(n):uE(n)),r.property==="style"){let s=typeof n=="object"?n:aP(e,String(n));return e.stylePropertyNameCase==="css"&&(s=uP(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?LN[r.property]||r.property:r.attribute,n]}}function aP(e,t){try{return VN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new bn("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=EE+"#cannot-parse-style-attribute",s}}function TE(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=K1(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=K1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Uf.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ca(e)}function Ca(e,t){const n=new bn("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=EE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function uP(e){const t={};let n;for(n in e)Uf.call(e,n)&&(t[lP(n)]=e[n]);return t}function lP(e){let t=e.replace(YN,cP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function cP(e){return"-"+e.toLowerCase()}const zf={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"]},dP={};function $f(e,t){const n=dP,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return _E(e,r,s)}function _E(e,t,n){if(fP(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 SE(e.children,t,n)}return Array.isArray(e)?SE(e,t,n):""}function SE(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=_E(e[s],t,n);return r.join("")}function fP(e){return!!(e&&typeof e=="object")}const xE=document.createElement("i");function Vf(e){const t="&"+e+";";xE.innerHTML=t;const n=xE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function qn(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?(qn(e,e.length,0,t),e):t}const wE={}.hasOwnProperty;function AE(e){const t={};let n=-1;for(;++n<e.length;)hP(t,e[n]);return t}function hP(e,t){let n;for(n in t){const s=(wE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){wE.call(s,u)||(s[u]=[]);const c=a[u];pP(s[u],Array.isArray(c)?c:c?[c]:[])}}}function pP(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);qn(e,0,0,r)}function vE(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 pr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kn=Si(/[A-Za-z]/),Tn=Si(/[\dA-Za-z]/),mP=Si(/[#-'*+\--9=?A-Z^-~]/);function Tl(e){return e!==null&&(e<32||e===127)}const qf=Si(/\d/),gP=Si(/[\dA-Fa-f]/),EP=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 _l=Si(new RegExp("\\p{P}|\\p{S}","u")),us=Si(/\s/);function Si(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Zs(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&Tn(e.charCodeAt(n+1))&&Tn(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const 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 rt(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 yP={tokenize:bP};function bP(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"),rt(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 TP={tokenize:_P},CE={tokenize:SP};function _P(e){const t=this,n=[];let r=0,s,a,u;return c;function c(v){if(r<n.length){const U=n[r];return t.containerState=U[1],e.attempt(U[0].continuation,d,f)(v)}return f(v)}function d(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&C();const U=t.events.length;let q=U,L;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){L=t.events[q][1].end;break}w(r);let V=U;for(;V<t.events.length;)t.events[V][1].end=B({},L),V++;return qn(t.events,q+1,0,t.events.slice(U)),t.events.length=V,f(v)}return c(v)}function f(v){if(r===n.length){if(!s)return T(v);if(s.currentConstruct&&s.currentConstruct.concrete)return _(v);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(CE,p,m)(v)}function p(v){return s&&C(),w(r),T(v)}function m(v){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(v)}function T(v){return t.containerState={},e.attempt(CE,y,_)(v)}function y(v){return r++,n.push([t.currentConstruct,t.containerState]),T(v)}function _(v){if(v===null){s&&C(),w(0),e.consume(v);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),A(v)}function A(v){if(v===null){P(e.exit("chunkFlow"),!0),w(0),e.consume(v);return}return Ue(v)?(e.consume(v),P(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(v),A)}function P(v,U){const q=t.sliceStream(v);if(U&&q.push(null),v.previous=a,a&&(a.next=v),a=v,s.defineSkip(v.start),s.write(q),t.parser.lazy[v.start.line]){let L=s.events.length;for(;L--;)if(s.events[L][1].start.offset<u&&(!s.events[L][1].end||s.events[L][1].end.offset>u))return;const V=t.events.length;let ne=V,fe,Y;for(;ne--;)if(t.events[ne][0]==="exit"&&t.events[ne][1].type==="chunkFlow"){if(fe){Y=t.events[ne][1].end;break}fe=!0}for(w(r),L=V;L<t.events.length;)t.events[L][1].end=B({},Y),L++;qn(t.events,ne+1,0,t.events.slice(V)),t.events.length=L}}function w(v){let U=n.length;for(;U-- >v;){const q=n[U];t.containerState=q[1],q[0].exit.call(t,e)}n.length=v}function C(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function SP(e,t,n){return rt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function eo(e){if(e===null||ht(e)||us(e))return 1;if(_l(e))return 2}function Sl(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 Yf={name:"attention",resolveAll:xP,tokenize:wP};function xP(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);kE(m,-d),kE(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,Sl(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,qn(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 wP(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=eo(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=eo(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 kE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const AP={name:"autolink",tokenize:vP};function vP(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 kn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||Tn(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||Tn(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||Tl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):mP(y)?(e.consume(y),f):n(y)}function p(y){return Tn(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):T(y)}function T(y){if((y===45||Tn(y))&&r++<63){const _=y===45?T:m;return e.consume(y),_}return n(y)}}const ka={partial:!0,tokenize:CP};function CP(e,t,n){return r;function r(a){return Ze(a)?rt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Ue(a)?t(a):n(a)}}const NE={continuation:{tokenize:NP},exit:PP,name:"blockQuote",tokenize:kP};function kP(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)?rt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(NE,t,n)(u)}}function PP(e){e.exit("blockQuote")}const PE={name:"characterEscape",tokenize:OP};function OP(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 EP(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const OE={name:"characterReference",tokenize:IP};function IP(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=Tn,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=gP,p):(e.enter("characterReferenceValue"),a=7,u=qf,p(m))}function p(m){if(m===59&&s){const T=e.exit("characterReferenceValue");return u===Tn&&!Vf(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 IE={partial:!0,tokenize:LP},RE={concrete:!0,name:"codeFenced",tokenize:RP};function RP(e,t,n){const r=this,s={partial:!0,tokenize:q};let a=0,u=0,c;return d;function d(L){return f(L)}function f(L){const V=r.events[r.events.length-1];return a=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,c=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(L)}function p(L){return L===c?(u++,e.consume(L),p):u<3?n(L):(e.exit("codeFencedFenceSequence"),Ze(L)?rt(e,m,"whitespace")(L):m(L))}function m(L){return L===null||Ue(L)?(e.exit("codeFencedFence"),r.interrupt?t(L):e.check(IE,A,U)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(L))}function T(L){return L===null||Ue(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(L)):Ze(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),rt(e,y,"whitespace")(L)):L===96&&L===c?n(L):(e.consume(L),T)}function y(L){return L===null||Ue(L)?m(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(L))}function _(L){return L===null||Ue(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(L)):L===96&&L===c?n(L):(e.consume(L),_)}function A(L){return e.attempt(s,U,P)(L)}function P(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),w}function w(L){return a>0&&Ze(L)?rt(e,C,"linePrefix",a+1)(L):C(L)}function C(L){return L===null||Ue(L)?e.check(IE,A,U)(L):(e.enter("codeFlowValue"),v(L))}function v(L){return L===null||Ue(L)?(e.exit("codeFlowValue"),C(L)):(e.consume(L),v)}function U(L){return e.exit("codeFenced"),t(L)}function q(L,V,ne){let fe=0;return Y;function Y(ae){return L.enter("lineEnding"),L.consume(ae),L.exit("lineEnding"),oe}function oe(ae){return L.enter("codeFencedFence"),Ze(ae)?rt(L,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ae):he(ae)}function he(ae){return ae===c?(L.enter("codeFencedFenceSequence"),Ce(ae)):ne(ae)}function Ce(ae){return ae===c?(fe++,L.consume(ae),Ce):fe>=u?(L.exit("codeFencedFenceSequence"),Ze(ae)?rt(L,re,"whitespace")(ae):re(ae)):ne(ae)}function re(ae){return ae===null||Ue(ae)?(L.exit("codeFencedFence"),V(ae)):ne(ae)}}}function LP(e,t,n){const r=this;return s;function s(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Wf={name:"codeIndented",tokenize:MP},DP={partial:!0,tokenize:FP};function MP(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),rt(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(DP,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 FP(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):rt(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 BP={name:"codeText",previous:HP,resolve:UP,tokenize:jP};function UP(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 jP(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 zP{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&Na(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Na(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Na(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Na(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Na(this.left,n.reverse())}}}function Na(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function LE(e){const t={};let n=-1,r,s,a,u,c,d,f;const p=new zP(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,$P(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 qn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function $P(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,A=0;const P=[A];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&&(A=T+1,P.push(A),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):P.pop(),T=P.length;T--;){const w=c.slice(P[T],P[T+1]),C=a.pop();d.push([C,C+w.length-1]),e.splice(C,2,w)}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 VP={resolve:YP,tokenize:WP},qP={partial:!0,tokenize:GP};function YP(e){return LE(e),e}function WP(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(qP,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 GP(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),rt(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 DE(e,t,n,r,s,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(w){return w===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(w),e.exit(a),T):w===null||w===32||w===41||Tl(w)?n(w):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),A(w))}function T(w){return w===62?(e.enter(a),e.consume(w),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===62?(e.exit("chunkString"),e.exit(c),T(w)):w===null||w===60||Ue(w)?n(w):(e.consume(w),w===92?_:y)}function _(w){return w===60||w===62||w===92?(e.consume(w),y):y(w)}function A(w){return!p&&(w===null||w===41||ht(w))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(w)):p<f&&w===40?(e.consume(w),p++,A):w===41?(e.consume(w),p--,A):w===null||w===32||w===40||Tl(w)?n(w):(e.consume(w),w===92?P:A)}function P(w){return w===40||w===41||w===92?(e.consume(w),A):A(w)}}function ME(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 FE(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"),rt(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 Pa(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)?rt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const XP={name:"definition",tokenize:QP},KP={partial:!0,tokenize:JP};function QP(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return ME.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=pr(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)?Pa(e,f)(y):f(y)}function f(y){return DE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(KP,m,m)(y)}function m(y){return Ze(y)?rt(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 JP(e,t,n){return r;function r(c){return ht(c)?Pa(e,s)(c):n(c)}function s(c){return FE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ze(c)?rt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Ue(c)?t(c):n(c)}}const ZP={name:"hardBreakEscape",tokenize:eO};function eO(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 tO={name:"headingAtx",resolve:nO,tokenize:rO};function nO(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"},qn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function rO(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)?rt(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 iO=["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"],BE=["pre","script","style","textarea"],sO={concrete:!0,name:"htmlFlow",resolveTo:uO,tokenize:lO},oO={partial:!0,tokenize:dO},aO={partial:!0,tokenize:cO};function uO(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 lO(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,A):O===63?(e.consume(O),s=3,r.interrupt?t:k):kn(O)?(e.consume(O),u=String.fromCharCode(O),P):n(O)}function T(O){return O===45?(e.consume(O),s=2,y):O===91?(e.consume(O),s=5,c=0,_):kn(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:he:_):n(O)}function A(O){return kn(O)?(e.consume(O),u=String.fromCharCode(O),P):n(O)}function P(O){if(O===null||O===47||O===62||ht(O)){const Se=O===47,Fe=u.toLowerCase();return!Se&&!a&&BE.includes(Fe)?(s=1,r.interrupt?t(O):he(O)):iO.includes(u.toLowerCase())?(s=6,Se?(e.consume(O),w):r.interrupt?t(O):he(O)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?C(O):v(O))}return O===45||Tn(O)?(e.consume(O),u+=String.fromCharCode(O),P):n(O)}function w(O){return O===62?(e.consume(O),r.interrupt?t:he):n(O)}function C(O){return Ze(O)?(e.consume(O),C):Y(O)}function v(O){return O===47?(e.consume(O),Y):O===58||O===95||kn(O)?(e.consume(O),U):Ze(O)?(e.consume(O),v):Y(O)}function U(O){return O===45||O===46||O===58||O===95||Tn(O)?(e.consume(O),U):q(O)}function q(O){return O===61?(e.consume(O),L):Ze(O)?(e.consume(O),q):v(O)}function L(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,V):Ze(O)?(e.consume(O),L):ne(O)}function V(O){return O===d?(e.consume(O),d=null,fe):O===null||Ue(O)?n(O):(e.consume(O),V)}function ne(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||ht(O)?q(O):(e.consume(O),ne)}function fe(O){return O===47||O===62||Ze(O)?v(O):n(O)}function Y(O){return O===62?(e.consume(O),oe):n(O)}function oe(O){return O===null||Ue(O)?he(O):Ze(O)?(e.consume(O),oe):n(O)}function he(O){return O===45&&s===2?(e.consume(O),Ae):O===60&&s===1?(e.consume(O),se):O===62&&s===4?(e.consume(O),D):O===63&&s===3?(e.consume(O),k):O===93&&s===5?(e.consume(O),ie):Ue(O)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(oO,Q,Ce)(O)):O===null||Ue(O)?(e.exit("htmlFlowData"),Ce(O)):(e.consume(O),he)}function Ce(O){return e.check(aO,re,Q)(O)}function re(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),ae}function ae(O){return O===null||Ue(O)?Ce(O):(e.enter("htmlFlowData"),he(O))}function Ae(O){return O===45?(e.consume(O),k):he(O)}function se(O){return O===47?(e.consume(O),u="",J):he(O)}function J(O){if(O===62){const Se=u.toLowerCase();return BE.includes(Se)?(e.consume(O),D):he(O)}return kn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),J):he(O)}function ie(O){return O===93?(e.consume(O),k):he(O)}function k(O){return O===62?(e.consume(O),D):O===45&&s===2?(e.consume(O),k):he(O)}function D(O){return O===null||Ue(O)?(e.exit("htmlFlowData"),Q(O)):(e.consume(O),D)}function Q(O){return e.exit("htmlFlow"),t(O)}}function cO(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 dO(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(ka,t,n)}}const fO={name:"htmlText",tokenize:hO};function hO(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),q):k===63?(e.consume(k),v):kn(k)?(e.consume(k),ne):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,_):kn(k)?(e.consume(k),C):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):Ue(k)?(u=m,se(k)):(e.consume(k),m)}function T(k){return k===45?(e.consume(k),y):m(k)}function y(k){return k===62?Ae(k):k===45?T(k):m(k)}function _(k){const D="CDATA[";return k===D.charCodeAt(a++)?(e.consume(k),a===D.length?A:_):n(k)}function A(k){return k===null?n(k):k===93?(e.consume(k),P):Ue(k)?(u=A,se(k)):(e.consume(k),A)}function P(k){return k===93?(e.consume(k),w):A(k)}function w(k){return k===62?Ae(k):k===93?(e.consume(k),w):A(k)}function C(k){return k===null||k===62?Ae(k):Ue(k)?(u=C,se(k)):(e.consume(k),C)}function v(k){return k===null?n(k):k===63?(e.consume(k),U):Ue(k)?(u=v,se(k)):(e.consume(k),v)}function U(k){return k===62?Ae(k):v(k)}function q(k){return kn(k)?(e.consume(k),L):n(k)}function L(k){return k===45||Tn(k)?(e.consume(k),L):V(k)}function V(k){return Ue(k)?(u=V,se(k)):Ze(k)?(e.consume(k),V):Ae(k)}function ne(k){return k===45||Tn(k)?(e.consume(k),ne):k===47||k===62||ht(k)?fe(k):n(k)}function fe(k){return k===47?(e.consume(k),Ae):k===58||k===95||kn(k)?(e.consume(k),Y):Ue(k)?(u=fe,se(k)):Ze(k)?(e.consume(k),fe):Ae(k)}function Y(k){return k===45||k===46||k===58||k===95||Tn(k)?(e.consume(k),Y):oe(k)}function oe(k){return k===61?(e.consume(k),he):Ue(k)?(u=oe,se(k)):Ze(k)?(e.consume(k),oe):fe(k)}function he(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),s=k,Ce):Ue(k)?(u=he,se(k)):Ze(k)?(e.consume(k),he):(e.consume(k),re)}function Ce(k){return k===s?(e.consume(k),s=void 0,ae):k===null?n(k):Ue(k)?(u=Ce,se(k)):(e.consume(k),Ce)}function re(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||ht(k)?fe(k):(e.consume(k),re)}function ae(k){return k===47||k===62||ht(k)?fe(k):n(k)}function Ae(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function se(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),J}function J(k){return Ze(k)?rt(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 Gf={name:"labelEnd",resolveAll:EO,resolveTo:yO,tokenize:bO},pO={tokenize:TO},mO={tokenize:_O},gO={tokenize:SO};function EO(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&&qn(e,0,e.length,n),e}function yO(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,Sl(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]]),qn(e,a,e.length,c),e}function bO(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(pr(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(pO,p,u?p:m)(T):T===91?e.attempt(mO,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(gO,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function TO(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)?Pa(e,a)(m):a(m)}function a(m){return m===41?p(m):DE(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return ht(m)?Pa(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?FE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return ht(m)?Pa(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 _O(e,t,n){const r=this;return s;function s(c){return ME.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(pr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function SO(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 xO={name:"labelStartImage",resolveAll:Gf.resolveAll,tokenize:wO};function wO(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 AO={name:"labelStartLink",resolveAll:Gf.resolveAll,tokenize:vO};function vO(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 Xf={name:"lineEnding",tokenize:CO};function CO(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),rt(e,t,"linePrefix")}}const xl={name:"thematicBreak",tokenize:kO};function kO(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)?rt(e,c,"whitespace")(f):c(f))}}const Ln={continuation:{tokenize:IO},exit:LO,name:"list",tokenize:OO},NO={partial:!0,tokenize:DO},PO={partial:!0,tokenize:RO};function OO(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:qf(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(xl,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 qf(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(ka,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 IO(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ka,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,rt(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(PO,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,rt(e,e.attempt(Ln,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function RO(e,t,n){const r=this;return rt(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 LO(e){e.exit(this.containerState.type)}function DO(e,t,n){const r=this;return rt(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 UE={name:"setextUnderline",resolveTo:MO,tokenize:FO};function MO(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 FO(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)?rt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Ue(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const BO={tokenize:UO};function UO(e){const t=this,n=e.attempt(ka,r,e.attempt(this.parser.constructs.flowInitial,s,rt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(VP,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:jE()},jO=HE("string"),zO=HE("text");function HE(e){return{resolveAll:jE(e==="text"?$O: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 jE(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 $O(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 VO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:XP},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:NE},flow:{35:tO,42:xl,45:[UE,xl],60:sO,61:UE,95:xl,96:RE,126:RE},flowInitial:{[-2]:Wf,[-1]:Wf,32:Wf},insideSpan:{null:[Yf,HO]},string:{38:OE,92:PE},text:{[-5]:Xf,[-4]:Xf,[-3]:Xf,33:xO,38:OE,42:Yf,60:[AP,fO],91:AO,92:[ZP,PE],93:Gf,95:Yf,96:BP}},Symbol.toStringTag,{value:"Module"}));function qO(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:V(q),check:V(L),consume:C,enter:v,exit:U,interrupt:V(L,{interrupt:!0})},f={code:null,containerState:{},defineSkip:A,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(oe){return u=nr(u,oe),P(),u[u.length-1]!==null?[]:(ne(t,0),f.events=Sl(a,f.events,f),f.events)}function T(oe,he){return WO(y(oe),he)}function y(oe){return YO(u,oe)}function _(){const{_bufferIndex:oe,_index:he,line:Ce,column:re,offset:ae}=r;return{_bufferIndex:oe,_index:he,line:Ce,column:re,offset:ae}}function A(oe){s[oe.line]=oe.column,Y()}function P(){let oe;for(;r._index<u.length;){const he=u[r._index];if(typeof he=="string")for(oe=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===oe&&r._bufferIndex<he.length;)w(he.charCodeAt(r._bufferIndex));else w(he)}}function w(oe){p=p(oe)}function C(oe){Ue(oe)?(r.line++,r.column=1,r.offset+=oe===-3?2:1,Y()):oe!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=oe}function v(oe,he){const Ce=he||{};return Ce.type=oe,Ce.start=_(),f.events.push(["enter",Ce,f]),c.push(Ce),Ce}function U(oe){const he=c.pop();return he.end=_(),f.events.push(["exit",he,f]),he}function q(oe,he){ne(oe,he.from)}function L(oe,he){he.restore()}function V(oe,he){return Ce;function Ce(re,ae,Ae){let se,J,ie,k;return Array.isArray(re)?Q(re):"tokenize"in re?Q([re]):D(re);function D(ke){return xe;function xe(Ie){const Ye=Ie!==null&&ke[Ie],dt=Ie!==null&&ke.null,Yt=[...Array.isArray(Ye)?Ye:Ye?[Ye]:[],...Array.isArray(dt)?dt:dt?[dt]:[]];return Q(Yt)(Ie)}}function Q(ke){return se=ke,J=0,ke.length===0?Ae:O(ke[J])}function O(ke){return xe;function xe(Ie){return k=fe(),ie=ke,ke.partial||(f.currentConstruct=ke),ke.name&&f.parser.constructs.disable.null.includes(ke.name)?Fe():ke.tokenize.call(he?Object.assign(Object.create(f),he):f,d,Se,Fe)(Ie)}}function Se(ke){return oe(ie,k),ae}function Fe(ke){return k.restore(),++J<se.length?O(se[J]):Ae}}}function ne(oe,he){oe.resolveAll&&!a.includes(oe)&&a.push(oe),oe.resolve&&qn(f.events,he,f.events.length-he,oe.resolve(f.events.slice(he),f)),oe.resolveTo&&(f.events=oe.resolveTo(f.events,f))}function fe(){const oe=_(),he=f.previous,Ce=f.currentConstruct,re=f.events.length,ae=Array.from(c);return{from:re,restore:Ae};function Ae(){r=oe,f.previous=he,f.currentConstruct=Ce,f.events.length=re,c=ae,Y()}}function Y(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function YO(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 WO(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 SO(e){const r={constructs:dE([yO,...(e||{}).extensions||[]]),content:s(YN),defined:[],document:s(WN),flow:s(fO),lazy:{},string:s(mO),text:s(gO)};return r;function s(a){return u;function u(c){return bO(r,a,c)}}}function xO(e){for(;!TE(e););return e}const kE=/[\0\t\n\r]/g;function wO(){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 AO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function vO(e){return e.replace(AO,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 fE(n.slice(a?2:1),a?16:10)}return Uf(n)||e}const NE={}.hasOwnProperty;function kO(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),NO(n)(xO(SO(n).document().write(wO()(e,t,!0))))}function NO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(on),autolinkProtocol:Ee,autolinkEmail:Ee,atxHeading:a(Zt),blockQuote:a(ht),characterEscape:Ee,characterReference:Ee,codeFenced:a(Ut),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Ut,u),codeText:a(Vt,u),codeTextData:Ee,data:Ee,codeFlowValue:Ee,definition:a(Cn),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(sr),hardBreakEscape:a($e),hardBreakTrailing:a($e),htmlFlow:a(Ct,u),htmlFlowData:Ee,htmlText:a(Ct,u),htmlTextData:Ee,image:a(kn),label:u,link:a(on),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(Fe),thematicBreak:a(pt)},exit:{atxHeading:d(),atxHeadingSequence:q,autolink:d(),autolinkEmail:Ge,autolinkProtocol:Be,blockQuote:d(),characterEscapeValue:V,characterReferenceMarkerHexadecimal:Me,characterReferenceMarkerNumeric:Me,characterReferenceValue:ye,characterReference:De,codeFenced:d(C),codeFencedFence:w,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:V,codeIndented:d(A),codeText:d(ae),codeTextData:V,data:V,definition:d(),definitionDestinationString:H,definitionLabelString:N,definitionTitleString:v,emphasis:d(),hardBreakEscape:d(he),hardBreakTrailing:d(he),htmlFlow:d(Ce),htmlFlowData:V,htmlText:d(ne),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:D,resource:ee,setextHeading:d(re),setextHeadingLineSequence:Y,setextHeadingText:R,strong:d(),thematicBreak:d()}};PE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let me={type:"root",children:[]};const ve={stack:[me],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},Ve=[];let Ie=-1;for(;++Ie<J.length;)if(J[Ie][1].type==="listOrdered"||J[Ie][1].type==="listUnordered")if(J[Ie][0]==="enter")Ve.push(Ie);else{const lt=Ve.pop();Ie=s(J,lt,Ie)}for(Ie=-1;++Ie<J.length;){const lt=t[J[Ie][0]];NE.call(lt,J[Ie][1].type)&&lt[J[Ie][1].type].call(Object.assign({sliceSerialize:J[Ie][2].sliceSerialize},ve),J[Ie][1])}if(ve.tokenStack.length>0){const lt=ve.tokenStack[ve.tokenStack.length-1];(lt[1]||OE).call(ve,void 0,lt[0])}for(me.position={start:Si(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:Si(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ie=-1;++Ie<t.transforms.length;)me=t.transforms[Ie](me)||me;return me}function s(J,me,ve){let Ve=me-1,Ie=-1,lt=!1,qt,Ht,an,$r;for(;++Ve<=ve;){const un=J[Ve];switch(un[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{un[0]==="enter"?Ie++:Ie--,$r=void 0;break}case"lineEndingBlank":{un[0]==="enter"&&(qt&&!$r&&!Ie&&!an&&(an=Ve),$r=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:$r=void 0}if(!Ie&&un[0]==="enter"&&un[1].type==="listItemPrefix"||Ie===-1&&un[0]==="exit"&&(un[1].type==="listUnordered"||un[1].type==="listOrdered")){if(qt){let Vr=Ve;for(Ht=void 0;Vr--;){const Wn=J[Vr];if(Wn[1].type==="lineEnding"||Wn[1].type==="lineEndingBlank"){if(Wn[0]==="exit")continue;Ht&&(J[Ht][1].type="lineEndingBlank",lt=!0),Wn[1].type="lineEnding",Ht=Vr}else if(!(Wn[1].type==="linePrefix"||Wn[1].type==="blockQuotePrefix"||Wn[1].type==="blockQuotePrefixWhitespace"||Wn[1].type==="blockQuoteMarker"||Wn[1].type==="listItemIndent"))break}an&&(!Ht||an<Ht)&&(qt._spread=!0),qt.end=Object.assign({},Ht?J[Ht][1].start:un[1].end),J.splice(Ht||Ve,0,["exit",qt,un[2]]),Ve++,ve++}if(un[1].type==="listItemPrefix"){const Vr={type:"listItem",_spread:!1,start:Object.assign({},un[1].start),end:void 0};qt=Vr,J.splice(Ve,0,["enter",Vr,un[2]]),Ve++,ve++,an=void 0,$r=!0}}}return J[me][1]._spread=lt,ve}function a(J,me){return ve;function ve(Ve){c.call(this,J(Ve),Ve),me&&me.call(this,Ve)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(J,me,ve){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([me,ve||void 0]),J.position={start:Si(me.start),end:void 0}}function d(J){return me;function me(ve){J&&J.call(this,ve),f.call(this,ve)}}function f(J,me){const ve=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==J.type&&(me?me.call(this,J,Ve[0]):(Ve[1]||OE).call(this,J,Ve[0]));else throw new Error("Cannot close `"+J.type+"` ("+xa({start:J.start,end:J.end})+"): it’s not open");ve.position.end=Si(J.end)}function p(){return Bf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(J){if(this.data.expectingFirstListItemValue){const me=this.stack[this.stack.length-2];me.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),me=this.stack[this.stack.length-1];me.lang=J}function _(){const J=this.resume(),me=this.stack[this.stack.length-1];me.meta=J}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const J=this.resume(),me=this.stack[this.stack.length-1];me.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const J=this.resume(),me=this.stack[this.stack.length-1];me.value=J.replace(/(\r?\n|\r)$/g,"")}function N(J){const me=this.resume(),ve=this.stack[this.stack.length-1];ve.label=me,ve.identifier=mr(this.sliceSerialize(J)).toLowerCase()}function v(){const J=this.resume(),me=this.stack[this.stack.length-1];me.title=J}function H(){const J=this.resume(),me=this.stack[this.stack.length-1];me.url=J}function q(J){const me=this.stack[this.stack.length-1];if(!me.depth){const ve=this.sliceSerialize(J).length;me.depth=ve}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function Y(J){const me=this.stack[this.stack.length-1];me.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function re(){this.data.setextHeadingSlurpLineEnding=void 0}function Ee(J){const ve=this.stack[this.stack.length-1].children;let Ve=ve[ve.length-1];(!Ve||Ve.type!=="text")&&(Ve=rt(),Ve.position={start:Si(J.start),end:void 0},ve.push(Ve)),this.stack.push(Ve)}function V(J){const me=this.stack.pop();me.value+=this.sliceSerialize(J),me.position.end=Si(J.end)}function se(J){const me=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ve=me.children[me.children.length-1];ve.position.end=Si(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(me.type)&&(Ee.call(this,J),V.call(this,J))}function he(){this.data.atHardBreak=!0}function Ce(){const J=this.resume(),me=this.stack[this.stack.length-1];me.value=J}function ne(){const J=this.resume(),me=this.stack[this.stack.length-1];me.value=J}function ae(){const J=this.resume(),me=this.stack[this.stack.length-1];me.value=J}function xe(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=me,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 me=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=me,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function Q(J){const me=this.sliceSerialize(J),ve=this.stack[this.stack.length-2];ve.label=vO(me),ve.identifier=mr(me).toLowerCase()}function ie(){const J=this.stack[this.stack.length-1],me=this.resume(),ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,ve.type==="link"){const Ve=J.children;ve.children=Ve}else ve.alt=me}function k(){const J=this.resume(),me=this.stack[this.stack.length-1];me.url=J}function D(){const J=this.resume(),me=this.stack[this.stack.length-1];me.title=J}function ee(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function Se(J){const me=this.resume(),ve=this.stack[this.stack.length-1];ve.label=me,ve.identifier=mr(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function Me(J){this.data.characterReferenceType=J.type}function ye(J){const me=this.sliceSerialize(J),ve=this.data.characterReferenceType;let Ve;ve?(Ve=fE(me,ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=Uf(me);const Ie=this.stack[this.stack.length-1];Ie.value+=Ve}function De(J){const me=this.stack.pop();me.position.end=Si(J.end)}function Be(J){V.call(this,J);const me=this.stack[this.stack.length-1];me.url=this.sliceSerialize(J)}function Ge(J){V.call(this,J);const me=this.stack[this.stack.length-1];me.url="mailto:"+this.sliceSerialize(J)}function ht(){return{type:"blockquote",children:[]}}function Ut(){return{type:"code",lang:null,meta:null,value:""}}function Vt(){return{type:"inlineCode",value:""}}function Cn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function sr(){return{type:"emphasis",children:[]}}function Zt(){return{type:"heading",depth:0,children:[]}}function $e(){return{type:"break"}}function Ct(){return{type:"html",value:""}}function kn(){return{type:"image",title:null,url:"",alt:null}}function on(){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 Fe(){return{type:"strong",children:[]}}function rt(){return{type:"text",value:""}}function pt(){return{type:"thematicBreak"}}}function Si(e){return{line:e.line,column:e.column,offset:e.offset}}function PE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?PE(e,r):PO(e,r)}}function PO(e,t){let n;for(n in t)if(NE.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 OE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+xa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+xa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+xa({start:t.start,end:t.end})+") is still open")}function OO(e){const t=this;t.parser=n;function n(r){return kO(r,de(B(B({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function IO(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 RO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
21
- `}]}function LO(e,t){const n=t.value?t.value+`
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 DO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function FO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Zs(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 BO(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function UO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function IE(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 HO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return IE(e,t);const s={src:Zs(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 zO(e,t){const n={src:Zs(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 jO(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 $O(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return IE(e,t);const s={href:Zs(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 VO(e,t){const n={href:Zs(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 qO(e,t,n){const r=e.all(t),s=n?YO(n):RE(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:`
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 GO(e){const r={constructs:AE([VO,...(e||{}).extensions||[]]),content:s(yP),defined:[],document:s(TP),flow:s(BO),lazy:{},string:s(jO),text:s(zO)};return r;function s(a){return u;function u(c){return qO(r,a,c)}}}function XO(e){for(;!LE(e););return e}const zE=/[\0\t\n\r]/g;function KO(){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(zE.lastIndex=m,f=zE.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 QO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function JO(e){return e.replace(QO,ZO)}function ZO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return vE(n.slice(a?2:1),a?16:10)}return Vf(n)||e}const $E={}.hasOwnProperty;function e3(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),t3(n)(XO(GO(n).document().write(KO()(e,t,!0))))}function t3(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(yt),autolinkProtocol:fe,autolinkEmail:fe,atxHeading:a(br),blockQuote:a(dt),characterEscape:fe,characterReference:fe,codeFenced:a(Yt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Yt,u),codeText:a(Lt,u),codeTextData:fe,data:fe,codeFlowValue:fe,definition:a(Pt),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(rn),hardBreakEscape:a(sr),hardBreakTrailing:a(sr),htmlFlow:a(Wt,u),htmlFlowData:fe,htmlText:a(Wt,u),htmlTextData:fe,image:a($e),label:u,link:a(yt),listItem:a(_e),listItemValue:T,listOrdered:a(jt,m),listUnordered:a(jt),paragraph:a(De),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(br),strong:a(Be),thematicBreak:a(pt)},exit:{atxHeading:d(),atxHeadingSequence:q,autolink:d(),autolinkEmail:Ye,autolinkProtocol:Ie,blockQuote:d(),characterEscapeValue:Y,characterReferenceMarkerHexadecimal:Fe,characterReferenceMarkerNumeric:Fe,characterReferenceValue:ke,characterReference:xe,codeFenced:d(P),codeFencedFence:A,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:Y,codeIndented:d(w),codeText:d(ae),codeTextData:Y,data:Y,definition:d(),definitionDestinationString:U,definitionLabelString:C,definitionTitleString:v,emphasis:d(),hardBreakEscape:d(he),hardBreakTrailing:d(he),htmlFlow:d(Ce),htmlFlowData:Y,htmlText:d(re),htmlTextData:Y,image:d(se),label:ie,labelText:J,lineEnding:oe,link:d(Ae),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Se,resourceDestinationString:k,resourceTitleString:D,resource:Q,setextHeading:d(ne),setextHeadingLineSequence:V,setextHeadingText:L,strong:d(),thematicBreak:d()}};VE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Z){let ge={type:"root",children:[]};const ve={stack:[ge],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},Ve=[];let Re=-1;for(;++Re<Z.length;)if(Z[Re][1].type==="listOrdered"||Z[Re][1].type==="listUnordered")if(Z[Re][0]==="enter")Ve.push(Re);else{const lt=Ve.pop();Re=s(Z,lt,Re)}for(Re=-1;++Re<Z.length;){const lt=t[Z[Re][0]];$E.call(lt,Z[Re][1].type)&&lt[Z[Re][1].type].call(Object.assign({sliceSerialize:Z[Re][2].sliceSerialize},ve),Z[Re][1])}if(ve.tokenStack.length>0){const lt=ve.tokenStack[ve.tokenStack.length-1];(lt[1]||qE).call(ve,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})},Re=-1;++Re<t.transforms.length;)ge=t.transforms[Re](ge)||ge;return ge}function s(Z,ge,ve){let Ve=ge-1,Re=-1,lt=!1,Gt,zt,ln,$r;for(;++Ve<=ve;){const cn=Z[Ve];switch(cn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{cn[0]==="enter"?Re++:Re--,$r=void 0;break}case"lineEndingBlank":{cn[0]==="enter"&&(Gt&&!$r&&!Re&&!ln&&(ln=Ve),$r=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:$r=void 0}if(!Re&&cn[0]==="enter"&&cn[1].type==="listItemPrefix"||Re===-1&&cn[0]==="exit"&&(cn[1].type==="listUnordered"||cn[1].type==="listOrdered")){if(Gt){let Vr=Ve;for(zt=void 0;Vr--;){const Wn=Z[Vr];if(Wn[1].type==="lineEnding"||Wn[1].type==="lineEndingBlank"){if(Wn[0]==="exit")continue;zt&&(Z[zt][1].type="lineEndingBlank",lt=!0),Wn[1].type="lineEnding",zt=Vr}else if(!(Wn[1].type==="linePrefix"||Wn[1].type==="blockQuotePrefix"||Wn[1].type==="blockQuotePrefixWhitespace"||Wn[1].type==="blockQuoteMarker"||Wn[1].type==="listItemIndent"))break}ln&&(!zt||ln<zt)&&(Gt._spread=!0),Gt.end=Object.assign({},zt?Z[zt][1].start:cn[1].end),Z.splice(zt||Ve,0,["exit",Gt,cn[2]]),Ve++,ve++}if(cn[1].type==="listItemPrefix"){const Vr={type:"listItem",_spread:!1,start:Object.assign({},cn[1].start),end:void 0};Gt=Vr,Z.splice(Ve,0,["enter",Vr,cn[2]]),Ve++,ve++,ln=void 0,$r=!0}}}return Z[ge][1]._spread=lt,ve}function a(Z,ge){return ve;function ve(Ve){c.call(this,Z(Ve),Ve),ge&&ge.call(this,Ve)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(Z,ge,ve){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([ge,ve||void 0]),Z.position={start:xi(ge.start),end:void 0}}function d(Z){return ge;function ge(ve){Z&&Z.call(this,ve),f.call(this,ve)}}function f(Z,ge){const ve=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==Z.type&&(ge?ge.call(this,Z,Ve[0]):(Ve[1]||qE).call(this,Z,Ve[0]));else throw new Error("Cannot close `"+Z.type+"` ("+va({start:Z.start,end:Z.end})+"): it’s not open");ve.position.end=xi(Z.end)}function p(){return $f(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 A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function P(){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 w(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z.replace(/(\r?\n|\r)$/g,"")}function C(Z){const ge=this.resume(),ve=this.stack[this.stack.length-1];ve.label=ge,ve.identifier=pr(this.sliceSerialize(Z)).toLowerCase()}function v(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.title=Z}function U(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.url=Z}function q(Z){const ge=this.stack[this.stack.length-1];if(!ge.depth){const ve=this.sliceSerialize(Z).length;ge.depth=ve}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function V(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 fe(Z){const ve=this.stack[this.stack.length-1].children;let Ve=ve[ve.length-1];(!Ve||Ve.type!=="text")&&(Ve=Xe(),Ve.position={start:xi(Z.start),end:void 0},ve.push(Ve)),this.stack.push(Ve)}function Y(Z){const ge=this.stack.pop();ge.value+=this.sliceSerialize(Z),ge.position.end=xi(Z.end)}function oe(Z){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ve=ge.children[ge.children.length-1];ve.position.end=xi(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(fe.call(this,Z),Y.call(this,Z))}function he(){this.data.atHardBreak=!0}function Ce(){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 Ae(){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 se(){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 J(Z){const ge=this.sliceSerialize(Z),ve=this.stack[this.stack.length-2];ve.label=JO(ge),ve.identifier=pr(ge).toLowerCase()}function ie(){const Z=this.stack[this.stack.length-1],ge=this.resume(),ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,ve.type==="link"){const Ve=Z.children;ve.children=Ve}else ve.alt=ge}function k(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.url=Z}function D(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.title=Z}function Q(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function Se(Z){const ge=this.resume(),ve=this.stack[this.stack.length-1];ve.label=ge,ve.identifier=pr(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function Fe(Z){this.data.characterReferenceType=Z.type}function ke(Z){const ge=this.sliceSerialize(Z),ve=this.data.characterReferenceType;let Ve;ve?(Ve=vE(ge,ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=Vf(ge);const Re=this.stack[this.stack.length-1];Re.value+=Ve}function xe(Z){const ge=this.stack.pop();ge.position.end=xi(Z.end)}function Ie(Z){Y.call(this,Z);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(Z)}function Ye(Z){Y.call(this,Z);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(Z)}function dt(){return{type:"blockquote",children:[]}}function Yt(){return{type:"code",lang:null,meta:null,value:""}}function Lt(){return{type:"inlineCode",value:""}}function Pt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function rn(){return{type:"emphasis",children:[]}}function br(){return{type:"heading",depth:0,children:[]}}function sr(){return{type:"break"}}function Wt(){return{type:"html",value:""}}function $e(){return{type:"image",title:null,url:"",alt:null}}function yt(){return{type:"link",title:null,url:"",children:[]}}function jt(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function _e(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function De(){return{type:"paragraph",children:[]}}function Be(){return{type:"strong",children:[]}}function Xe(){return{type:"text",value:""}}function pt(){return{type:"thematicBreak"}}}function xi(e){return{line:e.line,column:e.column,offset:e.offset}}function VE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?VE(e,r):n3(e,r)}}function n3(e,t){let n;for(n in t)if($E.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 qE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+va({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+va({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+va({start:t.start,end:t.end})+") is still open")}function r3(e){const t=this;t.parser=n;function n(r){return e3(r,me(B(B({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function i3(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 s3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
21
+ `}]}function o3(e,t){const n=t.value?t.value+`
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 a3(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function u3(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function l3(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Zs(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 c3(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 d3(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function YE(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 f3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return YE(e,t);const s={src:Zs(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 h3(e,t){const n={src:Zs(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 p3(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 m3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return YE(e,t);const s={href:Zs(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 g3(e,t){const n={href:Zs(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 E3(e,t,n){const r=e.all(t),s=n?y3(n):WE(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 YO(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=RE(n[r])}return t}function RE(e){const t=e.spread;return t==null?e.children.length>1:t}function GO(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 XO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function KO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QO(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=Ir(t.children[1]),d=gl(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 JO(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 ZO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const LE=9,DE=32;function e3(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(ME(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(ME(t.slice(s),s>0,!1)),a.join("")}function ME(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===LE||a===DE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===LE||a===DE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function t3(e,t){const n={type:"text",value:e3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function n3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const r3={blockquote:IO,break:RO,code:LO,delete:DO,emphasis:MO,footnoteReference:FO,heading:BO,html:UO,imageReference:HO,image:zO,inlineCode:jO,linkReference:$O,link:VO,listItem:qO,list:GO,paragraph:WO,root:XO,strong:KO,table:QO,tableCell:ZO,tableRow:JO,text:t3,thematicBreak:n3,toml:_l,yaml:_l,definition:_l,footnoteDefinition:_l};function _l(){}const FE=-1,Sl=0,ka=1,xl=2,qf=3,Yf=4,Gf=5,Wf=6,BE=7,UE=8,{defineProperty:i3}=Object,HE=typeof self=="object"?self:globalThis,zE=(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 HE[e](t)},s3=(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 Sl:case FE:return n(u,s);case ka:{const c=n([],s);for(const d of u)c.push(r(d));return c}case xl:{const c=n({},s);for(const[d,f]of u){const p=r(d),m=r(f);p==="__proto__"?i3(c,p,{value:m,configurable:!0,enumerable:!0,writable:!0}):c[p]=m}return c}case qf:return n(new Date(u),s);case Yf:{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 Wf:{const c=n(new Set,s);for(const d of u)c.add(r(d));return c}case BE:{const{name:c,message:d}=u;return n(typeof HE[c]=="function"?zE(c,d):new Error(d),s)}case UE: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(zE(a,u),s)};return r},jE=e=>s3(new Map,e)(0),as="",{toString:o3}={},{keys:a3,is:u3}=Object,Na=e=>{const t=typeof e;if(t!=="object"||!e)return[Sl,t];const n=o3.call(e).slice(8,-1);switch(n){case"Array":return[ka,as];case"Object":return[xl,as];case"Date":return[qf,as];case"RegExp":return[Yf,as];case"Map":return[Gf,as];case"Set":return[Wf,as];case"DataView":return[ka,n]}return n.includes("Array")?[ka,n]:e instanceof Error?[BE,e.name||"Error"]:[xl,n]},wl=([e,t])=>e===Sl&&(t==="function"||t==="symbol"),l3=(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]=Na(u);switch(c){case Sl:{let p=u;switch(d){case"bigint":c=UE,p=u.toString();break;case"number":if(!u&&u3(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([FE],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 xl:{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 a3(u))(e||!wl(Na(u[T])))&&p.push([a(T),a(u[T])]);return m}case qf:return s([c,isNaN(u.getTime())?as:u.toISOString()],u);case Yf:{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||!(wl(Na(T))||wl(Na(y))))&&p.push([a(T),a(y)]);return m}case Wf:{const p=[],m=s([c,p],u);for(const T of u)(e||!wl(Na(T)))&&p.push(a(T));return m}}const{message:f}=u;return s([c,{name:d,message:f}],u)};return a},$E=(e,{json:t,lossy:n}={})=>{const r=[];return l3(!(t||n),!!t,new Map,r)(e),r},us=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?jE($E(e,t)):structuredClone(e):(e,t)=>jE($E(e,t));function c3(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 d3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function f3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||c3,r=e.options.footnoteBackLabel||d3,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=Zs(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 C=p[p.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const N=C.children[C.children.length-1];N&&N.type==="text"?N.value+=" ":C.children.push({type:"text",value:" "}),C.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:de(B({},us(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 y3(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=WE(n[r])}return t}function WE(e){const t=e.spread;return t==null?e.children.length>1:t}function b3(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 T3(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _3(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function S3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function x3(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=Ir(t.children[1]),d=bl(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 w3(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 A3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const GE=9,XE=32;function v3(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(KE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(KE(t.slice(s),s>0,!1)),a.join("")}function KE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===GE||a===XE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===GE||a===XE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function C3(e,t){const n={type:"text",value:v3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function k3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const N3={blockquote:i3,break:s3,code:o3,delete:a3,emphasis:u3,footnoteReference:l3,heading:c3,html:d3,imageReference:f3,image:h3,inlineCode:p3,linkReference:m3,link:g3,listItem:E3,list:b3,paragraph:T3,root:_3,strong:S3,table:x3,tableCell:A3,tableRow:w3,text:C3,thematicBreak:k3,toml:wl,yaml:wl,definition:wl,footnoteDefinition:wl};function wl(){}const QE=-1,Al=0,Oa=1,vl=2,Kf=3,Qf=4,Jf=5,Zf=6,JE=7,ZE=8,{defineProperty:P3}=Object,ey=typeof self=="object"?self:globalThis,ty=(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 ey[e](t)},O3=(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 Al:case QE:return n(u,s);case Oa:{const c=n([],s);for(const d of u)c.push(r(d));return c}case vl:{const c=n({},s);for(const[d,f]of u){const p=r(d),m=r(f);p==="__proto__"?P3(c,p,{value:m,configurable:!0,enumerable:!0,writable:!0}):c[p]=m}return c}case Kf:return n(new Date(u),s);case Qf:{const{source:c,flags:d}=u;return n(new RegExp(c,d),s)}case Jf:{const c=n(new Map,s);for(const[d,f]of u)c.set(r(d),r(f));return c}case Zf:{const c=n(new Set,s);for(const d of u)c.add(r(d));return c}case JE:{const{name:c,message:d}=u;return n(typeof ey[c]=="function"?ty(c,d):new Error(d),s)}case ZE: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(ty(a,u),s)};return r},ny=e=>O3(new Map,e)(0),ls="",{toString:I3}={},{keys:R3,is:L3}=Object,Ia=e=>{const t=typeof e;if(t!=="object"||!e)return[Al,t];const n=I3.call(e).slice(8,-1);switch(n){case"Array":return[Oa,ls];case"Object":return[vl,ls];case"Date":return[Kf,ls];case"RegExp":return[Qf,ls];case"Map":return[Jf,ls];case"Set":return[Zf,ls];case"DataView":return[Oa,n]}return n.includes("Array")?[Oa,n]:e instanceof Error?[JE,e.name||"Error"]:[vl,n]},Cl=([e,t])=>e===Al&&(t==="function"||t==="symbol"),D3=(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]=Ia(u);switch(c){case Al:{let p=u;switch(d){case"bigint":c=ZE,p=u.toString();break;case"number":if(!u&&L3(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([QE],u)}return s([c,p],u)}case Oa:{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 vl:{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 R3(u))(e||!Cl(Ia(u[T])))&&p.push([a(T),a(u[T])]);return m}case Kf:return s([c,isNaN(u.getTime())?ls:u.toISOString()],u);case Qf:{const{source:p,flags:m}=u;return s([c,{source:p,flags:m}],u)}case Jf:{const p=[],m=s([c,p],u);for(const[T,y]of u)(e||!(Cl(Ia(T))||Cl(Ia(y))))&&p.push([a(T),a(y)]);return m}case Zf:{const p=[],m=s([c,p],u);for(const T of u)(e||!Cl(Ia(T)))&&p.push(a(T));return m}}const{message:f}=u;return s([c,{name:d,message:f}],u)};return a},ry=(e,{json:t,lossy:n}={})=>{const r=[];return D3(!(t||n),!!t,new Map,r)(e),r},cs=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ny(ry(e,t)):structuredClone(e):(e,t)=>ny(ry(e,t));function M3(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 F3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function B3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||M3,r=e.options.footnoteBackLabel||F3,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=Zs(m.toLowerCase());let y=0;const _=[],A=e.footnoteCounts.get(m);for(;A!==void 0&&++y<=A;){_.length>0&&_.push({type:"text",value:" "});let C=typeof n=="string"?n:n(d,y);typeof C=="string"&&(C={type:"text",value:C}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+T+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const P=p[p.length-1];if(P&&P.type==="element"&&P.tagName==="p"){const C=P.children[P.children.length-1];C&&C.type==="text"?C.value+=" ":P.children.push({type:"text",value:" "}),P.children.push(..._)}else p.push(..._);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(f,w),c.push(w)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:me(B({},cs(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 Al=(function(e){if(e==null)return g3;if(typeof e=="function")return vl(e);if(typeof e=="object")return Array.isArray(e)?h3(e):p3(e);if(typeof e=="string")return m3(e);throw new Error("Expected function, string, or object as test")});function h3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Al(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 p3(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 m3(e){return vl(t);function t(n){return n&&n.type===e}}function vl(e){return t;function t(n,r,s){return!!(E3(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function g3(){return!0}function E3(e){return e!==null&&typeof e=="object"&&"type"in e}function kU(e){return e}const VE=[],y3=!0,Xf=!1,b3="skip";function qE(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=Al(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=VE,_,w,C;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=T3(n(d,p)),y[0]===Xf))return y;if("children"in d&&d.children){const A=d;if(A.children&&y[0]!==b3)for(w=(r?A.children.length:-1)+u,C=p.concat(A);w>-1&&w<A.children.length;){const N=A.children[w];if(_=c(N,w,C)(),_[0]===Xf)return _;w=typeof _[1]=="number"?_[1]:w+u}}return y}}}function T3(e){return Array.isArray(e)?e:typeof e=="number"?[y3,e]:e==null?VE:[e]}function Cl(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),qE(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 Kf={}.hasOwnProperty,_3={};function S3(e,t){const n=t||_3,r=new Map,s=new Map,a=new Map,u=B(B({},r3),n.handlers),c={all:f,applyData:w3,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:x3,wrap:v3};return Cl(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(Kf.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:C}=w,A=dn(w,["children"]),N=us(A);return N.children=c.all(p),N}return us(p)}return(c.options.unknownHandler||A3)(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=YE(_.value)),!Array.isArray(_)&&_.type==="element")){const w=_.children[0];w&&w.type==="text"&&(w.value=YE(w.value))}Array.isArray(_)?m.push(..._):m.push(_)}}}return m}}function x3(e,t){e.position&&(t.position=eE(e))}function w3(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,us(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function A3(e,t){const n=t.data||{},r="value"in t&&!(Kf.call(n,"hProperties")||Kf.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 v3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
26
+ `}]}}const kl=(function(e){if(e==null)return z3;if(typeof e=="function")return Nl(e);if(typeof e=="object")return Array.isArray(e)?U3(e):H3(e);if(typeof e=="string")return j3(e);throw new Error("Expected function, string, or object as test")});function U3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=kl(e[n]);return Nl(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 Nl(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function j3(e){return Nl(t);function t(n){return n&&n.type===e}}function Nl(e){return t;function t(n,r,s){return!!($3(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function z3(){return!0}function $3(e){return e!==null&&typeof e=="object"&&"type"in e}function eH(e){return e}const iy=[],V3=!0,eh=!1,q3="skip";function sy(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=kl(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=iy,_,A,P;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=Y3(n(d,p)),y[0]===eh))return y;if("children"in d&&d.children){const w=d;if(w.children&&y[0]!==q3)for(A=(r?w.children.length:-1)+u,P=p.concat(w);A>-1&&A<w.children.length;){const C=w.children[A];if(_=c(C,A,P)(),_[0]===eh)return _;A=typeof _[1]=="number"?_[1]:A+u}}return y}}}function Y3(e){return Array.isArray(e)?e:typeof e=="number"?[V3,e]:e==null?iy:[e]}function Pl(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),sy(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 th={}.hasOwnProperty,W3={};function G3(e,t){const n=t||W3,r=new Map,s=new Map,a=new Map,u=B(B({},N3),n.handlers),c={all:f,applyData:K3,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:X3,wrap:J3};return Pl(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(th.call(c.handlers,T)&&y)return y(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(T)){if("children"in p){const A=p,{children:P}=A,w=hn(A,["children"]),C=cs(w);return C.children=c.all(p),C}return cs(p)}return(c.options.unknownHandler||Q3)(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=oy(_.value)),!Array.isArray(_)&&_.type==="element")){const A=_.children[0];A&&A.type==="text"&&(A.value=oy(A.value))}Array.isArray(_)?m.push(..._):m.push(_)}}}return m}}function X3(e,t){e.position&&(t.position=pE(e))}function K3(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,cs(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function Q3(e,t){const n=t.data||{},r="value"in t&&!(th.call(n,"hProperties")||th.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 J3(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
- `}),n}function YE(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=S3(e,t),r=n.one(e,void 0),s=f3(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 Ze(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 WE(e){if(e)throw e}var Qf,XE;function k3(){if(XE)return Qf;XE=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 Qf=function d(){var f,p,m,T,y,_,w=arguments[0],C=1,A=arguments.length,N=!1;for(typeof w=="boolean"&&(N=w,w=arguments[1]||{},C=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});C<A;++C)if(f=arguments[C],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},Qf}var N3=k3();const Jf=je(N3);function Zf(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 P3(){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?O3(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 O3(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 Rr={basename:I3,dirname:R3,extname:L3,join:D3,sep:"/"};function I3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pa(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 R3(e){if(Pa(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 L3(e){Pa(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 D3(...e){let t=-1,n;for(;++t<e.length;)Pa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":M3(n)}function M3(e){Pa(e);const t=e.codePointAt(0)===47;let n=F3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function F3(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 Pa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const B3={cwd:U3};function U3(){return"/"}function eh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function H3(e){if(typeof e=="string")e=new URL(e);else if(!eh(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 z3(e)}function z3(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 th=["history","path","basename","stem","extname","dirname"];class KE{constructor(t){let n;t?eh(t)?n={path:t}:typeof t=="string"||j3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":B3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<th.length;){const a=th[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)th.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Rr.basename(this.path):void 0}set basename(t){rh(t,"basename"),nh(t,"basename"),this.path=Rr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Rr.dirname(this.path):void 0}set dirname(t){QE(this.basename,"dirname"),this.path=Rr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Rr.extname(this.path):void 0}set extname(t){if(nh(t,"extname"),QE(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=Rr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){eh(t)&&(t=H3(t)),rh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Rr.basename(this.path,this.extname):void 0}set stem(t){rh(t,"stem"),nh(t,"stem"),this.path=Rr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new En(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function nh(e,t){if(e&&e.includes(Rr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Rr.sep+"`")}function rh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function QE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function j3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $3=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),V3={}.hasOwnProperty;class ih extends $3{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=P3()}copy(){const t=new ih;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Jf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ah("data",this.frozen),this.namespace[t]=n,this):V3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ah("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 sh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),sh("process",this.parser||this.Parser),oh("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);G3(_)?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(),sh("processSync",this.parser||this.Parser),oh("processSync",this.compiler||this.Compiler),this.process(t,s),ZE("processSync","process",n),r;function s(a,u){n=!0,WE(a),r=u}}run(t,n,r){JE(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),ZE("runSync","run",r),s;function a(u,c){WE(u),s=c,r=!0}}stringify(t,n){this.freeze();const r=kl(n),s=this.compiler||this.Compiler;return oh("stringify",s),JE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(ah("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=Jf(!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];Zf(w)&&Zf(y)&&(y=Jf(!0,w,y)),r[T]=[f,y,..._]}}}}const q3=new ih().freeze();function sh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function oh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ah(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 JE(e){if(!Zf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ZE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function kl(e){return Y3(e)?e:new KE(e)}function Y3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function G3(e){return typeof e=="string"||W3(e)}function W3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const X3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ey=[],ty={allowDangerousHtml:!0},K3=/^(https?|ircs?|mailto|xmpp)$/i,Q3=[{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 ny(e){const t=J3(e),n=Z3(e);return eI(t.runSync(t.parse(n),n),e)}function J3(e){const t=e.rehypePlugins||ey,n=e.remarkPlugins||ey,r=e.remarkRehypeOptions?B(B({},e.remarkRehypeOptions),ty):ty;return q3().use(OO).use(n).use(C3,r).use(t)}function Z3(e){const t=e.children||"",n=new KE;return typeof t=="string"&&(n.value=t),n}function eI(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||tI;for(const p of Q3)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+X3+p.id,void 0);return Cl(e,f),xN(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 Ff)if(Object.hasOwn(Ff,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],w=Ff[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 tI(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||K3.test(e.slice(0,t))?e:""}const ry=/[#.]/g;function nI(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){ry.lastIndex=s;const c=ry.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 iy(e,t,n){const r=n?oI(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=nI(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,rI(u))c.unshift(u);else for(const[m,T]of Object.entries(u))iI(e,d.properties,m,T)}for(const f of c)uh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function rI(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 iI(e,t,n,r){const s=ml(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=L1(r):s.commaOrSpaceSeparated?a=G1(L1(r).join(" ")):a=sy(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?sI(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(sy(s,s.property,c));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function uh(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)uh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?uh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function sy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ba(n)===ba(t)))return!0}return n}function sI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function oI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const aI=["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"],uI=iy(Ta,"div"),lI=iy(Ti,"g",aI);function cI(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=oy(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=oy(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 oy(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 ls={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/"},ay={}.hasOwnProperty,dI=Object.prototype;function fI(e,t){const n=t||{};return lh({file:n.file||void 0,location:!1,schema:n.space==="svg"?Ti:Ta,verbose:n.verbose||!1},e)}function lh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Nl(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:uy(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=cI(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"},Nl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Nl(e,r,n),n}default:return n=hI(e,t),n}}function uy(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=lh(e,t[n]);r.push(s)}return r}function hI(e,t){const n=e.schema;e.schema=t.namespaceURI===ls.svg?Ti:Ta;let r=-1;const s={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;ay.call(dI,d)||(s[d]=c.value)}const u=(e.schema.space==="svg"?lI:uI)(t.tagName,s,uy(e,t.childNodes));if(Nl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&to(d.startTag),p=d&&d.endTag&&to(d.endTag),m=lh(e,c.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Nl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=pI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function pI(e,t,n){const r=to(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)ay.call(n.attrs,u)&&(a[ml(e.schema,u).property]=to(n.attrs[u]));n.startTag;const c=to(n.startTag),d=n.endTag?to(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function to(e){const t=ly({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=ly({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function ly(e){return e.line&&e.column?e:void 0}const cy={}.hasOwnProperty;function dy(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const c=r.handlers;if(s&&cy.call(s,e)){const d=String(s[e]);u=cy.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 mI={},gI={}.hasOwnProperty,fy=dy("type",{handlers:{root:yI,element:xI,text:_I,comment:SI,doctype:TI}});function EI(e,t){const r=(t||mI).space;return fy(e,r==="svg"?Ti:Ta)}function yI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=ch(e.children,n,t),no(e,n),n}function bI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=ch(e.children,n,t),no(e,n),n}function TI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return no(e,t),t}function _I(e){const t={nodeName:"#text",value:e.value,parentNode:null};return no(e,t),t}function SI(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return no(e,t),t}function xI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Ti);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&gI.call(e.properties,a)){const d=wI(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:ls[u],childNodes:[],parentNode:null};return c.childNodes=ch(e.children,c,r),no(e,c),e.tagName==="template"&&e.content&&(c.content=bI(e.content,r)),c}function wI(e,t,n){const r=ml(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?D1(n):W1(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=ls[r.space]}return s}function ch(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=fy(e[r],n);a.parentNode=t,s.push(a)}return s}function no(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 AI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],vI=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]),xt="�";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 hy(e){return e>=55296&&e<=57343}function CI(e){return e>=56320&&e<=57343}function kI(e,t){return(e-55296)*1024+9216+t}function py(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function my(e){return e>=64976&&e<=65007||vI.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 PI{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(),kI(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,hy(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){py(t)?this._err(te.controlCharacterInInputStream):my(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 gy(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 OI=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))),II=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 RI(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=II.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 LI=32;var xi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(xi||(xi={}));function dh(e){return e>=Xt.ZERO&&e<=Xt.NINE}function DI(e){return e>=Xt.UPPER_A&&e<=Xt.UPPER_F||e>=Xt.LOWER_A&&e<=Xt.LOWER_F}function MI(e){return e>=Xt.UPPER_A&&e<=Xt.UPPER_Z||e>=Xt.LOWER_A&&e<=Xt.LOWER_Z||dh(e)}function FI(e){return e===Xt.EQUALS||MI(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 ii;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ii||(ii={}));class BI{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=ii.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)|LI)===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(dh(s)||DI(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(dh(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===ii.Strict)return 0;return this.emitCodePoint(RI(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&xi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=UI(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===ii.Attribute&&(a===0||FI(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&xi.VALUE_LENGTH)>>14,a!==0){if(u===Xt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==ii.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]&xi.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]&~xi.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!==ii.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 UI(e,t,n,r){const s=(t&xi.BRANCH_LENGTH)>>7,a=t&xi.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 le;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(le||(le={}));var cs;(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"})(cs||(cs={}));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 HI=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 ro(e){var t;return(t=HI.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const fe=g,zI={[le.HTML]:new Set([fe.ADDRESS,fe.APPLET,fe.AREA,fe.ARTICLE,fe.ASIDE,fe.BASE,fe.BASEFONT,fe.BGSOUND,fe.BLOCKQUOTE,fe.BODY,fe.BR,fe.BUTTON,fe.CAPTION,fe.CENTER,fe.COL,fe.COLGROUP,fe.DD,fe.DETAILS,fe.DIR,fe.DIV,fe.DL,fe.DT,fe.EMBED,fe.FIELDSET,fe.FIGCAPTION,fe.FIGURE,fe.FOOTER,fe.FORM,fe.FRAME,fe.FRAMESET,fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6,fe.HEAD,fe.HEADER,fe.HGROUP,fe.HR,fe.HTML,fe.IFRAME,fe.IMG,fe.INPUT,fe.LI,fe.LINK,fe.LISTING,fe.MAIN,fe.MARQUEE,fe.MENU,fe.META,fe.NAV,fe.NOEMBED,fe.NOFRAMES,fe.NOSCRIPT,fe.OBJECT,fe.OL,fe.P,fe.PARAM,fe.PLAINTEXT,fe.PRE,fe.SCRIPT,fe.SECTION,fe.SELECT,fe.SOURCE,fe.STYLE,fe.SUMMARY,fe.TABLE,fe.TBODY,fe.TD,fe.TEMPLATE,fe.TEXTAREA,fe.TFOOT,fe.TH,fe.THEAD,fe.TITLE,fe.TR,fe.TRACK,fe.UL,fe.WBR,fe.XMP]),[le.MATHML]:new Set([fe.MI,fe.MO,fe.MN,fe.MS,fe.MTEXT,fe.ANNOTATION_XML]),[le.SVG]:new Set([fe.TITLE,fe.FOREIGN_OBJECT,fe.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.XMLNS]:new Set},fh=new Set([fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.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 It={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function jI(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function Oa(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function $I(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function wi(e){return $I(e)||Oa(e)}function Ey(e){return wi(e)||jI(e)}function Pl(e){return e+32}function yy(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function by(e){return yy(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function VI(e){return e===P.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:hy(e)?te.surrogateCharacterReference:my(e)?te.noncharacterCharacterReference:py(e)||e===P.CARRIAGE_RETURN?te.controlCharacterReference:null}class qI{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 PI(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new BI(OI,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=VI(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Xe.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Xe.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Xe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Xe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(gy(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=ro(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=yy(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()?ii.Attribute:ii.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(xt);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(xt);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(xt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(wi(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(wi(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+=xt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Oa(t)?Pl(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){wi(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){wi(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){wi(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(xt);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(xt);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(xt);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:wi(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){wi(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)&&by(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(xt);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(xt);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(xt);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)&&by(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+=xt;break}default:this.currentAttr.name+=String.fromCodePoint(Oa(t)?Pl(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+=xt;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+=xt;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+=xt;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+=xt;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+=xt;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(Oa(t))this._createDoctypeToken(String.fromCharCode(Pl(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(xt),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+=xt;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Oa(t)?Pl(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+=xt;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+=xt;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+=xt;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+=xt;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()&&Ey(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ey(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Ty=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),_y=new Set([...Ty,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Ol=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),YI=new Set([...Ol,g.OL,g.UL]),GI=new Set([...Ol,g.BUTTON]),Sy=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),xy=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),WI=new Set([g.TR,g.TEMPLATE,g.HTML]),XI=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),KI=new Set([g.TABLE,g.TEMPLATE,g.HTML]),QI=new Set([g.TD,g.TH]);class JI{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)===le.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const 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])!==le.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(fh,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(QI,le.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(KI,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(XI,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(WI,le.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===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 le.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case le.SVG:{if(xy.has(s))return!1;break}case le.MATHML:{if(Sy.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ol)}hasInListItemScope(t){return this.hasInDynamicScope(t,YI)}hasInButtonScope(t){return this.hasInDynamicScope(t,GI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case le.HTML:{if(fh.has(n))return!0;if(Ol.has(n))return!1;break}case le.SVG:{if(xy.has(n))return!1;break}case le.MATHML:{if(Sy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case 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])===le.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])===le.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&&Ty.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&_y.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&_y.has(this.currentTagId);)this.pop()}}const hh=3;var Lr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Lr||(Lr={}));const wy={type:Lr.Marker};class ZI{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===Lr.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<hh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<hh)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>=hh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(wy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Lr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Lr.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(wy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Lr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Lr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Lr.Element&&n.element===t)}}const Ai={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};Ai.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(Ai.isTextNode(n)){n.value+=t;return}}Ai.appendChild(e,Ai.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ai.isTextNode(r)?r.value+=t:Ai.insertBefore(e,Ai.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)}},Ay="html",eR="about:legacy-compat",tR="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//"],nR=[...vy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],rR=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Cy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],iR=[...Cy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ky(e,t){return t.some(n=>e.startsWith(n))}function sR(e){return e.name===Ay&&e.publicId===null&&(e.systemId===null||e.systemId===eR)}function oR(e){if(e.name!==Ay)return rr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===tR)return rr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),rR.has(n))return rr.QUIRKS;let r=t===null?nR:vy;if(ky(n,r))return rr.QUIRKS;if(r=t===null?Cy:iR,ky(n,r))return rr.LIMITED_QUIRKS}return rr.NO_QUIRKS}const Ny={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},aR="definitionurl",uR="definitionURL",lR=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])),cR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:le.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:le.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:le.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:le.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:le.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:le.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:le.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:le.XML}],["xml:space",{prefix:"xml",name:"space",namespace:le.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:le.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:le.XMLNS}]]),dR=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])),fR=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 hR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===cs.COLOR||r===cs.SIZE||r===cs.FACE)||fR.has(t)}function Py(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===aR){e.attrs[t].name=uR;break}}function Oy(e){for(let t=0;t<e.attrs.length;t++){const n=lR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function ph(e){for(let t=0;t<e.attrs.length;t++){const n=cR.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 pR(e){const t=dR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ro(e.tagName))}function mR(e,t){return t===le.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function gR(e,t,n){if(t===le.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===cs.ENCODING){const s=n[r].value.toLowerCase();return s===Ny.TEXT_HTML||s===Ny.APPLICATION_XML}}return t===le.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function ER(e,t,n,r){return(!r||r===le.HTML)&&gR(e,t,n)||(!r||r===le.MATHML)&&mR(e,t)}const yR="hidden",bR=8,TR=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 _R={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Iy=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Ry={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ai,onParseError:null};class Ly{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({},Ry),t),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n!=null?n:this.treeAdapter.createDocument(),this.tokenizer=new qI(this.options,this),this.activeFormattingElements=new ZI(this.treeAdapter),this.fragmentContextID=r?ro(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new JI(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=B(B({},Ry),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,le.HTML,[]));const s=r.treeAdapter.createElement("documentmock",le.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:_R,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)===le.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,le.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=It.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)!==le.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=It.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=It.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=It.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=It.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&&de(B({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,le.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,le.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(X.HTML,le.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)===le.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,le.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 ER(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Lr.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 Iy.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)===le.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 zI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){QL(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ia(this,t);break}case M.BEFORE_HTML:{Ra(this,t);break}case M.BEFORE_HEAD:{La(this,t);break}case M.IN_HEAD:{Da(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Ma(this,t);break}case M.AFTER_HEAD:{Fa(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{My(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:{yh(this,t);break}case M.IN_TABLE_TEXT:{Vy(this,t);break}case M.IN_COLUMN_GROUP:{Ll(this,t);break}case M.AFTER_BODY:{Fl(this,t);break}case M.AFTER_AFTER_BODY:{Bl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){KL(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ia(this,t);break}case M.BEFORE_HTML:{Ra(this,t);break}case M.BEFORE_HEAD:{La(this,t);break}case M.IN_HEAD:{Da(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Ma(this,t);break}case M.AFTER_HEAD:{Fa(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{yh(this,t);break}case M.IN_COLUMN_GROUP:{Ll(this,t);break}case M.AFTER_BODY:{Fl(this,t);break}case M.AFTER_AFTER_BODY:{Bl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){gh(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:{gh(this,t);break}case M.IN_TABLE_TEXT:{Ha(this,t);break}case M.AFTER_BODY:{kR(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:{PR(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:{Ha(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)?JL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ia(this,t);break}case M.BEFORE_HTML:{OR(this,t);break}case M.BEFORE_HEAD:{RR(this,t);break}case M.IN_HEAD:{gr(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:{bn(this,t);break}case M.IN_TABLE:{io(this,t);break}case M.IN_TABLE_TEXT:{Ha(this,t);break}case M.IN_CAPTION:{LL(this,t);break}case M.IN_COLUMN_GROUP:{bh(this,t);break}case M.IN_TABLE_BODY:{Dl(this,t);break}case M.IN_ROW:{Ml(this,t);break}case M.IN_CELL:{FL(this,t);break}case M.IN_SELECT:{Gy(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:{$L(this,t);break}case M.IN_FRAMESET:{VL(this,t);break}case M.AFTER_FRAMESET:{YL(this,t);break}case M.AFTER_AFTER_BODY:{WL(this,t);break}case M.AFTER_AFTER_FRAMESET:{XL(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?ZL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ia(this,t);break}case M.BEFORE_HTML:{IR(this,t);break}case M.BEFORE_HEAD:{LR(this,t);break}case M.IN_HEAD:{DR(this,t);break}case M.IN_HEAD_NO_SCRIPT:{FR(this,t);break}case M.AFTER_HEAD:{UR(this,t);break}case M.IN_BODY:{Rl(this,t);break}case M.TEXT:{wL(this,t);break}case M.IN_TABLE:{Ba(this,t);break}case M.IN_TABLE_TEXT:{Ha(this,t);break}case M.IN_CAPTION:{DL(this,t);break}case M.IN_COLUMN_GROUP:{ML(this,t);break}case M.IN_TABLE_BODY:{Th(this,t);break}case M.IN_ROW:{Yy(this,t);break}case M.IN_CELL:{BL(this,t);break}case M.IN_SELECT:{Wy(this,t);break}case M.IN_SELECT_IN_TABLE:{HL(this,t);break}case M.IN_TEMPLATE:{jL(this,t);break}case M.AFTER_BODY:{Ky(this,t);break}case M.IN_FRAMESET:{qL(this,t);break}case M.AFTER_FRAMESET:{GL(this,t);break}case M.AFTER_AFTER_BODY:{Bl(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Ia(this,t);break}case M.BEFORE_HTML:{Ra(this,t);break}case M.BEFORE_HEAD:{La(this,t);break}case M.IN_HEAD:{Da(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Ma(this,t);break}case M.AFTER_HEAD:{Fa(this,t);break}case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{jy(this,t);break}case M.TEXT:{AL(this,t);break}case M.IN_TABLE_TEXT:{Ha(this,t);break}case M.IN_TEMPLATE:{Xy(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:{Eh(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:{Dy(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{yh(this,t);break}case M.IN_TABLE_TEXT:{$y(this,t);break}}}}function SR(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):zy(e,t),n}function xR(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 wR(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>=TR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=AR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function AR(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 vR(e,t,n){const r=e.treeAdapter.getTagName(t),s=ro(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===le.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 mh(e,t){for(let n=0;n<bR;n++){const r=SR(e,t);if(!r)break;const s=xR(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=wR(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&vR(e,u,a),CR(e,s,r)}}function gh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function kR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function NR(e,t){e._appendCommentNode(t,e.document)}function Eh(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 PR(e,t){e._setDocumentType(t);const n=t.forceQuirks?rr.QUIRKS:oR(t);sR(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Ia(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,rr.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function OR(e,t){t.tagID===g.HTML?(e._insertElement(t,le.HTML),e.insertionMode=M.BEFORE_HEAD):Ra(e,t)}function IR(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Ra(e,t)}function Ra(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function RR(e,t){switch(t.tagID){case g.HTML:{bn(e,t);break}case g.HEAD:{e._insertElement(t,le.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:La(e,t)}}function LR(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?La(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function La(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function gr(e,t){switch(t.tagID){case g.HTML:{bn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,It.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,It.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,It.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,It.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:Da(e,t)}}function DR(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:{Da(e,t);break}case g.TEMPLATE:{ds(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function ds(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function Da(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function MR(e,t){switch(t.tagID){case g.HTML:{bn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{gr(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:Ma(e,t)}}function FR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case g.BR:{Ma(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Ma(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 BR(e,t){switch(t.tagID){case g.HTML:{bn(e,t);break}case g.BODY:{e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,le.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),gr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Fa(e,t)}}function UR(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Fa(e,t);break}case g.TEMPLATE:{ds(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Fa(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=M.IN_BODY,Il(e,t)}function Il(e,t){switch(t.type){case Xe.CHARACTER:{My(e,t);break}case Xe.WHITESPACE_CHARACTER:{Dy(e,t);break}case Xe.COMMENT:{gh(e,t);break}case Xe.START_TAG:{bn(e,t);break}case Xe.END_TAG:{Rl(e,t);break}case Xe.EOF:{jy(e,t);break}}}function Dy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function My(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function HR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function zR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function jR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_FRAMESET)}function $R(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function VR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&fh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,le.HTML)}function qR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function YR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),n||(e.formElement=e.openElements.current))}function GR(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,le.HTML)}function WR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=It.PLAINTEXT}function XR(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1}function KR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(mh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function QR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function JR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(mh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ZR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function eL(e,t){e.treeAdapter.getDocumentMode(e.document)!==rr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function Fy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function By(e){const t=gy(e,cs.TYPE);return t!=null&&t.toLowerCase()===yR}function tL(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),By(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function nL(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function rL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function iL(e,t){t.tagName=X.IMG,t.tagID=g.IMG,Fy(e,t)}function sL(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=It.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function oL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,It.RAWTEXT)}function aL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,It.RAWTEXT)}function Uy(e,t){e._switchToTextParsing(t,It.RAWTEXT)}function uL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function lL(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function cL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function dL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,le.HTML)}function fL(e,t){e._reconstructActiveFormattingElements(),Py(t),ph(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function hL(e,t){e._reconstructActiveFormattingElements(),Oy(t),ph(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function Hy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function bn(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:{QR(e,t);break}case g.A:{KR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{VR(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{$R(e,t);break}case g.LI:case g.DD:case g.DT:{GR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Fy(e,t);break}case g.HR:{rL(e,t);break}case g.RB:case g.RTC:{cL(e,t);break}case g.RT:case g.RP:{dL(e,t);break}case g.PRE:case g.LISTING:{qR(e,t);break}case g.XMP:{oL(e,t);break}case g.SVG:{hL(e,t);break}case g.HTML:{HR(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:{gr(e,t);break}case g.BODY:{zR(e,t);break}case g.FORM:{YR(e,t);break}case g.NOBR:{JR(e,t);break}case g.MATH:{fL(e,t);break}case g.TABLE:{eL(e,t);break}case g.INPUT:{tL(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{nL(e,t);break}case g.IMAGE:{iL(e,t);break}case g.BUTTON:{XR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{ZR(e,t);break}case g.IFRAME:{aL(e,t);break}case g.SELECT:{uL(e,t);break}case g.OPTION:case g.OPTGROUP:{lL(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Uy(e,t);break}case g.FRAMESET:{jR(e,t);break}case g.TEXTAREA:{sL(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Uy(e,t):Hy(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:Hy(e,t)}}function pL(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 mL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,Ky(e,t))}function gL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function EL(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 yL(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function bL(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function TL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function _L(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function SL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function xL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function zy(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 Rl(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:{mh(e,t);break}case g.P:{yL(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:{gL(e,t);break}case g.LI:{bL(e);break}case g.DD:case g.DT:{TL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{_L(e);break}case g.BR:{xL(e);break}case g.BODY:{pL(e,t);break}case g.HTML:{mL(e,t);break}case g.FORM:{EL(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{SL(e,t);break}case g.TEMPLATE:{ds(e,t);break}default:zy(e,t)}}function jy(e,t){e.tmplInsertionModeStack.length>0?Xy(e,t):Eh(e,t)}function wL(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 AL(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function yh(e,t){if(e.openElements.currentTagId!==void 0&&Iy.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:{Vy(e,t);break}case Xe.WHITESPACE_CHARACTER:{$y(e,t);break}}else Ua(e,t)}function vL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CAPTION}function CL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function kL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,bh(e,t)}function NL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_TABLE_BODY}function PL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=M.IN_TABLE_BODY,Dl(e,t)}function OL(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function IL(e,t){By(t)?e._appendElement(t,le.HTML):Ua(e,t),t.ackSelfClosing=!0}function RL(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function io(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{PL(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{gr(e,t);break}case g.COL:{kL(e,t);break}case g.FORM:{RL(e,t);break}case g.TABLE:{OL(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{NL(e,t);break}case g.INPUT:{IL(e,t);break}case g.CAPTION:{vL(e,t);break}case g.COLGROUP:{CL(e,t);break}default:Ua(e,t)}}function Ba(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{ds(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:Ua(e,t)}}function Ua(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Il(e,t),e.fosterParentingEnabled=n}function $y(e,t){e.pendingCharacterTokens.push(t)}function Vy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ha(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ua(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const qy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function LL(e,t){const n=t.tagID;qy.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,io(e,t)):bn(e,t)}function DL(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&&Ba(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:Rl(e,t)}}function bh(e,t){switch(t.tagID){case g.HTML:{bn(e,t);break}case g.COL:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{gr(e,t);break}default:Ll(e,t)}}function ML(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:{ds(e,t);break}case g.COL:break;default:Ll(e,t)}}function Ll(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function Dl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,le.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,Ml(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,io(e,t));break}default:io(e,t)}}function Th(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,Ba(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:Ba(e,t)}}function Ml(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,le.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,Dl(e,t));break}default:io(e,t)}}function Yy(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,Th(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Th(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:Ba(e,t)}}function FL(e,t){const n=t.tagID;qy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),Ml(e,t)):bn(e,t)}function BL(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(),Yy(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Rl(e,t)}}function Gy(e,t){switch(t.tagID){case g.HTML:{bn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,le.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:{gr(e,t);break}}}function Wy(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:{ds(e,t);break}}}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.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Gy(e,t)}function HL(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)):Wy(e,t)}function zL(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:{gr(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,io(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,bh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,Dl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,Ml(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,bn(e,t)}}function jL(e,t){t.tagID===g.TEMPLATE&&ds(e,t)}function Xy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Eh(e,t)}function $L(e,t){t.tagID===g.HTML?bn(e,t):Fl(e,t)}function Ky(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 Fl(e,t)}function Fl(e,t){e.insertionMode=M.IN_BODY,Il(e,t)}function VL(e,t){switch(t.tagID){case g.HTML:{bn(e,t);break}case g.FRAMESET:{e._insertElement(t,le.HTML);break}case g.FRAME:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{gr(e,t);break}}}function qL(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 YL(e,t){switch(t.tagID){case g.HTML:{bn(e,t);break}case g.NOFRAMES:{gr(e,t);break}}}function GL(e,t){t.tagID===g.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function WL(e,t){t.tagID===g.HTML?bn(e,t):Bl(e,t)}function Bl(e,t){e.insertionMode=M.IN_BODY,Il(e,t)}function XL(e,t){switch(t.tagID){case g.HTML:{bn(e,t);break}case g.NOFRAMES:{gr(e,t);break}}}function KL(e,t){t.chars=xt,e._insertCharacters(t)}function QL(e,t){e._insertCharacters(t),e.framesetOk=!1}function Qy(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==le.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function JL(e,t){if(hR(t))Qy(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?Py(t):r===le.SVG&&(pR(t),Oy(t)),ph(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function ZL(e,t){if(t.tagID===g.P||t.tagID===g.BR){Qy(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===le.HTML){e._endTagOutsideForeignContent(t);break}const 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 e6=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,t6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Jy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Zy(e,t){const n=d6(e),r=dy("type",{handlers:{root:n6,element:r6,text:i6,comment:tb,doctype:s6,raw:a6},unknown:u6}),s={parser:n?new Ly(Jy):Ly.getFragmentParser(void 0,Jy),handle(c){r(c,s)},stitches:!1,options:t||{}};r(e,s),so(s,Ir());const a=n?s.parser.document:s.parser.getFragment(),u=fI(a,{file:s.options.file});return s.stitches&&Cl(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 eb(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function n6(e,t){eb(e.children,t)}function r6(e,t){l6(e,t),eb(e.children,t),c6(e,t)}function i6(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Xe.CHARACTER,chars:e.value,location:za(e)};so(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function s6(e,t){const n={type:Xe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:za(e)};so(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function o6(e,t){t.stitches=!0;const n=f6(e);if("children"in e&&"children"in n){const r=Zy({type:"root",children:e.children},t.options);n.children=r.children}tb({type:"comment",value:{stitch:n}},t)}function tb(e,t){const n=e.value,r={type:Xe.COMMENT,data:n,location:za(e)};so(t,Ir(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function a6(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,nb(t,Ir(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(e6,"&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 u6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))o6(n,t);else{let r="";throw t6.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 so(e,t){nb(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=It.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 nb(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 l6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===It.PLAINTEXT)return;so(t,Ir(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:ls.html;s===ls.html&&n==="svg"&&(s=ls.svg);const a=EI(de(B({},e),{children:[]}),{space:s===ls.svg?"svg":"html"}),u={type:Xe.START_TAG,tagName:n,tagID:ro(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:za(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function c6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&AI.includes(n)||t.parser.tokenizer.state===It.PLAINTEXT)return;so(t,gl(e));const r={type:Xe.END_TAG,tagName:n,tagID:ro(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:za(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===It.RCDATA||t.parser.tokenizer.state===It.RAWTEXT||t.parser.tokenizer.state===It.SCRIPT_DATA)&&(t.parser.tokenizer.state=It.DATA)}function d6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function za(e){const t=Ir(e)||{line:void 0,column:void 0,offset:void 0},n=gl(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 f6(e){return"children"in e?us(de(B({},e),{children:[]})):us(e)}function rb(e){return function(t,n){return Zy(t,de(B({},e),{file:n}))}}const fs=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],ib={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...fs,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...fs],h2:[["className","sr-only"]],img:[...fs,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...fs,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...fs],table:[...fs],ul:[...fs,["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 h6(e,t){let n={type:"root",children:[]};const r={schema:t?B(B({},ib),t):ib,stack:[]},s=sb(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function sb(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return p6(e,n);case"doctype":return m6(e,n);case"element":return g6(e,n);case"root":return E6(e,n);case"text":return y6(e,n)}}}function p6(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 ja(a,t),a}}function m6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ja(n,t),n}}function g6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=ob(e,t.children),s=b6(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 ja(u,t),u}function E6(e,t){const r={type:"root",children:ob(e,t.children)};return ja(r,t),r}function y6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return ja(r,t),r}function ob(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=sb(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function b6(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=ab(e,lb(a,f),f,p);m==null&&(m=ab(e,lb(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 ab(e,t,n,r){return t?Array.isArray(r)?T6(e,t,n,r):ub(e,t,n,r):void 0}function T6(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=ub(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function ub(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&_6(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 _6(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 ja(e,t){const n=eE(t);t.data&&(e.data=us(t.data)),n&&(e.position=n)}function lb(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 S6(e){return function(t){return h6(t,e)}}const cb=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return S.jsx("a",de(B(B({className:G(e,`${z}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},x6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=tt();return!e&&!t?null:S.jsx("div",{className:G(n,`${z}-disclaimer`),children:t?S.jsx(ny,{rehypePlugins:[rb,S6],components:{ul:({children:r})=>S.jsx("ul",{className:G(n,`${z}-ul`),children:r}),ol:({children:r})=>S.jsx("ol",{className:G(n,`${z}-ol`),children:r}),li:({children:r})=>S.jsx("li",{className:G(n,`${z}-li`),children:r}),a:({href:r,title:s,children:a})=>S.jsx(cb,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>S.jsx("img",{className:G(n,`${z}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>S.jsx("p",{className:G(n,`${z}-disclaimer-text`),children:r}),span:({children:r})=>S.jsx("span",{className:G(n,`${z}-disclaimer-text-span`),children:r})},children:t}):S.jsx("p",{className:G(n,`${z}-disclaimer-text`),children:e})})},_h=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:s,imageFile:a}=Vn(),{setImageFile:u}=Ws(),{logger:c,globalClassName:d,searchConfig:f,features:p}=tt(),m=F.useRef(null),T=!!(p!=null&&p.enableImageUpload),y=!!s||!1,_=y?"connected":"disconnected",w=t||!y,C=()=>a?new Promise((H,q)=>{const R=new FileReader;R.readAsDataURL(a),R.onload=()=>H(R.result),R.onerror=Y=>q(Y)}):Promise.resolve(""),A=()=>{u(null)},N=F.useCallback(H=>{const q=H==null?void 0:H[0];if(q&&!w){if(q.size>10*1024*1024){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(q)}},[w,u]),v=H=>Ze(null,null,function*(){var Y;H.preventDefault();const q=(((Y=m.current)==null?void 0:Y.value)||"").trim();let R="";try{R=yield C()}catch(re){c==null||c.error("Error converting file to base64:",re),alert("There was an error processing the file. Please try again.");return}q&&(A(),m.current.value="",r(q,R))});return S.jsxs("div",{className:G(d,e,`cim-${n}-component`,a&&"with-attachments",`${z}-search-bar-wrapper`),children:[a&&S.jsx(Hk,{file:a,componentType:n,globalClassName:d,onRemove:A}),S.jsxs("form",{className:G(d,e,`cim-${n}-component`,`${z}-search-bar`),name:`${z}-search-form`,onSubmit:v,children:[S.jsx("span",{role:"status",className:G(`${z}-connection-status-icon`,_),children:S.jsx("span",{className:`${z}-visually-hidden`,children:y?"Connected to assistant":"Disconnected from assistant"})}),T&&S.jsx(Wk,{componentType:n,accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",disabled:w,globalClassName:d,className:e,onFiles:N}),S.jsx("input",{className:G(d,e,`cim-${n}-component`,`${z}-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:`${z}-user-input`}),S.jsx(Zk,{isLoading:w}),S.jsx(Kk,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:w})]}),S.jsx(x6,{})]})};function w6(e){return Tt({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 A6(e){return Tt({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 db=F.createContext({isOpen:!1}),Sh=F.createContext(null),fb=F.createContext(null),hs=()=>{var n,r;const e=F.useContext(Sh),t=F.useContext(fb);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},hb=({onClearChat:e,componentType:t})=>{const n=hs(),r=()=>{e(),n()};return S.jsxs("button",{className:G(`${z}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[S.jsx(A6,{}),"Clear chat"]})};function v6(e){return e==null?[]:Array.isArray(e)?e:[e]}var C6=(e,...t)=>e.concat(t),k6=(e,...t)=>e.filter(n=>!t.includes(n)),N6=e=>Array.from(new Set(e));function pb(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 P6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return pb(e,t,{step:-r,loop:s})}var O6=e=>Array.isArray(e),mb=e=>e!=null&&typeof e=="object",I6=e=>mb(e)&&!O6(e),Ul=e=>typeof e=="string",oo=e=>typeof e=="function",R6=e=>e==null,L6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),D6=e=>Object.prototype.toString.call(e),gb=Function.prototype.toString,M6=gb.call(Object),F6=e=>{if(!mb(e)||D6(e)!="[object Object]"||H6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=L6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&gb.call(n)==M6},B6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,U6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,H6=e=>B6(e)||U6(e),z6=e=>e(),j6=()=>{},xh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function $6(e,t=0){let n=0,r=null;return((...s)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...s),n=a):r||(r=setTimeout(()=>{e(...s),n=Date.now(),r=null},t-u))})}var{min:V6,max:q6}=Math,Y6=e=>Number.isNaN(e),G6=e=>Y6(e)?0:e,Eb=(e,t,n)=>V6(q6(G6(e),t),n);function wh(e){if(!F6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const s=e[r];s!==void 0&&(n[r]=wh(s))}return n}function Ah(...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 X6(e,t,n){let r=[];for(const s of t)e[s]==null&&r.push(s);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var K6=Object.defineProperty,Q6=(e,t,n)=>t in e?K6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vh=(e,t,n)=>Q6(e,typeof t!="symbol"?t+"":t,n),yb=()=>{},Hl=e=>typeof e=="object"&&e!==null,ao=e=>e?"":void 0,bb=e=>e?"true":void 0,J6=1,Z6=9,e4=11,Qt=e=>Hl(e)&&e.nodeType===J6&&typeof e.nodeName=="string",zl=e=>Hl(e)&&e.nodeType===Z6,t4=e=>Hl(e)&&e===e.window,Tb=e=>Qt(e)?e.localName||"":"#document";function n4(e){return["html","body","#document"].includes(Tb(e))}var r4=e=>Hl(e)&&e.nodeType!==void 0,ps=e=>r4(e)&&e.nodeType===e4&&"host"in e,i4=e=>Qt(e)&&e.localName==="input",s4=e=>Qt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function $a(e){if(!e)return!1;const t=e.getRootNode();return co(t)===e}var o4=/(textarea|select)/;function a4(e){if(e==null||!Qt(e))return!1;try{return i4(e)&&e.selectionStart!=null||o4.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function uo(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&&ps(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Dr(e){var t;return zl(e)?e:t4(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function u4(e){return Dr(e).documentElement}function lo(e){var t,n,r;return ps(e)?lo(e.host):zl(e)?(t=e.defaultView)!=null?t:window:Qt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function co(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 l4(e){if(Tb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ps(e)&&e.host||u4(e);return ps(t)?t.host:t}function Ch(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),zl(t)||ps(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var kh=new WeakMap;function fo(e){return kh.has(e)||kh.set(e,lo(e).getComputedStyle(e)),kh.get(e)}var Nh=new Set(["menu","listbox","dialog","grid","tree","region"]),c4=e=>Nh.has(e),_b=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Sb(e,t){const n=new Set,r=Ch(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=_b(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&&c4(m)&&!T&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function xb(e,t){const n=Ch(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=_b(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&&Nh.has(m)&&!T&&(t(p),s(p))}}}};s(e)}function d4(e){const t=new Set;return xb(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function f4(e){const t=e.getAttribute("role");return!!(t&&Nh.has(t))}function h4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function p4(e){var t;return h4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function m4(e){if(!e.id)return!1;const t=Ch(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&f4(e))}var Ph=()=>typeof document!="undefined";function g4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Oh=e=>Ph()&&e.test(g4()),E4=e=>Ph()&&e.test(navigator.vendor),wb=()=>Ph()&&!!navigator.maxTouchPoints,y4=()=>Oh(/^iPhone/i),b4=()=>Oh(/^iPad/i)||Ih()&&navigator.maxTouchPoints>1,jl=()=>y4()||b4(),T4=()=>Ih()||jl(),Ih=()=>Oh(/^Mac/i),_4=()=>T4()&&E4(/apple/i);function S4(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 Er(e){var n;const t=S4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Ab=e=>e.button===0,x4=e=>e.button===2||Ih()&&e.ctrlKey&&e.button===0,w4=e=>"touches"in e&&e.touches.length>0,A4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},vb={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function v4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=A4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in vb&&(s=vb[s]),s}function Cb(e,t="client"){const n=w4(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 Nb(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var k4=e=>!Number.isNaN(Nb(e)),N4=e=>Nb(e)<0;function P4(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 Pb(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=P4(d,t);if(f){const p=Array.from(f.querySelectorAll($l)).filter(n),m=u.get(d);if(m!==void 0){const T=m+1;r.splice(T,0,...p),p.forEach((y,_)=>{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 $l="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",Ob=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll($l));(n==!0||n=="if-empty"&&s.length===0)&&Qt(e)&&Mr(e)&&s.unshift(e);const u=[];for(const c of s)if(Mr(c)){if(kb(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...Ob(d,{getShadowRoot:r}));continue}u.push(c)}return r?Pb(u,r,Mr):u};function Mr(e){return!Qt(e)||e.closest("[inert]")?!1:e.matches($l)&&s4(e)}function ho(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll($l));n&&ms(e)&&s.unshift(e);const a=[];for(const u of s)if(ms(u)){if(kb(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...ho(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Pb(a,r,ms);return!u.length&&n?s:u}return!a.length&&n?s:a}function ms(e){return Qt(e)&&e.tabIndex>0?!0:Mr(e)&&!N4(e)}function O4(e,t={}){const n=ho(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function I4(e,t={}){const{current:n,getShadowRoot:r}=t,s=ho(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:co(a);if(!u)return null;const c=s.indexOf(u);return s[c+1]||null}function Va(e){return e.tabIndex<0&&(C4.test(e.localName)||a4(e))&&!k4(e)?0:e.tabIndex}function Ib(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=ho(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var R4=class B2{constructor(){vh(this,"id",null),vh(this,"fn_cleanup"),vh(this,"cleanup",()=>{this.cancel()})}static create(){return new B2}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function jt(e){const t=R4.create();return t.request(e),t.cleanup}function Rb(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 Rh(e){const t=l4(e);return n4(t)?Dr(t).body:Qt(t)&&M4(t)?t:Rh(t)}var L4=/auto|scroll|overlay|hidden|clip/,D4=new Set(["inline","contents"]);function M4(e){const t=lo(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return L4.test(n+s+r)&&!D4.has(a)}var po="default",Lh="",Vl=new WeakMap;function F4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return jl()?(po==="default"&&(Lh=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),po="disabled"):t&&(Vl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>B4({target:t,doc:r})}function B4(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(jl()){if(po!=="disabled")return;po="restoring",setTimeout(()=>{Rb(()=>{po==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=Lh||""),Lh="",po="default")})},300)}else if(t&&Vl.has(t)){const a=Vl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Vl.delete(t)}}function U4(e={}){const u=e,{defer:t,target:n}=u,r=dn(u,["defer","target"]),s=t?jt:c=>c(),a=[];return a.push(s(()=>{const c=typeof n=="function"?n():n;a.push(F4(de(B({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function H4(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=c=>{const d=Cb(c),f=Math.sqrt(Fu(d.x,2)+Fu(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=Cb(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),U4({doc:e})];return()=>{u.forEach(c=>c())}}function z4(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]=O4(e,{includeContainer:!0,getShadowRoot:a}),y=I4(c,{current:n,getShadowRoot:a}),_=!m&&!T;f.shiftKey&&$a(y)?(s==null||s(),p=T):f.shiftKey&&($a(m)||_)?p=n:!f.shiftKey&&$a(n)?(s==null||s(),p=m):!f.shiftKey&&($a(T)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Jt(u,"keydown",d,!0)}function j4(e,t){const c=t,{defer:n,triggerElement:r}=c,s=dn(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(z4(d,B({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function $4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function ql(e,t){if(!e)return yb;const n=Object.keys(t).reduce((r,s)=>(r[s]=e.style.getPropertyValue(s),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function V4(e,t,n){if(!e)return yb;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 q4(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 Y4(e,t){const{timeout:n,rootNode:r}=t,s=lo(r),a=Dr(r),u=new s.AbortController;return q4(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 G4=(...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,Lb=e=>{const t={};let n;for(;n=W4.exec(e);)t[n[1]]=n[2];return t},X4=(e,t)=>{if(Ul(e)){if(Ul(t))return`${e};${t}`;e=Lb(e)}else Ul(t)&&(t=Lb(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]=xh(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=G4(t[s],n[s]);continue}if(s==="style"){t[s]=X4(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 NU(e){return e}var mo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(mo||{}),Dh="__init__";function K4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Dr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>co(t()),a=u=>t().getElementById(u);return de(B({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:$a,getById:a})}function Q4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var go=()=>e=>Array.from(new Set(e)),Db=typeof globalThis.document!="undefined"?F.useLayoutEffect:F.useEffect;function Yl(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);Db(()=>{d.current=c.current},[s,e().value]);const f=y=>{var C,A;const _=d.current,w=oo(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:w,prev:_}),u||a(w),n(w,_)||(A=(C=e()).onChange)==null||A.call(C,w,_)};function p(){return u?e().value:s}return{initial:r,ref:c,get:p,set(y){(e().sync?Xs.flushSync:z6)(()=>f(y))},invoke(y,_){var w,C;(C=(w=e()).onChange)==null||C.call(w,y,_)},hash(y){var _,w,C;return(C=(w=(_=e()).hash)==null?void 0:w.call(_,y))!=null?C:String(y)}}}Yl.cleanup=e=>{F.useEffect(()=>e,[])},Yl.ref=e=>{const t=F.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function J4(e){const t=F.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var Z4=(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,he,Ce,ne,ae,xe;const n=F.useMemo(()=>{const{id:oe,ids:Q,getRootNode:ie}=t;return K4({id:oe,ids:Q,getRootNode:ie})},[t]),r=(...oe)=>{e.debug&&console.log(...oe)},s=(he=(se=e.props)==null?void 0:se.call(e,{props:wh(t),scope:n}))!=null?he:t,a=eD(s),u=(Ce=e.context)==null?void 0:Ce.call(e,{prop:a,bindable:Yl,scope:n,flush:Fb,getContext(){return d},getComputed(){return q},getRefs(){return w},getEvent(){return y()}}),c=Mb(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=()=>de(B({},T.current),{current(){return T.current},previous(){return m.current}}),_=()=>de(B({},R),{matches(...oe){return oe.includes(R.ref.current)},hasTag(oe){var Q,ie;return!!((ie=(Q=e.states[R.ref.current])==null?void 0:Q.tags)!=null&&ie.includes(oe))}}),w=J4((ae=(ne=e.refs)==null?void 0:ne.call(e,{prop:a,context:d}))!=null?ae:{}),C=()=>({state:_(),context:d,event:y(),prop:a,send:V,action:A,guard:N,track:Z4,refs:w,computed:q,flush:Fb,scope:n,choose:H}),A=oe=>{const Q=oo(oe)?oe(C()):oe;if(!Q)return;const ie=Q.map(k=>{var ee,O;const D=(O=(ee=e.implementations)==null?void 0:ee.actions)==null?void 0:O[k];return D||Ah(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),D});for(const k of ie)k==null||k(C())},N=oe=>{var Q,ie;return oo(oe)?oe(C()):(ie=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:ie[oe](C())},v=oe=>{const Q=oo(oe)?oe(C()):oe;if(!Q)return;const ie=Q.map(D=>{var O,Se;const ee=(Se=(O=e.implementations)==null?void 0:O.effects)==null?void 0:Se[D];return ee||Ah(`[zag-js] No implementation found for effect "${JSON.stringify(D)}"`),ee}),k=[];for(const D of ie){const ee=D==null?void 0:D(C());ee&&k.push(ee)}return()=>k.forEach(D=>D==null?void 0:D())},H=oe=>v6(oe).find(Q=>{let ie=!Q.guard;return Ul(Q.guard)?ie=!!N(Q.guard):oo(Q.guard)&&(ie=Q.guard(C())),ie}),q=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:q})},R=Yl(()=>({defaultValue:e.initialState({prop:a}),onChange(oe,Q){var k,D,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((D=p.current)==null?void 0:D.actions);const ie=v((ee=e.states[oe])==null?void 0:ee.effects);if(ie&&f.current.set(oe,ie),Q===Dh){A(e.entry);const Se=v(e.effects);Se&&f.current.set(Dh,Se)}A((O=e.states[oe])==null?void 0:O.entry)}})),Y=F.useRef(void 0),re=F.useRef(mo.NotStarted);Db(()=>{queueMicrotask(()=>{var D;const ie=re.current===mo.Started;re.current=mo.Started,r(ie?"rehydrating...":"initializing...");const k=(D=Y.current)!=null?D:R.initial;R.invoke(k,ie?R.get():Dh)});const oe=f.current,Q=R.ref.current;return()=>{r("unmounting..."),Y.current=Q,re.current=mo.Stopped,oe.forEach(ie=>ie==null?void 0:ie()),f.current=new Map,p.current=null,queueMicrotask(()=>{A(e.exit)})}},[]);const Ee=()=>"ref"in R?R.ref.current:R.get(),V=oe=>{queueMicrotask(()=>{var O,Se,Me,ye,De;if(re.current!==mo.Started)return;m.current=T.current,T.current=oe;let Q=Ee();const ie=(Me=(O=e.states[Q].on)==null?void 0:O[oe.type])!=null?Me:(Se=e.on)==null?void 0:Se[oe.type],k=H(ie);if(!k)return;p.current=k;const D=(ye=k.target)!=null?ye:Q;r("transition",oe.type,k.target||Q,`(${k.actions})`);const ee=D!==Q;ee?Xs.flushSync(()=>R.set(D)):k.reenter&&!ee?R.invoke(Q,Q):A((De=k.actions)!=null?De:[])})};return(xe=e.watch)==null||xe.call(e,C()),{state:_(),send:V,context:d,prop:a,scope:n,refs:w,computed:q,event:y(),getStatus:()=>re.current}}function Mb(e){const t=F.useRef(e);return t.current=e,t}function eD(e){const t=Mb(e);return function(r){return t.current[r]}}function Fb(e){queueMicrotask(()=>{Xs.flushSync(()=>e())})}var Mh=Q4(e=>e);function Wl(...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 tD(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 Fh=e=>{const t=F.memo(F.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=dn(f,["asChild","children"]);if(!s)return F.createElement(e,de(B({},u),{ref:r}),a);if(!F.isValidElement(a))return null;const c=F.Children.only(a),d=tD(c);return F.cloneElement(c,de(B({},$t(u,c.props)),{ref:r?Wl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Tn=(()=>{const e=new Map;return new Proxy(Fh,{apply(t,n,r){return Fh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Fh(r)),e.get(r)}})})();function nD(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function gs(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:nD(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[c.Provider,d,c]}const[rD,Bh]=gs({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[Bb,qa]=gs({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),Ub=F.forwardRef((e,t)=>{const n=Bh(),r=qa(),s=$t(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:S.jsx(Tn.div,de(B({},s),{ref:Wl(r.ref,t)}))});Ub.displayName="PopoverContent";const Hb=F.forwardRef((e,t)=>{const n=Bh(),r=qa(),s=$t(n.getPositionerProps(),e);return r.unmounted?null:S.jsx(Tn.div,de(B({},s),{ref:t}))});Hb.displayName="PopoverPositioner";const Ya=()=>(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)]),zb=e=>Ya()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function iD(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 sD={props({props:e}){return de(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",fo(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=Xl(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",Xl(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",Xl(t.get("styles")))},u=d=>{const f=Xl(t.get("styles"));Er(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=ql(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),Rb(()=>c())}}}}};function Xl(e){return(e==null?void 0:e.animationName)||"none"}go()(["onExitComplete","present","immediate"]);function oD(e,t={}){const{sync:n=!1}=t,r=aD(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 aD(e){const t=F.useRef(e);return t.current=e,t}const Uh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=T,a=dn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=F.useRef(!1),c=de(B({},a),{present:r,onExitComplete:oD(e.onExitComplete)}),d=Gl(sD,c),f=iD(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 Es=(e,t=[])=>({parts:(...n)=>{if(uD(t))return Es(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Es(e,[...t,...n]),omit:(...n)=>Es(e,t.filter(r=>!n.includes(r))),rename:n=>Es(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Eo(e)}"][data-part="${Eo(r)}"]`,`& [data-scope="${Eo(e)}"][data-part="${Eo(r)}"]`].join(", "),attrs:{"data-scope":Eo(e),"data-part":Eo(r)}}}),{})}),Eo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),uD=e=>e.length===0;const lD=["top","right","bottom","left"],Ci=Math.min,si=Math.max,Kl=Math.round,Ql=Math.floor,Fr=e=>({x:e,y:e}),cD={left:"right",right:"left",bottom:"top",top:"bottom"};function jb(e,t,n){return si(e,Ci(t,n))}function oi(e,t){return typeof e=="function"?e(t):e}function ki(e){return e.split("-")[0]}function yo(e){return e.split("-")[1]}function Hh(e){return e==="x"?"y":"x"}function zh(e){return e==="y"?"height":"width"}function Br(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function jh(e){return Hh(Br(e))}function dD(e,t,n){n===void 0&&(n=!1);const r=yo(e),s=jh(e),a=zh(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Jl(u)),[u,Jl(u)]}function fD(e){const t=Jl(e);return[$h(e),t,$h(t)]}function $h(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const $b=["left","right"],Vb=["right","left"],hD=["top","bottom"],pD=["bottom","top"];function mD(e,t,n){switch(e){case"top":case"bottom":return n?t?Vb:$b:t?$b:Vb;case"left":case"right":return t?hD:pD;default:return[]}}function gD(e,t,n,r){const s=yo(e);let a=mD(ki(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map($h)))),a}function Jl(e){const t=ki(e);return cD[t]+e.slice(t.length)}function ED(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 qb(e){return typeof e!="number"?ED(e):{top:e,right:e,bottom:e,left:e}}function Zl(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 Yb(e,t,n){let{reference:r,floating:s}=e;const a=Br(t),u=jh(t),c=zh(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 _=yo(t);return _&&(y[u]+=T*(_==="end"?1:-1)*(n&&f?-1:1)),y}function yD(e,t){return Ze(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}=oi(t,e),_=qb(y),C=c[T?m==="floating"?"reference":"floating":m],A=Zl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(C))==null||n?C:C.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,v=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),H=(yield a.isElement==null?void 0:a.isElement(v))&&(yield a.getScale==null?void 0:a.getScale(v))||{x:1,y:1},q=Zl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:N,offsetParent:v,strategy:d}):N);return{top:(A.top-q.top+_.top)/H.y,bottom:(q.bottom-A.bottom+_.bottom)/H.y,left:(A.left-q.left+_.left)/H.x,right:(q.right-A.right+_.right)/H.x}})}const bD=50,TD=(e,t,n)=>Ze(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,c=u.detectOverflow?u:de(B({},u),{detectOverflow:yD}),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}=Yb(f,r,d),T=r,y=0;const _={};for(let w=0;w<a.length;w++){const C=a[w];if(!C)continue;const{name:A,fn:N}=C,{x:v,y:H,data:q,reset:R}=yield N({x:p,y:m,initialPlacement:r,placement:T,strategy:s,middlewareData:_,rects:f,platform:c,elements:{reference:e,floating:t}});p=v!=null?v:p,m=H!=null?H:m,_[A]=B(B({},_[A]),q),R&&y<bD&&(y++,typeof R=="object"&&(R.placement&&(T=R.placement),R.rects&&(f=R.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):R.rects),{x:p,y:m}=Yb(f,T,d)),w=-1)}return{x:p,y:m,placement:T,strategy:s,middlewareData:_}}),_D=e=>({name:"arrow",options:e,fn(n){return Ze(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=oi(e,n)||{};if(p==null)return{};const T=qb(m),y={x:r,y:s},_=jh(a),w=zh(_),C=yield c.getDimensions(p),A=_==="y",N=A?"top":"left",v=A?"bottom":"right",H=A?"clientHeight":"clientWidth",q=u.reference[w]+u.reference[_]-y[_]-u.floating[w],R=y[_]-u.reference[_],Y=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let re=Y?Y[H]:0;(!re||!(yield c.isElement==null?void 0:c.isElement(Y)))&&(re=d.floating[H]||u.floating[w]);const Ee=q/2-R/2,V=re/2-C[w]/2-1,se=Ci(T[N],V),he=Ci(T[v],V),Ce=re-C[w]-he,ne=re/2-C[w]/2+Ee,ae=jb(se,ne,Ce),xe=!f.arrow&&yo(a)!=null&&ne!==ae&&u.reference[w]/2-(ne<se?se:he)-C[w]/2<0,oe=xe?ne<se?ne-se:ne-Ce:0;return{[_]:y[_]+oe,data:B({[_]:ae,centerOffset:ne-ae-oe},xe&&{alignmentOffset:oe}),reset:xe}})}}),SD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ze(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,ae=oi(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0}=ae,A=dn(ae,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const N=ki(a),v=Br(d),H=ki(d)===d,q=yield f.isRTL==null?void 0:f.isRTL(p.floating),R=y||(H||!C?[Jl(d)]:fD(d)),Y=w!=="none";!y&&Y&&R.push(...gD(d,C,w,q));const re=[d,...R],Ee=yield f.detectOverflow(n,A),V=[];let se=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&V.push(Ee[N]),T){const xe=dD(a,c,q);V.push(Ee[xe[0]],Ee[xe[1]])}if(se=[...se,{placement:a,overflows:V}],!V.every(xe=>xe<=0)){var he,Ce;const xe=(((he=u.flip)==null?void 0:he.index)||0)+1,oe=re[xe];if(oe&&(!(T==="alignment"?v!==Br(oe):!1)||se.every(k=>Br(k.placement)===v?k.overflows[0]>0:!0)))return{data:{index:xe,overflows:se},reset:{placement:oe}};let Q=(Ce=se.filter(ie=>ie.overflows[0]<=0).sort((ie,k)=>ie.overflows[1]-k.overflows[1])[0])==null?void 0:Ce.placement;if(!Q)switch(_){case"bestFit":{var ne;const ie=(ne=se.filter(k=>{if(Y){const D=Br(k.placement);return D===v||D==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(D=>D>0).reduce((D,ee)=>D+ee,0)]).sort((k,D)=>k[1]-D[1])[0])==null?void 0:ne[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 Wb(e){return lD.some(t=>e[t]>=0)}const xD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ze(this,null,function*(){const{rects:r,platform:s}=n,c=oi(e,n),{strategy:a="referenceHidden"}=c,u=dn(c,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,de(B({},u),{elementContext:"reference"})),f=Gb(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Wb(f)}}}case"escaped":{const d=yield s.detectOverflow(n,de(B({},u),{altBoundary:!0})),f=Gb(d,r.floating);return{data:{escapedOffsets:f,escaped:Wb(f)}}}default:return{}}})}}},Xb=new Set(["left","top"]);function wD(e,t){return Ze(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=ki(n),c=yo(n),d=Br(n)==="y",f=Xb.has(u)?-1:1,p=a&&d?-1:1,m=oi(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 AD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ze(this,null,function*(){var r,s;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield wD(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:de(B({},f),{placement:c})}})}}},vD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ze(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,v=oi(e,n),{mainAxis:c=!0,crossAxis:d=!1,limiter:f={fn:H=>{let{x:q,y:R}=H;return{x:q,y:R}}}}=v,p=dn(v,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},T=yield u.detectOverflow(n,p),y=Br(a),_=Hh(y);let w=m[_],C=m[y];const A=(H,q)=>jb(q+T[H==="y"?"top":"left"],q,q-T[H==="y"?"bottom":"right"]);c&&(w=A(_,w)),d&&(C=A(y,C));const N=f.fn(de(B({},n),{[_]:w,[y]:C}));return de(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}=oi(e,t),T={x:s,y:a},y=Br(u),_=Hh(y);let w=T[_],C=T[y];const A=oi(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 q=_==="y"?"height":"width",R=c.reference[_]-c.floating[q]+N.mainAxis,Y=c.reference[_]+c.reference[q]-N.mainAxis;w<R?w=R:w>Y&&(w=Y)}if(m){var v,H;const q=_==="y"?"width":"height",R=Xb.has(ki(u)),Y=c.reference[y]-c.floating[q]+(R&&((v=d.offset)==null?void 0:v[y])||0)+(R?0:N.crossAxis),re=c.reference[y]+c.reference[q]+(R?0:((H=d.offset)==null?void 0:H[y])||0)-(R?N.crossAxis:0);C<Y?C=Y:C>re&&(C=re)}return{[_]:w,[y]:C}}}},kD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ze(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,V=oi(e,n),{apply:c=()=>{}}=V,d=dn(V,["apply"]),f=yield a.detectOverflow(n,d),p=ki(r),m=yo(r),T=Br(r)==="y",{width:y,height:_}=s.floating;let w,C;p==="top"||p==="bottom"?(w=p,C=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(C=p,w=m==="end"?"top":"bottom");const A=_-f.top-f.bottom,N=y-f.left-f.right,v=Ci(_-f[w],A),H=Ci(y-f[C],N),q=n.middlewareData.shift,R=!q;let Y=v,re=H;q!=null&&q.enabled.x&&(re=N),q!=null&&q.enabled.y&&(Y=A),R&&!m&&(T?re=y-2*si(f.left,f.right):Y=_-2*si(f.top,f.bottom)),yield c(de(B({},n),{availableWidth:re,availableHeight:Y}));const Ee=yield a.getDimensions(u.floating);return y!==Ee.width||_!==Ee.height?{reset:{rects:!0}}:{}})}}};function ec(){return typeof window!="undefined"}function bo(e){return Kb(e)?(e.nodeName||"").toLowerCase():"#document"}function Gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ur(e){var t;return(t=(Kb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Kb(e){return ec()?e instanceof Node||e instanceof Gn(e).Node:!1}function yr(e){return ec()?e instanceof Element||e instanceof Gn(e).Element:!1}function Hr(e){return ec()?e instanceof HTMLElement||e instanceof Gn(e).HTMLElement:!1}function Qb(e){return!ec()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Gn(e).ShadowRoot}function Ga(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=br(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function ND(e){return/^(table|td|th)$/.test(bo(e))}function tc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const PD=/transform|translate|scale|rotate|perspective|filter/,OD=/paint|layout|strict|content/,ys=e=>!!e&&e!=="none";let Vh;function qh(e){const t=yr(e)?br(e):e;return ys(t.transform)||ys(t.translate)||ys(t.scale)||ys(t.rotate)||ys(t.perspective)||!Yh()&&(ys(t.backdropFilter)||ys(t.filter))||PD.test(t.willChange||"")||OD.test(t.contain||"")}function ID(e){let t=Ni(e);for(;Hr(t)&&!To(t);){if(qh(t))return t;if(tc(t))return null;t=Ni(t)}return null}function Yh(){return Vh==null&&(Vh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Vh}function To(e){return/^(html|body|#document)$/.test(bo(e))}function br(e){return Gn(e).getComputedStyle(e)}function nc(e){return yr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ni(e){if(bo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Qb(e)&&e.host||Ur(e);return Qb(t)?t.host:t}function Jb(e){const t=Ni(e);return To(t)?(e.ownerDocument||e).body:Hr(t)&&Ga(t)?t:Jb(t)}function Wa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Jb(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Gn(s);if(a){const c=Gh(u);return t.concat(u,u.visualViewport||[],Ga(s)?s:[],c&&n?Wa(c):[])}else return t.concat(s,Wa(s,[],n))}function Gh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zb(e){const t=br(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Hr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,c=Kl(n)!==a||Kl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Wh(e){return yr(e)?e:e.contextElement}function _o(e){const t=Wh(e);if(!Hr(t))return Fr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=Zb(t);let u=(a?Kl(n.width):n.width)/r,c=(a?Kl(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const RD=Fr(0);function eT(e){const t=Gn(e);return!Yh()||!t.visualViewport?RD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function LD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Gn(e)?!1:t}function bs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Wh(e);let u=Fr(1);t&&(r?yr(r)&&(u=_o(r)):u=_o(e));const c=LD(a,n,r)?eT(a):Fr(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=Gn(a),y=r&&yr(r)?Gn(r):r;let _=T,w=Gh(_);for(;w&&r&&y!==_;){const C=_o(w),A=w.getBoundingClientRect(),N=br(w),v=A.left+(w.clientLeft+parseFloat(N.paddingLeft))*C.x,H=A.top+(w.clientTop+parseFloat(N.paddingTop))*C.y;d*=C.x,f*=C.y,p*=C.x,m*=C.y,d+=v,f+=H,_=Gn(w),w=Gh(_)}}return Zl({width:p,height:m,x:d,y:f})}function rc(e,t){const n=nc(e).scrollLeft;return t?t.left+n:bs(Ur(e)).left+n}function tT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-rc(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function DD(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Ur(r),c=t?tc(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Fr(1);const p=Fr(0),m=Hr(r);if((m||!m&&!a)&&((bo(r)!=="body"||Ga(u))&&(d=nc(r)),Hr(r))){const y=bs(r);f=_o(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?tT(u,d):Fr(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 MD(e){return Array.from(e.getClientRects())}function FD(e){const t=Ur(e),n=nc(e),r=e.ownerDocument.body,s=si(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=si(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+rc(e);const c=-n.scrollTop;return br(r).direction==="rtl"&&(u+=si(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:c}}const nT=25;function BD(e,t){const n=Gn(e),r=Ur(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=Yh();(!p||p&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}const f=rc(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);_<=nT&&(a-=_)}else f<=nT&&(a+=f);return{width:a,height:u,x:c,y:d}}const UD=new Set(["absolute","fixed"]);function HD(e,t){const n=bs(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Hr(e)?_o(e):Fr(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 rT(e,t,n){let r;if(t==="viewport")r=BD(e,n);else if(t==="document")r=FD(Ur(e));else if(yr(t))r=HD(t,n);else{const s=eT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Zl(r)}function iT(e,t){const n=Ni(e);return n===t||!yr(n)||To(n)?!1:br(n).position==="fixed"||iT(n,t)}function zD(e,t){const n=t.get(e);if(n)return n;let r=Wa(e,[],!1).filter(c=>yr(c)&&bo(c)!=="body"),s=null;const a=br(e).position==="fixed";let u=a?Ni(e):e;for(;yr(u)&&!To(u);){const c=br(u),d=qh(u);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&UD.has(s.position)||Ga(u)&&!d&&iT(e,u))?r=r.filter(p=>p!==u):s=c,u=Ni(u)}return t.set(e,r),r}function jD(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?tc(t)?[]:zD(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const m=rT(t,p,s);return f.top=si(m.top,f.top),f.right=Ci(m.right,f.right),f.bottom=Ci(m.bottom,f.bottom),f.left=si(m.left,f.left),f},rT(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function $D(e){const{width:t,height:n}=Zb(e);return{width:t,height:n}}function VD(e,t,n){const r=Hr(t),s=Ur(t),a=n==="fixed",u=bs(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Fr(0);function f(){d.x=rc(s)}if(r||!r&&!a)if((bo(t)!=="body"||Ga(s))&&(c=nc(t)),r){const y=bs(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?tT(s,c):Fr(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 Xh(e){return br(e).position==="static"}function sT(e,t){if(!Hr(e)||br(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ur(e)===n&&(n=n.ownerDocument.body),n}function oT(e,t){const n=Gn(e);if(tc(e))return n;if(!Hr(e)){let s=Ni(e);for(;s&&!To(s);){if(yr(s)&&!Xh(s))return s;s=Ni(s)}return n}let r=sT(e,t);for(;r&&ND(r)&&Xh(r);)r=sT(r,t);return r&&To(r)&&Xh(r)&&!qh(r)?n:r||ID(e)||n}const qD=function(e){return Ze(this,null,function*(){const t=this.getOffsetParent||oT,n=this.getDimensions,r=yield n(e.floating);return{reference:VD(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function YD(e){return br(e).direction==="rtl"}const GD={convertOffsetParentRelativeRectToViewportRelativeRect:DD,getDocumentElement:Ur,getClippingRect:jD,getOffsetParent:oT,getElementRects:qD,getClientRects:MD,getDimensions:$D,getScale:_o,isElement:yr,isRTL:YD};function aT(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=Ur(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 _=Ql(m),w=Ql(s.clientWidth-(p+T)),C=Ql(s.clientHeight-(m+y)),A=Ql(p),v={rootMargin:-_+"px "+-w+"px "+-C+"px "+-A+"px",threshold:si(0,Ci(1,d))||1};let H=!0;function q(R){const Y=R[0].intersectionRatio;if(Y!==d){if(!H)return u();Y?u(!1,Y):r=setTimeout(()=>{u(!1,1e-7)},1e3)}Y===1&&!aT(f,e.getBoundingClientRect())&&u(),H=!1}try{n=new IntersectionObserver(q,de(B({},v),{root:s.ownerDocument}))}catch(R){n=new IntersectionObserver(q,v)}n.observe(e)}return u(!0),a}function XD(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=Wh(e),p=s||a?[...f?Wa(f):[],...Wa(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 v;(v=y)==null||v.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,w=d?bs(e):null;d&&C();function C(){const A=bs(e);w&&!aT(w,A)&&n(),w=A,_=requestAnimationFrame(C)}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 KD=AD,QD=vD,JD=SD,ZD=kD,e5=xD,t5=_D,n5=CD,r5=(e,t,n)=>{const r=new Map,s=B({platform:GD},n),a=de(B({},s.platform),{_c:r});return TD(e,t,de(B({},s),{platform:a}))};function uT(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 de(B({},s),{toJSON:()=>s})}function i5(e){if(!e)return uT();const{x:t,y:n,width:r,height:s}=e;return uT(t,n,r,s)}function s5(e,t){return{contextElement:Qt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?i5(r):n.getBoundingClientRect()}}}var Xa=e=>({variable:e,reference:`var(${e})`}),ai={arrowSize:Xa("--arrow-size"),arrowSizeHalf:Xa("--arrow-size-half"),arrowBg:Xa("--arrow-background"),transformOrigin:Xa("--transform-origin"),arrowOffset:Xa("--arrow-offset")},o5=e=>e==="top"||e==="bottom"?"y":"x";function a5(e,t){return{name:"transformOrigin",fn(n){var Ee,V,se,he,Ce;const{elements:r,middlewareData:s,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=o5(d),p=((Ee=s.arrow)==null?void 0:Ee.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,C=Math.abs(((se=s.shift)==null?void 0:se.y)||0),A=u.reference.height/2,N=y/2,v=(Ce=(he=e.offset)==null?void 0:he.mainAxis)!=null?Ce:e.gutter,H=typeof v=="number"?v+N:v!=null?v:N,q=C>H,R={top:`${_}px calc(100% + ${H}px)`,bottom:`${_}px ${-H}px`,left:`calc(100% + ${H}px) ${w}px`,right:`${-H}px ${w}px`}[d],Y=`${_}px ${u.reference.y+A-c}px`,re=!!e.overlap&&f==="y"&&q;return r.floating.style.setProperty(ai.transformOrigin.variable,re?Y:R),{data:{transformOrigin:re?Y:R}}}}}var u5={name:"rects",fn({rects:e}){return{data:e}}},l5=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% + ${ai.arrowOffset.reference})`}),{}}}};function c5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var d5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function lT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Kh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function f5(e,t,n){const r=e||t.createElement("div");return t5({element:r,padding:n.arrowPadding})}function h5(e,t){var n;if(!R6((n=t.offset)!=null?n:t.gutter))return KD(({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}=c5(r),d=c?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return wh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function p5(e){if(!e.flip)return;const t=Kh(e.boundary);return JD(de(B({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function m5(e){if(!e.slide&&!e.overlap)return;const t=Kh(e.boundary);return QD(de(B({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:n5()}))}function g5(e){return ZD({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 E5(e){var t;if(e.hideWhenDetached)return e5({strategy:"referenceHidden",boundary:(t=Kh(e.boundary))!=null?t:"clippingAncestors"})}function y5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function b5(e,t,n={}){const r=s5(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},d5,n),a=t.querySelector("[data-part=arrow]"),u=[h5(a,s),p5(s),m5(s),f5(a,t.ownerDocument,s),l5(a),a5({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),g5(s),E5(s),u5],{placement:c,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>Ze(null,null,function*(){var H;if(!r||!t)return;const w=yield r5(r,t,{placement:c,middleware:u,strategy:d});f==null||f(w),p==null||p({placed:!0});const C=lo(t),A=lT(C,w.x),N=lT(C,w.y);t.style.setProperty("--x",`${A}px`),t.style.setProperty("--y",`${N}px`),s.hideWhenDetached&&(((H=w.middlewareData.hide)==null?void 0:H.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const v=t.firstElementChild;if(v){const q=fo(v);t.style.setProperty("--z-index",q.zIndex)}}),T=()=>Ze(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=y5(s.listeners),_=s.listeners?XD(r,t,T,y):j6;return T(),()=>{_==null||_(),p==null||p({placed:!1})}}function cT(e,t,n={}){const c=n,{defer:r}=c,s=dn(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(b5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var T5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function _5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:ai.arrowSize.reference,height:ai.arrowSize.reference,[ai.arrowSizeHalf.variable]:`calc(${ai.arrowSize.reference} / 2)`,[ai.arrowOffset.variable]:`calc(${ai.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?T5[t.split("-")[0]]:void 0,background:ai.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 So=new WeakMap,ic=new WeakMap,sc={},Qh=0,dT=e=>e&&(e.host||dT(e.parentNode)),S5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=dT(n);return r&&e.contains(r)?r:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),x5=new Set(["script","output","status","next-route-announcer"]),w5=e=>x5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),A5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=S5(n,Array.isArray(e)?e:[e]);sc[r]||(sc[r]=new WeakMap);const c=sc[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)&&xb(y,_=>{m(_)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))T(_);else try{if(w5(_))return;const C=_.getAttribute(s)==="true",A=(So.get(_)||0)+1,N=(c.get(_)||0)+1;So.set(_,A),c.set(_,N),d.push(_),A===1&&C&&ic.set(_,!0),N===1&&_.setAttribute(r,""),C||_.setAttribute(s,"true")}catch(w){console.error("[zag-js > ariaHidden] cannot operate on ",_,w)}})};return T(n),f.clear(),Qh++,()=>{d.forEach(y=>{const _=So.get(y)-1,w=c.get(y)-1;So.set(y,_),c.set(y,w),_||(ic.has(y)||y.removeAttribute(s),ic.delete(y)),w||y.removeAttribute(r)}),Qh--,Qh||(So=new WeakMap,So=new WeakMap,ic=new WeakMap,sc={})}},v5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,C5=(e,t=v5(e),n="data-aria-hidden",r=!0)=>{if(t)return A5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},k5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function fT(e,t={}){const{defer:n=!0}=t,r=n?k5: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 P5(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 hT="pointerdown.outside",pT="focus.outside";function O5(e){for(const t of e)if(Qt(t)&&Mr(t))return!0;return!1}var mT=e=>"clientY"in e;function I5(e,t){if(!mT(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 R5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function gT(e,t){if(!t||!mT(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 R5(u,c)?r||a:!1}function L5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Dr(e),f=lo(e),p=N5(f),m=P5(f);function T(v,H){if(!Qt(H)||!H.isConnected||uo(e,H)||I5(e,v)||c&&Sb(e,H))return!1;const q=d.querySelector(`[aria-controls="${e.id}"]`);if(q){const Y=Rh(q);if(gT(v,Y))return!1}const R=Rh(e);return gT(v,R)?!1:!(n!=null&&n(H))}const y=new Set,_=ps(e==null?void 0:e.getRootNode());function w(v){function H(q){var Ee,V;const R=u&&!wb()?jt:se=>se(),Y=q!=null?q:v,re=(V=(Ee=Y==null?void 0:Y.composedPath)==null?void 0:Ee.call(Y))!=null?V:[Y==null?void 0:Y.target];R(()=>{const se=_?re[0]:Er(v);if(!(!e||!T(v,se))){if(s||a){const he=xh(s,a);e.addEventListener(hT,he,{once:!0})}ET(e,hT,{bubbles:!1,cancelable:!0,detail:{originalEvent:Y,contextmenu:x4(Y),focusable:O5(re),target:se}})}})}v.pointerType==="touch"?(y.forEach(q=>q()),y.add(Jt(d,"click",H,{once:!0})),y.add(m.addEventListener("click",H,{once:!0})),y.add(p.addEventListener("click",H,{once:!0}))):H()}const C=new Set,A=setTimeout(()=>{C.add(Jt(d,"pointerdown",w,!0)),C.add(m.addEventListener("pointerdown",w,!0)),C.add(p.addEventListener("pointerdown",w,!0))},0);function N(v){(u?jt:q=>q())(()=>{var Y,re;const q=(re=(Y=v==null?void 0:v.composedPath)==null?void 0:Y.call(v))!=null?re:[v==null?void 0:v.target],R=_?q[0]:Er(v);if(!(!e||!T(v,R))){if(r||a){const Ee=xh(r,a);e.addEventListener(pT,Ee,{once:!0})}ET(e,pT,{bubbles:!1,cancelable:!0,detail:{originalEvent:v,contextmenu:!1,focusable:Mr(R),target:R}})}})}return wb()||(C.add(Jt(d,"focusin",N,!0)),C.add(m.addEventListener("focusin",N,!0)),C.add(p.addEventListener("focusin",N,!0))),()=>{clearTimeout(A),y.forEach(v=>v()),C.forEach(v=>v())}}function D5(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(L5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function ET(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function M5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Jt(Dr(e),"keydown",n,{capture:!0})}var yT="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=>uo(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>uo(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];B5(e,yT,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),F5(e,yT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function F5(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 B5(e,t,n){e.addEventListener(t,n,{once:!0})}var bT;function TT(){ir.layers.forEach(({node:e})=>{e.style.pointerEvents=ir.isBelowPointerBlockingLayer(e)?"none":"auto"})}function U5(e){e.style.pointerEvents=""}function H5(e,t){const n=Dr(e),r=[];return ir.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(bT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=Y4(()=>{const c=s();return Qt(c)?c:null},{timeout:1e3});a.then(c=>r.push(ql(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{ir.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=bT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function z5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Ah("[@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),TT();function p(w){var A,N;const C=Er(w.detail.originalEvent);ir.isBelowPointerBlockingLayer(e)||ir.isInBranch(C)||((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 C=Er(w.detail.originalEvent);ir.isInBranch(C)||((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 C;ir.isTopMost(e)&&((C=t.onEscapeKeyDown)==null||C.call(t,w),!w.defaultPrevented&&r&&(w.preventDefault(),r()))}function y(w){var v;if(!e)return!1;const C=typeof u=="function"?u():u,A=Array.isArray(C)?C:[C],N=(v=t.persistentElements)==null?void 0:v.map(H=>H()).filter(Qt);return N&&A.push(...N),A.some(H=>uo(H,w))||ir.isInNestedLayer(e,w)}const _=[a?H5(e,t.persistentElements):void 0,M5(e,T),D5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{ir.remove(e),TT(),U5(e),_.forEach(w=>w==null?void 0:w())}}function _T(e,t){const{defer:n}=t,r=n?jt:a=>a(),s=[];return s.push(r(()=>{const a=oo(e)?e():e;s.push(z5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var j5=Object.defineProperty,$5=(e,t,n)=>t in e?j5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wt=(e,t,n)=>$5(e,typeof t!="symbol"?t+"":t,n),ST={activateTrap(e,t){if(e.length>0){const r=e[e.length-1];r!==t&&r.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},V5=[],q5=class{constructor(e,t){wt(this,"trapStack"),wt(this,"config"),wt(this,"doc"),wt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),wt(this,"portalContainers",new Set),wt(this,"listenerCleanups",[]),wt(this,"handleFocus",r=>{const s=Er(r),a=this.findContainerIndex(s,r)>=0;if(a||zl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Va(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=>Va(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}),wt(this,"handlePointerDown",r=>{const s=Er(r);if(!(this.findContainerIndex(s,r)>=0)){if(Qa(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Qa(this.config.allowOutsideClick,r)||r.preventDefault()}}),wt(this,"handleClick",r=>{const s=Er(r);this.findContainerIndex(s,r)>=0||Qa(this.config.clickOutsideDeactivates,r)||Qa(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),wt(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;Ka(r)&&r.preventDefault(),this.tryFocus(a)}}),wt(this,"handleEscapeKey",r=>{Y5(r)&&Qa(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),wt(this,"_mutationObserver"),wt(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 p4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?m4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),wt(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)}))}),wt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Mr(r)){const s=co(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}),wt(this,"tryFocus",r=>{if(r!==!1&&r!==co(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,G5(r)&&r.select()}}),wt(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(),ST.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=()=>{xT(()=>{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}),wt(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}),wt(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}),wt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),wt(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),wt(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),wt(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}),wt(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||Er(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||Mr(u)&&!ms(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=Va(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Ka(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||Mr(u)&&!ms(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=Va(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Ka(s)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||V5;const n=B({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Ka(r)&&!r.shiftKey},isKeyBackward(r){return Ka(r)&&r.shiftKey}},t);this.doc=n.document||Dr(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=>{d4(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?Sb(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=ho(e,{getShadowRoot:this.config.getShadowRoot}),n=Ob(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(Va(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(ms(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(ms(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 ST.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?xT(()=>{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=co(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)}},Ka=e=>e.key==="Tab",Qa=(e,...t)=>typeof e=="function"?e(...t):e,Y5=e=>!e.isComposing&&e.key==="Escape",xT=e=>setTimeout(e,0),G5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function wT(e,t={}){let n;const r=jt(()=>{const s=typeof e=="function"?e():e;if(s){n=new q5(s,de(B({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:Dr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Jh="data-scroll-lock";function W5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function AT(e){const t=fo(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(Jh))return;const u=AT(r)||AT(s),c=n.innerWidth-r.clientWidth;s.setAttribute(Jh,"");const d=()=>V4(r,"--scrollbar-width",`${c}px`),f=W5(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),ql(s,_)},m=()=>{var q,R;const{scrollX:_,scrollY:w,visualViewport:C}=n,A=(q=C==null?void 0:C.offsetLeft)!=null?q:0,N=(R=C==null?void 0:C.offsetTop)!=null?R:0,v={position:"fixed",overflow:"hidden",top:`${-(w-Math.floor(N))}px`,left:`${-(_-Math.floor(A))}px`,right:"0"};!u&&c>0&&(v[f]=`${c}px`);const H=ql(s,v);return()=>{H==null||H(),n.scrollTo({left:_,top:w,behavior:"instant"})}},T=[d(),jl()?m():p()];return()=>{T.forEach(_=>_==null?void 0:_()),s.removeAttribute(Jh)}}var X5=Es("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),zr=X5.build(),CT=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`},Zh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},NT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},K5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},tp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},Q5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},PT=e=>e.getById(CT(e)),xo=e=>e.getById(kT(e)),wo=e=>e.getById(Zh(e)),OT=e=>e.getById(NT(e)),J5=e=>e.getById(ep(e)),Z5=e=>e.getById(tp(e));function e8(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=_5(de(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(de(B({id:K5(c)},zr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(de(B({},zr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(de(B({},zr.anchor.attrs),{dir:u("dir"),id:CT(c)}))},getTriggerProps(){return t.button(de(B({},zr.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":Zh(c),onPointerDown(y){Ab(y)&&_4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(de(B({},zr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(de(B({id:NT(c)},zr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(de(B({},zr.content.attrs),{dir:u("dir"),id:Zh(c),tabIndex:-1,role:"dialog","aria-modal":bb(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":ao(d),"aria-labelledby":m.title?ep(c):void 0,"aria-describedby":m.description?tp(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(de(B({},zr.title.attrs),{id:ep(c),dir:u("dir")}))},getDescriptionProps(){return t.element(de(B({},zr.description.attrs),{id:tp(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(de(B({},zr.closeTrigger.attrs),{dir:u("dir"),id:Q5(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var t8={props({props:e}){return de(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=PT(n))!=null?a:xo(n);return cT(r,()=>OT(n),de(B({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>wo(n);let s=!0;return _T(r,{type:"popover",pointerBlocking:t("modal"),exclude:xo(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:j4(()=>wo(t),{triggerElement:xo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?fT(()=>[wo(t),xo(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")?wT(()=>wo(t),{initialFocus:()=>Ib({root:wo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=PT(n))!=null?u:xo(n);cT(s,()=>OT(n),de(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:!!J5(t),description:!!Z5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||jt(()=>{const n=Ib({root:wo(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=xo(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})}}}};go()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[OU,oc]=gs({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[IU,np]=gs({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),n8=e=>{const t=F.useId(),{getRootNode:n}=oc(),{dir:r}=np(),s=B({id:t,dir:r,getRootNode:n},e),a=Gl(t8,s);return e8(a,Mh)},r8=e=>{const[t,u]=zb(e),c=u,{children:n}=c,r=dn(c,["children"]),s=n8(r),a=Uh($t({present:s.open},t));return S.jsx(rD,{value:s,children:S.jsx(Bb,{value:a,children:n})})},IT=F.forwardRef((e,t)=>{const n=Bh(),r=qa(),s=$t(de(B({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return S.jsx(Tn.button,de(B({},s),{ref:t}))});IT.displayName="PopoverTrigger";function i8(e){return Tt({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 s8(e){return Tt({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 o8(e){return Tt({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 a8(e){return Tt({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 u8(e){return Tt({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 l8(e){return Tt({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 rp(e){return Tt({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 RT(e){return Tt({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 c8=({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(r8,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[S.jsx(IT,{"aria-label":`Overflow menu for ${t}`,className:G(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,a,e,`cim-${t}-component`),children:S.jsx(RT,{})}),S.jsx(Hb,{children:S.jsx(Ub,{className:G(`${z}-overflow-menu-list`,a,`cim-${t}-component`),children:S.jsx(fb.Provider,{value:d,children:n})})})]})};function LT(e){return Tt({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 DT(e){return Tt({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[d8,Ts]=gs({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),MT=F.forwardRef((e,t)=>{const n=Ts(),r=$t(n.getControlProps(),e);return S.jsx(Tn.div,de(B(B({},r),e),{ref:t}))});MT.displayName="CarouselControl";const FT=F.forwardRef((e,t)=>{const[n,r]=Ya()(e,["readOnly","index"]),s=Ts(),a=$t(s.getIndicatorProps(n),r);return S.jsx(Tn.button,de(B({},a),{ref:t}))});FT.displayName="CarouselIndicator";const BT=F.forwardRef((e,t)=>{const n=Ts(),r=$t(n.getIndicatorGroupProps(),e);return S.jsx(Tn.div,de(B({},r),{ref:t}))});BT.displayName="CarouselIndicatorGroup";const UT=F.forwardRef((e,t)=>{const[n,r]=Ya()(e,["index","snapAlign"]),s=Ts(),a=$t(s.getItemProps(n),r);return S.jsx(Tn.div,de(B({},a),{ref:t}))});UT.displayName="CarouselItem";const HT=F.forwardRef((e,t)=>{const n=Ts(),r=$t(n.getItemGroupProps(),e);return S.jsx(Tn.div,de(B({},r),{ref:t}))});HT.displayName="CarouselItemGroup";const zT=F.forwardRef((e,t)=>{const n=Ts(),r=$t(n.getNextTriggerProps(),e);return S.jsx(Tn.button,de(B({},r),{ref:t}))});zT.displayName="CarouselNextTrigger";const jT=F.forwardRef((e,t)=>{const n=Ts(),r=$t(n.getPrevTriggerProps(),e);return S.jsx(Tn.button,de(B({},r),{ref:t}))});jT.displayName="CarouselPrevTrigger";function f8(e){const t=fo(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 h8(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 $T(e){let t=[];for(const n of e.children)t=t.concat(n,$T(n));return t}function VT(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?$T(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(!h8(n,m,u))continue;const T=fo(p);let[y,_]=T.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const w=a==="x"?_:y,C=m[c]-n[c]+e[f];switch(w){case"none":break;case"start":r[a].start.push({node:p,position:C});break;case"center":r[a].center.push({node:p,position:C+m[d]/2});break;case"end":r[a].end.push({node:p,position:C+m[d]});break}}}return r}function qT(e){const t=e.getBoundingClientRect(),n=f8(e),r=VT(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:YT([...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:YT([...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 p8(e,t,n){const r=VT(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var YT=e=>[...new Set(e)],GT=(e,t)=>n=>Math.max(e,Math.min(t,n)),m8=Es("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ui=m8.build(),g8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},E8=(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}`},ac=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},y8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},b8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},T8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},WT=(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(ac(e)),XT=e=>$4(Mn(e),"[data-part=item]"),_8=(e,t)=>e.getById(WT(e,t)),KT=e=>{const t=Mn(e);if(!t)return;const n=ho(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function S8(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"),C=c("padding"),A=c("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return _/y.length},scrollToIndex(N,v){a({type:"INDEX.SET",index:N,instant:v})},scrollTo(N,v){a({type:"PAGE.SET",index:N,instant:v})},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(de(B({},ui.root.attrs),{id:g8(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(de(B({},ui.itemGroup.attrs),{id:ac(u),"data-orientation":c("orientation"),"data-dragging":ao(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(N){uo(N.currentTarget,Er(N))&&a({type:"VIEWPORT.FOCUS"})},onBlur(N){uo(N.currentTarget,N.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(N){if(N.defaultPrevented||!c("allowMouseDrag")||!Ab(N))return;const v=Er(N);Mr(v)&&v!==N.currentTarget||(N.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:$6(N=>{const v=c("orientation")==="horizontal"?"deltaX":"deltaY";N[v]<0&&!s("canScrollPrev")||N[v]>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"]:C,[T?"paddingInline":"paddingBlock"]:C,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(N){const v=r.get("slidesInView").includes(N.index);return t.element(de(B({},ui.item.attrs),{id:E8(u,N.index),dir:c("dir"),role:"group","data-index":N.index,"data-inview":ao(v),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":A.item(N.index,c("slideCount")),"aria-hidden":bb(!v),style:{scrollSnapAlign:(()=>{var re;const H=(re=N.snapAlign)!=null?re:"start",q=c("slidesPerMove"),R=q==="auto"?Math.floor(c("slidesPerPage")):q;return(N.index+R)%R===0?H:void 0})()}}))},getControlProps(){return t.element(de(B({},ui.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(de(B({},ui.prevTrigger.attrs),{id:b8(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":A.prevTrigger,"data-orientation":c("orientation"),"aria-controls":ac(u),onClick(N){N.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(de(B({},ui.nextTrigger.attrs),{dir:c("dir"),id:y8(u),type:"button","aria-label":A.nextTrigger,"data-orientation":c("orientation"),"aria-controls":ac(u),disabled:!p,onClick(N){N.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(de(B({},ui.indicatorGroup.attrs),{dir:c("dir"),id:T8(u),"data-orientation":c("orientation"),onKeyDown(N){if(N.defaultPrevented)return;const v="indicator",H={ArrowDown(Y){T||(a({type:"PAGE.NEXT",src:v}),Y.preventDefault())},ArrowUp(Y){T||(a({type:"PAGE.PREV",src:v}),Y.preventDefault())},ArrowRight(Y){T&&(a({type:"PAGE.NEXT",src:v}),Y.preventDefault())},ArrowLeft(Y){T&&(a({type:"PAGE.PREV",src:v}),Y.preventDefault())},Home(Y){a({type:"PAGE.SET",index:0,src:v}),Y.preventDefault()},End(Y){a({type:"PAGE.SET",index:y.length-1,src:v}),Y.preventDefault()}},q=v4(N,{dir:c("dir"),orientation:c("orientation")}),R=H[q];R==null||R(N)}}))},getIndicatorProps(N){return t.button(de(B({},ui.indicator.attrs),{dir:c("dir"),id:WT(u,N.index),type:"button","data-orientation":c("orientation"),"data-index":N.index,"data-readonly":ao(N.readOnly),"data-current":ao(N.index===_),"aria-label":A.indicator(N.index),onClick(v){v.defaultPrevented||N.readOnly||a({type:"PAGE.SET",index:N.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(de(B({},ui.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":ao(d),"aria-label":d?A.autoplayStop:A.autoplayStart,onClick(N){N.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var x8={props({props:e}){return X6(e,["slideCount"],"carousel"),de(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:w8(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 I6(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"}),KT(e)});return KT(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 XT(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):k6(d,m)},n.get("slidesInView"));n.set("slidesInView",N6(c))},{root:r,threshold:t("inViewThreshold")});return XT(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 H4(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=Eb((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=pb(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=P6(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=p8(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=Eb(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=qT(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=qT(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=_8(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 w8(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}go()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),go()(["index","readOnly"]),go()(["index","snapAlign"]);const A8=e=>{const t=F.useId(),{getRootNode:n}=oc(),{dir:r}=np(),s=B({id:t,dir:r,getRootNode:n},e),a=Gl(x8,s);return S8(a,Mh)},QT=F.forwardRef((e,t)=>{const[n,r]=Ya()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=A8(n),a=$t(s.getRootProps(),r);return S.jsx(d8,{value:s,children:S.jsx(Tn.div,de(B({},a),{ref:t}))})});QT.displayName="CarouselRoot";const v8=180,C8=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},k8=({globalClassName:e,className:t,itemMinWidth:n=v8,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((re,Ee)=>({node:re,key:F.isValidElement(re)&&re.key!=null?re.key:`carousel-item-${Ee}`})),T=m.length,y=F.useRef(null),[_,w]=F.useState(0),{width:C}=PC();F.useLayoutEffect(()=>{y.current&&w(y.current.getBoundingClientRect().width)},[C,T]);const A=C8(r),N=n+A,v=_>0?(_+A)/N:1,H=Math.max(1,Math.floor(v));if(T===0)return null;const q=T>H,R=Math.ceil(T/H),Y=q?Math.max(1,v):H;return S.jsxs(QT,{ref:y,className:G(e,t,`${z}-carousel`),slidesPerPage:Y,slidesPerMove:H,spacing:r,loop:s,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[S.jsx(HT,{className:G(e,`${z}-carousel__item-group`,{"carousel-row-container":!q}),children:m.map(({node:re,key:Ee},V)=>S.jsx(UT,{index:V,className:G(e,`${z}-carousel__item`),children:re},Ee))}),c&&q&&S.jsxs(MT,{className:G(e,`${z}-carousel__control`),children:[S.jsx(jT,{className:G(e,`${z}-carousel__prev-trigger`),"aria-label":"Previous slide",children:S.jsx(o8,{size:"16px"})}),S.jsx(zT,{className:G(e,`${z}-carousel__next-trigger`),"aria-label":"Next slide",children:S.jsx(a8,{size:"16px"})})]}),u&&q&&S.jsx(BT,{className:G(e,`${z}-carousel__indicator-group`),children:Array.from({length:R},(re,Ee)=>S.jsx(FT,{index:Ee,className:G(e,`${z}-carousel__indicator`),"aria-label":`Go to slide group ${Ee+1}`},Ee))})]})},[N8,P8]=gs({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),O8=e=>Ya()(e,["lazyMount","unmountOnExit"]),[I8,Ja]=gs({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),JT=F.forwardRef((e,t)=>{const n=Ja(),r=P8(),s=Uh(de(B({},r),{present:n.open})),a=$t(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:S.jsx(Tn.div,de(B({},a),{ref:Wl(s.ref,t)}))});JT.displayName="DialogBackdrop";const ip=F.forwardRef((e,t)=>{const n=Ja(),r=qa(),s=$t(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:S.jsx(Tn.div,de(B({},s),{ref:Wl(r.ref,t)}))});ip.displayName="DialogContent";const sp=F.forwardRef((e,t)=>{const n=Ja(),r=$t(n.getDescriptionProps(),e);return S.jsx(Tn.div,de(B({},r),{ref:t}))});sp.displayName="DialogDescription";const op=F.forwardRef((e,t)=>{const n=Ja(),r=$t(n.getPositionerProps(),e);return qa().unmounted?null:S.jsx(Tn.div,de(B({},r),{ref:t}))});op.displayName="DialogPositioner";var R8=Es("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),_s=R8.build(),ZT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},e_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},ap=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},t_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},up=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},lp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},n_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},uc=e=>e.getById(ap(e)),L8=e=>e.getById(ZT(e)),D8=e=>e.getById(e_(e)),M8=e=>e.getById(t_(e)),F8=e=>e.getById(up(e)),B8=e=>e.getById(lp(e)),U8=e=>e.getById(n_(e));function H8(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(de(B({},_s.trigger.attrs),{dir:a("dir"),id:t_(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ap(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(de(B({},_s.backdrop.attrs),{dir:a("dir"),hidden:!d,id:e_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(de(B({},_s.positioner.attrs),{dir:a("dir"),id:ZT(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(de(B({},_s.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:ap(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:up(u),"aria-describedby":f.description?lp(u):void 0}))},getTitleProps(){return t.element(de(B({},_s.title.attrs),{dir:a("dir"),id:up(u)}))},getDescriptionProps(){return t.element(de(B({},_s.description.attrs),{dir:a("dir"),id:lp(u)}))},getCloseTriggerProps(){return t.button(de(B({},_s.closeTrigger.attrs),{dir:a("dir"),id:n_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var z8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>U8(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 _T(()=>uc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[M8(e)],onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),n("closeOnInteractOutside")||s.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(s){var a;(a=n("onEscapeKeyDown"))==null||a(s),n("closeOnEscape")||s.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return vT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?wT(()=>uc(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")?fT(()=>[uc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){jt(()=>{e.set("rendered",{title:!!F8(t),description:!!B8(t)})})},syncZIndex({scope:e}){jt(()=>{const t=uc(e);if(!t)return;const n=fo(t);[L8(e),D8(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})}}}};go()(["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 j8=e=>{const t=F.useId(),{getRootNode:n}=oc(),{dir:r}=np(),s=B({id:t,getRootNode:n,dir:r},e),a=Gl(z8,s);return H8(a,Mh)},r_=e=>{const[t,c]=zb(e),d=c,{children:n}=d,r=dn(d,["children"]),[s]=O8(t),a=j8(r),u=Uh($t({present:a.open},t));return S.jsx(I8,{value:a,children:S.jsx(N8,{value:s,children:S.jsx(Bb,{value:u,children:n})})})},i_=F.forwardRef((e,t)=>{const n=Ja(),r=$t(n.getTitleProps(),e);return S.jsx(Tn.h2,de(B({},r),{ref:t}))});i_.displayName="DialogTitle";const $8=({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(Sh.Provider,{value:r,children:S.jsx(db.Provider,{value:s,children:e})})},s_=()=>F.useContext(db),o_=()=>{const e=F.useContext(Sh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},V8=`${z}-overflow-menu-button-trigger`,q8=({componentType:e,children:t})=>{const{isOpen:n}=s_(),{closeMenu:r}=o_(),{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(`.${V8}`)||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:G(`${z}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},Y8=({componentType:e,className:t})=>{const{toggleMenu:n}=o_(),{isOpen:r}=s_(),{globalClassName:s}=tt();return S.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,className:G(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:S.jsx(RT,{})})},cp=()=>{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},G8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{previousComponentType:r}=tr(),s=hs(),a=()=>{dl(r||"dialog"),s()};return t?S.jsx(ri,{className:G(n,`${z}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:S.jsx(LT,{})}):S.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[S.jsx(LT,{}),"Show ",r||"dialog"]})},W8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{isModalFullscreen:r}=tr(),s=hs(),a=()=>{yf(!r),s()},u=r?Vk:qk,c="Toggle Fullscreen";return t?S.jsx(ri,{ariaLabel:c,title:c,className:G(n,`${z}-modal-fullscreen-button`,`cim-${e}-component`),icon:S.jsx(u,{}),onClick:a}):S.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[S.jsx(u,{}),c]})},X8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{dialogPosition:r}=tr(),s=hs(),a=r==="bottom-left",u=()=>{bf(a?"bottom-right":"bottom-left"),s()},c=a?s8:i8,d=a?"Move right":"Move left";return t?S.jsx(ri,{className:G(n,`${z}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:S.jsx(c,{})}):S.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[S.jsx(c,{}),d]})},a_=({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?G8:u_,_=T?W8:X8,w=F.useMemo(()=>a?Uk(a):{},[a]);return S.jsx($8,{children:S.jsxs("div",{className:G(u,`${z}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[S.jsxs("div",{className:G(u,`${z}-${e}-header`,{standalone:m,embedded:!m}),style:w,children:[(a==null?void 0:a.logoUrl)&&S.jsx("img",{alt:"",role:"img",className:G(u,`${z}-${e}-logo`,{standalone:m,embedded:!m}),src:a.logoUrl}),S.jsx(i_,{className:G(u,`${z}-${e}-title`,{standalone:m,embedded:!m}),children:a==null?void 0:a.headerText}),S.jsxs("div",{className:G(u,`${z}-${e}-controls`),children:[S.jsx(y,{componentType:e,isIcon:!0}),S.jsx(Y8,{componentType:e}),S.jsx(P1,{className:G(u,`cim-${e}-component`),label:a==null?void 0:a.closeButtonAriaLabel,onClick:r})]})]}),S.jsxs(q8,{componentType:e,children:[S.jsx(_,{componentType:e}),S.jsx(eM,{componentType:e}),S.jsx(hb,{componentType:e,onClearChat:t}),n&&S.jsx(Q8,{componentType:e,onEndConversation:n}),p&&S.jsx(K8,{componentType:e,onDownloadTranscript:s})]})]})})},K8=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=tt(),r=hs(),[s,a]=F.useState(!1),u=()=>Ze(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:G(`${z}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[S.jsx(w6,{}),"Download transcript"]})},Q8=({onEndConversation:e,componentType:t})=>{const n=hs(),r=()=>{e(),n()};return S.jsxs("button",{className:G(`${z}-overflow-menu-button`,"end-conversation-button",`cim-${t}-component`),onClick:r,children:[S.jsx(Yk,{}),"End conversation"]})},J8={sparkle:rp,plus:u8,"paper-plane":l8},dp=({icon:e,className:t})=>{const n=J8[e];return n?S.jsx(n,{className:t,"aria-hidden":"true"}):null},Z8=({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(dp,{icon:c,className:`${z}-suggestion-button-icon`}),S.jsx("span",{children:_})]});return S.jsx("div",{className:G(t,`${z}-suggestion-container ${f}`,e),children:n.map(_=>s?S.jsx(pl,{disabled:r,className:G(t,`${z}-suggestion-button standalone`,m),onClick:p(_),children:T(_)},_):S.jsx("button",{disabled:r,className:G(t,`${z}-suggestion-button embedded`,m),onClick:p(_),children:T(_)},_))})},eM=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=tt();if(!r)return null;const s=()=>{ti(!1),pa(!0),Cf()};return t?S.jsx(ri,{className:G(n,`${z}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:S.jsx(I1,{})}):S.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[S.jsx(I1,{}),"Minimize"]})},u_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),r=hs(),s=()=>{dl("modal"),r()};return t?S.jsx(ri,{className:G(n,`${z}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:S.jsx(DT,{})}):S.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[S.jsx(DT,{}),"Show modal"]})},tM=({isWidgetStandalone:e})=>{var C,A;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:s,staticQuestions:a,staticQuestionsStrategy:u}=tt(),{askCimPrompts:c,messages:d}=Vn(),{isLoading:f,handleAskCim:p}=Or(),m=s==null?void 0:s.icon,T=(C=s==null?void 0:s.iconPosition)!=null?C:"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(H=>H.name==="conversation_reset")&&r||N},[d,n,r]),_=F.useMemo(()=>{var v,H;const N=((H=(v=c.message)==null?void 0:v.suggestions)!=null?H:[]).map(q=>q.displayText.trim()).filter(Boolean);return F0(N,a||[],u)},[(A=c.message)==null?void 0:A.suggestions,a,u]),w=N=>()=>{p({userPrompt:N})};return S.jsxs("div",{className:G(t,`${z}-ask-cim-entry-message`,`${z}-message-group`,e?"standalone":"embedded"),children:[S.jsx("p",{className:G(t,`${z}-ask-cim-entry-text`),children:y}),!!(_!=null&&_.length)&&S.jsx("div",{className:G(t,`${z}-ask-cim-suggestions-container`,`${z}-suggestion-container`,e?"standalone":"embedded"),children:_.map(N=>S.jsxs(pl,{disabled:f,className:G(t,`${z}-ask-cim-suggestion-button`,`${z}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!m,"icon-right":!!m&&T==="right"}),onClick:w(N),children:[m&&S.jsx(dp,{icon:m,className:`${z}-suggestion-button-icon`}),S.jsx("span",{children:N})]},N))})]})},nM=({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:G(r,`${z}-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:G(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):S.jsx("img",{className:G(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),S.jsxs("div",{className:G(r,`${z}-product-tile-details`,{embedded:!e,standalone:e}),children:[S.jsxs("div",{className:G(r,`${z}-product-tile-content`),children:[u&&S.jsx("p",{className:`${z}-product-tile-brand`,children:u}),m?S.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:G(r,`${z}-product-tile-pdp`),href:`${m}`,target:s?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",S.jsx("span",{className:G(r,`${z}-product-tile-pdp-arrow`),children:"→"})]}):S.jsx("p",{className:G(r,`${z}-product-tile-name`),title:a,children:a})]}),S.jsx("div",{className:G(r,`${z}-product-tile-footer`),children:S.jsx("p",{className:G(r,`${z}-product-tile-price`),children:c})})]})]})},rM=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=tt(),s=t;return n?S.jsxs("div",{className:G(r,`${z}-display-products`),children:[S.jsx("p",{children:s.message}),s.products&&s.products.length>0&&S.jsx(k8,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:s.products.map(a=>{const u=n.getPid(a);return S.jsx(nM,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},iM=({globalClassName:e,message:t,isWidgetStandalone:n})=>S.jsx("div",{className:G(e,`${z}-error-message`,{standalone:n,embedded:!n}),children:S.jsxs("p",{className:G(e,`${z}-error-message-text`,{standalone:n,embedded:!n}),children:[S.jsx(zk,{})," ",t.message||"An error occurred while processing your request."]})}),sM=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:s})=>{var _;const{isLoading:a}=Or(),{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?dA(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=w=>{const C=n.suggestions.find(A=>A.displayText===w);C&&s(C,n.eventSourceId||n.id)};return S.jsxs("div",{className:G(e,`${z}-follow-up`),children:[S.jsx("p",{className:G(e,`${z}-text`),children:n.message}),S.jsx(Z8,{suggestions:n.suggestions.map(w=>w.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function l_(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 oM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function aM(e,t,n){const s=Al((n||{}).ignore||[]),a=uM(t);let u=-1;for(;++u<a.length;)qE(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 C=m.children.indexOf(f);let A=!1,N=[];T.lastIndex=0;let v=T.exec(f.value);for(;v;){const H=v.index,q={index:v.index,input:v.input,stack:[...p,f]};let R=y(...v,q);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?T.lastIndex=H+1:(_!==H&&N.push({type:"text",value:f.value.slice(_,H)}),Array.isArray(R)?N.push(...R):R&&N.push(R),_=H+v[0].length,A=!0),!T.global)break;v=T.exec(f.value)}return A?(_<f.value.length&&N.push({type:"text",value:f.value.slice(_)}),m.children.splice(C,1,...N)):N=[f],C+N.length}}function uM(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([lM(s[0]),cM(s[1])])}return t}function lM(e){return typeof e=="string"?new RegExp(oM(e),"g"):e}function cM(e){return typeof e=="function"?e:function(){return e}}const fp="phrasing",hp=["autolink","link","image","label"];function dM(){return{transforms:[yM],enter:{literalAutolink:hM,literalAutolinkEmail:pp,literalAutolinkHttp:pp,literalAutolinkWww:pp},exit:{literalAutolink:EM,literalAutolinkEmail:gM,literalAutolinkHttp:pM,literalAutolinkWww:mM}}}function fM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:fp,notInConstruct:hp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:fp,notInConstruct:hp},{character:":",before:"[ps]",after:"\\/",inConstruct:fp,notInConstruct:hp}]}}function hM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function pp(e){this.config.enter.autolinkProtocol.call(this,e)}function pM(e){this.config.exit.autolinkProtocol.call(this,e)}function mM(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 gM(e){this.config.exit.autolinkEmail.call(this,e)}function EM(e){this.exit(e)}function yM(e){aM(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,bM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),TM]],{ignore:["link","linkReference"]})}function bM(e,t,n,r,s){let a="";if(!c_(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!_M(n)))return!1;const u=SM(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 TM(e,t,n,r){return!c_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function _M(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 SM(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=l_(e,"(");let a=l_(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 c_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||os(n)||yl(n))&&(!t||n!==47)}d_.peek=OM;function xM(){this.buffer()}function wM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function AM(){this.buffer()}function vM(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=mr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function kM(e){this.exit(e)}function NM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function PM(e){this.exit(e)}function OM(){return"["}function d_(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 IM(){return{enter:{gfmFootnoteCallString:xM,gfmFootnoteCall:wM,gfmFootnoteDefinitionLabelString:AM,gfmFootnoteDefinition:vM},exit:{gfmFootnoteCallString:CM,gfmFootnoteCall:kM,gfmFootnoteDefinitionLabelString:NM,gfmFootnoteDefinition:PM}}}function RM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:d_},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?f_:LM))),f(),d}}function LM(e,t,n){return t===0?e:f_(e,t,n)}function f_(e,t,n){return(n?"":" ")+e}const DM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];h_.peek=HM;function MM(){return{canContainEols:["delete"],enter:{strikethrough:BM},exit:{strikethrough:UM}}}function FM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:DM}],handlers:{delete:h_}}}function BM(e){this.enter({type:"delete",children:[]},e)}function UM(e){this.exit(e)}function h_(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,de(B({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function HM(){return"~"}function zM(e){return e.length}function jM(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||zM,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const w=[],C=[];let A=-1;for(e[p].length>f&&(f=e[p].length);++A<e[p].length;){const N=$M(e[p][A]);if(n.alignDelimiters!==!1){const v=s(N);C[A]=v,(d[A]===void 0||v>d[A])&&(d[A]=v)}w.push(N)}u[p]=w,c[p]=C}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=p_(r[m]);else{const w=p_(r);for(;++m<f;)a[m]=w}m=-1;const T=[],y=[];for(;++m<f;){const w=a[m];let C="",A="";w===99?(C=":",A=":"):w===108?C=":":w===114&&(A=":");let N=n.alignDelimiters===!1?1:Math.max(1,d[m]-C.length-A.length);const v=C+"-".repeat(N)+A;n.alignDelimiters!==!1&&(N=C.length+N+A.length,N>d[m]&&(d[m]=N),y[m]=N),T[m]=v}u.splice(1,0,T),c.splice(1,0,y),p=-1;const _=[];for(;++p<u.length;){const w=u[p],C=c[p];m=-1;const A=[];for(;++m<f;){const N=w[m]||"";let v="",H="";if(n.alignDelimiters!==!1){const q=d[m]-(C[m]||0),R=a[m];R===114?v=" ".repeat(q):R===99?q%2?(v=" ".repeat(q/2+.5),H=" ".repeat(q/2-.5)):(v=" ".repeat(q/2),H=v):H=" ".repeat(q)}n.delimiterStart!==!1&&!m&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&N==="")&&(n.delimiterStart!==!1||m)&&A.push(" "),n.alignDelimiters!==!1&&A.push(v),A.push(N),n.alignDelimiters!==!1&&A.push(H),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
- `)}function $M(e){return e==null?"":String(e)}function p_(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 VM(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()),qM);return s(),u}function qM(e,t,n){return">"+(n?"":" ")+e}function YM(e,t){return m_(e,t.inConstruct,!0)&&!m_(e,t.notInConstruct,!1)}function m_(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 g_(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
34
- `&&YM(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
35
- `}function GM(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 XM(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 KM(e,t,n,r){const s=XM(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(WM(e,n)){const m=n.enter("codeIndented"),T=n.indentLines(a,QM);return m(),T}const c=n.createTracker(r),d=s.repeat(Math.max(GM(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:`
29
+ `}),n}function oy(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ay(e,t){const n=G3(e,t),r=n.one(e,void 0),s=B3(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 Z3(e,t){return e&&"run"in e?function(n,r){return et(this,null,function*(){const s=ay(n,B({file:r},t));yield e.run(s,r)})}:function(n,r){return ay(n,B({file:r},e||t))}}function uy(e){if(e)throw e}var nh,ly;function eI(){if(ly)return nh;ly=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 nh=function d(){var f,p,m,T,y,_,A=arguments[0],P=1,w=arguments.length,C=!1;for(typeof A=="boolean"&&(C=A,A=arguments[1]||{},P=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});P<w;++P)if(f=arguments[P],f!=null)for(p in f)m=c(A,p),T=c(f,p),A!==T&&(C&&T&&(a(T)||(y=s(T)))?(y?(y=!1,_=m&&s(m)?m:[]):_=m&&a(m)?m:{},u(A,{name:p,newValue:d(C,_,T)})):typeof T!="undefined"&&u(A,{name:p,newValue:T}));return A},nh}var tI=eI();const rh=ze(tI);function ih(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 nI(){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?rI(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 rI(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 Rr={basename:iI,dirname:sI,extname:oI,join:aI,sep:"/"};function iI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ra(e);let n=0,r=-1,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 sI(e){if(Ra(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function oI(e){Ra(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 aI(...e){let t=-1,n;for(;++t<e.length;)Ra(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":uI(n)}function uI(e){Ra(e);const t=e.codePointAt(0)===47;let n=lI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function lI(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 Ra(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const cI={cwd:dI};function dI(){return"/"}function sh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function fI(e){if(typeof e=="string")e=new URL(e);else if(!sh(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 hI(e)}function hI(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 oh=["history","path","basename","stem","extname","dirname"];class cy{constructor(t){let n;t?sh(t)?n={path:t}:typeof t=="string"||pI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":cI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<oh.length;){const a=oh[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)oh.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Rr.basename(this.path):void 0}set basename(t){uh(t,"basename"),ah(t,"basename"),this.path=Rr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Rr.dirname(this.path):void 0}set dirname(t){dy(this.basename,"dirname"),this.path=Rr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Rr.extname(this.path):void 0}set extname(t){if(ah(t,"extname"),dy(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=Rr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){sh(t)&&(t=fI(t)),uh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Rr.basename(this.path,this.extname):void 0}set stem(t){uh(t,"stem"),ah(t,"stem"),this.path=Rr.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 bn(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 ah(e,t){if(e&&e.includes(Rr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Rr.sep+"`")}function uh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function dy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function pI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const mI=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),gI={}.hasOwnProperty;class lh extends mI{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=nI()}copy(){const t=new lh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(rh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(fh("data",this.frozen),this.namespace[t]=n,this):gI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(fh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ol(t),r=this.parser||this.Parser;return ch("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ch("process",this.parser||this.Parser),dh("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const c=Ol(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);bI(_)?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(),ch("processSync",this.parser||this.Parser),dh("processSync",this.compiler||this.Compiler),this.process(t,s),hy("processSync","process",n),r;function s(a,u){n=!0,uy(a),r=u}}run(t,n,r){fy(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=Ol(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),hy("runSync","run",r),s;function a(u,c){uy(u),s=c,r=!0}}stringify(t,n){this.freeze();const r=Ol(n),s=this.compiler||this.Compiler;return dh("stringify",s),fy(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(fh("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=rh(!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 A=r[T][1];ih(A)&&ih(y)&&(y=rh(!0,A,y)),r[T]=[f,y,..._]}}}}const EI=new lh().freeze();function ch(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function dh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function fh(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 fy(e){if(!ih(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function hy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ol(e){return yI(e)?e:new cy(e)}function yI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function bI(e){return typeof e=="string"||TI(e)}function TI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _I="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",py=[],my={allowDangerousHtml:!0},SI=/^(https?|ircs?|mailto|xmpp)$/i,xI=[{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 gy(e){const t=wI(e),n=AI(e);return vI(t.runSync(t.parse(n),n),e)}function wI(e){const t=e.rehypePlugins||py,n=e.remarkPlugins||py,r=e.remarkRehypeOptions?B(B({},e.remarkRehypeOptions),my):my;return EI().use(r3).use(n).use(Z3,r).use(t)}function AI(e){const t=e.children||"",n=new cy;return typeof t=="string"&&(n.value=t),n}function vI(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||CI;for(const p of xI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+_I+p.id,void 0);return Pl(e,f),XN(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 zf)if(Object.hasOwn(zf,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],A=zf[y];(A===null||A.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 CI(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||SI.test(e.slice(0,t))?e:""}const Ey=/[#.]/g;function kI(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){Ey.lastIndex=s;const c=Ey.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 yy(e,t,n){const r=n?II(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=kI(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))PI(e,d.properties,m,T)}for(const f of c)hh(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 PI(e,t,n,r){const s=yl(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=aE(r):s.commaSeparated?a=G1(r):s.commaOrSpaceSeparated?a=aE(G1(r).join(" ")):a=by(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?OI(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(by(s,s.property,c));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function hh(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)hh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?hh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function by(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Sa(n)===Sa(t)))return!0}return n}function OI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function II(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const RI=["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"],LI=yy(xa,"div"),DI=yy(_i,"g",RI);function MI(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=Ty(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=Ty(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 Ty(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 ds={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/"},_y={}.hasOwnProperty,FI=Object.prototype;function BI(e,t){const n=t||{};return ph({file:n.file||void 0,location:!1,schema:n.space==="svg"?_i:xa,verbose:n.verbose||!1},e)}function ph(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Il(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:Sy(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=MI(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"},Il(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Il(e,r,n),n}default:return n=UI(e,t),n}}function Sy(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=ph(e,t[n]);r.push(s)}return r}function UI(e,t){const n=e.schema;e.schema=t.namespaceURI===ds.svg?_i:xa;let r=-1;const s={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;_y.call(FI,d)||(s[d]=c.value)}const u=(e.schema.space==="svg"?DI:LI)(t.tagName,s,Sy(e,t.childNodes));if(Il(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&to(d.startTag),p=d&&d.endTag&&to(d.endTag),m=ph(e,c.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Il(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=to(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)_y.call(n.attrs,u)&&(a[yl(e.schema,u).property]=to(n.attrs[u]));n.startTag;const c=to(n.startTag),d=n.endTag?to(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function to(e){const t=xy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=xy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function xy(e){return e.line&&e.column?e:void 0}const wy={}.hasOwnProperty;function Ay(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const c=r.handlers;if(s&&wy.call(s,e)){const d=String(s[e]);u=wy.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 jI={},zI={}.hasOwnProperty,vy=Ay("type",{handlers:{root:VI,element:XI,text:WI,comment:GI,doctype:YI}});function $I(e,t){const r=(t||jI).space;return vy(e,r==="svg"?_i:xa)}function VI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=mh(e.children,n,t),no(e,n),n}function qI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=mh(e.children,n,t),no(e,n),n}function YI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return no(e,t),t}function WI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return no(e,t),t}function GI(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return no(e,t),t}function XI(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"&&zI.call(e.properties,a)){const d=KI(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:ds[u],childNodes:[],parentNode:null};return c.childNodes=mh(e.children,c,r),no(e,c),e.tagName==="template"&&e.content&&(c.content=qI(e.content,r)),c}function KI(e,t,n){const r=yl(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?X1(n):uE(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=ds[r.space]}return s}function mh(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=vy(e[r],n);a.parentNode=t,s.push(a)}return s}function no(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 QI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],JI=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 N;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(N||(N={}));const Dn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Cy(e){return e>=55296&&e<=57343}function ZI(e){return e>=56320&&e<=57343}function eR(e,t){return(e-55296)*1024+9216+t}function ky(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Ny(e){return e>=64976&&e<=65007||JI.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 tR=65536;class nR{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=tR,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(ZI(n))return this.pos++,this._addGap(),eR(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,N.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,N.EOF;const r=this.html.charCodeAt(n);return r===N.CARRIAGE_RETURN?N.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,N.EOF;let t=this.html.charCodeAt(this.pos);return t===N.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,N.LINE_FEED):t===N.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Cy(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===N.LINE_FEED||t===N.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){ky(t)?this._err(te.controlCharacterInInputStream):Ny(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 Ke;(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"})(Ke||(Ke={}));function Py(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 rR=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))),iR=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 sR(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=iR.get(e))!==null&&t!==void 0?t:e}var Zt;(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"})(Zt||(Zt={}));const oR=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 gh(e){return e>=Zt.ZERO&&e<=Zt.NINE}function aR(e){return e>=Zt.UPPER_A&&e<=Zt.UPPER_F||e>=Zt.LOWER_A&&e<=Zt.LOWER_F}function uR(e){return e>=Zt.UPPER_A&&e<=Zt.UPPER_Z||e>=Zt.LOWER_A&&e<=Zt.LOWER_Z||gh(e)}function lR(e){return e===Zt.EQUALS||uR(e)}var en;(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"})(en||(en={}));var ii;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ii||(ii={}));class cR{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=en.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ii.Strict}startEntity(t){this.decodeMode=t,this.state=en.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case en.EntityStart:return t.charCodeAt(n)===Zt.NUM?(this.state=en.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=en.NamedEntity,this.stateNamedEntity(t,n));case en.NumericStart:return this.stateNumericStart(t,n);case en.NumericDecimal:return this.stateNumericDecimal(t,n);case en.NumericHex:return this.stateNumericHex(t,n);case en.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|oR)===Zt.LOWER_X?(this.state=en.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=en.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(gh(s)||aR(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(gh(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===Zt.SEMI)this.consumed+=1;else if(this.decodeMode===ii.Strict)return 0;return this.emitCodePoint(sR(this.result),this.consumed),this.errors&&(t!==Zt.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=dR(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===ii.Attribute&&(a===0||lR(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&wi.VALUE_LENGTH)>>14,a!==0){if(u===Zt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==ii.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 en.NamedEntity:return this.result!==0&&(this.decodeMode!==ii.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case en.NumericDecimal:return this.emitNumericEntity(0,2);case en.NumericHex:return this.emitNumericEntity(0,3);case en.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case en.EntityStart:return 0}}}function dR(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 le;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(le||(le={}));var fs;(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"})(fs||(fs={}));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 fR=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 ro(e){var t;return(t=fR.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const de=g,hR={[le.HTML]:new Set([de.ADDRESS,de.APPLET,de.AREA,de.ARTICLE,de.ASIDE,de.BASE,de.BASEFONT,de.BGSOUND,de.BLOCKQUOTE,de.BODY,de.BR,de.BUTTON,de.CAPTION,de.CENTER,de.COL,de.COLGROUP,de.DD,de.DETAILS,de.DIR,de.DIV,de.DL,de.DT,de.EMBED,de.FIELDSET,de.FIGCAPTION,de.FIGURE,de.FOOTER,de.FORM,de.FRAME,de.FRAMESET,de.H1,de.H2,de.H3,de.H4,de.H5,de.H6,de.HEAD,de.HEADER,de.HGROUP,de.HR,de.HTML,de.IFRAME,de.IMG,de.INPUT,de.LI,de.LINK,de.LISTING,de.MAIN,de.MARQUEE,de.MENU,de.META,de.NAV,de.NOEMBED,de.NOFRAMES,de.NOSCRIPT,de.OBJECT,de.OL,de.P,de.PARAM,de.PLAINTEXT,de.PRE,de.SCRIPT,de.SECTION,de.SELECT,de.SOURCE,de.STYLE,de.SUMMARY,de.TABLE,de.TBODY,de.TD,de.TEMPLATE,de.TEXTAREA,de.TFOOT,de.TH,de.THEAD,de.TITLE,de.TR,de.TRACK,de.UL,de.WBR,de.XMP]),[le.MATHML]:new Set([de.MI,de.MO,de.MN,de.MS,de.MTEXT,de.ANNOTATION_XML]),[le.SVG]:new Set([de.TITLE,de.FOREIGN_OBJECT,de.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.XMLNS]:new Set},Eh=new Set([de.H1,de.H2,de.H3,de.H4,de.H5,de.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 Rt={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function pR(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function La(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function mR(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function Ai(e){return mR(e)||La(e)}function Oy(e){return Ai(e)||pR(e)}function Rl(e){return e+32}function Iy(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function Ry(e){return Iy(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function gR(e){return e===N.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:Cy(e)?te.surrogateCharacterReference:Ny(e)?te.noncharacterCharacterReference:ky(e)||e===N.CARRIAGE_RETURN?te.controlCharacterReference:null}class ER{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 nR(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new cR(rR,(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=gR(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:Ke.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ke.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ke.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ke.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(Py(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=ro(t.tagName),t.type===Ke.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 Ke.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ke.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ke.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:Ke.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=Iy(t)?Ke.WHITESPACE_CHARACTER:t===N.NULL?Ke.NULL_CHARACTER:Ke.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ke.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ii.Attribute:ii.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 N.LESS_THAN_SIGN:{this.state=I.TAG_OPEN;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case N.AMPERSAND:{this._startCharacterReference();break}case N.LESS_THAN_SIGN:{this.state=I.RCDATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case N.LESS_THAN_SIGN:{this.state=I.RAWTEXT_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case N.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 N.EXCLAMATION_MARK:{this.state=I.MARKUP_DECLARATION_OPEN;break}case N.SOLIDUS:{this.state=I.END_TAG_OPEN;break}case N.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case N.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 N.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=I.DATA;break}case N.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=wt;break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(La(t)?Rl(t):t)}}_stateRcdataLessThanSign(t){t===N.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=I.BEFORE_ATTRIBUTE_NAME,!1;case N.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=I.SELF_CLOSING_START_TAG,!1;case N.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===N.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 N.SOLIDUS:{this.state=I.SCRIPT_DATA_END_TAG_OPEN;break}case N.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===N.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===N.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 N.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===N.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)&&Ry(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 N.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===N.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)&&Ry(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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this._leaveAttrName(),this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._leaveAttrName(),this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=wt;break}default:this.currentAttr.name+=String.fromCodePoint(La(t)?Rl(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case N.EQUALS_SIGN:{this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{this.state=I.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this.state=I.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case N.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 N.QUOTATION_MARK:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case N.APOSTROPHE:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:case N.EQUALS_SIGN:case N.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this._leaveAttrValue(),this.state=I.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case N.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 N.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=I.DATA,this.emitCurrentTagToken();break}case N.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 N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case N.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case N.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 N.HYPHEN_MINUS:{this.state=I.COMMENT_START_DASH;break}case N.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 N.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(n);break}case N.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 N.HYPHEN_MINUS:{this.state=I.COMMENT_END_DASH;break}case N.LESS_THAN_SIGN:{n.data+="<",this.state=I.COMMENT_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.data+=wt;break}case N.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 N.EXCLAMATION_MARK:{n.data+="!",this.state=I.COMMENT_LESS_THAN_SIGN_BANG;break}case N.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===N.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=I.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===N.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=I.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==N.GREATER_THAN_SIGN&&t!==N.EOF&&this._err(te.nestedComment),this.state=I.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case N.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 N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case N.EXCLAMATION_MARK:{this.state=I.COMMENT_END_BANG;break}case N.HYPHEN_MINUS:{n.data+="-";break}case N.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 N.HYPHEN_MINUS:{n.data+="--!",this.state=I.COMMENT_END_DASH;break}case N.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(n);break}case N.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case N.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(La(t))this._createDoctypeToken(String.fromCharCode(Rl(t))),this.state=I.DOCTYPE_NAME;else switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(wt),this.state=I.DOCTYPE_NAME;break}case N.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 N.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.AFTER_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.name+=wt;break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(La(t)?Rl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.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 N.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=wt;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.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 N.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=wt;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case N.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case N.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 N.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=wt;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.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 N.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=wt;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.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 N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case N.NULL:{this._err(te.unexpectedNullCharacter);break}case N.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case N.RIGHT_SQUARE_BRACKET:{this.state=I.CDATA_SECTION_BRACKET;break}case N.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===N.RIGHT_SQUARE_BRACKET?this.state=I.CDATA_SECTION_END:(this._emitChars("]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case N.GREATER_THAN_SIGN:{this.state=I.DATA;break}case N.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(N.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Oy(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Oy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Ly=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Dy=new Set([...Ly,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Ll=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),yR=new Set([...Ll,g.OL,g.UL]),bR=new Set([...Ll,g.BUTTON]),My=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Fy=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),TR=new Set([g.TR,g.TEMPLATE,g.HTML]),_R=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),SR=new Set([g.TABLE,g.TEMPLATE,g.HTML]),xR=new Set([g.TD,g.TH]);class wR{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)===le.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const 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])!==le.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Eh,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(xR,le.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(SR,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(_R,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(TR,le.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===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 le.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case le.SVG:{if(Fy.has(s))return!1;break}case le.MATHML:{if(My.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ll)}hasInListItemScope(t){return this.hasInDynamicScope(t,yR)}hasInButtonScope(t){return this.hasInDynamicScope(t,bR)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case le.HTML:{if(Eh.has(n))return!0;if(Ll.has(n))return!1;break}case le.SVG:{if(Fy.has(n))return!1;break}case le.MATHML:{if(My.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case 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])===le.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])===le.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&&Ly.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Dy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Dy.has(this.currentTagId);)this.pop()}}const yh=3;var Lr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Lr||(Lr={}));const By={type:Lr.Marker};class AR{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===Lr.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<yh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<yh)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>=yh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(By)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Lr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Lr.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(By);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Lr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Lr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Lr.Element&&n.element===t)}}const vi={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};vi.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(vi.isTextNode(n)){n.value+=t;return}}vi.appendChild(e,vi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&vi.isTextNode(r)?r.value+=t:vi.insertBefore(e,vi.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)}},Uy="html",vR="about:legacy-compat",CR="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Hy=["+//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//"],kR=[...Hy,"-//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"]),jy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],PR=[...jy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function zy(e,t){return t.some(n=>e.startsWith(n))}function OR(e){return e.name===Uy&&e.publicId===null&&(e.systemId===null||e.systemId===vR)}function IR(e){if(e.name!==Uy)return rr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===CR)return rr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),NR.has(n))return rr.QUIRKS;let r=t===null?kR:Hy;if(zy(n,r))return rr.QUIRKS;if(r=t===null?jy:PR,zy(n,r))return rr.LIMITED_QUIRKS}return rr.NO_QUIRKS}const $y={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},RR="definitionurl",LR="definitionURL",DR=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])),MR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:le.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:le.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:le.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:le.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:le.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:le.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:le.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:le.XML}],["xml:space",{prefix:"xml",name:"space",namespace:le.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:le.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:le.XMLNS}]]),FR=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])),BR=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 UR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===fs.COLOR||r===fs.SIZE||r===fs.FACE)||BR.has(t)}function Vy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===RR){e.attrs[t].name=LR;break}}function qy(e){for(let t=0;t<e.attrs.length;t++){const n=DR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function bh(e){for(let t=0;t<e.attrs.length;t++){const n=MR.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=FR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ro(e.tagName))}function jR(e,t){return t===le.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function zR(e,t,n){if(t===le.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===fs.ENCODING){const s=n[r].value.toLowerCase();return s===$y.TEXT_HTML||s===$y.APPLICATION_XML}}return t===le.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function $R(e,t,n,r){return(!r||r===le.HTML)&&zR(e,t,n)||(!r||r===le.MATHML)&&jR(e,t)}const VR="hidden",qR=8,YR=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 WR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Yy=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Wy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:vi,onParseError:null};class Gy{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({},Wy),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 ER(this.options,this),this.activeFormattingElements=new AR(this.treeAdapter),this.fragmentContextID=r?ro(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new wR(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({},Wy),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,le.HTML,[]));const s=r.treeAdapter.createElement("documentmock",le.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:WR,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)===le.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,le.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=Rt.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)!==le.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Rt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Rt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Rt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Rt.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&&me(B({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,le.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,le.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(X.HTML,le.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===Ke.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)===le.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,le.HTML)}_processToken(t){switch(t.type){case Ke.CHARACTER:{this.onCharacter(t);break}case Ke.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ke.COMMENT:{this.onComment(t);break}case Ke.DOCTYPE:{this.onDoctype(t);break}case Ke.START_TAG:{this._processStartTag(t);break}case Ke.END_TAG:{this.onEndTag(t);break}case Ke.EOF:{this.onEof(t);break}case Ke.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return $R(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Lr.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 Yy.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)===le.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 hR[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){x6(this,t);return}switch(this.insertionMode){case M.INITIAL:{Da(this,t);break}case M.BEFORE_HTML:{Ma(this,t);break}case M.BEFORE_HEAD:{Fa(this,t);break}case M.IN_HEAD:{Ba(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Ua(this,t);break}case M.AFTER_HEAD:{Ha(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{Ky(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:{xh(this,t);break}case M.IN_TABLE_TEXT:{ib(this,t);break}case M.IN_COLUMN_GROUP:{Fl(this,t);break}case M.AFTER_BODY:{Hl(this,t);break}case M.AFTER_AFTER_BODY:{jl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){S6(this,t);return}switch(this.insertionMode){case M.INITIAL:{Da(this,t);break}case M.BEFORE_HTML:{Ma(this,t);break}case M.BEFORE_HEAD:{Fa(this,t);break}case M.IN_HEAD:{Ba(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Ua(this,t);break}case M.AFTER_HEAD:{Ha(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{xh(this,t);break}case M.IN_COLUMN_GROUP:{Fl(this,t);break}case M.AFTER_BODY:{Hl(this,t);break}case M.AFTER_AFTER_BODY:{jl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){_h(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:{_h(this,t);break}case M.IN_TABLE_TEXT:{$a(this,t);break}case M.AFTER_BODY:{eL(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{tL(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{nL(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:{$a(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)?w6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Da(this,t);break}case M.BEFORE_HTML:{rL(this,t);break}case M.BEFORE_HEAD:{sL(this,t);break}case M.IN_HEAD:{mr(this,t);break}case M.IN_HEAD_NO_SCRIPT:{uL(this,t);break}case M.AFTER_HEAD:{cL(this,t);break}case M.IN_BODY:{_n(this,t);break}case M.IN_TABLE:{io(this,t);break}case M.IN_TABLE_TEXT:{$a(this,t);break}case M.IN_CAPTION:{o6(this,t);break}case M.IN_COLUMN_GROUP:{wh(this,t);break}case M.IN_TABLE_BODY:{Bl(this,t);break}case M.IN_ROW:{Ul(this,t);break}case M.IN_CELL:{l6(this,t);break}case M.IN_SELECT:{ab(this,t);break}case M.IN_SELECT_IN_TABLE:{d6(this,t);break}case M.IN_TEMPLATE:{h6(this,t);break}case M.AFTER_BODY:{m6(this,t);break}case M.IN_FRAMESET:{g6(this,t);break}case M.AFTER_FRAMESET:{y6(this,t);break}case M.AFTER_AFTER_BODY:{T6(this,t);break}case M.AFTER_AFTER_FRAMESET:{_6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?A6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Da(this,t);break}case M.BEFORE_HTML:{iL(this,t);break}case M.BEFORE_HEAD:{oL(this,t);break}case M.IN_HEAD:{aL(this,t);break}case M.IN_HEAD_NO_SCRIPT:{lL(this,t);break}case M.AFTER_HEAD:{dL(this,t);break}case M.IN_BODY:{Ml(this,t);break}case M.TEXT:{KL(this,t);break}case M.IN_TABLE:{ja(this,t);break}case M.IN_TABLE_TEXT:{$a(this,t);break}case M.IN_CAPTION:{a6(this,t);break}case M.IN_COLUMN_GROUP:{u6(this,t);break}case M.IN_TABLE_BODY:{Ah(this,t);break}case M.IN_ROW:{ob(this,t);break}case M.IN_CELL:{c6(this,t);break}case M.IN_SELECT:{ub(this,t);break}case M.IN_SELECT_IN_TABLE:{f6(this,t);break}case M.IN_TEMPLATE:{p6(this,t);break}case M.AFTER_BODY:{cb(this,t);break}case M.IN_FRAMESET:{E6(this,t);break}case M.AFTER_FRAMESET:{b6(this,t);break}case M.AFTER_AFTER_BODY:{jl(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Da(this,t);break}case M.BEFORE_HTML:{Ma(this,t);break}case M.BEFORE_HEAD:{Fa(this,t);break}case M.IN_HEAD:{Ba(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Ua(this,t);break}case M.AFTER_HEAD:{Ha(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:{nb(this,t);break}case M.TEXT:{QL(this,t);break}case M.IN_TABLE_TEXT:{$a(this,t);break}case M.IN_TEMPLATE:{lb(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:{Sh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===N.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{Xy(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{xh(this,t);break}case M.IN_TABLE_TEXT:{rb(this,t);break}}}}function GR(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):tb(e,t),n}function XR(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 KR(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>=YR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=QR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function QR(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 JR(e,t,n){const r=e.treeAdapter.getTagName(t),s=ro(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===le.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function ZR(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 Th(e,t){for(let n=0;n<qR;n++){const r=GR(e,t);if(!r)break;const s=XR(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=KR(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&JR(e,u,a),ZR(e,s,r)}}function _h(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function eL(e,t){e._appendCommentNode(t,e.openElements.items[0])}function tL(e,t){e._appendCommentNode(t,e.document)}function Sh(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 nL(e,t){e._setDocumentType(t);const n=t.forceQuirks?rr.QUIRKS:IR(t);OR(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Da(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,rr.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function rL(e,t){t.tagID===g.HTML?(e._insertElement(t,le.HTML),e.insertionMode=M.BEFORE_HEAD):Ma(e,t)}function iL(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Ma(e,t)}function Ma(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function sL(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.HEAD:{e._insertElement(t,le.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:Fa(e,t)}}function oL(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Fa(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function Fa(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function mr(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Rt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Rt.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Rt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Rt.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:Ba(e,t)}}function aL(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:{Ba(e,t);break}case g.TEMPLATE:{hs(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function hs(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 Ba(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function uL(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{mr(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:Ua(e,t)}}function lL(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case g.BR:{Ua(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Ua(e,t){const n=t.type===Ke.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function cL(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.BODY:{e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,le.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),mr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Ha(e,t)}}function dL(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Ha(e,t);break}case g.TEMPLATE:{hs(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Ha(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=M.IN_BODY,Dl(e,t)}function Dl(e,t){switch(t.type){case Ke.CHARACTER:{Ky(e,t);break}case Ke.WHITESPACE_CHARACTER:{Xy(e,t);break}case Ke.COMMENT:{_h(e,t);break}case Ke.START_TAG:{_n(e,t);break}case Ke.END_TAG:{Ml(e,t);break}case Ke.EOF:{nb(e,t);break}}}function Xy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Ky(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function fL(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function hL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function pL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_FRAMESET)}function mL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function gL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Eh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,le.HTML)}function EL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function yL(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),n||(e.formElement=e.openElements.current))}function bL(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,le.HTML)}function TL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=Rt.PLAINTEXT}function _L(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1}function SL(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Th(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function xL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function wL(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Th(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function AL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function vL(e,t){e.treeAdapter.getDocumentMode(e.document)!==rr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function Qy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Jy(e){const t=Py(e,fs.TYPE);return t!=null&&t.toLowerCase()===VR}function CL(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),Jy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function kL(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function NL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function PL(e,t){t.tagName=X.IMG,t.tagID=g.IMG,Qy(e,t)}function OL(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Rt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function IL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function RL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function Zy(e,t){e._switchToTextParsing(t,Rt.RAWTEXT)}function LL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function DL(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function ML(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function FL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,le.HTML)}function BL(e,t){e._reconstructActiveFormattingElements(),Vy(t),bh(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function UL(e,t){e._reconstructActiveFormattingElements(),qy(t),bh(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function eb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function _n(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:{xL(e,t);break}case g.A:{SL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{gL(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:{mL(e,t);break}case g.LI:case g.DD:case g.DT:{bL(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Qy(e,t);break}case g.HR:{NL(e,t);break}case g.RB:case g.RTC:{ML(e,t);break}case g.RT:case g.RP:{FL(e,t);break}case g.PRE:case g.LISTING:{EL(e,t);break}case g.XMP:{IL(e,t);break}case g.SVG:{UL(e,t);break}case g.HTML:{fL(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:{mr(e,t);break}case g.BODY:{hL(e,t);break}case g.FORM:{yL(e,t);break}case g.NOBR:{wL(e,t);break}case g.MATH:{BL(e,t);break}case g.TABLE:{vL(e,t);break}case g.INPUT:{CL(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{kL(e,t);break}case g.IMAGE:{PL(e,t);break}case g.BUTTON:{_L(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{AL(e,t);break}case g.IFRAME:{RL(e,t);break}case g.SELECT:{LL(e,t);break}case g.OPTION:case g.OPTGROUP:{DL(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Zy(e,t);break}case g.FRAMESET:{pL(e,t);break}case g.TEXTAREA:{OL(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Zy(e,t):eb(e,t);break}case g.PLAINTEXT:{TL(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:eb(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 jL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,cb(e,t))}function zL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function $L(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 VL(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function qL(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function YL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function WL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function GL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function XL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function tb(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 Ml(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:{Th(e,t);break}case g.P:{VL(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:{zL(e,t);break}case g.LI:{qL(e);break}case g.DD:case g.DT:{YL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{WL(e);break}case g.BR:{XL(e);break}case g.BODY:{HL(e,t);break}case g.HTML:{jL(e,t);break}case g.FORM:{$L(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{GL(e,t);break}case g.TEMPLATE:{hs(e,t);break}default:tb(e,t)}}function nb(e,t){e.tmplInsertionModeStack.length>0?lb(e,t):Sh(e,t)}function KL(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 QL(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function xh(e,t){if(e.openElements.currentTagId!==void 0&&Yy.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 Ke.CHARACTER:{ib(e,t);break}case Ke.WHITESPACE_CHARACTER:{rb(e,t);break}}else za(e,t)}function JL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CAPTION}function ZL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function e6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,wh(e,t)}function t6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_TABLE_BODY}function n6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=M.IN_TABLE_BODY,Bl(e,t)}function r6(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function i6(e,t){Jy(t)?e._appendElement(t,le.HTML):za(e,t),t.ackSelfClosing=!0}function s6(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function io(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{n6(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{mr(e,t);break}case g.COL:{e6(e,t);break}case g.FORM:{s6(e,t);break}case g.TABLE:{r6(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{t6(e,t);break}case g.INPUT:{i6(e,t);break}case g.CAPTION:{JL(e,t);break}case g.COLGROUP:{ZL(e,t);break}default:za(e,t)}}function ja(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{hs(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:za(e,t)}}function za(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Dl(e,t),e.fosterParentingEnabled=n}function rb(e,t){e.pendingCharacterTokens.push(t)}function ib(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function $a(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)za(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const sb=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function o6(e,t){const n=t.tagID;sb.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,io(e,t)):_n(e,t)}function a6(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&&ja(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:Ml(e,t)}}function wh(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.COL:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{mr(e,t);break}default:Fl(e,t)}}function u6(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:{hs(e,t);break}case g.COL:break;default:Fl(e,t)}}function Fl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function Bl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,le.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,Ul(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,io(e,t));break}default:io(e,t)}}function Ah(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,ja(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:ja(e,t)}}function Ul(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,le.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,Bl(e,t));break}default:io(e,t)}}function ob(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,Ah(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,Ah(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:ja(e,t)}}function l6(e,t){const n=t.tagID;sb.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),Ul(e,t)):_n(e,t)}function c6(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(),ob(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Ml(e,t)}}function ab(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,le.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:{mr(e,t);break}}}function ub(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:{hs(e,t);break}}}function d6(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)):ab(e,t)}function f6(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)):ub(e,t)}function h6(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:{mr(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,io(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,wh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,Bl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,Ul(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,_n(e,t)}}function p6(e,t){t.tagID===g.TEMPLATE&&hs(e,t)}function lb(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Sh(e,t)}function m6(e,t){t.tagID===g.HTML?_n(e,t):Hl(e,t)}function cb(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 Hl(e,t)}function Hl(e,t){e.insertionMode=M.IN_BODY,Dl(e,t)}function g6(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.FRAMESET:{e._insertElement(t,le.HTML);break}case g.FRAME:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{mr(e,t);break}}}function E6(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 y6(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.NOFRAMES:{mr(e,t);break}}}function b6(e,t){t.tagID===g.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function T6(e,t){t.tagID===g.HTML?_n(e,t):jl(e,t)}function jl(e,t){e.insertionMode=M.IN_BODY,Dl(e,t)}function _6(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.NOFRAMES:{mr(e,t);break}}}function S6(e,t){t.chars=wt,e._insertCharacters(t)}function x6(e,t){e._insertCharacters(t),e.framesetOk=!1}function db(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==le.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function w6(e,t){if(UR(t))db(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?Vy(t):r===le.SVG&&(HR(t),qy(t)),bh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function A6(e,t){if(t.tagID===g.P||t.tagID===g.BR){db(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===le.HTML){e._endTagOutsideForeignContent(t);break}const 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 v6=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,C6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),fb={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function hb(e,t){const n=F6(e),r=Ay("type",{handlers:{root:k6,element:N6,text:P6,comment:mb,doctype:O6,raw:R6},unknown:L6}),s={parser:n?new Gy(fb):Gy.getFragmentParser(void 0,fb),handle(c){r(c,s)},stitches:!1,options:t||{}};r(e,s),so(s,Ir());const a=n?s.parser.document:s.parser.getFragment(),u=BI(a,{file:s.options.file});return s.stitches&&Pl(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 pb(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function k6(e,t){pb(e.children,t)}function N6(e,t){D6(e,t),pb(e.children,t),M6(e,t)}function P6(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ke.CHARACTER,chars:e.value,location:Va(e)};so(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function O6(e,t){const n={type:Ke.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Va(e)};so(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function I6(e,t){t.stitches=!0;const n=B6(e);if("children"in e&&"children"in n){const r=hb({type:"root",children:e.children},t.options);n.children=r.children}mb({type:"comment",value:{stitch:n}},t)}function mb(e,t){const n=e.value,r={type:Ke.COMMENT,data:n,location:Va(e)};so(t,Ir(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function R6(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,gb(t,Ir(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(v6,"&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 L6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))I6(n,t);else{let r="";throw C6.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 so(e,t){gb(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=Rt.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 gb(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 D6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Rt.PLAINTEXT)return;so(t,Ir(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:ds.html;s===ds.html&&n==="svg"&&(s=ds.svg);const a=$I(me(B({},e),{children:[]}),{space:s===ds.svg?"svg":"html"}),u={type:Ke.START_TAG,tagName:n,tagID:ro(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Va(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function M6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&QI.includes(n)||t.parser.tokenizer.state===Rt.PLAINTEXT)return;so(t,bl(e));const r={type:Ke.END_TAG,tagName:n,tagID:ro(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Va(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Rt.RCDATA||t.parser.tokenizer.state===Rt.RAWTEXT||t.parser.tokenizer.state===Rt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Rt.DATA)}function F6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Va(e){const t=Ir(e)||{line:void 0,column:void 0,offset:void 0},n=bl(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 B6(e){return"children"in e?cs(me(B({},e),{children:[]})):cs(e)}function Eb(e){return function(t,n){return hb(t,me(B({},e),{file:n}))}}const ps=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],yb={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...ps,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...ps],h2:[["className","sr-only"]],img:[...ps,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...ps,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...ps],table:[...ps],ul:[...ps,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Ci={}.hasOwnProperty;function U6(e,t){let n={type:"root",children:[]};const r={schema:t?B(B({},yb),t):yb,stack:[]},s=bb(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function bb(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 j6(e,n);case"element":return z6(e,n);case"root":return $6(e,n);case"text":return V6(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 qa(a,t),a}}function j6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return qa(n,t),n}}function z6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Tb(e,t.children),s=q6(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Ci.call(e.schema.ancestors,n))){const 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 qa(u,t),u}function $6(e,t){const r={type:"root",children:Tb(e,t.children)};return qa(r,t),r}function V6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return qa(r,t),r}function Tb(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=bb(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function q6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&Ci.call(r,n)?r[n]:void 0,u=r&&Ci.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(Ci.call(c,f)){const p=c[f];let m=_b(e,xb(a,f),f,p);m==null&&(m=_b(e,xb(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&Ci.call(s,n)){const p=s[n];for(f in p)Ci.call(p,f)&&!Ci.call(d,f)&&(d[f]=p[f])}return d}function _b(e,t,n,r){return t?Array.isArray(r)?Y6(e,t,n,r):Sb(e,t,n,r):void 0}function Y6(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=Sb(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Sb(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&W6(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 W6(e,t,n){const r=e.schema.protocols&&Ci.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),a=s.indexOf(":"),u=s.indexOf("?"),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 qa(e,t){const n=pE(t);t.data&&(e.data=cs(t.data)),n&&(e.position=n)}function xb(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 G6(e){return function(t){return U6(t,e)}}const wb=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return S.jsx("a",me(B(B({className:W(e,`${j}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},X6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=nt();return!e&&!t?null:S.jsx("div",{className:W(n,`${j}-disclaimer`),children:t?S.jsx(gy,{rehypePlugins:[Eb,G6],components:{ul:({children:r})=>S.jsx("ul",{className:W(n,`${j}-ul`),children:r}),ol:({children:r})=>S.jsx("ol",{className:W(n,`${j}-ol`),children:r}),li:({children:r})=>S.jsx("li",{className:W(n,`${j}-li`),children:r}),a:({href:r,title:s,children:a})=>S.jsx(wb,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>S.jsx("img",{className:W(n,`${j}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>S.jsx("p",{className:W(n,`${j}-disclaimer-text`),children:r}),span:({children:r})=>S.jsx("span",{className:W(n,`${j}-disclaimer-text-span`),children:r})},children:t}):S.jsx("p",{className:W(n,`${j}-disclaimer-text`),children:e})})},vh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:s,imageFile:a}=$n(),{setImageFile:u}=Gs(),{logger:c,globalClassName:d,searchConfig:f,features:p}=nt(),m=F.useRef(null),T=!!(p!=null&&p.enableImageUpload),y=!!s||!1,_=y?"connected":"disconnected",A=t||!y,P=()=>a?new Promise((U,q)=>{const L=new FileReader;L.readAsDataURL(a),L.onload=()=>U(L.result),L.onerror=V=>q(V)}):Promise.resolve(""),w=()=>{u(null)},C=F.useCallback(U=>{const q=U==null?void 0:U[0];if(q&&!A){if(q.size>10*1024*1024){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(q)}},[A,u]),v=U=>et(null,null,function*(){var V;U.preventDefault();const q=(((V=m.current)==null?void 0:V.value)||"").trim();let L="";try{L=yield P()}catch(ne){c==null||c.error("Error converting file to base64:",ne),alert("There was an error processing the file. Please try again.");return}q&&(w(),m.current.value="",r(q,L))});return S.jsxs("div",{className:W(d,e,`cim-${n}-component`,a&&"with-attachments",`${j}-search-bar-wrapper`),children:[a&&S.jsx(fN,{file:a,componentType:n,globalClassName:d,onRemove:w}),S.jsxs("form",{className:W(d,e,`cim-${n}-component`,`${j}-search-bar`),name:`${j}-search-form`,onSubmit:v,children:[S.jsx("span",{role:"status",className:W(`${j}-connection-status-icon`,_),children:S.jsx("span",{className:`${j}-visually-hidden`,children:y?"Connected to assistant":"Disconnected from assistant"})}),T&&S.jsx(TN,{componentType:n,accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",disabled:A,globalClassName:d,className:e,onFiles:C}),S.jsx("input",{className:W(d,e,`cim-${n}-component`,`${j}-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:`${j}-user-input`}),S.jsx(AN,{isLoading:A}),S.jsx(SN,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:A})]}),S.jsx(X6,{})]})};function K6(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 Q6(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 Ab=F.createContext({isOpen:!1}),Ch=F.createContext(null),vb=F.createContext(null),ms=()=>{var n,r;const e=F.useContext(Ch),t=F.useContext(vb);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Cb=({onClearChat:e,componentType:t})=>{const n=ms(),r=()=>{e(),n()};return S.jsxs("button",{className:W(`${j}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[S.jsx(Q6,{}),"Clear chat"]})};function J6(e){return e==null?[]:Array.isArray(e)?e:[e]}var Z6=(e,...t)=>e.concat(t),e4=(e,...t)=>e.filter(n=>!t.includes(n)),t4=e=>Array.from(new Set(e));function kb(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 n4(e,t,n={}){const{step:r=1,loop:s=!0}=n;return kb(e,t,{step:-r,loop:s})}var r4=e=>Array.isArray(e),Nb=e=>e!=null&&typeof e=="object",i4=e=>Nb(e)&&!r4(e),zl=e=>typeof e=="string",oo=e=>typeof e=="function",s4=e=>e==null,o4=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a4=e=>Object.prototype.toString.call(e),Pb=Function.prototype.toString,u4=Pb.call(Object),l4=e=>{if(!Nb(e)||a4(e)!="[object Object]"||f4(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=o4(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Pb.call(n)==u4},c4=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,d4=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,f4=e=>c4(e)||d4(e),h4=e=>e(),p4=()=>{},kh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function m4(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:g4,max:E4}=Math,y4=e=>Number.isNaN(e),b4=e=>y4(e)?0:e,Ob=(e,t,n)=>g4(E4(b4(e),t),n);function Nh(e){if(!l4(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]=Nh(s))}return n}function Ph(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function T4(e,t){if(e==null)throw new Error(t())}function _4(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 S4=Object.defineProperty,x4=(e,t,n)=>t in e?S4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oh=(e,t,n)=>x4(e,typeof t!="symbol"?t+"":t,n),Ib=()=>{},$l=e=>typeof e=="object"&&e!==null,ao=e=>e?"":void 0,Rb=e=>e?"true":void 0,w4=1,A4=9,v4=11,tn=e=>$l(e)&&e.nodeType===w4&&typeof e.nodeName=="string",Vl=e=>$l(e)&&e.nodeType===A4,C4=e=>$l(e)&&e===e.window,Lb=e=>tn(e)?e.localName||"":"#document";function k4(e){return["html","body","#document"].includes(Lb(e))}var N4=e=>$l(e)&&e.nodeType!==void 0,gs=e=>N4(e)&&e.nodeType===v4&&"host"in e,P4=e=>tn(e)&&e.localName==="input",O4=e=>tn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Ya(e){if(!e)return!1;const t=e.getRootNode();return co(t)===e}var I4=/(textarea|select)/;function R4(e){if(e==null||!tn(e))return!1;try{return P4(e)&&e.selectionStart!=null||I4.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function uo(e,t){var r;if(!e||!t||!tn(e)||!tn(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&gs(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Dr(e){var t;return Vl(e)?e:C4(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function L4(e){return Dr(e).documentElement}function lo(e){var t,n,r;return gs(e)?lo(e.host):Vl(e)?(t=e.defaultView)!=null?t:window:tn(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function co(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 D4(e){if(Lb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gs(e)&&e.host||L4(e);return gs(t)?t.host:t}function Ih(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Vl(t)||gs(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Rh=new WeakMap;function fo(e){return Rh.has(e)||Rh.set(e,lo(e).getComputedStyle(e)),Rh.get(e)}var Lh=new Set(["menu","listbox","dialog","grid","tree","region"]),M4=e=>Lh.has(e),Db=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Mb(e,t){const n=new Set,r=Ih(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Db(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&&M4(m)&&!T&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function Fb(e,t){const n=Ih(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=Db(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&&Lh.has(m)&&!T&&(t(p),s(p))}}}};s(e)}function F4(e){const t=new Set;return Fb(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function B4(e){const t=e.getAttribute("role");return!!(t&&Lh.has(t))}function U4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function H4(e){var t;return U4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function j4(e){if(!e.id)return!1;const t=Ih(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&B4(e))}var Dh=()=>typeof document!="undefined";function z4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Mh=e=>Dh()&&e.test(z4()),$4=e=>Dh()&&e.test(navigator.vendor),Bb=()=>Dh()&&!!navigator.maxTouchPoints,V4=()=>Mh(/^iPhone/i),q4=()=>Mh(/^iPad/i)||Fh()&&navigator.maxTouchPoints>1,ql=()=>V4()||q4(),Y4=()=>Fh()||ql(),Fh=()=>Mh(/^Mac/i),W4=()=>Y4()&&$4(/apple/i);function G4(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 gr(e){var n;const t=G4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Ub=e=>e.button===0,X4=e=>e.button===2||Fh()&&e.ctrlKey&&e.button===0,K4=e=>"touches"in e&&e.touches.length>0,Q4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Hb={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function J4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=Q4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in Hb&&(s=Hb[s]),s}function jb(e,t="client"){const n=K4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var nn=(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)}},zb=e=>tn(e)&&e.tagName==="IFRAME",Z4=/^(audio|video|details)$/;function $b(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var eD=e=>!Number.isNaN($b(e)),tD=e=>$b(e)<0;function nD(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 Vb(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=nD(d,t);if(f){const p=Array.from(f.querySelectorAll(Yl)).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 Yl="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",qb=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Yl));(n==!0||n=="if-empty"&&s.length===0)&&tn(e)&&Mr(e)&&s.unshift(e);const u=[];for(const c of s)if(Mr(c)){if(zb(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...qb(d,{getShadowRoot:r}));continue}u.push(c)}return r?Vb(u,r,Mr):u};function Mr(e){return!tn(e)||e.closest("[inert]")?!1:e.matches(Yl)&&O4(e)}function ho(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Yl));n&&Es(e)&&s.unshift(e);const a=[];for(const u of s)if(Es(u)){if(zb(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...ho(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Vb(a,r,Es);return!u.length&&n?s:u}return!a.length&&n?s:a}function Es(e){return tn(e)&&e.tabIndex>0?!0:Mr(e)&&!tD(e)}function rD(e,t={}){const n=ho(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function iD(e,t={}){const{current:n,getShadowRoot:r}=t,s=ho(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:co(a);if(!u)return null;const c=s.indexOf(u);return s[c+1]||null}function Wa(e){return e.tabIndex<0&&(Z4.test(e.localName)||R4(e))&&!eD(e)?0:e.tabIndex}function Yb(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=ho(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var sD=class J2{constructor(){Oh(this,"id",null),Oh(this,"fn_cleanup"),Oh(this,"cleanup",()=>{this.cancel()})}static create(){return new J2}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 Vt(e){const t=sD.create();return t.request(e),t.cleanup}function Wb(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 Bh(e){const t=D4(e);return k4(t)?Dr(t).body:tn(t)&&uD(t)?t:Bh(t)}var oD=/auto|scroll|overlay|hidden|clip/,aD=new Set(["inline","contents"]);function uD(e){const t=lo(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return oD.test(n+s+r)&&!aD.has(a)}var po="default",Uh="",Wl=new WeakMap;function lD(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return ql()?(po==="default"&&(Uh=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),po="disabled"):t&&(Wl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>cD({target:t,doc:r})}function cD(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(ql()){if(po!=="disabled")return;po="restoring",setTimeout(()=>{Wb(()=>{po==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=Uh||""),Uh="",po="default")})},300)}else if(t&&Wl.has(t)){const a=Wl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Wl.delete(t)}}function dD(e={}){const u=e,{defer:t,target:n}=u,r=hn(u,["defer","target"]),s=t?Vt:c=>c(),a=[];return a.push(s(()=>{const c=typeof n=="function"?n():n;a.push(lD(me(B({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function fD(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=c=>{const d=jb(c),f=Math.sqrt(Hu(d.x,2)+Hu(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=jb(c);r({point:d,event:c})},u=[nn(e,"pointermove",s,!1),nn(e,"pointerup",a,!1),nn(e,"pointercancel",a,!1),nn(e,"contextmenu",a,!1),dD({doc:e})];return()=>{u.forEach(c=>c())}}function hD(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]=rD(e,{includeContainer:!0,getShadowRoot:a}),y=iD(c,{current:n,getShadowRoot:a}),_=!m&&!T;f.shiftKey&&Ya(y)?(s==null||s(),p=T):f.shiftKey&&(Ya(m)||_)?p=n:!f.shiftKey&&Ya(n)?(s==null||s(),p=m):!f.shiftKey&&(Ya(T)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return nn(u,"keydown",d,!0)}function pD(e,t){const c=t,{defer:n,triggerElement:r}=c,s=hn(c,["defer","triggerElement"]),a=n?Vt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(hD(d,B({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function mD(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Gl(e,t){if(!e)return Ib;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 gD(e,t,n){if(!e)return Ib;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 ED(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 yD(e,t){const{timeout:n,rootNode:r}=t,s=lo(r),a=Dr(r),u=new s.AbortController;return ED(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 bD=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),TD=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Gb=e=>{const t={};let n;for(;n=TD.exec(e);)t[n[1]]=n[2];return t},_D=(e,t)=>{if(zl(e)){if(zl(t))return`${e};${t}`;e=Gb(e)}else zl(t)&&(t=Gb(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function qt(...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]=kh(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=bD(t[s],n[s]);continue}if(s==="style"){t[s]=_D(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 tH(e){return e}var mo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(mo||{}),Hh="__init__";function SD(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Dr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>co(t()),a=u=>t().getElementById(u);return me(B({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:Ya,getById:a})}function xD(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var go=()=>e=>Array.from(new Set(e)),Xb=typeof globalThis.document!="undefined"?F.useLayoutEffect:F.useEffect;function Xl(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);Xb(()=>{d.current=c.current},[s,e().value]);const f=y=>{var P,w;const _=d.current,A=oo(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:A,prev:_}),u||a(A),n(A,_)||(w=(P=e()).onChange)==null||w.call(P,A,_)};function p(){return u?e().value:s}return{initial:r,ref:c,get:p,set(y){(e().sync?Xs.flushSync:h4)(()=>f(y))},invoke(y,_){var A,P;(P=(A=e()).onChange)==null||P.call(A,y,_)},hash(y){var _,A,P;return(P=(A=(_=e()).hash)==null?void 0:A.call(_,y))!=null?P:String(y)}}}Xl.cleanup=e=>{F.useEffect(()=>e,[])},Xl.ref=e=>{const t=F.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function wD(e){const t=F.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var AD=(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 Kl(e,t={}){var oe,he,Ce,re,ae,Ae;const n=F.useMemo(()=>{const{id:se,ids:J,getRootNode:ie}=t;return SD({id:se,ids:J,getRootNode:ie})},[t]),r=(...se)=>{e.debug&&console.log(...se)},s=(he=(oe=e.props)==null?void 0:oe.call(e,{props:Nh(t),scope:n}))!=null?he:t,a=vD(s),u=(Ce=e.context)==null?void 0:Ce.call(e,{prop:a,bindable:Xl,scope:n,flush:Qb,getContext(){return d},getComputed(){return q},getRefs(){return A},getEvent(){return y()}}),c=Kb(u),d={get(se){var J;return(J=c.current)==null?void 0:J[se].ref.current},set(se,J){var ie;(ie=c.current)==null||ie[se].set(J)},initial(se){var J;return(J=c.current)==null?void 0:J[se].initial},hash(se){var ie,k;const J=(ie=c.current)==null?void 0:ie[se].get();return(k=c.current)==null?void 0:k[se].hash(J)}},f=F.useRef(new Map),p=F.useRef(null),m=F.useRef(null),T=F.useRef({type:""}),y=()=>me(B({},T.current),{current(){return T.current},previous(){return m.current}}),_=()=>me(B({},L),{matches(...se){return se.includes(L.ref.current)},hasTag(se){var J,ie;return!!((ie=(J=e.states[L.ref.current])==null?void 0:J.tags)!=null&&ie.includes(se))}}),A=wD((ae=(re=e.refs)==null?void 0:re.call(e,{prop:a,context:d}))!=null?ae:{}),P=()=>({state:_(),context:d,event:y(),prop:a,send:Y,action:w,guard:C,track:AD,refs:A,computed:q,flush:Qb,scope:n,choose:U}),w=se=>{const J=oo(se)?se(P()):se;if(!J)return;const ie=J.map(k=>{var Q,O;const D=(O=(Q=e.implementations)==null?void 0:Q.actions)==null?void 0:O[k];return D||Ph(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),D});for(const k of ie)k==null||k(P())},C=se=>{var J,ie;return oo(se)?se(P()):(ie=(J=e.implementations)==null?void 0:J.guards)==null?void 0:ie[se](P())},v=se=>{const J=oo(se)?se(P()):se;if(!J)return;const ie=J.map(D=>{var O,Se;const Q=(Se=(O=e.implementations)==null?void 0:O.effects)==null?void 0:Se[D];return Q||Ph(`[zag-js] No implementation found for effect "${JSON.stringify(D)}"`),Q}),k=[];for(const D of ie){const Q=D==null?void 0:D(P());Q&&k.push(Q)}return()=>k.forEach(D=>D==null?void 0:D())},U=se=>J6(se).find(J=>{let ie=!J.guard;return zl(J.guard)?ie=!!C(J.guard):oo(J.guard)&&(ie=J.guard(P())),ie}),q=se=>{T4(e.computed,()=>"[zag-js] No computed object found on machine");const J=e.computed[se];return J({context:d,event:y(),prop:a,refs:A,scope:n,computed:q})},L=Xl(()=>({defaultValue:e.initialState({prop:a}),onChange(se,J){var k,D,Q,O;if(J){const Se=f.current.get(J);Se==null||Se(),f.current.delete(J)}J&&w((k=e.states[J])==null?void 0:k.exit),w((D=p.current)==null?void 0:D.actions);const ie=v((Q=e.states[se])==null?void 0:Q.effects);if(ie&&f.current.set(se,ie),J===Hh){w(e.entry);const Se=v(e.effects);Se&&f.current.set(Hh,Se)}w((O=e.states[se])==null?void 0:O.entry)}})),V=F.useRef(void 0),ne=F.useRef(mo.NotStarted);Xb(()=>{queueMicrotask(()=>{var D;const ie=ne.current===mo.Started;ne.current=mo.Started,r(ie?"rehydrating...":"initializing...");const k=(D=V.current)!=null?D:L.initial;L.invoke(k,ie?L.get():Hh)});const se=f.current,J=L.ref.current;return()=>{r("unmounting..."),V.current=J,ne.current=mo.Stopped,se.forEach(ie=>ie==null?void 0:ie()),f.current=new Map,p.current=null,queueMicrotask(()=>{w(e.exit)})}},[]);const fe=()=>"ref"in L?L.ref.current:L.get(),Y=se=>{queueMicrotask(()=>{var O,Se,Fe,ke,xe;if(ne.current!==mo.Started)return;m.current=T.current,T.current=se;let J=fe();const ie=(Fe=(O=e.states[J].on)==null?void 0:O[se.type])!=null?Fe:(Se=e.on)==null?void 0:Se[se.type],k=U(ie);if(!k)return;p.current=k;const D=(ke=k.target)!=null?ke:J;r("transition",se.type,k.target||J,`(${k.actions})`);const Q=D!==J;Q?Xs.flushSync(()=>L.set(D)):k.reenter&&!Q?L.invoke(J,J):w((xe=k.actions)!=null?xe:[])})};return(Ae=e.watch)==null||Ae.call(e,P()),{state:_(),send:Y,context:d,prop:a,scope:n,refs:A,computed:q,event:y(),getStatus:()=>ne.current}}function Kb(e){const t=F.useRef(e);return t.current=e,t}function vD(e){const t=Kb(e);return function(r){return t.current[r]}}function Qb(e){queueMicrotask(()=>{Xs.flushSync(()=>e())})}var jh=xD(e=>e);function Ql(...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 CD(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 zh=e=>{const t=F.memo(F.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=hn(f,["asChild","children"]);if(!s)return F.createElement(e,me(B({},u),{ref:r}),a);if(!F.isValidElement(a))return null;const c=F.Children.only(a),d=CD(c);return F.cloneElement(c,me(B({},qt(u,c.props)),{ref:r?Ql(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Sn=(()=>{const e=new Map;return new Proxy(zh,{apply(t,n,r){return zh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,zh(r)),e.get(r)}})})();function kD(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ys(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:kD(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,$h]=ys({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[Jb,Ga]=ys({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),Zb=F.forwardRef((e,t)=>{const n=$h(),r=Ga(),s=qt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:S.jsx(Sn.div,me(B({},s),{ref:Ql(r.ref,t)}))});Zb.displayName="PopoverContent";const eT=F.forwardRef((e,t)=>{const n=$h(),r=Ga(),s=qt(n.getPositionerProps(),e);return r.unmounted?null:S.jsx(Sn.div,me(B({},s),{ref:t}))});eT.displayName="PopoverPositioner";const Xa=()=>(e,t)=>t.reduce((n,r)=>{const[s,a]=n,u=r;return a[u]!==void 0&&(s[u]=a[u]),delete a[u],[s,a]},[{},B({},e)]),tT=e=>Xa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function PD(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 OD={props({props:e}){return me(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",fo(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"});Vt(()=>{var c,d;const u=Jl(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})=>{Vt(()=>{e.set("prevAnimationName",Jl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const s=t.get("node");if(!s)return;const a=d=>{var 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",Jl(t.get("styles")))},u=d=>{const f=Jl(t.get("styles"));gr(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=Gl(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),Wb(()=>c())}}}}};function Jl(e){return(e==null?void 0:e.animationName)||"none"}go()(["onExitComplete","present","immediate"]);function ID(e,t={}){const{sync:n=!1}=t,r=RD(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 RD(e){const t=F.useRef(e);return t.current=e,t}const Vh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=T,a=hn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=F.useRef(!1),c=me(B({},a),{present:r,onExitComplete:ID(e.onExitComplete)}),d=Kl(OD,c),f=PD(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 bs=(e,t=[])=>({parts:(...n)=>{if(LD(t))return bs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>bs(e,[...t,...n]),omit:(...n)=>bs(e,t.filter(r=>!n.includes(r))),rename:n=>bs(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Eo(e)}"][data-part="${Eo(r)}"]`,`& [data-scope="${Eo(e)}"][data-part="${Eo(r)}"]`].join(", "),attrs:{"data-scope":Eo(e),"data-part":Eo(r)}}}),{})}),Eo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),LD=e=>e.length===0;const DD=["top","right","bottom","left"],ki=Math.min,si=Math.max,Zl=Math.round,ec=Math.floor,Fr=e=>({x:e,y:e}),MD={left:"right",right:"left",bottom:"top",top:"bottom"};function nT(e,t,n){return si(e,ki(t,n))}function oi(e,t){return typeof e=="function"?e(t):e}function Ni(e){return e.split("-")[0]}function yo(e){return e.split("-")[1]}function qh(e){return e==="x"?"y":"x"}function Yh(e){return e==="y"?"height":"width"}function Br(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Wh(e){return qh(Br(e))}function FD(e,t,n){n===void 0&&(n=!1);const r=yo(e),s=Wh(e),a=Yh(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=tc(u)),[u,tc(u)]}function BD(e){const t=tc(e);return[Gh(e),t,Gh(t)]}function Gh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const rT=["left","right"],iT=["right","left"],UD=["top","bottom"],HD=["bottom","top"];function jD(e,t,n){switch(e){case"top":case"bottom":return n?t?iT:rT:t?rT:iT;case"left":case"right":return t?UD:HD;default:return[]}}function zD(e,t,n,r){const s=yo(e);let a=jD(Ni(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Gh)))),a}function tc(e){const t=Ni(e);return MD[t]+e.slice(t.length)}function $D(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 sT(e){return typeof e!="number"?$D(e):{top:e,right:e,bottom:e,left:e}}function nc(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 oT(e,t,n){let{reference:r,floating:s}=e;const a=Br(t),u=Wh(t),c=Yh(u),d=Ni(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 _=yo(t);return _&&(y[u]+=T*(_==="end"?1:-1)*(n&&f?-1:1)),y}function VD(e,t){return et(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}=oi(t,e),_=sT(y),P=c[T?m==="floating"?"reference":"floating":m],w=nc(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(P))==null||n?P:P.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),C=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,v=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),U=(yield a.isElement==null?void 0:a.isElement(v))&&(yield a.getScale==null?void 0:a.getScale(v))||{x:1,y:1},q=nc(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:C,offsetParent:v,strategy:d}):C);return{top:(w.top-q.top+_.top)/U.y,bottom:(q.bottom-w.bottom+_.bottom)/U.y,left:(w.left-q.left+_.left)/U.x,right:(q.right-w.right+_.right)/U.x}})}const qD=50,YD=(e,t,n)=>et(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,c=u.detectOverflow?u:me(B({},u),{detectOverflow:VD}),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}=oT(f,r,d),T=r,y=0;const _={};for(let A=0;A<a.length;A++){const P=a[A];if(!P)continue;const{name:w,fn:C}=P,{x:v,y:U,data:q,reset:L}=yield C({x:p,y:m,initialPlacement:r,placement:T,strategy:s,middlewareData:_,rects:f,platform:c,elements:{reference:e,floating:t}});p=v!=null?v:p,m=U!=null?U:m,_[w]=B(B({},_[w]),q),L&&y<qD&&(y++,typeof L=="object"&&(L.placement&&(T=L.placement),L.rects&&(f=L.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):L.rects),{x:p,y:m}=oT(f,T,d)),A=-1)}return{x:p,y:m,placement:T,strategy:s,middlewareData:_}}),WD=e=>({name:"arrow",options:e,fn(n){return et(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=oi(e,n)||{};if(p==null)return{};const T=sT(m),y={x:r,y:s},_=Wh(a),A=Yh(_),P=yield c.getDimensions(p),w=_==="y",C=w?"top":"left",v=w?"bottom":"right",U=w?"clientHeight":"clientWidth",q=u.reference[A]+u.reference[_]-y[_]-u.floating[A],L=y[_]-u.reference[_],V=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ne=V?V[U]:0;(!ne||!(yield c.isElement==null?void 0:c.isElement(V)))&&(ne=d.floating[U]||u.floating[A]);const fe=q/2-L/2,Y=ne/2-P[A]/2-1,oe=ki(T[C],Y),he=ki(T[v],Y),Ce=ne-P[A]-he,re=ne/2-P[A]/2+fe,ae=nT(oe,re,Ce),Ae=!f.arrow&&yo(a)!=null&&re!==ae&&u.reference[A]/2-(re<oe?oe:he)-P[A]/2<0,se=Ae?re<oe?re-oe:re-Ce:0;return{[_]:y[_]+se,data:B({[_]:ae,centerOffset:re-ae-se},Ae&&{alignmentOffset:se}),reset:Ae}})}}),GD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return et(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,ae=oi(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:P=!0}=ae,w=hn(ae,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const C=Ni(a),v=Br(d),U=Ni(d)===d,q=yield f.isRTL==null?void 0:f.isRTL(p.floating),L=y||(U||!P?[tc(d)]:BD(d)),V=A!=="none";!y&&V&&L.push(...zD(d,P,A,q));const ne=[d,...L],fe=yield f.detectOverflow(n,w),Y=[];let oe=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&Y.push(fe[C]),T){const Ae=FD(a,c,q);Y.push(fe[Ae[0]],fe[Ae[1]])}if(oe=[...oe,{placement:a,overflows:Y}],!Y.every(Ae=>Ae<=0)){var he,Ce;const Ae=(((he=u.flip)==null?void 0:he.index)||0)+1,se=ne[Ae];if(se&&(!(T==="alignment"?v!==Br(se):!1)||oe.every(k=>Br(k.placement)===v?k.overflows[0]>0:!0)))return{data:{index:Ae,overflows:oe},reset:{placement:se}};let J=(Ce=oe.filter(ie=>ie.overflows[0]<=0).sort((ie,k)=>ie.overflows[1]-k.overflows[1])[0])==null?void 0:Ce.placement;if(!J)switch(_){case"bestFit":{var re;const ie=(re=oe.filter(k=>{if(V){const D=Br(k.placement);return D===v||D==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(D=>D>0).reduce((D,Q)=>D+Q,0)]).sort((k,D)=>k[1]-D[1])[0])==null?void 0:re[0];ie&&(J=ie);break}case"initialPlacement":J=d;break}if(a!==J)return{reset:{placement:J}}}return{}})}}};function aT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uT(e){return DD.some(t=>e[t]>=0)}const XD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return et(this,null,function*(){const{rects:r,platform:s}=n,c=oi(e,n),{strategy:a="referenceHidden"}=c,u=hn(c,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,me(B({},u),{elementContext:"reference"})),f=aT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:uT(f)}}}case"escaped":{const d=yield s.detectOverflow(n,me(B({},u),{altBoundary:!0})),f=aT(d,r.floating);return{data:{escapedOffsets:f,escaped:uT(f)}}}default:return{}}})}}},lT=new Set(["left","top"]);function KD(e,t){return et(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=Ni(n),c=yo(n),d=Br(n)==="y",f=lT.has(u)?-1:1,p=a&&d?-1:1,m=oi(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 QD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return et(this,null,function*(){var r,s;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield KD(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:me(B({},f),{placement:c})}})}}},JD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return et(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,v=oi(e,n),{mainAxis:c=!0,crossAxis:d=!1,limiter:f={fn:U=>{let{x:q,y:L}=U;return{x:q,y:L}}}}=v,p=hn(v,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},T=yield u.detectOverflow(n,p),y=Br(a),_=qh(y);let A=m[_],P=m[y];const w=(U,q)=>nT(q+T[U==="y"?"top":"left"],q,q-T[U==="y"?"bottom":"right"]);c&&(A=w(_,A)),d&&(P=w(y,P));const C=f.fn(me(B({},n),{[_]:A,[y]:P}));return me(B({},C),{data:{x:C.x-r,y:C.y-s,enabled:{[_]:c,[y]:d}}})})}}},ZD=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}=oi(e,t),T={x:s,y:a},y=Br(u),_=qh(y);let A=T[_],P=T[y];const w=oi(f,t),C=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:(n=w.mainAxis)!=null?n:0,crossAxis:(r=w.crossAxis)!=null?r:0};if(p){const q=_==="y"?"height":"width",L=c.reference[_]-c.floating[q]+C.mainAxis,V=c.reference[_]+c.reference[q]-C.mainAxis;A<L?A=L:A>V&&(A=V)}if(m){var v,U;const q=_==="y"?"width":"height",L=lT.has(Ni(u)),V=c.reference[y]-c.floating[q]+(L&&((v=d.offset)==null?void 0:v[y])||0)+(L?0:C.crossAxis),ne=c.reference[y]+c.reference[q]+(L?0:((U=d.offset)==null?void 0:U[y])||0)-(L?C.crossAxis:0);P<V?P=V:P>ne&&(P=ne)}return{[_]:A,[y]:P}}}},e5=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return et(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,Y=oi(e,n),{apply:c=()=>{}}=Y,d=hn(Y,["apply"]),f=yield a.detectOverflow(n,d),p=Ni(r),m=yo(r),T=Br(r)==="y",{width:y,height:_}=s.floating;let A,P;p==="top"||p==="bottom"?(A=p,P=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(P=p,A=m==="end"?"top":"bottom");const w=_-f.top-f.bottom,C=y-f.left-f.right,v=ki(_-f[A],w),U=ki(y-f[P],C),q=n.middlewareData.shift,L=!q;let V=v,ne=U;q!=null&&q.enabled.x&&(ne=C),q!=null&&q.enabled.y&&(V=w),L&&!m&&(T?ne=y-2*si(f.left,f.right):V=_-2*si(f.top,f.bottom)),yield c(me(B({},n),{availableWidth:ne,availableHeight:V}));const fe=yield a.getDimensions(u.floating);return y!==fe.width||_!==fe.height?{reset:{rects:!0}}:{}})}}};function rc(){return typeof window!="undefined"}function bo(e){return cT(e)?(e.nodeName||"").toLowerCase():"#document"}function Yn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ur(e){var t;return(t=(cT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function cT(e){return rc()?e instanceof Node||e instanceof Yn(e).Node:!1}function Er(e){return rc()?e instanceof Element||e instanceof Yn(e).Element:!1}function Hr(e){return rc()?e instanceof HTMLElement||e instanceof Yn(e).HTMLElement:!1}function dT(e){return!rc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Yn(e).ShadowRoot}function Ka(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=yr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function t5(e){return/^(table|td|th)$/.test(bo(e))}function ic(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const n5=/transform|translate|scale|rotate|perspective|filter/,r5=/paint|layout|strict|content/,Ts=e=>!!e&&e!=="none";let Xh;function Kh(e){const t=Er(e)?yr(e):e;return Ts(t.transform)||Ts(t.translate)||Ts(t.scale)||Ts(t.rotate)||Ts(t.perspective)||!Qh()&&(Ts(t.backdropFilter)||Ts(t.filter))||n5.test(t.willChange||"")||r5.test(t.contain||"")}function i5(e){let t=Pi(e);for(;Hr(t)&&!To(t);){if(Kh(t))return t;if(ic(t))return null;t=Pi(t)}return null}function Qh(){return Xh==null&&(Xh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Xh}function To(e){return/^(html|body|#document)$/.test(bo(e))}function yr(e){return Yn(e).getComputedStyle(e)}function sc(e){return Er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pi(e){if(bo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||dT(e)&&e.host||Ur(e);return dT(t)?t.host:t}function fT(e){const t=Pi(e);return To(t)?(e.ownerDocument||e).body:Hr(t)&&Ka(t)?t:fT(t)}function Qa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=fT(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Yn(s);if(a){const c=Jh(u);return t.concat(u,u.visualViewport||[],Ka(s)?s:[],c&&n?Qa(c):[])}else return t.concat(s,Qa(s,[],n))}function Jh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function hT(e){const t=yr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Hr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,c=Zl(n)!==a||Zl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Zh(e){return Er(e)?e:e.contextElement}function _o(e){const t=Zh(e);if(!Hr(t))return Fr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=hT(t);let u=(a?Zl(n.width):n.width)/r,c=(a?Zl(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const s5=Fr(0);function pT(e){const t=Yn(e);return!Qh()||!t.visualViewport?s5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function o5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Yn(e)?!1:t}function _s(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Zh(e);let u=Fr(1);t&&(r?Er(r)&&(u=_o(r)):u=_o(e));const c=o5(a,n,r)?pT(a):Fr(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=Yn(a),y=r&&Er(r)?Yn(r):r;let _=T,A=Jh(_);for(;A&&r&&y!==_;){const P=_o(A),w=A.getBoundingClientRect(),C=yr(A),v=w.left+(A.clientLeft+parseFloat(C.paddingLeft))*P.x,U=w.top+(A.clientTop+parseFloat(C.paddingTop))*P.y;d*=P.x,f*=P.y,p*=P.x,m*=P.y,d+=v,f+=U,_=Yn(A),A=Jh(_)}}return nc({width:p,height:m,x:d,y:f})}function oc(e,t){const n=sc(e).scrollLeft;return t?t.left+n:_s(Ur(e)).left+n}function mT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-oc(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function a5(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Ur(r),c=t?ic(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Fr(1);const p=Fr(0),m=Hr(r);if((m||!m&&!a)&&((bo(r)!=="body"||Ka(u))&&(d=sc(r)),Hr(r))){const y=_s(r);f=_o(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?mT(u,d):Fr(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 u5(e){return Array.from(e.getClientRects())}function l5(e){const t=Ur(e),n=sc(e),r=e.ownerDocument.body,s=si(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=si(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+oc(e);const c=-n.scrollTop;return yr(r).direction==="rtl"&&(u+=si(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:c}}const gT=25;function c5(e,t){const n=Yn(e),r=Ur(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=Qh();(!p||p&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}const f=oc(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);_<=gT&&(a-=_)}else f<=gT&&(a+=f);return{width:a,height:u,x:c,y:d}}const d5=new Set(["absolute","fixed"]);function f5(e,t){const n=_s(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Hr(e)?_o(e):Fr(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 ET(e,t,n){let r;if(t==="viewport")r=c5(e,n);else if(t==="document")r=l5(Ur(e));else if(Er(t))r=f5(t,n);else{const s=pT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return nc(r)}function yT(e,t){const n=Pi(e);return n===t||!Er(n)||To(n)?!1:yr(n).position==="fixed"||yT(n,t)}function h5(e,t){const n=t.get(e);if(n)return n;let r=Qa(e,[],!1).filter(c=>Er(c)&&bo(c)!=="body"),s=null;const a=yr(e).position==="fixed";let u=a?Pi(e):e;for(;Er(u)&&!To(u);){const c=yr(u),d=Kh(u);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&d5.has(s.position)||Ka(u)&&!d&&yT(e,u))?r=r.filter(p=>p!==u):s=c,u=Pi(u)}return t.set(e,r),r}function p5(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?ic(t)?[]:h5(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const m=ET(t,p,s);return f.top=si(m.top,f.top),f.right=ki(m.right,f.right),f.bottom=ki(m.bottom,f.bottom),f.left=si(m.left,f.left),f},ET(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function m5(e){const{width:t,height:n}=hT(e);return{width:t,height:n}}function g5(e,t,n){const r=Hr(t),s=Ur(t),a=n==="fixed",u=_s(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Fr(0);function f(){d.x=oc(s)}if(r||!r&&!a)if((bo(t)!=="body"||Ka(s))&&(c=sc(t)),r){const y=_s(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?mT(s,c):Fr(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 ep(e){return yr(e).position==="static"}function bT(e,t){if(!Hr(e)||yr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ur(e)===n&&(n=n.ownerDocument.body),n}function TT(e,t){const n=Yn(e);if(ic(e))return n;if(!Hr(e)){let s=Pi(e);for(;s&&!To(s);){if(Er(s)&&!ep(s))return s;s=Pi(s)}return n}let r=bT(e,t);for(;r&&t5(r)&&ep(r);)r=bT(r,t);return r&&To(r)&&ep(r)&&!Kh(r)?n:r||i5(e)||n}const E5=function(e){return et(this,null,function*(){const t=this.getOffsetParent||TT,n=this.getDimensions,r=yield n(e.floating);return{reference:g5(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function y5(e){return yr(e).direction==="rtl"}const b5={convertOffsetParentRelativeRectToViewportRelativeRect:a5,getDocumentElement:Ur,getClippingRect:p5,getOffsetParent:TT,getElementRects:E5,getClientRects:u5,getDimensions:m5,getScale:_o,isElement:Er,isRTL:y5};function _T(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function T5(e,t){let n=null,r;const s=Ur(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 _=ec(m),A=ec(s.clientWidth-(p+T)),P=ec(s.clientHeight-(m+y)),w=ec(p),v={rootMargin:-_+"px "+-A+"px "+-P+"px "+-w+"px",threshold:si(0,ki(1,d))||1};let U=!0;function q(L){const V=L[0].intersectionRatio;if(V!==d){if(!U)return u();V?u(!1,V):r=setTimeout(()=>{u(!1,1e-7)},1e3)}V===1&&!_T(f,e.getBoundingClientRect())&&u(),U=!1}try{n=new IntersectionObserver(q,me(B({},v),{root:s.ownerDocument}))}catch(L){n=new IntersectionObserver(q,v)}n.observe(e)}return u(!0),a}function _5(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=Zh(e),p=s||a?[...f?Qa(f):[],...Qa(t)]:[];p.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const m=f&&c?T5(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(w=>{let[C]=w;C&&C.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var v;(v=y)==null||v.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,A=d?_s(e):null;d&&P();function P(){const w=_s(e);A&&!_T(A,w)&&n(),A=w,_=requestAnimationFrame(P)}return n(),()=>{var w;p.forEach(C=>{s&&C.removeEventListener("scroll",n),a&&C.removeEventListener("resize",n)}),m==null||m(),(w=y)==null||w.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const S5=QD,x5=JD,w5=GD,A5=e5,v5=XD,C5=WD,k5=ZD,N5=(e,t,n)=>{const r=new Map,s=B({platform:b5},n),a=me(B({},s.platform),{_c:r});return YD(e,t,me(B({},s),{platform:a}))};function ST(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 me(B({},s),{toJSON:()=>s})}function P5(e){if(!e)return ST();const{x:t,y:n,width:r,height:s}=e;return ST(t,n,r,s)}function O5(e,t){return{contextElement:tn(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?P5(r):n.getBoundingClientRect()}}}var Ja=e=>({variable:e,reference:`var(${e})`}),ai={arrowSize:Ja("--arrow-size"),arrowSizeHalf:Ja("--arrow-size-half"),arrowBg:Ja("--arrow-background"),transformOrigin:Ja("--transform-origin"),arrowOffset:Ja("--arrow-offset")},I5=e=>e==="top"||e==="bottom"?"y":"x";function R5(e,t){return{name:"transformOrigin",fn(n){var fe,Y,oe,he,Ce;const{elements:r,middlewareData:s,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=I5(d),p=((fe=s.arrow)==null?void 0:fe.x)||0,m=((Y=s.arrow)==null?void 0:Y.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+T/2,A=m+y/2,P=Math.abs(((oe=s.shift)==null?void 0:oe.y)||0),w=u.reference.height/2,C=y/2,v=(Ce=(he=e.offset)==null?void 0:he.mainAxis)!=null?Ce:e.gutter,U=typeof v=="number"?v+C:v!=null?v:C,q=P>U,L={top:`${_}px calc(100% + ${U}px)`,bottom:`${_}px ${-U}px`,left:`calc(100% + ${U}px) ${A}px`,right:`${-U}px ${A}px`}[d],V=`${_}px ${u.reference.y+w-c}px`,ne=!!e.overlap&&f==="y"&&q;return r.floating.style.setProperty(ai.transformOrigin.variable,ne?V:L),{data:{transformOrigin:ne?V:L}}}}}var L5={name:"rects",fn({rects:e}){return{data:e}}},D5=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% + ${ai.arrowOffset.reference})`}),{}}}};function M5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var F5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function xT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function tp(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function B5(e,t,n){const r=e||t.createElement("div");return C5({element:r,padding:n.arrowPadding})}function U5(e,t){var n;if(!s4((n=t.offset)!=null?n:t.gutter))return S5(({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}=M5(r),d=c?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Nh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function H5(e){if(!e.flip)return;const t=tp(e.boundary);return w5(me(B({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function j5(e){if(!e.slide&&!e.overlap)return;const t=tp(e.boundary);return x5(me(B({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:k5()}))}function z5(e){return A5({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 $5(e){var t;if(e.hideWhenDetached)return v5({strategy:"referenceHidden",boundary:(t=tp(e.boundary))!=null?t:"clippingAncestors"})}function V5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function q5(e,t,n={}){const r=O5(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},F5,n),a=t.querySelector("[data-part=arrow]"),u=[U5(a,s),H5(s),j5(s),B5(a,t.ownerDocument,s),D5(a),R5({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),z5(s),$5(s),L5],{placement:c,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>et(null,null,function*(){var U;if(!r||!t)return;const A=yield N5(r,t,{placement:c,middleware:u,strategy:d});f==null||f(A),p==null||p({placed:!0});const P=lo(t),w=xT(P,A.x),C=xT(P,A.y);t.style.setProperty("--x",`${w}px`),t.style.setProperty("--y",`${C}px`),s.hideWhenDetached&&(((U=A.middlewareData.hide)==null?void 0:U.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const v=t.firstElementChild;if(v){const q=fo(v);t.style.setProperty("--z-index",q.zIndex)}}),T=()=>et(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=V5(s.listeners),_=s.listeners?_5(r,t,T,y):p4;return T(),()=>{_==null||_(),p==null||p({placed:!1})}}function wT(e,t,n={}){const c=n,{defer:r}=c,s=hn(c,["defer"]),a=r?Vt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(q5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var Y5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function W5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:ai.arrowSize.reference,height:ai.arrowSize.reference,[ai.arrowSizeHalf.variable]:`calc(${ai.arrowSize.reference} / 2)`,[ai.arrowOffset.variable]:`calc(${ai.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?Y5[t.split("-")[0]]:void 0,background:ai.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 So=new WeakMap,ac=new WeakMap,uc={},np=0,AT=e=>e&&(e.host||AT(e.parentNode)),G5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=AT(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),X5=new Set(["script","output","status","next-route-announcer"]),K5=e=>X5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),Q5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=G5(n,Array.isArray(e)?e:[e]);uc[r]||(uc[r]=new WeakMap);const c=uc[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&&tn(y)&&Fb(y,_=>{m(_)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))T(_);else try{if(K5(_))return;const P=_.getAttribute(s)==="true",w=(So.get(_)||0)+1,C=(c.get(_)||0)+1;So.set(_,w),c.set(_,C),d.push(_),w===1&&P&&ac.set(_,!0),C===1&&_.setAttribute(r,""),P||_.setAttribute(s,"true")}catch(A){console.error("[zag-js > ariaHidden] cannot operate on ",_,A)}})};return T(n),f.clear(),np++,()=>{d.forEach(y=>{const _=So.get(y)-1,A=c.get(y)-1;So.set(y,_),c.set(y,A),_||(ac.has(y)||y.removeAttribute(s),ac.delete(y)),A||y.removeAttribute(r)}),np--,np||(So=new WeakMap,So=new WeakMap,ac=new WeakMap,uc={})}},J5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,Z5=(e,t=J5(e),n="data-aria-hidden",r=!0)=>{if(t)return Q5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},e8=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function vT(e,t={}){const{defer:n=!0}=t,r=n?e8:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(Z5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function t8(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 n8(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 CT="pointerdown.outside",kT="focus.outside";function r8(e){for(const t of e)if(tn(t)&&Mr(t))return!0;return!1}var NT=e=>"clientY"in e;function i8(e,t){if(!NT(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 s8(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function PT(e,t){if(!t||!NT(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 s8(u,c)?r||a:!1}function o8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Dr(e),f=lo(e),p=t8(f),m=n8(f);function T(v,U){if(!tn(U)||!U.isConnected||uo(e,U)||i8(e,v)||c&&Mb(e,U))return!1;const q=d.querySelector(`[aria-controls="${e.id}"]`);if(q){const V=Bh(q);if(PT(v,V))return!1}const L=Bh(e);return PT(v,L)?!1:!(n!=null&&n(U))}const y=new Set,_=gs(e==null?void 0:e.getRootNode());function A(v){function U(q){var fe,Y;const L=u&&!Bb()?Vt:oe=>oe(),V=q!=null?q:v,ne=(Y=(fe=V==null?void 0:V.composedPath)==null?void 0:fe.call(V))!=null?Y:[V==null?void 0:V.target];L(()=>{const oe=_?ne[0]:gr(v);if(!(!e||!T(v,oe))){if(s||a){const he=kh(s,a);e.addEventListener(CT,he,{once:!0})}OT(e,CT,{bubbles:!1,cancelable:!0,detail:{originalEvent:V,contextmenu:X4(V),focusable:r8(ne),target:oe}})}})}v.pointerType==="touch"?(y.forEach(q=>q()),y.add(nn(d,"click",U,{once:!0})),y.add(m.addEventListener("click",U,{once:!0})),y.add(p.addEventListener("click",U,{once:!0}))):U()}const P=new Set,w=setTimeout(()=>{P.add(nn(d,"pointerdown",A,!0)),P.add(m.addEventListener("pointerdown",A,!0)),P.add(p.addEventListener("pointerdown",A,!0))},0);function C(v){(u?Vt:q=>q())(()=>{var V,ne;const q=(ne=(V=v==null?void 0:v.composedPath)==null?void 0:V.call(v))!=null?ne:[v==null?void 0:v.target],L=_?q[0]:gr(v);if(!(!e||!T(v,L))){if(r||a){const fe=kh(r,a);e.addEventListener(kT,fe,{once:!0})}OT(e,kT,{bubbles:!1,cancelable:!0,detail:{originalEvent:v,contextmenu:!1,focusable:Mr(L),target:L}})}})}return Bb()||(P.add(nn(d,"focusin",C,!0)),P.add(m.addEventListener("focusin",C,!0)),P.add(p.addEventListener("focusin",C,!0))),()=>{clearTimeout(w),y.forEach(v=>v()),P.forEach(v=>v())}}function a8(e,t){const{defer:n}=t,r=n?Vt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(o8(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function OT(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function u8(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return nn(Dr(e),"keydown",n,{capture:!0})}var IT="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=>uo(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>uo(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];c8(e,IT,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),l8(e,IT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function l8(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 c8(e,t,n){e.addEventListener(t,n,{once:!0})}var RT;function LT(){ir.layers.forEach(({node:e})=>{e.style.pointerEvents=ir.isBelowPointerBlockingLayer(e)?"none":"auto"})}function d8(e){e.style.pointerEvents=""}function f8(e,t){const n=Dr(e),r=[];return ir.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(RT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=yD(()=>{const c=s();return tn(c)?c:null},{timeout:1e3});a.then(c=>r.push(Gl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{ir.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=RT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function h8(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Ph("[@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),LT();function p(A){var w,C;const P=gr(A.detail.originalEvent);ir.isBelowPointerBlockingLayer(e)||ir.isInBranch(P)||((w=t.onPointerDownOutside)==null||w.call(t,A),(C=t.onInteractOutside)==null||C.call(t,A),!A.defaultPrevented&&(c&&console.log("onPointerDownOutside:",A.detail.originalEvent),r==null||r()))}function m(A){var w,C;const P=gr(A.detail.originalEvent);ir.isInBranch(P)||((w=t.onFocusOutside)==null||w.call(t,A),(C=t.onInteractOutside)==null||C.call(t,A),!A.defaultPrevented&&(c&&console.log("onFocusOutside:",A.detail.originalEvent),r==null||r()))}function T(A){var P;ir.isTopMost(e)&&((P=t.onEscapeKeyDown)==null||P.call(t,A),!A.defaultPrevented&&r&&(A.preventDefault(),r()))}function y(A){var v;if(!e)return!1;const P=typeof u=="function"?u():u,w=Array.isArray(P)?P:[P],C=(v=t.persistentElements)==null?void 0:v.map(U=>U()).filter(tn);return C&&w.push(...C),w.some(U=>uo(U,A))||ir.isInNestedLayer(e,A)}const _=[a?f8(e,t.persistentElements):void 0,u8(e,T),a8(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{ir.remove(e),LT(),d8(e),_.forEach(A=>A==null?void 0:A())}}function DT(e,t){const{defer:n}=t,r=n?Vt:a=>a(),s=[];return s.push(r(()=>{const a=oo(e)?e():e;s.push(h8(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var p8=Object.defineProperty,m8=(e,t,n)=>t in e?p8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,At=(e,t,n)=>m8(e,typeof t!="symbol"?t+"":t,n),MT={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()}},g8=[],E8=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=gr(r),a=this.findContainerIndex(s,r)>=0;if(a||Vl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Wa(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=>Wa(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=gr(r);if(!(this.findContainerIndex(s,r)>=0)){if(eu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}eu(this.config.allowOutsideClick,r)||r.preventDefault()}}),At(this,"handleClick",r=>{const s=gr(r);this.findContainerIndex(s,r)>=0||eu(this.config.clickOutsideDeactivates,r)||eu(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;Za(r)&&r.preventDefault(),this.tryFocus(a)}}),At(this,"handleEscapeKey",r=>{y8(r)&&eu(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))?j4(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&&!Mr(r)){const s=co(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!==co(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,b8(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(),MT.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=()=>{FT(()=>{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||gr(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||Mr(u)&&!Es(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=Wa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Za(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||Mr(u)&&!Es(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=Wa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Za(s)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||g8;const n=B({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Za(r)&&!r.shiftKey},isKeyBackward(r){return Za(r)&&r.shiftKey}},t);this.doc=n.document||Dr(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=>{F4(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?Mb(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=ho(e,{getShadowRoot:this.config.getShadowRoot}),n=qb(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(Wa(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(Es(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(Es(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 MT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?FT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(nn(this.doc,"focusin",this.handleFocus,!0),nn(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),nn(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),nn(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),nn(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),nn(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=co(this.doc),t==null||t();const s=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(s,s),this):(s(),this)}},Za=e=>e.key==="Tab",eu=(e,...t)=>typeof e=="function"?e(...t):e,y8=e=>!e.isComposing&&e.key==="Escape",FT=e=>setTimeout(e,0),b8=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function BT(e,t={}){let n;const r=Vt(()=>{const s=typeof e=="function"?e():e;if(s){n=new E8(s,me(B({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:Dr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var rp="data-scroll-lock";function T8(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function UT(e){const t=fo(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function HT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(rp))return;const u=UT(r)||UT(s),c=n.innerWidth-r.clientWidth;s.setAttribute(rp,"");const d=()=>gD(r,"--scrollbar-width",`${c}px`),f=T8(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Gl(s,_)},m=()=>{var q,L;const{scrollX:_,scrollY:A,visualViewport:P}=n,w=(q=P==null?void 0:P.offsetLeft)!=null?q:0,C=(L=P==null?void 0:P.offsetTop)!=null?L:0,v={position:"fixed",overflow:"hidden",top:`${-(A-Math.floor(C))}px`,left:`${-(_-Math.floor(w))}px`,right:"0"};!u&&c>0&&(v[f]=`${c}px`);const U=Gl(s,v);return()=>{U==null||U(),n.scrollTo({left:_,top:A,behavior:"instant"})}},T=[d(),ql()?m():p()];return()=>{T.forEach(_=>_==null?void 0:_()),s.removeAttribute(rp)}}var _8=bs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),jr=_8.build(),jT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},zT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},ip=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},$T=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},S8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},op=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},x8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},VT=e=>e.getById(jT(e)),xo=e=>e.getById(zT(e)),wo=e=>e.getById(ip(e)),qT=e=>e.getById($T(e)),w8=e=>e.getById(sp(e)),A8=e=>e.getById(op(e));function v8(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=W5(me(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(me(B({id:S8(c)},jr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(me(B({},jr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(me(B({},jr.anchor.attrs),{dir:u("dir"),id:jT(c)}))},getTriggerProps(){return t.button(me(B({},jr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:zT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ip(c),onPointerDown(y){Ub(y)&&W4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(me(B({},jr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(me(B({id:$T(c)},jr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(me(B({},jr.content.attrs),{dir:u("dir"),id:ip(c),tabIndex:-1,role:"dialog","aria-modal":Rb(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":ao(d),"aria-labelledby":m.title?sp(c):void 0,"aria-describedby":m.description?op(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(me(B({},jr.title.attrs),{id:sp(c),dir:u("dir")}))},getDescriptionProps(){return t.element(me(B({},jr.description.attrs),{id:op(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(me(B({},jr.closeTrigger.attrs),{dir:u("dir"),id:x8(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var C8={props({props:e}){return me(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=VT(n))!=null?a:xo(n);return wT(r,()=>qT(n),me(B({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>wo(n);let s=!0;return DT(r,{type:"popover",pointerBlocking:t("modal"),exclude:xo(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:pD(()=>wo(t),{triggerElement:xo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?vT(()=>[wo(t),xo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return HT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?BT(()=>wo(t),{initialFocus:()=>Yb({root:wo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=VT(n))!=null?u:xo(n);wT(s,()=>qT(n),me(B(B({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Vt(()=>{Object.assign(e.get("renderedElements"),{title:!!w8(t),description:!!A8(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Vt(()=>{const n=Yb({root:wo(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||Vt(()=>{const a=xo(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})}}}};go()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[rH,lc]=ys({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[iH,ap]=ys({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),k8=e=>{const t=F.useId(),{getRootNode:n}=lc(),{dir:r}=ap(),s=B({id:t,dir:r,getRootNode:n},e),a=Kl(C8,s);return v8(a,jh)},N8=e=>{const[t,u]=tT(e),c=u,{children:n}=c,r=hn(c,["children"]),s=k8(r),a=Vh(qt({present:s.open},t));return S.jsx(ND,{value:s,children:S.jsx(Jb,{value:a,children:n})})},YT=F.forwardRef((e,t)=>{const n=$h(),r=Ga(),s=qt(me(B({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return S.jsx(Sn.button,me(B({},s),{ref:t}))});YT.displayName="PopoverTrigger";function P8(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 O8(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 I8(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 R8(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 L8(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 D8(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 up(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 WT(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 M8=({className:e,componentType:t,children:n})=>{const[r,s]=F.useState(!1),{globalClassName:a}=nt(),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(YT,{"aria-label":`Overflow menu for ${t}`,className:W(`${j}-overflow-menu-button-trigger`,`${j}-icon-button`,a,e,`cim-${t}-component`),children:S.jsx(WT,{})}),S.jsx(eT,{children:S.jsx(Zb,{className:W(`${j}-overflow-menu-list`,a,`cim-${t}-component`),children:S.jsx(vb.Provider,{value:d,children:n})})})]})};function GT(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 XT(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[F8,Ss]=ys({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),KT=F.forwardRef((e,t)=>{const n=Ss(),r=qt(n.getControlProps(),e);return S.jsx(Sn.div,me(B(B({},r),e),{ref:t}))});KT.displayName="CarouselControl";const QT=F.forwardRef((e,t)=>{const[n,r]=Xa()(e,["readOnly","index"]),s=Ss(),a=qt(s.getIndicatorProps(n),r);return S.jsx(Sn.button,me(B({},a),{ref:t}))});QT.displayName="CarouselIndicator";const JT=F.forwardRef((e,t)=>{const n=Ss(),r=qt(n.getIndicatorGroupProps(),e);return S.jsx(Sn.div,me(B({},r),{ref:t}))});JT.displayName="CarouselIndicatorGroup";const ZT=F.forwardRef((e,t)=>{const[n,r]=Xa()(e,["index","snapAlign"]),s=Ss(),a=qt(s.getItemProps(n),r);return S.jsx(Sn.div,me(B({},a),{ref:t}))});ZT.displayName="CarouselItem";const e_=F.forwardRef((e,t)=>{const n=Ss(),r=qt(n.getItemGroupProps(),e);return S.jsx(Sn.div,me(B({},r),{ref:t}))});e_.displayName="CarouselItemGroup";const t_=F.forwardRef((e,t)=>{const n=Ss(),r=qt(n.getNextTriggerProps(),e);return S.jsx(Sn.button,me(B({},r),{ref:t}))});t_.displayName="CarouselNextTrigger";const n_=F.forwardRef((e,t)=>{const n=Ss(),r=qt(n.getPrevTriggerProps(),e);return S.jsx(Sn.button,me(B({},r),{ref:t}))});n_.displayName="CarouselPrevTrigger";function B8(e){const t=fo(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 U8(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 r_(e){let t=[];for(const n of e.children)t=t.concat(n,r_(n));return t}function i_(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?r_(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(!U8(n,m,u))continue;const T=fo(p);let[y,_]=T.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const A=a==="x"?_:y,P=m[c]-n[c]+e[f];switch(A){case"none":break;case"start":r[a].start.push({node:p,position:P});break;case"center":r[a].center.push({node:p,position:P+m[d]/2});break;case"end":r[a].end.push({node:p,position:P+m[d]});break}}}return r}function s_(e){const t=e.getBoundingClientRect(),n=B8(e),r=i_(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:o_([...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(a_(0,s.x))),y:o_([...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(a_(0,s.y)))}}function H8(e,t,n){const r=i_(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var o_=e=>[...new Set(e)],a_=(e,t)=>n=>Math.max(e,Math.min(t,n)),j8=bs("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ui=j8.build(),z8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},$8=(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}`},cc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},V8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},q8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},Y8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},u_=(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(cc(e)),l_=e=>mD(Mn(e),"[data-part=item]"),W8=(e,t)=>e.getById(u_(e,t)),c_=e=>{const t=Mn(e);if(!t)return;const n=ho(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function G8(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"),A=c("slidesPerPage"),P=c("padding"),w=c("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return _/y.length},scrollToIndex(C,v){a({type:"INDEX.SET",index:C,instant:v})},scrollTo(C,v){a({type:"PAGE.SET",index:C,instant:v})},scrollNext(C){a({type:"PAGE.NEXT",instant:C})},scrollPrev(C){a({type:"PAGE.PREV",instant:C})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(C){return Array.from(r.get("slidesInView")).includes(C)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(me(B({},ui.root.attrs),{id:z8(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":A,"--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(me(B({},ui.itemGroup.attrs),{id:cc(u),"data-orientation":c("orientation"),"data-dragging":ao(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(C){uo(C.currentTarget,gr(C))&&a({type:"VIEWPORT.FOCUS"})},onBlur(C){uo(C.currentTarget,C.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(C){if(C.defaultPrevented||!c("allowMouseDrag")||!Ub(C))return;const v=gr(C);Mr(v)&&v!==C.currentTarget||(C.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:m4(C=>{const v=c("orientation")==="horizontal"?"deltaX":"deltaY";C[v]<0&&!s("canScrollPrev")||C[v]>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"]:P,[T?"paddingInline":"paddingBlock"]:P,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(C){const v=r.get("slidesInView").includes(C.index);return t.element(me(B({},ui.item.attrs),{id:$8(u,C.index),dir:c("dir"),role:"group","data-index":C.index,"data-inview":ao(v),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":w.item(C.index,c("slideCount")),"aria-hidden":Rb(!v),style:{scrollSnapAlign:(()=>{var ne;const U=(ne=C.snapAlign)!=null?ne:"start",q=c("slidesPerMove"),L=q==="auto"?Math.floor(c("slidesPerPage")):q;return(C.index+L)%L===0?U:void 0})()}}))},getControlProps(){return t.element(me(B({},ui.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(me(B({},ui.prevTrigger.attrs),{id:q8(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":w.prevTrigger,"data-orientation":c("orientation"),"aria-controls":cc(u),onClick(C){C.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(me(B({},ui.nextTrigger.attrs),{dir:c("dir"),id:V8(u),type:"button","aria-label":w.nextTrigger,"data-orientation":c("orientation"),"aria-controls":cc(u),disabled:!p,onClick(C){C.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(me(B({},ui.indicatorGroup.attrs),{dir:c("dir"),id:Y8(u),"data-orientation":c("orientation"),onKeyDown(C){if(C.defaultPrevented)return;const v="indicator",U={ArrowDown(V){T||(a({type:"PAGE.NEXT",src:v}),V.preventDefault())},ArrowUp(V){T||(a({type:"PAGE.PREV",src:v}),V.preventDefault())},ArrowRight(V){T&&(a({type:"PAGE.NEXT",src:v}),V.preventDefault())},ArrowLeft(V){T&&(a({type:"PAGE.PREV",src:v}),V.preventDefault())},Home(V){a({type:"PAGE.SET",index:0,src:v}),V.preventDefault()},End(V){a({type:"PAGE.SET",index:y.length-1,src:v}),V.preventDefault()}},q=J4(C,{dir:c("dir"),orientation:c("orientation")}),L=U[q];L==null||L(C)}}))},getIndicatorProps(C){return t.button(me(B({},ui.indicator.attrs),{dir:c("dir"),id:u_(u,C.index),type:"button","data-orientation":c("orientation"),"data-index":C.index,"data-readonly":ao(C.readOnly),"data-current":ao(C.index===_),"aria-label":w.indicator(C.index),onClick(v){v.defaultPrevented||C.readOnly||a({type:"PAGE.SET",index:C.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(me(B({},ui.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":ao(d),"aria-label":d?w.autoplayStop:w.autoplayStart,onClick(C){C.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var X8={props({props:e}){return _4(e,["slideCount"],"carousel"),me(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:K8(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 i4(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"}),c_(e)});return c_(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"})};Vt(()=>{s(),Vt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return l_(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?Z6(d,m):e4(d,m)},n.get("slidesInView"));n.set("slidesInView",t4(c))},{root:r,threshold:t("inViewThreshold")});return l_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Mn(n);return r?nn(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 nn(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return fD(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 nn(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=Ob((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=kb(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=n4(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=Ob(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=s_(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=s_(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]);Vt(()=>{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=W8(n,e.get("page"));r&&Vt(()=>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 K8(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}go()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),go()(["index","readOnly"]),go()(["index","snapAlign"]);const Q8=e=>{const t=F.useId(),{getRootNode:n}=lc(),{dir:r}=ap(),s=B({id:t,dir:r,getRootNode:n},e),a=Kl(X8,s);return G8(a,jh)},d_=F.forwardRef((e,t)=>{const[n,r]=Xa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=Q8(n),a=qt(s.getRootProps(),r);return S.jsx(F8,{value:s,children:S.jsx(Sn.div,me(B({},a),{ref:t}))})});d_.displayName="CarouselRoot";const J8=180,Z8=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},eM=({globalClassName:e,className:t,itemMinWidth:n=J8,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,fe)=>({node:ne,key:F.isValidElement(ne)&&ne.key!=null?ne.key:`carousel-item-${fe}`})),T=m.length,y=F.useRef(null),[_,A]=F.useState(0),{width:P}=nk();F.useLayoutEffect(()=>{y.current&&A(y.current.getBoundingClientRect().width)},[P,T]);const w=Z8(r),C=n+w,v=_>0?(_+w)/C:1,U=Math.max(1,Math.floor(v));if(T===0)return null;const q=T>U,L=Math.ceil(T/U),V=q?Math.max(1,v):U;return S.jsxs(d_,{ref:y,className:W(e,t,`${j}-carousel`),slidesPerPage:V,slidesPerMove:U,spacing:r,loop:s,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[S.jsx(e_,{className:W(e,`${j}-carousel__item-group`,{"carousel-row-container":!q}),children:m.map(({node:ne,key:fe},Y)=>S.jsx(ZT,{index:Y,className:W(e,`${j}-carousel__item`),children:ne},fe))}),c&&q&&S.jsxs(KT,{className:W(e,`${j}-carousel__control`),children:[S.jsx(n_,{className:W(e,`${j}-carousel__prev-trigger`),"aria-label":"Previous slide",children:S.jsx(I8,{size:"16px"})}),S.jsx(t_,{className:W(e,`${j}-carousel__next-trigger`),"aria-label":"Next slide",children:S.jsx(R8,{size:"16px"})})]}),u&&q&&S.jsx(JT,{className:W(e,`${j}-carousel__indicator-group`),children:Array.from({length:L},(ne,fe)=>S.jsx(QT,{index:fe,className:W(e,`${j}-carousel__indicator`),"aria-label":`Go to slide group ${fe+1}`},fe))})]})},[tM,nM]=ys({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),rM=e=>Xa()(e,["lazyMount","unmountOnExit"]),[iM,tu]=ys({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),f_=F.forwardRef((e,t)=>{const n=tu(),r=nM(),s=Vh(me(B({},r),{present:n.open})),a=qt(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:S.jsx(Sn.div,me(B({},a),{ref:Ql(s.ref,t)}))});f_.displayName="DialogBackdrop";const lp=F.forwardRef((e,t)=>{const n=tu(),r=Ga(),s=qt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:S.jsx(Sn.div,me(B({},s),{ref:Ql(r.ref,t)}))});lp.displayName="DialogContent";const cp=F.forwardRef((e,t)=>{const n=tu(),r=qt(n.getDescriptionProps(),e);return S.jsx(Sn.div,me(B({},r),{ref:t}))});cp.displayName="DialogDescription";const dp=F.forwardRef((e,t)=>{const n=tu(),r=qt(n.getPositionerProps(),e);return Ga().unmounted?null:S.jsx(Sn.div,me(B({},r),{ref:t}))});dp.displayName="DialogPositioner";var sM=bs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),xs=sM.build(),h_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},p_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},fp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},m_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},hp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},pp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},g_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},dc=e=>e.getById(fp(e)),oM=e=>e.getById(h_(e)),aM=e=>e.getById(p_(e)),uM=e=>e.getById(m_(e)),lM=e=>e.getById(hp(e)),cM=e=>e.getById(pp(e)),dM=e=>e.getById(g_(e));function fM(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(me(B({},xs.trigger.attrs),{dir:a("dir"),id:m_(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":fp(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(me(B({},xs.backdrop.attrs),{dir:a("dir"),hidden:!d,id:p_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(me(B({},xs.positioner.attrs),{dir:a("dir"),id:h_(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(me(B({},xs.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:fp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:hp(u),"aria-describedby":f.description?pp(u):void 0}))},getTitleProps(){return t.element(me(B({},xs.title.attrs),{dir:a("dir"),id:hp(u)}))},getDescriptionProps(){return t.element(me(B({},xs.description.attrs),{dir:a("dir"),id:pp(u)}))},getCloseTriggerProps(){return t.button(me(B({},xs.closeTrigger.attrs),{dir:a("dir"),id:g_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var hM={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>dM(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 DT(()=>dc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[uM(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 HT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?BT(()=>dc(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")?vT(()=>[dc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Vt(()=>{e.set("rendered",{title:!!lM(t),description:!!cM(t)})})},syncZIndex({scope:e}){Vt(()=>{const t=dc(e);if(!t)return;const n=fo(t);[oM(e),aM(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})}}}};go()(["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 pM=e=>{const t=F.useId(),{getRootNode:n}=lc(),{dir:r}=ap(),s=B({id:t,getRootNode:n,dir:r},e),a=Kl(hM,s);return fM(a,jh)},E_=e=>{const[t,c]=tT(e),d=c,{children:n}=d,r=hn(d,["children"]),[s]=rM(t),a=pM(r),u=Vh(qt({present:a.open},t));return S.jsx(iM,{value:a,children:S.jsx(tM,{value:s,children:S.jsx(Jb,{value:u,children:n})})})},y_=F.forwardRef((e,t)=>{const n=tu(),r=qt(n.getTitleProps(),e);return S.jsx(Sn.h2,me(B({},r),{ref:t}))});y_.displayName="DialogTitle";const mM=({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(Ch.Provider,{value:r,children:S.jsx(Ab.Provider,{value:s,children:e})})},b_=()=>F.useContext(Ab),T_=()=>{const e=F.useContext(Ch);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},gM=`${j}-overflow-menu-button-trigger`,EM=({componentType:e,children:t})=>{const{isOpen:n}=b_(),{closeMenu:r}=T_(),{globalClassName:s}=nt(),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(`.${gM}`)||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(`${j}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},yM=({componentType:e,className:t})=>{const{toggleMenu:n}=T_(),{isOpen:r}=b_(),{globalClassName:s}=nt();return S.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,className:W(`${j}-overflow-menu-button-trigger`,`${j}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:S.jsx(WT,{})})},mp=()=>{const{status:e,entryType:t}=tr(),{messages:n}=$n(),r=t==="ask_cim",s=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&s},bM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=nt(),{previousComponentType:r}=tr(),s=ms(),a=()=>{pl(r||"dialog"),s()};return t?S.jsx(ri,{className:W(n,`${j}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:S.jsx(GT,{})}):S.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[S.jsx(GT,{}),"Show ",r||"dialog"]})},TM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=nt(),{isModalFullscreen:r}=tr(),s=ms(),a=()=>{xf(!r),s()},u=r?gN:EN,c="Toggle Fullscreen";return t?S.jsx(ri,{ariaLabel:c,title:c,className:W(n,`${j}-modal-fullscreen-button`,`cim-${e}-component`),icon:S.jsx(u,{}),onClick:a}):S.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[S.jsx(u,{}),c]})},_M=({componentType:e,isIcon:t})=>{const{globalClassName:n}=nt(),{dialogPosition:r}=tr(),s=ms(),a=r==="bottom-left",u=()=>{wf(a?"bottom-right":"bottom-left"),s()},c=a?O8:P8,d=a?"Move right":"Move left";return t?S.jsx(ri,{className:W(n,`${j}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:S.jsx(c,{})}):S.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[S.jsx(c,{}),d]})},__=({componentType:e,onClearChat:t,onEndConversation:n,onClose:r,onDownloadTranscript:s})=>{const{headerConfig:a,globalClassName:u,mode:c,enableDownloadTranscript:d}=nt(),{mode:f}=tr(),p=c==="messaging"&&d&&!!s,m=f==="standalone",T=e==="modal",y=T?bM:S_,_=T?TM:_M,A=F.useMemo(()=>a?dN(a):{},[a]);return S.jsx(mM,{children:S.jsxs("div",{className:W(u,`${j}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[S.jsxs("div",{className:W(u,`${j}-${e}-header`,{standalone:m,embedded:!m}),style:A,children:[(a==null?void 0:a.logoUrl)&&S.jsx("img",{alt:"",role:"img",className:W(u,`${j}-${e}-logo`,{standalone:m,embedded:!m}),src:a.logoUrl}),S.jsx(y_,{className:W(u,`${j}-${e}-title`,{standalone:m,embedded:!m}),children:a==null?void 0:a.headerText}),S.jsxs("div",{className:W(u,`${j}-${e}-controls`),children:[S.jsx(y,{componentType:e,isIcon:!0}),S.jsx(yM,{componentType:e}),S.jsx(V1,{className:W(u,`cim-${e}-component`),label:a==null?void 0:a.closeButtonAriaLabel,onClick:r})]})]}),S.jsxs(EM,{componentType:e,children:[S.jsx(_,{componentType:e}),S.jsx(vM,{componentType:e}),S.jsx(Cb,{componentType:e,onClearChat:t}),n&&S.jsx(xM,{componentType:e,onEndConversation:n}),p&&S.jsx(SM,{componentType:e,onDownloadTranscript:s})]})]})})},SM=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=nt(),r=ms(),[s,a]=F.useState(!1),u=()=>et(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(`${j}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[S.jsx(K6,{}),"Download transcript"]})},xM=({onEndConversation:e,componentType:t})=>{const n=ms(),r=()=>{e(),n()};return S.jsxs("button",{className:W(`${j}-overflow-menu-button`,"end-conversation-button",`cim-${t}-component`),onClick:r,children:[S.jsx(yN,{}),"End conversation"]})},wM={sparkle:up,plus:L8,"paper-plane":D8},gp=({icon:e,className:t})=>{const n=wM[e];return n?S.jsx(n,{className:t,"aria-hidden":"true"}):null},AM=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=nt(),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(gp,{icon:c,className:`${j}-suggestion-button-icon`}),S.jsx("span",{children:_})]});return S.jsx("div",{className:W(t,`${j}-suggestion-container ${f}`,e),children:n.map(_=>s?S.jsx(El,{disabled:r,className:W(t,`${j}-suggestion-button standalone`,m),onClick:p(_),children:T(_)},_):S.jsx("button",{disabled:r,className:W(t,`${j}-suggestion-button embedded`,m),onClick:p(_),children:T(_)},_))})},vM=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=nt();if(!r)return null;const s=()=>{ti(!1),Ea(!0),If()};return t?S.jsx(ri,{className:W(n,`${j}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:S.jsx(Y1,{})}):S.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[S.jsx(Y1,{}),"Minimize"]})},S_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=nt(),r=ms(),s=()=>{pl("modal"),r()};return t?S.jsx(ri,{className:W(n,`${j}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:S.jsx(XT,{})}):S.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[S.jsx(XT,{}),"Show modal"]})},CM=({isWidgetStandalone:e})=>{var P,w;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:s,staticQuestions:a,staticQuestionsStrategy:u}=nt(),{askCimPrompts:c,messages:d}=$n(),{isLoading:f,handleAskCim:p}=Or(),m=s==null?void 0:s.icon,T=(P=s==null?void 0:s.iconPosition)!=null?P:"left",y=F.useMemo(()=>{const C=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(U=>U.name==="conversation_reset")&&r||C},[d,n,r]),_=F.useMemo(()=>{var v,U;const C=((U=(v=c.message)==null?void 0:v.suggestions)!=null?U:[]).map(q=>q.displayText.trim()).filter(Boolean);return z0(C,a||[],u)},[(w=c.message)==null?void 0:w.suggestions,a,u]),A=C=>()=>{p({userPrompt:C})};return S.jsxs("div",{className:W(t,`${j}-ask-cim-entry-message`,`${j}-message-group`,e?"standalone":"embedded"),children:[S.jsx("p",{className:W(t,`${j}-ask-cim-entry-text`),children:y}),!!(_!=null&&_.length)&&S.jsx("div",{className:W(t,`${j}-ask-cim-suggestions-container`,`${j}-suggestion-container`,e?"standalone":"embedded"),children:_.map(C=>S.jsxs(El,{disabled:f,className:W(t,`${j}-ask-cim-suggestion-button`,`${j}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!m,"icon-right":!!m&&T==="right"}),onClick:A(C),children:[m&&S.jsx(gp,{icon:m,className:`${j}-suggestion-button-icon`}),S.jsx("span",{children:C})]},C))})]})},kM=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:s}=nt();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,`${j}-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,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):S.jsx("img",{className:W(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),S.jsxs("div",{className:W(r,`${j}-product-tile-details`,{embedded:!e,standalone:e}),children:[S.jsxs("div",{className:W(r,`${j}-product-tile-content`),children:[u&&S.jsx("p",{className:`${j}-product-tile-brand`,children:u}),m?S.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:W(r,`${j}-product-tile-pdp`),href:`${m}`,target:s?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",S.jsx("span",{className:W(r,`${j}-product-tile-pdp-arrow`),children:"→"})]}):S.jsx("p",{className:W(r,`${j}-product-tile-name`),title:a,children:a})]}),S.jsx("div",{className:W(r,`${j}-product-tile-footer`),children:S.jsx("p",{className:W(r,`${j}-product-tile-price`),children:c})})]})]})},NM=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=nt(),s=t;return n?S.jsxs("div",{className:W(r,`${j}-display-products`),children:[S.jsx("p",{children:s.message}),s.products&&s.products.length>0&&S.jsx(eM,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:s.products.map(a=>{const u=n.getPid(a);return S.jsx(kM,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},PM=({globalClassName:e,message:t,isWidgetStandalone:n})=>S.jsx("div",{className:W(e,`${j}-error-message`,{standalone:n,embedded:!n}),children:S.jsxs("p",{className:W(e,`${j}-error-message-text`,{standalone:n,embedded:!n}),children:[S.jsx(hN,{})," ",t.message||"An error occurred while processing your request."]})}),OM=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:s})=>{var _;const{isLoading:a}=Or(),{messages:u}=$n(),c=u.find(A=>A.id===n.eventSourceId),d=!!c,f=((_=c==null?void 0:c.name)==null?void 0:_.replace("_suggestions",""))||"",p=d?AA(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=A=>{const P=n.suggestions.find(w=>w.displayText===A);P&&s(P,n.eventSourceId||n.id)};return S.jsxs("div",{className:W(e,`${j}-follow-up`),children:[S.jsx("p",{className:W(e,`${j}-text`),children:n.message}),S.jsx(AM,{suggestions:n.suggestions.map(A=>A.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function x_(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 IM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function RM(e,t,n){const s=kl((n||{}).ignore||[]),a=LM(t);let u=-1;for(;++u<a.length;)sy(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 P=m.children.indexOf(f);let w=!1,C=[];T.lastIndex=0;let v=T.exec(f.value);for(;v;){const U=v.index,q={index:v.index,input:v.input,stack:[...p,f]};let L=y(...v,q);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?T.lastIndex=U+1:(_!==U&&C.push({type:"text",value:f.value.slice(_,U)}),Array.isArray(L)?C.push(...L):L&&C.push(L),_=U+v[0].length,w=!0),!T.global)break;v=T.exec(f.value)}return w?(_<f.value.length&&C.push({type:"text",value:f.value.slice(_)}),m.children.splice(P,1,...C)):C=[f],P+C.length}}function LM(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([DM(s[0]),MM(s[1])])}return t}function DM(e){return typeof e=="string"?new RegExp(IM(e),"g"):e}function MM(e){return typeof e=="function"?e:function(){return e}}const Ep="phrasing",yp=["autolink","link","image","label"];function FM(){return{transforms:[VM],enter:{literalAutolink:UM,literalAutolinkEmail:bp,literalAutolinkHttp:bp,literalAutolinkWww:bp},exit:{literalAutolink:$M,literalAutolinkEmail:zM,literalAutolinkHttp:HM,literalAutolinkWww:jM}}}function BM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ep,notInConstruct:yp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ep,notInConstruct:yp},{character:":",before:"[ps]",after:"\\/",inConstruct:Ep,notInConstruct:yp}]}}function UM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function bp(e){this.config.enter.autolinkProtocol.call(this,e)}function HM(e){this.config.exit.autolinkProtocol.call(this,e)}function jM(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 zM(e){this.config.exit.autolinkEmail.call(this,e)}function $M(e){this.exit(e)}function VM(e){RM(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,qM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),YM]],{ignore:["link","linkReference"]})}function qM(e,t,n,r,s){let a="";if(!w_(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!WM(n)))return!1;const u=GM(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 YM(e,t,n,r){return!w_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function WM(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 GM(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=x_(e,"(");let a=x_(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 w_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||us(n)||_l(n))&&(!t||n!==47)}A_.peek=rF;function XM(){this.buffer()}function KM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function QM(){this.buffer()}function JM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ZM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function eF(e){this.exit(e)}function tF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function nF(e){this.exit(e)}function rF(){return"["}function A_(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 iF(){return{enter:{gfmFootnoteCallString:XM,gfmFootnoteCall:KM,gfmFootnoteDefinitionLabelString:QM,gfmFootnoteDefinition:JM},exit:{gfmFootnoteCallString:ZM,gfmFootnoteCall:eF,gfmFootnoteDefinitionLabelString:tF,gfmFootnoteDefinition:nF}}}function sF(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:A_},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?v_:oF))),f(),d}}function oF(e,t,n){return t===0?e:v_(e,t,n)}function v_(e,t,n){return(n?"":" ")+e}const aF=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];C_.peek=fF;function uF(){return{canContainEols:["delete"],enter:{strikethrough:cF},exit:{strikethrough:dF}}}function lF(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:aF}],handlers:{delete:C_}}}function cF(e){this.enter({type:"delete",children:[]},e)}function dF(e){this.exit(e)}function C_(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,me(B({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function fF(){return"~"}function hF(e){return e.length}function pF(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||hF,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const A=[],P=[];let w=-1;for(e[p].length>f&&(f=e[p].length);++w<e[p].length;){const C=mF(e[p][w]);if(n.alignDelimiters!==!1){const v=s(C);P[w]=v,(d[w]===void 0||v>d[w])&&(d[w]=v)}A.push(C)}u[p]=A,c[p]=P}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=k_(r[m]);else{const A=k_(r);for(;++m<f;)a[m]=A}m=-1;const T=[],y=[];for(;++m<f;){const A=a[m];let P="",w="";A===99?(P=":",w=":"):A===108?P=":":A===114&&(w=":");let C=n.alignDelimiters===!1?1:Math.max(1,d[m]-P.length-w.length);const v=P+"-".repeat(C)+w;n.alignDelimiters!==!1&&(C=P.length+C+w.length,C>d[m]&&(d[m]=C),y[m]=C),T[m]=v}u.splice(1,0,T),c.splice(1,0,y),p=-1;const _=[];for(;++p<u.length;){const A=u[p],P=c[p];m=-1;const w=[];for(;++m<f;){const C=A[m]||"";let v="",U="";if(n.alignDelimiters!==!1){const q=d[m]-(P[m]||0),L=a[m];L===114?v=" ".repeat(q):L===99?q%2?(v=" ".repeat(q/2+.5),U=" ".repeat(q/2-.5)):(v=" ".repeat(q/2),U=v):U=" ".repeat(q)}n.delimiterStart!==!1&&!m&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||m)&&w.push(" "),n.alignDelimiters!==!1&&w.push(v),w.push(C),n.alignDelimiters!==!1&&w.push(U),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&w.push("|")}_.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return _.join(`
33
+ `)}function mF(e){return e==null?"":String(e)}function k_(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 gF(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()),EF);return s(),u}function EF(e,t,n){return">"+(n?"":" ")+e}function yF(e,t){return N_(e,t.inConstruct,!0)&&!N_(e,t.notInConstruct,!1)}function N_(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 P_(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
34
+ `&&yF(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
35
+ `}function bF(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 TF(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 _F(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 SF(e,t,n,r){const s=_F(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(TF(e,n)){const m=n.enter("codeIndented"),T=n.indentLines(a,xF);return m(),T}const c=n.createTracker(r),d=s.repeat(Math.max(bF(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:`
36
36
  `,encode:["`"]},c.current()))),m()}return p+=c.move(`
37
37
  `),a&&(p+=c.move(a+`
38
- `)),p+=c.move(d),f(),p}function QM(e,t,n){return(n?"":" ")+e}function mp(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function JM(e,t,n,r){const s=mp(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),B({before:f,after:"]"},d.current()))),f+=d.move("]: "),c(),!e.url||/[\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?" ":`
39
- `},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()),u(),f}function ZM(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Za(e){return"&#x"+e.toString(16).toUpperCase()+";"}function lc(e,t,n){const r=eo(e),s=eo(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}E_.peek=eF;function E_(e,t,n,r){const s=ZM(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(s);let d=u.move(n.containerPhrasing(e,B({after:s,before:c},u.current())));const f=d.charCodeAt(0),p=lc(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=Za(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=lc(r.after.charCodeAt(0),m,s);T.inside&&(d=d.slice(0,-1)+Za(m));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+y}function eF(e,t,n){return n.options.emphasis||"*"}function tF(e,t){let n=!1;return Cl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Xf}),!!((!e.depth||e.depth<3)&&Bf(e)&&(t.options.setext||n))}function nF(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(tF(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),T=n.containerPhrasing(e,de(B({},a.current()),{before:`
38
+ `)),p+=c.move(d),f(),p}function xF(e,t,n){return(n?"":" ")+e}function Tp(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function wF(e,t,n,r){const s=Tp(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),B({before:f,after:"]"},d.current()))),f+=d.move("]: "),c(),!e.url||/[\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?" ":`
39
+ `},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()),u(),f}function AF(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function nu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function fc(e,t,n){const r=eo(e),s=eo(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}O_.peek=vF;function O_(e,t,n,r){const s=AF(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(s);let d=u.move(n.containerPhrasing(e,B({after:s,before:c},u.current())));const f=d.charCodeAt(0),p=fc(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=nu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=fc(r.after.charCodeAt(0),m,s);T.inside&&(d=d.slice(0,-1)+nu(m));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+y}function vF(e,t,n){return n.options.emphasis||"*"}function CF(e,t){let n=!1;return Pl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,eh}),!!((!e.depth||e.depth<3)&&$f(e)&&(t.options.setext||n))}function kF(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(CF(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),T=n.containerPhrasing(e,me(B({},a.current()),{before:`
40
40
  `,after:`
41
41
  `}));return m(),p(),T+`
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
- `},a.current()));return/^[\t ]/.test(f)&&(f=Za(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}y_.peek=rF;function y_(e){return e.value||""}function rF(){return"<"}b_.peek=iF;function b_(e,t,n,r){const s=mp(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 iF(){return"!"}T_.peek=sF;function T_(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 sF(){return"!"}__.peek=oF;function __(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 oF(){return"`"}function S_(e,t){const n=Bf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}x_.peek=aF;function x_(e,t,n,r){const s=mp(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(S_(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 aF(e,t,n){return S_(e,n)?"<":"["}w_.peek=uF;function w_(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 uF(){return"["}function gp(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 lF(e){const t=gp(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 cF(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 A_(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 dF(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?cF(n):gp(n);const c=e.ordered?u==="."?")":".":lF(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),A_(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 fF(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 hF(e,t,n,r){const s=fF(n);let a=n.bulletCurrent||gp(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 pF(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const mF=Al(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function gF(e,t,n,r){return(e.children.some(function(u){return mF(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function EF(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=yF;function v_(e,t,n,r){const s=EF(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=lc(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=Za(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=lc(r.after.charCodeAt(0),m,s);T.inside&&(d=d.slice(0,-1)+Za(m));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+y}function yF(e,t,n){return n.options.strong||"*"}function bF(e,t,n,r){return n.safe(e.value,r)}function TF(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 _F(e,t,n){const r=(A_(n)+(n.options.ruleSpaces?" ":"")).repeat(TF(n));return n.options.ruleSpaces?r.slice(0,-1):r}const C_={blockquote:VM,break:g_,code:KM,definition:JM,emphasis:E_,hardBreak:g_,heading:nF,html:y_,image:b_,imageReference:T_,inlineCode:__,link:x_,linkReference:w_,list:dF,listItem:hF,paragraph:pF,root:gF,strong:v_,text:bF,thematicBreak:_F};function SF(){return{enter:{table:xF,tableData:k_,tableHeader:k_,tableRow:AF},exit:{codeText:vF,table:wF,tableData:Ep,tableHeader:Ep,tableRow:Ep}}}function xF(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 wF(e){this.exit(e),this.data.inTable=void 0}function AF(e){this.enter({type:"tableRow",children:[]},e)}function Ep(e){this.exit(e)}function k_(e){this.enter({type:"tableCell",children:[]},e)}function vF(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 kF(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,C){return f(p(y,w,C),y.align)}function c(y,_,w,C){const A=m(y,w,C),N=f([A]);return N.slice(0,N.indexOf(`
46
- `))}function d(y,_,w,C){const A=w.enter("tableCell"),N=w.enter("phrasing"),v=w.containerPhrasing(y,de(B({},C),{before:a,after:a}));return N(),A(),v}function f(y,_){return jM(y,{align:_,alignDelimiters:r,padding:n,stringLength:s})}function p(y,_,w){const C=y.children;let A=-1;const N=[],v=_.enter("table");for(;++A<C.length;)N[A]=m(C[A],_,w);return v(),N}function m(y,_,w){const C=y.children;let A=-1;const N=[],v=_.enter("tableRow");for(;++A<C.length;)N[A]=d(C[A],y,_,w);return v(),N}function T(y,_,w){let C=C_.inlineCode(y,_,w);return w.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function NF(){return{exit:{taskListCheckValueChecked:N_,taskListCheckValueUnchecked:N_,paragraph:OF}}}function PF(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:IF}}}function N_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function OF(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 IF(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=C_.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 RF(){return[dM(),IM(),MM(),SF(),NF()]}function LF(e){return{extensions:[fM(),RM(e),FM(),kF(e),PF()]}}const DF={tokenize:zF,partial:!0},P_={tokenize:jF,partial:!0},O_={tokenize:$F,partial:!0},I_={tokenize:VF,partial:!0},MF={tokenize:qF,partial:!0},R_={name:"wwwAutolink",tokenize:UF,previous:D_},L_={name:"protocolAutolink",tokenize:HF,previous:M_},li={name:"emailAutolink",tokenize:BF,previous:F_},jr={};function FF(){return{text:jr}}let Ss=48;for(;Ss<123;)jr[Ss]=li,Ss++,Ss===58?Ss=65:Ss===91&&(Ss=97);jr[43]=li,jr[45]=li,jr[46]=li,jr[95]=li,jr[72]=[li,L_],jr[104]=[li,L_],jr[87]=[li,R_],jr[119]=[li,R_];function BF(e,t,n){const r=this;let s,a;return u;function u(m){return!yp(m)||!F_.call(r,r.previous)||bp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return yp(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(MF,p,f)(m):m===45||m===95||yn(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&&vn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function UF(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!D_.call(r,r.previous)||bp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(DF,e.attempt(P_,e.attempt(O_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function HF(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&M_.call(r,r.previous)&&!bp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(vn(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||El(m)||ft(m)||os(m)||yl(m)?n(m):e.attempt(P_,e.attempt(O_,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function zF(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 jF(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(I_,d,c)(f):f===null||ft(f)||os(f)||f!==45&&yl(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 $F(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(I_,t,a)(u):u===null||ft(u)||os(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function VF(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)||os(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||ft(c)||os(c)?t(c):r(c)}function a(c){return vn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):vn(c)?(e.consume(c),u):n(c)}}function qF(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return yn(a)?n(a):t(a)}}function D_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ft(e)}function M_(e){return!vn(e)}function F_(e){return!(e===47||yp(e))}function yp(e){return e===43||e===45||e===46||e===95||yn(e)}function bp(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 YF={tokenize:e9,partial:!0};function GF(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:QF,continuation:{tokenize:JF},exit:ZF}},text:{91:{name:"gfmFootnoteCall",tokenize:KF},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:WF,resolveTo:XF}}}}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=mr(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 XF(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 KF(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(mr(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 QF(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=mr(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 JF(e,t,n){return e.check(Aa,t,e.attempt(YF,t,n))}function ZF(e){e.exit("gfmFootnoteDefinition")}function e9(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 t9(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,bl(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=eo(f);if(_===126)return m>1?d(_):(u.consume(_),m++,y);if(m<2&&!n)return d(_);const C=u.exit("strikethroughSequenceTemporary"),A=eo(_);return C._open=!A||A===2&&!!w,C._close=!w||w===2&&!!A,c(_)}}}class n9{constructor(){this.map=[]}add(t,n,r){r9(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 r9(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 i9(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 s9(){return{flow:{null:{name:"table",tokenize:o9,resolveAll:a9}}}}function o9(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 ne=r.events[se][1].type;if(ne==="lineEnding"||ne==="linePrefix")se--;else break}const he=se>-1?r.events[se][1].type:null,Ce=he==="tableHead"||he==="tableRow"?R:d;return Ce===R&&r.parser.lazy[r.now().line]?n(V):Ce(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):Je(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,Je(V)?nt(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):_(V))}function _(V){return V===45||V===58?C(V):V===124?(u=!0,e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),w):q(V)}function w(V){return Je(V)?nt(e,C,"whitespace")(V):C(V)}function C(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)?H(V):q(V)}function A(V){return V===45?(e.enter("tableDelimiterFiller"),N(V)):q(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"),v):(e.exit("tableDelimiterFiller"),v(V))}function v(V){return Je(V)?nt(e,H,"whitespace")(V):H(V)}function H(V){return V===124?_(V):V===null||Ue(V)?!u||s!==a?q(V):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(V)):q(V)}function q(V){return n(V)}function R(V){return e.enter("tableRow"),Y(V)}function Y(V){return V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),Y):V===null||Ue(V)?(e.exit("tableRow"),t(V)):Je(V)?nt(e,Y,"whitespace")(V):(e.enter("data"),re(V))}function re(V){return V===null||V===124||ft(V)?(e.exit("data"),Y(V)):(e.consume(V),V===92?Ee:re)}function Ee(V){return V===92||V===124?(e.consume(V),re):re(V)}}function a9(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 n9;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(B_(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=cc(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=cc(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=cc(T,t,a,s,n,m)):u[1]!==0&&(m=cc(T,t,u,s,n,m)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&B_(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=i9(t.events,n))}return e}function cc(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},Ao(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Ao(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=Ao(t.events,n[2]),p=Ao(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({},Ao(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function B_(e,t,n,r,s){const a=[],u=Ao(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 Ao(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const u9={name:"tasklistCheck",tokenize:c9};function l9(){return{text:{91:u9}}}function c9(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 Ue(d)?t(d):Je(d)?e.check({tokenize:d9},t,n)(d):n(d)}}function d9(e,t,n){return nt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function f9(e){return dE([FF(),GF(),t9(e),s9(),l9()])}const h9={};function p9(e){const t=this,n=e||h9,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(f9(n)),a.push(RF()),u.push(LF(n))}const dc=()=>S.jsx("span",{className:`${z}-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"})})}),Tp=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>S.jsx(ny,{remarkPlugins:[p9],rehypePlugins:[rb],components:{h1:({children:s})=>S.jsx("h1",{className:G(e,`${z}-header h1`),children:s}),h2:({children:s})=>S.jsx("h2",{className:G(e,`${z}-header h2`),children:s}),h3:({children:s})=>S.jsx("h3",{className:G(e,`${z}-header h3`),children:s}),ul:({children:s})=>S.jsx("ul",{className:G(e,`${z}-ul`),children:s}),ol:({children:s})=>S.jsx("ol",{className:G(e,`${z}-ol`),children:s}),li:({children:s})=>S.jsx("li",{className:G(e,`${z}-li`),children:s}),a:({href:s,children:a})=>S.jsx(cb,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>S.jsx("div",{className:G(e,`${z}-table-container`),children:S.jsx("table",{className:G(e,`${z}-table`),children:s})}),thead:({children:s})=>S.jsx("thead",{className:G(e,`${z}-thead`),children:s}),tbody:({children:s})=>S.jsx("tbody",{className:G(e,`${z}-tbody`),children:s}),tr:({children:s})=>S.jsx("tr",{className:G(e,`${z}-tr`),children:s}),th:({children:s})=>S.jsx("th",{className:G(e,`${z}-th`),children:s}),td:({children:s})=>S.jsx("td",{className:G(e,`${z}-td`),children:s}),span:({className:s,children:a})=>s===`${z}-blinking-cursor`?S.jsx(dc,{}):S.jsx("span",{children:a})},children:r+(n?`<span className='${z}-blinking-cursor'></span>`:"")}),m9=({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:G(e,`${z}-progress-message`,"standalone"),children:[S.jsx("span",{className:G(e,`${z}-message-icon`,"progress-icon","standalone"),children:S.jsx(O1,{})}),S.jsx("p",{className:G(e,`${z}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&S.jsxs(S.Fragment,{children:[S.jsx(pl,{className:G(e,`${z}-thought-context-button`),onClick:c,children:n?S.jsxs(S.Fragment,{children:["Hide ",S.jsx(jk,{})]}):S.jsxs(S.Fragment,{children:["Context ",S.jsx($k,{})]})}),n&&S.jsx("div",{className:G(e,`${z}-thought-container`),children:a&&S.jsx("p",{className:G(e,`${z}-progress-thought`),children:t.thought})})]})]})},g9=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?S.jsx(m9,{globalClassName:e,message:t}):S.jsxs("div",{className:G(e,`${z}-progress-message`,"embedded"),title:t.message,children:[S.jsx("span",{className:G(e,`${z}-message-icon`,"progress-icon","embedded"),children:S.jsx(O1,{})}),S.jsx("i",{className:G(e,`${z}-progress-text`,"embedded"),children:t.message})]}),E9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var s;const r=(s=t.searchParams)==null?void 0:s.query;return S.jsxs("div",{className:G(e,`${z}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&S.jsxs("div",{className:G(e,`${z}-refined-event-query`,{embedded:!n,standalone:n}),children:[S.jsx("span",{className:G(e,`${z}-message-icon`,`${z}-refined-event-icon`,{embedded:!n,standalone:n}),children:S.jsx(Ks,{role:"img"})}),S.jsx("p",{className:G(e,`${z}-text`,`${z}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),S.jsx(Tp,{text:t.message})]})},U_=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}},fc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>S.jsx("span",{className:G(t,`${z}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),H_=({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:G(e,`${z}-facets`),children:[S.jsx("p",{className:G(e,`${z}-facet-category`),children:c}),S.jsx("p",{className:G(e,`${z}-facet-values`),children:d})]},c)})},eu=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>S.jsx("span",{className:G(e,`${z}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),y9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:s}=t,{facetFiltersList:a,filterCount:u}=U_(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:G(e,`${z}-user-message standalone`),children:[S.jsxs("div",{className:G(e,`${z}-user-message-row standalone`),children:[d?S.jsx("img",{className:G(e,`${z}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):S.jsx("span",{className:G(e,`${z}-message-icon user-message-icon standalone`),children:S.jsx(R1,{})}),S.jsx("p",{className:G(e,`${z}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&S.jsx(fc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),S.jsx(H_,{globalClassName:e,facetFiltersList:a,message:t}),S.jsx(eu,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):S.jsxs("div",{className:G(e,`${z}-user-message embedded`),children:[S.jsxs("div",{className:G(e,`${z}-user-message-row embedded`),children:[d?S.jsx("img",{className:G(e,`${z}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):S.jsx("span",{className:G(e,`${z}-message-icon user-message-icon embedded`),children:S.jsx(R1,{})}),S.jsx("p",{className:G(e,`${z}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&S.jsx(fc,{isWidgetStandalone:!1,filterCount:u})]}),S.jsx(eu,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},b9=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:s,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>S.jsxs("div",{className:G(e,`${z}-user-search standalone`),children:[S.jsxs("div",{children:[S.jsxs("div",{className:G(e,`${z}-user-search-query standalone`),children:[d?S.jsx("img",{className:G(e,`${z}-user-search-image standalone`),src:d,alt:s||r,loading:"lazy"}):S.jsx("span",{className:G(e,`${z}-message-icon user-search-icon standalone`),children:S.jsx(Ks,{})}),S.jsx("p",{className:G(e,`${z}-text bold`),children:`${n}: ${s||r}`}),u.length>0&&S.jsx(fc,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),S.jsx(H_,{globalClassName:e,facetFiltersList:u,message:a})]}),S.jsx(eu,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),T9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:s,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=U_(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,C,A;const _=typeof((w=r==null?void 0:r.clientContext)==null?void 0:w.cimLabel)=="string"?(C=r==null?void 0:r.clientContext)==null?void 0:C.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(b9,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:T,facetFiltersList:u,filterCount:c}):S.jsxs("div",{className:G(e,`${z}-user-search embedded`),children:[S.jsxs("div",{className:G(e,`${z}-user-search-query embedded`),children:[f?S.jsx("img",{className:G(e,`${z}-user-search-image embedded`),src:f,alt:T||m,loading:"lazy"}):S.jsx("span",{className:G(e,`${z}-message-icon user-search-icon embedded`),children:S.jsx(Ks,{})}),S.jsx("p",{className:G(e,`${z}-text bold embedded`),children:T||m}),u.length>0&&S.jsx(fc,{isWidgetStandalone:!1,filterCount:c})]}),S.jsx(eu,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},z_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:s,isWidgetStandalone:a,handleSuggestionClick:u})=>{var T;const{isLoading:c,isResponseLoading:d}=Or(),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(y9,{globalClassName:t,isWidgetStandalone:a,message:e}):S.jsx(T9,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return S.jsx(E9,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return S.jsx(sM,{globalClassName:t,entryType:s,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return S.jsx(Tp,{globalClassName:t,openLinksInNewTab:n,showIsLoading:f,text:e.message});case"error":return S.jsx(iM,{message:e,isWidgetStandalone:a});case"display_products":return S.jsx(rM,{message:e,isWidgetStandalone:a});case"progress":return S.jsx(g9,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return s==="ask_cim"?null:S.jsxs(S.Fragment,{children:[S.jsx("p",{className:G(t,`${z}-reset-message`),children:"This conversation has been reset."}),S.jsx("p",{className:G(t,`${z}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},_9=({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(tM,{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:G(n,`${z}-message-group`,e?"standalone":"embedded"),children:[c.messages.length>0&&c.messages.map(p=>S.jsx("div",{className:`${z}-message-group-child`,children:S.jsx(z_,{id:p.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),S.jsx(eu,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${c.eventSourceId}`)}else if(c.type==="individual"&&c.message)return S.jsx("div",{className:G(n,`${z}-message`,e?"standalone":"embedded",{error:c.message.name.includes("error")}),children:S.jsx(z_,{id:c.message.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:c.message,handleSuggestionClick:t})},c.message.id);return null})]})},S9=4e3,x9=e=>(typeof e=="string"?e:"").replace(/<[^>]*>/g," ").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/[`*_~#>|]+/g," ").replace(/\s+/g," ").trim().slice(0,S9),w9=({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:`${z}-visually-hidden`,role:"status","aria-atomic":"true",children:n})},A9=()=>{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(w9,{message:n?x9(n.message):"",announcementKey:n==null?void 0:n.id})},v9=({isOpen:e}={})=>{const{messages:t}=Or(),{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"},_p=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:s})=>{const a=v9({isOpen:e});return S.jsxs(S.Fragment,{children:[S.jsx(_9,{isWidgetStandalone:t,handleSuggestionClick:r}),S.jsx(A9,{}),n&&S.jsx("div",{style:B(B({},C9),s),children:S.jsx(dc,{})}),S.jsx("div",{ref:a})]})},j_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{copilot:r,isLoading:s,handleUserInput:a,handleSuggestion:u,resetConversation:c}=Or();return cp()?r?S.jsxs("div",{className:G(e,`${z}-container`,`${z}-embedded-chat`),style:t,children:[S.jsx("div",{className:G(e,`${z}-message-container`,`container-${n}`,"embedded"),role:"region","aria-label":"Conversation",children:S.jsx(_p,{isWidgetStandalone:!1,isLoading:s,handleSuggestionClick:u})}),S.jsx(_h,{componentType:"chat",className:"embedded-chat",isLoading:s,onSubmit:a}),S.jsx("div",{className:G(`${z}-embedded-chat-menu`),children:S.jsxs(c8,{componentType:"chat",children:[S.jsx(u_,{componentType:"chat"}),S.jsx(hb,{componentType:"chat",onClearChat:c})]})})]}):S.jsx("div",{children:"Loading Copilot..."}):null},$_=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}=oc();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:k9(u);return S.jsx(S.Fragment,{children:F.Children.map(t,f=>Xs.createPortal(f,c))})},k9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return ps(n)?n:Dr(t).body},N9=()=>()=>{},V_=()=>{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}=Or(),y=cp(),{isOpen:_}=s||{},w=r==="standalone",C=()=>{ti(!1),Cf()};return y?d?S.jsx(r_,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:y,initialFocusEl:vf,children:S.jsx($_,{children:S.jsx(op,{className:G(e,`${z}-container`,`${z}-dialog`,a,u&&"full-height"),style:B(B({},t),c&&{width:c}),children:S.jsxs(ip,{className:G(e,`${z}-dialog-content`,{standalone:w,embedded:!w}),children:[S.jsx(a_,{componentType:"dialog",onClearChat:T,onClose:C}),S.jsx(sp,{className:G(e,`${z}-message-container`,`container-${n}`,{standalone:w,embedded:!w}),role:"region","aria-label":"Conversation",children:S.jsx(_p,{isWidgetStandalone:w,isLoading:f,isOpen:_,handleSuggestionClick:m})}),S.jsx(_h,{componentType:"dialog",isLoading:f,onSubmit:p})]})})})}):S.jsx("div",{children:"Loading Copilot..."}):null},q_=()=>{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}=Or(),{isOpen:m}=s||{},T=r==="standalone",y=cp(),_=({open:C})=>{if(C){ti(!0);return}w()},w=()=>{ti(!1),Cf()};return y?u?S.jsx(r_,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:_,initialFocusEl:vf,children:S.jsx($_,{children:S.jsxs("div",{className:G(e,`${z}-modal-container`),style:t,children:[S.jsx(JT,{className:G(e,`${z}-modal-backdrop`)}),S.jsx(op,{className:G(e,`${z}-container`,`${z}-modal`,{fullscreen:a,standalone:T,embedded:!T}),children:S.jsxs(ip,{className:G(e,`${z}-modal-content`,{standalone:T,embedded:!T}),children:[S.jsx(a_,{componentType:"modal",onClearChat:p,onClose:w}),S.jsx(sp,{className:G(e,`${z}-message-container`,`container-${n}`,{standalone:T,embedded:!T}),role:"region","aria-label":"Conversation",children:S.jsx(_p,{isWidgetStandalone:T,isLoading:c,isOpen:m,handleSuggestionClick:f,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),S.jsx(_h,{componentType:"modal",isLoading:c,onSubmit:d})]})})]})})}):S.jsx("div",{children:"Loading Copilot..."}):null},P9=()=>{const e=tr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?S.jsx(Bk,{}):t==="dialog"?S.jsx(V_,{}):t==="modal"?S.jsx(q_,{}):S.jsx(j_,{})},O9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=Sf();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 YC(a),()=>{GC(a)}},[e,t,n,r,s])},I9=()=>{const{copilot:e}=Vn(),{entryType:t,activePromptsId:n,params:r}=ni(),{setIsInitialized:s,setActivePromptsId:a,setPromptsMessage:u,setResponseMessage:c,setIsResponseLoading:d}=Sf(),{getCopilotSuggestions:f}=y1();O9();const p=F.useCallback(_=>{if(!t||!_)return;f(_,t,C=>{a(C.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},Y_={copilot:"Ask Copilot",messaging:"Ask a question"},R9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=tt(),{placeholder:s,isResponseLoading:a}=ni(),u=s||Y_[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:G(n,`${z}-prompts-input-container`),name:`${z}-prompts-form`,onSubmit:p,children:[S.jsx("label",{htmlFor:`${z}-prompts-input`,"aria-label":u,children:S.jsx(rp,{className:G(n,`${z}-prompts-input-icon`)})}),S.jsx("input",{id:`${z}-prompts-input`,className:G(n,`${z}-prompts-input`),name:`${z}-prompts-input`,placeholder:u,type:"text",disabled:f,value:c,onChange:m=>d(m.target.value)}),S.jsx(ri,{className:G(n,`${z}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:S.jsx(Ks,{}),disabled:f})]})},L9=()=>{const{globalClassName:e,mode:t}=tt(),{placeholder:n}=ni(),r=n||Y_[t];return S.jsxs("div",{className:G(e,`${z}-prompts-header`),children:[S.jsx(rp,{className:G(e,`${z}-prompts-input-icon`),"aria-hidden":"true"}),S.jsx("span",{className:G(e,`${z}-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:G(r,`${z}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&S.jsx(dp,{icon:a,className:`${z}-suggestion-button-icon`}),S.jsx("span",{children:e})]})},D9="Ask me something else",M9=({label:e,disabled:t=!1})=>S.jsx(G_,{label:e||D9,disabled:t,onClick:()=>ti(!0)}),F9=({sendCopilotPrompt:e})=>{var C,A;const{globalClassName:t}=tt(),{promptsMessage:n,isResponseLoading:r,isInitialized:s,isInline:a,askElseButtonLabel:u,staticQuestions:c,staticQuestionsStrategy:d,disableAskElseButton:f}=ni(),p=s?(A=(C=n==null?void 0:n.suggestions)==null?void 0:C.map(N=>N.displayText.trim()).filter(Boolean))!=null?A:[]:[],m=s?F0(p,c,d):[],T=!s,_=m.length>0&&!a&&!f,w=N=>()=>{const v=N.trim();v&&e(v)};return S.jsxs("div",{className:G(t,`${z}-prompts-button-group`),children:[T&&S.jsx(dc,{}),m.map(N=>S.jsx(G_,{label:N,disabled:r,onClick:w(N)},N)),_&&S.jsx(M9,{label:u,disabled:r})]})},B9=()=>{const{globalClassName:e}=tt(),{isInline:t,userPrompt:n}=ni();return!n||!t?null:S.jsx("div",{className:G(e,`${z}-prompts-user-message-container`),children:S.jsx("p",{className:G(e,`${z}-prompts-user-message`),children:n})})},U9=()=>{const{globalClassName:e,openLinksInNewTab:t}=tt(),{isInline:n,responseMessage:r,isResponseLoading:s}=ni();return!n||!r&&!s?null:s?S.jsx(dc,{}):r?S.jsx("div",{className:G(e,`${z}-prompts-response-container`,`${z}-message-container`),children:S.jsx(Tp,{globalClassName:e,openLinksInNewTab:t,text:r.message})}):null},H9=()=>{const{globalClassName:e,themeVariables:t}=tt(),{connected:n,copilot:r}=Vn(),{handleCopilotRequestAck:s}=Ws(),{status:{isOpen:a}}=tr(),{isOpen:u,isInline:c,elementId:d,entryType:f,params:p,promptsDisplay:m}=ni(),T=m!=="buttons",y=m!=="input",{setActivePromptsId:_,setUserPrompt:w,setResponseMessage:C,setIsResponseLoading:A}=Sf(),[N,v]=F.useState(null);F.useEffect(()=>{if(!d||N)return;const q=document.getElementById(d);q&&v(q)},[d,N]);const H=F.useCallback(q=>{if(!r||!f||!p)return;const R=re=>{c?(C(null),w(q),_(re.id),A(!0)):(a||ti(!0),s(re))},Y={userPrompt:q,clientContext:B({_cimEventSource:"prompts-extension"},c?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(Y,R);break;case"search":r.search(B({searchParams:p},Y),R);break;case"browse":r.browse(B({browseParams:p},Y),R);break;case"pdp":r.productView(B(B({},p),Y),R);break}},[r,c,f,p,a,_,C,w,A,s]);return!n||!u||!N||!f?null:Xs.createPortal(S.jsxs("div",{className:G(e,`${z}-prompts-extension-container`),style:t,children:[T&&S.jsx(R9,{onSubmit:H}),!T&&S.jsx(L9,{}),y&&S.jsx(F9,{sendCopilotPrompt:H}),S.jsxs("div",{className:G(e,`${z}-prompts-extension-messages-container`),children:[S.jsx(B9,{}),S.jsx(U9,{})]})]}),N)},z9=()=>S.jsxs(S.Fragment,{children:[S.jsx(I9,{}),S.jsx(H9,{})]}),Sp=e=>S.jsxs(b1,de(B({},e),{children:[S.jsx(P9,{}),S.jsx(z9,{})]}));var hc={},W_;function j9(){if(W_)return hc;W_=1;var e=w1();return hc.createRoot=e.createRoot,hc.hydrateRoot=e.hydrateRoot,hc}var X_=j9();const $9=r=>{var s=r,{elementId:e,timeout:t=5e3}=s,n=dn(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&&(Gs(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=X_.createRoot(T))==null||p.render(S.jsx(Sp,B({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Gs(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c};return Object.freeze(Object.defineProperty({__proto__:null,CopilotDialog:V_,CopilotEmbed:j_,CopilotModal:q_,CopilotWidget:Sp,CopilotWidgetProvider:b1,eventHandlers:{search:sk,browse:zC,pdp:{setPdpContext:i1,updatePdpProductId:$C,updatePdpLink:VC},components:{setEntryType:ha,toggleWidgetOpen:ti,toggleWidgetMinimized:pa,toggleModalFullscreen:yf,setWidgetType:dl,setWidgetDialogPosition:bf,togglePromptsExtensionOpen:s1,togglePromptsExtensionInline:o1,loadPromptsComponent:JC,getAskCimPrompts:WC,getSearchPrompts:XC,getBrowsePrompts:KC,getProductViewPrompts:QC},session:ZC},injectCopilotWidget:r=>{var s=r,{timeout:e,elementId:t}=s,n=dn(s,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Gs(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Gs(!0,"warn","Container element not found for id:",t),Gs(!0,"warn","Beginning observation for element"),$9(B({elementId:t,timeout:e},n));return}X_.createRoot(a).render(S.jsx(Sp,B({},n)))},state:()=>Object.freeze({search:Object.freeze(bt.state),browse:Object.freeze(ut.state),pdp:Object.freeze(pr.state),isConnected:Qe.state.connected,isOpen:Qe.isOpen,entryType:Qe.entryType}),useCopilot:Or},Symbol.toStringTag,{value:"Module"}))}));
44
+ `},a.current()));return/^[\t ]/.test(f)&&(f=nu(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}I_.peek=NF;function I_(e){return e.value||""}function NF(){return"<"}R_.peek=PF;function R_(e,t,n,r){const s=Tp(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 PF(){return"!"}L_.peek=OF;function L_(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 OF(){return"!"}D_.peek=IF;function D_(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 IF(){return"`"}function M_(e,t){const n=$f(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))}F_.peek=RF;function F_(e,t,n,r){const s=Tp(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(M_(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 RF(e,t,n){return M_(e,n)?"<":"["}B_.peek=LF;function B_(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 LF(){return"["}function _p(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 DF(e){const t=_p(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 MF(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 U_(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 FF(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?MF(n):_p(n);const c=e.ordered?u==="."?")":".":DF(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),U_(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 BF(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 UF(e,t,n,r){const s=BF(n);let a=n.bulletCurrent||_p(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 jF=kl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function zF(e,t,n,r){return(e.children.some(function(u){return jF(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function $F(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}H_.peek=VF;function H_(e,t,n,r){const s=$F(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=fc(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=nu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=fc(r.after.charCodeAt(0),m,s);T.inside&&(d=d.slice(0,-1)+nu(m));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+y}function VF(e,t,n){return n.options.strong||"*"}function qF(e,t,n,r){return n.safe(e.value,r)}function YF(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 WF(e,t,n){const r=(U_(n)+(n.options.ruleSpaces?" ":"")).repeat(YF(n));return n.options.ruleSpaces?r.slice(0,-1):r}const j_={blockquote:gF,break:P_,code:SF,definition:wF,emphasis:O_,hardBreak:P_,heading:kF,html:I_,image:R_,imageReference:L_,inlineCode:D_,link:F_,linkReference:B_,list:FF,listItem:UF,paragraph:HF,root:zF,strong:H_,text:qF,thematicBreak:WF};function GF(){return{enter:{table:XF,tableData:z_,tableHeader:z_,tableRow:QF},exit:{codeText:JF,table:KF,tableData:Sp,tableHeader:Sp,tableRow:Sp}}}function XF(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 KF(e){this.exit(e),this.data.inTable=void 0}function QF(e){this.enter({type:"tableRow",children:[]},e)}function Sp(e){this.exit(e)}function z_(e){this.enter({type:"tableCell",children:[]},e)}function JF(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ZF));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function ZF(e,t){return t==="|"?t:e}function e9(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,_,A,P){return f(p(y,A,P),y.align)}function c(y,_,A,P){const w=m(y,A,P),C=f([w]);return C.slice(0,C.indexOf(`
46
+ `))}function d(y,_,A,P){const w=A.enter("tableCell"),C=A.enter("phrasing"),v=A.containerPhrasing(y,me(B({},P),{before:a,after:a}));return C(),w(),v}function f(y,_){return pF(y,{align:_,alignDelimiters:r,padding:n,stringLength:s})}function p(y,_,A){const P=y.children;let w=-1;const C=[],v=_.enter("table");for(;++w<P.length;)C[w]=m(P[w],_,A);return v(),C}function m(y,_,A){const P=y.children;let w=-1;const C=[],v=_.enter("tableRow");for(;++w<P.length;)C[w]=d(P[w],y,_,A);return v(),C}function T(y,_,A){let P=j_.inlineCode(y,_,A);return A.stack.includes("tableCell")&&(P=P.replace(/\|/g,"\\$&")),P}}function t9(){return{exit:{taskListCheckValueChecked:$_,taskListCheckValueUnchecked:$_,paragraph:r9}}}function n9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:i9}}}function $_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function r9(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 i9(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=j_.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 s9(){return[FM(),iF(),uF(),GF(),t9()]}function o9(e){return{extensions:[BM(),sF(e),lF(),e9(e),n9()]}}const a9={tokenize:h9,partial:!0},V_={tokenize:p9,partial:!0},q_={tokenize:m9,partial:!0},Y_={tokenize:g9,partial:!0},u9={tokenize:E9,partial:!0},W_={name:"wwwAutolink",tokenize:d9,previous:X_},G_={name:"protocolAutolink",tokenize:f9,previous:K_},li={name:"emailAutolink",tokenize:c9,previous:Q_},zr={};function l9(){return{text:zr}}let ws=48;for(;ws<123;)zr[ws]=li,ws++,ws===58?ws=65:ws===91&&(ws=97);zr[43]=li,zr[45]=li,zr[46]=li,zr[95]=li,zr[72]=[li,G_],zr[104]=[li,G_],zr[87]=[li,W_],zr[119]=[li,W_];function c9(e,t,n){const r=this;let s,a;return u;function u(m){return!xp(m)||!Q_.call(r,r.previous)||wp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return xp(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(u9,p,f)(m):m===45||m===95||Tn(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),s=!0,d}function p(m){return a&&s&&kn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function d9(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!X_.call(r,r.previous)||wp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(a9,e.attempt(V_,e.attempt(q_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function f9(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&K_.call(r,r.previous)&&!wp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(kn(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||Tl(m)||ht(m)||us(m)||_l(m)?n(m):e.attempt(V_,e.attempt(q_,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function h9(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 p9(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(Y_,d,c)(f):f===null||ht(f)||us(f)||f!==45&&_l(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 m9(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(Y_,t,a)(u):u===null||ht(u)||us(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function g9(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)||us(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||ht(c)||us(c)?t(c):r(c)}function a(c){return kn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):kn(c)?(e.consume(c),u):n(c)}}function E9(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return Tn(a)?n(a):t(a)}}function X_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ht(e)}function K_(e){return!kn(e)}function Q_(e){return!(e===47||xp(e))}function xp(e){return e===43||e===45||e===46||e===95||Tn(e)}function wp(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 y9={tokenize:v9,partial:!0};function b9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:x9,continuation:{tokenize:w9},exit:A9}},text:{91:{name:"gfmFootnoteCall",tokenize:S9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:T9,resolveTo:_9}}}}function T9(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=pr(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 _9(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 S9(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(pr(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 x9(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 A=e.exit("gfmFootnoteDefinitionLabelString");return a=pr(r.sliceSerialize(A)),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),rt(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function w9(e,t,n){return e.check(ka,t,e.attempt(y9,t,n))}function A9(e){e.exit("gfmFootnoteDefinition")}function v9(e,t,n){const r=this;return rt(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 C9(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&&qn(T,T.length,0,Sl(y,u.slice(f+1,d),c)),qn(T,T.length,0,[["exit",m,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),qn(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 A=eo(f);if(_===126)return m>1?d(_):(u.consume(_),m++,y);if(m<2&&!n)return d(_);const P=u.exit("strikethroughSequenceTemporary"),w=eo(_);return P._open=!w||w===2&&!!A,P._close=!A||A===2&&!!w,c(_)}}}class k9{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 P9(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 O9(){return{flow:{null:{name:"table",tokenize:I9,resolveAll:R9}}}}function I9(e,t,n){const r=this;let s=0,a=0,u;return c;function c(Y){let oe=r.events.length-1;for(;oe>-1;){const re=r.events[oe][1].type;if(re==="lineEnding"||re==="linePrefix")oe--;else break}const he=oe>-1?r.events[oe][1].type:null,Ce=he==="tableHead"||he==="tableRow"?L:d;return Ce===L&&r.parser.lazy[r.now().line]?n(Y):Ce(Y)}function d(Y){return e.enter("tableHead"),e.enter("tableRow"),f(Y)}function f(Y){return Y===124||(u=!0,a+=1),p(Y)}function p(Y){return Y===null?n(Y):Ue(Y)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(Y),e.exit("lineEnding"),y):n(Y):Ze(Y)?rt(e,p,"whitespace")(Y):(a+=1,u&&(u=!1,s+=1),Y===124?(e.enter("tableCellDivider"),e.consume(Y),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(Y)))}function m(Y){return Y===null||Y===124||ht(Y)?(e.exit("data"),p(Y)):(e.consume(Y),Y===92?T:m)}function T(Y){return Y===92||Y===124?(e.consume(Y),m):m(Y)}function y(Y){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(Y):(e.enter("tableDelimiterRow"),u=!1,Ze(Y)?rt(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):_(Y))}function _(Y){return Y===45||Y===58?P(Y):Y===124?(u=!0,e.enter("tableCellDivider"),e.consume(Y),e.exit("tableCellDivider"),A):q(Y)}function A(Y){return Ze(Y)?rt(e,P,"whitespace")(Y):P(Y)}function P(Y){return Y===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(Y),e.exit("tableDelimiterMarker"),w):Y===45?(a+=1,w(Y)):Y===null||Ue(Y)?U(Y):q(Y)}function w(Y){return Y===45?(e.enter("tableDelimiterFiller"),C(Y)):q(Y)}function C(Y){return Y===45?(e.consume(Y),C):Y===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(Y),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(Y))}function v(Y){return Ze(Y)?rt(e,U,"whitespace")(Y):U(Y)}function U(Y){return Y===124?_(Y):Y===null||Ue(Y)?!u||s!==a?q(Y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(Y)):q(Y)}function q(Y){return n(Y)}function L(Y){return e.enter("tableRow"),V(Y)}function V(Y){return Y===124?(e.enter("tableCellDivider"),e.consume(Y),e.exit("tableCellDivider"),V):Y===null||Ue(Y)?(e.exit("tableRow"),t(Y)):Ze(Y)?rt(e,V,"whitespace")(Y):(e.enter("data"),ne(Y))}function ne(Y){return Y===null||Y===124||ht(Y)?(e.exit("data"),V(Y)):(e.consume(Y),Y===92?fe:ne)}function fe(Y){return Y===92||Y===124?(e.consume(Y),ne):ne(Y)}}function R9(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 k9;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(J_(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=hc(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=hc(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=hc(T,t,a,s,n,m)):u[1]!==0&&(m=hc(T,t,u,s,n,m)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&J_(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=P9(t.events,n))}return e}function hc(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},Ao(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Ao(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=Ao(t.events,n[2]),p=Ao(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,A=n[3]-n[2]-1;e.add(_,A,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},Ao(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function J_(e,t,n,r,s){const a=[],u=Ao(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 Ao(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const L9={name:"tasklistCheck",tokenize:M9};function D9(){return{text:{91:L9}}}function M9(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:F9},t,n)(d):n(d)}}function F9(e,t,n){return rt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function B9(e){return AE([l9(),b9(),C9(e),O9(),D9()])}const U9={};function H9(e){const t=this,n=e||U9,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(B9(n)),a.push(s9()),u.push(o9(n))}const pc=()=>S.jsx("span",{className:`${j}-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"})})}),Ap=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>S.jsx(gy,{remarkPlugins:[H9],rehypePlugins:[Eb],components:{h1:({children:s})=>S.jsx("h1",{className:W(e,`${j}-header h1`),children:s}),h2:({children:s})=>S.jsx("h2",{className:W(e,`${j}-header h2`),children:s}),h3:({children:s})=>S.jsx("h3",{className:W(e,`${j}-header h3`),children:s}),ul:({children:s})=>S.jsx("ul",{className:W(e,`${j}-ul`),children:s}),ol:({children:s})=>S.jsx("ol",{className:W(e,`${j}-ol`),children:s}),li:({children:s})=>S.jsx("li",{className:W(e,`${j}-li`),children:s}),a:({href:s,children:a})=>S.jsx(wb,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>S.jsx("div",{className:W(e,`${j}-table-container`),children:S.jsx("table",{className:W(e,`${j}-table`),children:s})}),thead:({children:s})=>S.jsx("thead",{className:W(e,`${j}-thead`),children:s}),tbody:({children:s})=>S.jsx("tbody",{className:W(e,`${j}-tbody`),children:s}),tr:({children:s})=>S.jsx("tr",{className:W(e,`${j}-tr`),children:s}),th:({children:s})=>S.jsx("th",{className:W(e,`${j}-th`),children:s}),td:({children:s})=>S.jsx("td",{className:W(e,`${j}-td`),children:s}),span:({className:s,children:a})=>s===`${j}-blinking-cursor`?S.jsx(pc,{}):S.jsx("span",{children:a})},children:r+(n?`<span className='${j}-blinking-cursor'></span>`:"")}),j9=({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,`${j}-progress-message`,"standalone"),children:[S.jsx("span",{className:W(e,`${j}-message-icon`,"progress-icon","standalone"),children:S.jsx(q1,{})}),S.jsx("p",{className:W(e,`${j}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&S.jsxs(S.Fragment,{children:[S.jsx(El,{className:W(e,`${j}-thought-context-button`),onClick:c,children:n?S.jsxs(S.Fragment,{children:["Hide ",S.jsx(pN,{})]}):S.jsxs(S.Fragment,{children:["Context ",S.jsx(mN,{})]})}),n&&S.jsx("div",{className:W(e,`${j}-thought-container`),children:a&&S.jsx("p",{className:W(e,`${j}-progress-thought`),children:t.thought})})]})]})},z9=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?S.jsx(j9,{globalClassName:e,message:t}):S.jsxs("div",{className:W(e,`${j}-progress-message`,"embedded"),title:t.message,children:[S.jsx("span",{className:W(e,`${j}-message-icon`,"progress-icon","embedded"),children:S.jsx(q1,{})}),S.jsx("i",{className:W(e,`${j}-progress-text`,"embedded"),children:t.message})]}),$9=({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,`${j}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&S.jsxs("div",{className:W(e,`${j}-refined-event-query`,{embedded:!n,standalone:n}),children:[S.jsx("span",{className:W(e,`${j}-message-icon`,`${j}-refined-event-icon`,{embedded:!n,standalone:n}),children:S.jsx(Ks,{role:"img"})}),S.jsx("p",{className:W(e,`${j}-text`,`${j}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),S.jsx(Ap,{text:t.message})]})},Z_=e=>{var d,f;const{configModule:t}=nt(),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}},mc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>S.jsx("span",{className:W(t,`${j}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),eS=({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,`${j}-facets`),children:[S.jsx("p",{className:W(e,`${j}-facet-category`),children:c}),S.jsx("p",{className:W(e,`${j}-facet-values`),children:d})]},c)})},ru=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>S.jsx("span",{className:W(e,`${j}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),V9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:s}=t,{facetFiltersList:a,filterCount:u}=Z_(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,`${j}-user-message standalone`),children:[S.jsxs("div",{className:W(e,`${j}-user-message-row standalone`),children:[d?S.jsx("img",{className:W(e,`${j}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):S.jsx("span",{className:W(e,`${j}-message-icon user-message-icon standalone`),children:S.jsx(W1,{})}),S.jsx("p",{className:W(e,`${j}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&S.jsx(mc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),S.jsx(eS,{globalClassName:e,facetFiltersList:a,message:t}),S.jsx(ru,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):S.jsxs("div",{className:W(e,`${j}-user-message embedded`),children:[S.jsxs("div",{className:W(e,`${j}-user-message-row embedded`),children:[d?S.jsx("img",{className:W(e,`${j}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):S.jsx("span",{className:W(e,`${j}-message-icon user-message-icon embedded`),children:S.jsx(W1,{})}),S.jsx("p",{className:W(e,`${j}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&S.jsx(mc,{isWidgetStandalone:!1,filterCount:u})]}),S.jsx(ru,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},q9=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:s,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>S.jsxs("div",{className:W(e,`${j}-user-search standalone`),children:[S.jsxs("div",{children:[S.jsxs("div",{className:W(e,`${j}-user-search-query standalone`),children:[d?S.jsx("img",{className:W(e,`${j}-user-search-image standalone`),src:d,alt:s||r,loading:"lazy"}):S.jsx("span",{className:W(e,`${j}-message-icon user-search-icon standalone`),children:S.jsx(Ks,{})}),S.jsx("p",{className:W(e,`${j}-text bold`),children:`${n}: ${s||r}`}),u.length>0&&S.jsx(mc,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),S.jsx(eS,{globalClassName:e,facetFiltersList:u,message:a})]}),S.jsx(ru,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),Y9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:s,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=Z_(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 A,P,w;const _=typeof((A=r==null?void 0:r.clientContext)==null?void 0:A.cimLabel)=="string"?(P=r==null?void 0:r.clientContext)==null?void 0:P.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:(w=r==null?void 0:r.browseParams)==null?void 0:w.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(q9,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:T,facetFiltersList:u,filterCount:c}):S.jsxs("div",{className:W(e,`${j}-user-search embedded`),children:[S.jsxs("div",{className:W(e,`${j}-user-search-query embedded`),children:[f?S.jsx("img",{className:W(e,`${j}-user-search-image embedded`),src:f,alt:T||m,loading:"lazy"}):S.jsx("span",{className:W(e,`${j}-message-icon user-search-icon embedded`),children:S.jsx(Ks,{})}),S.jsx("p",{className:W(e,`${j}-text bold embedded`),children:T||m}),u.length>0&&S.jsx(mc,{isWidgetStandalone:!1,filterCount:c})]}),S.jsx(ru,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},tS=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:s,isWidgetStandalone:a,handleSuggestionClick:u})=>{var T;const{isLoading:c,isResponseLoading:d}=Or(),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(V9,{globalClassName:t,isWidgetStandalone:a,message:e}):S.jsx(Y9,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return S.jsx($9,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return S.jsx(OM,{globalClassName:t,entryType:s,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return S.jsx(Ap,{globalClassName:t,openLinksInNewTab:n,showIsLoading:f,text:e.message});case"error":return S.jsx(PM,{message:e,isWidgetStandalone:a});case"display_products":return S.jsx(NM,{message:e,isWidgetStandalone:a});case"progress":return S.jsx(z9,{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,`${j}-reset-message`),children:"This conversation has been reset."}),S.jsx("p",{className:W(t,`${j}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},W9=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:s}=nt(),{groupedMessages:a}=$n(),{entryType:u}=tr();return S.jsxs(S.Fragment,{children:[u==="ask_cim"&&S.jsx(CM,{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,`${j}-message-group`,e?"standalone":"embedded"),children:[c.messages.length>0&&c.messages.map(p=>S.jsx("div",{className:`${j}-message-group-child`,children:S.jsx(tS,{id:p.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),S.jsx(ru,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${c.eventSourceId}`)}else if(c.type==="individual"&&c.message)return S.jsx("div",{className:W(n,`${j}-message`,e?"standalone":"embedded",{error:c.message.name.includes("error")}),children:S.jsx(tS,{id:c.message.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:c.message,handleSuggestionClick:t})},c.message.id);return null})]})},G9=4e3,X9=e=>(typeof e=="string"?e:"").replace(/<[^>]*>/g," ").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/[`*_~#>|]+/g," ").replace(/\s+/g," ").trim().slice(0,G9),K9=({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:`${j}-visually-hidden`,role:"status","aria-atomic":"true",children:n})},Q9=()=>{const{groupedMessages:e}=$n(),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(K9,{message:n?X9(n.message):"",announcementKey:n==null?void 0:n.id})},J9=({isOpen:e}={})=>{const{messages:t}=Or(),{autoScroll:n}=nt(),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},Z9={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},vp=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:s})=>{const a=J9({isOpen:e});return S.jsxs(S.Fragment,{children:[S.jsx(W9,{isWidgetStandalone:t,handleSuggestionClick:r}),S.jsx(Q9,{}),n&&S.jsx("div",{style:B(B({},Z9),s),children:S.jsx(pc,{})}),S.jsx("div",{ref:a})]})},nS=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=nt(),{copilot:r,isLoading:s,handleUserInput:a,handleSuggestion:u,resetConversation:c}=Or();return mp()?r?S.jsxs("div",{className:W(e,`${j}-container`,`${j}-embedded-chat`),style:t,children:[S.jsx("div",{className:W(e,`${j}-message-container`,`container-${n}`,"embedded"),role:"region","aria-label":"Conversation",children:S.jsx(vp,{isWidgetStandalone:!1,isLoading:s,handleSuggestionClick:u})}),S.jsx(vh,{componentType:"chat",className:"embedded-chat",isLoading:s,onSubmit:a}),S.jsx("div",{className:W(`${j}-embedded-chat-menu`),children:S.jsxs(M8,{componentType:"chat",children:[S.jsx(S_,{componentType:"chat"}),S.jsx(Cb,{componentType:"chat",onClearChat:c})]})})]}):S.jsx("div",{children:"Loading Copilot..."}):null},rS=e=>{var d;const{children:t,disabled:n}=e,[r,s]=F.useState((d=e.container)==null?void 0:d.current),a=F.useSyncExternalStore(tB,()=>!1,()=>!0),{getRootNode:u}=lc();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:eB(u);return S.jsx(S.Fragment,{children:F.Children.map(t,f=>Xs.createPortal(f,c))})},eB=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return gs(n)?n:Dr(t).body},tB=()=>()=>{},iS=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=nt(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:c}=tr(),{copilot:d,isLoading:f,handleUserInput:p,handleSuggestion:m,resetConversation:T}=Or(),y=mp(),{isOpen:_}=s||{},A=r==="standalone",P=()=>{ti(!1),If()};return y?d?S.jsx(E_,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:y,initialFocusEl:Of,children:S.jsx(rS,{children:S.jsx(dp,{className:W(e,`${j}-container`,`${j}-dialog`,a,u&&"full-height"),style:B(B({},t),c&&{width:c}),children:S.jsxs(lp,{className:W(e,`${j}-dialog-content`,{standalone:A,embedded:!A}),children:[S.jsx(__,{componentType:"dialog",onClearChat:T,onClose:P}),S.jsx(cp,{className:W(e,`${j}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),role:"region","aria-label":"Conversation",children:S.jsx(vp,{isWidgetStandalone:A,isLoading:f,isOpen:_,handleSuggestionClick:m})}),S.jsx(vh,{componentType:"dialog",isLoading:f,onSubmit:p})]})})})}):S.jsx("div",{children:"Loading Copilot..."}):null},sS=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=nt(),{mode:r,status:s,isModalFullscreen:a}=tr(),{copilot:u,isLoading:c,handleUserInput:d,handleSuggestion:f,resetConversation:p}=Or(),{isOpen:m}=s||{},T=r==="standalone",y=mp(),_=({open:P})=>{if(P){ti(!0);return}A()},A=()=>{ti(!1),If()};return y?u?S.jsx(E_,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:_,initialFocusEl:Of,children:S.jsx(rS,{children:S.jsxs("div",{className:W(e,`${j}-modal-container`),style:t,children:[S.jsx(f_,{className:W(e,`${j}-modal-backdrop`)}),S.jsx(dp,{className:W(e,`${j}-container`,`${j}-modal`,{fullscreen:a,standalone:T,embedded:!T}),children:S.jsxs(lp,{className:W(e,`${j}-modal-content`,{standalone:T,embedded:!T}),children:[S.jsx(__,{componentType:"modal",onClearChat:p,onClose:A}),S.jsx(cp,{className:W(e,`${j}-message-container`,`container-${n}`,{standalone:T,embedded:!T}),role:"region","aria-label":"Conversation",children:S.jsx(vp,{isWidgetStandalone:T,isLoading:c,isOpen:m,handleSuggestionClick:f,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),S.jsx(vh,{componentType:"modal",isLoading:c,onSubmit:d})]})})]})})}):S.jsx("div",{children:"Loading Copilot..."}):null},nB=()=>{const e=tr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?S.jsx(cN,{}):t==="dialog"?S.jsx(iS,{}):t==="modal"?S.jsx(sS,{}):S.jsx(nS,{})},rB=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=Cf();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 yk(a),()=>{bk(a)}},[e,t,n,r,s])},iB=()=>{const{copilot:e}=$n(),{entryType:t,activePromptsId:n,params:r}=ni(),{setIsInitialized:s,setActivePromptsId:a,setPromptsMessage:u,setResponseMessage:c,setIsResponseLoading:d}=Cf(),{getCopilotSuggestions:f}=I1();rB();const p=F.useCallback(_=>{if(!t||!_)return;f(_,t,P=>{a(P.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},oS={copilot:"Ask Copilot",messaging:"Ask a question"},sB=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=nt(),{placeholder:s,isResponseLoading:a}=ni(),u=s||oS[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,`${j}-prompts-input-container`),name:`${j}-prompts-form`,onSubmit:p,children:[S.jsx("label",{htmlFor:`${j}-prompts-input`,"aria-label":u,children:S.jsx(up,{className:W(n,`${j}-prompts-input-icon`)})}),S.jsx("input",{id:`${j}-prompts-input`,className:W(n,`${j}-prompts-input`),name:`${j}-prompts-input`,placeholder:u,type:"text",disabled:f,value:c,onChange:m=>d(m.target.value)}),S.jsx(ri,{className:W(n,`${j}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:S.jsx(Ks,{}),disabled:f})]})},oB=()=>{const{globalClassName:e,mode:t}=nt(),{placeholder:n}=ni(),r=n||oS[t];return S.jsxs("div",{className:W(e,`${j}-prompts-header`),children:[S.jsx(up,{className:W(e,`${j}-prompts-input-icon`),"aria-hidden":"true"}),S.jsx("span",{className:W(e,`${j}-prompts-header-text`),children:r})]})},aS=({label:e,disabled:t=!1,onClick:n})=>{var c;const{globalClassName:r,suggestionButtonConfig:s}=nt(),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,`${j}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&S.jsx(gp,{icon:a,className:`${j}-suggestion-button-icon`}),S.jsx("span",{children:e})]})},aB="Ask me something else",uB=({label:e,disabled:t=!1})=>S.jsx(aS,{label:e||aB,disabled:t,onClick:()=>ti(!0)}),lB=({sendCopilotPrompt:e})=>{var P,w;const{globalClassName:t}=nt(),{promptsMessage:n,isResponseLoading:r,isInitialized:s,isInline:a,askElseButtonLabel:u,staticQuestions:c,staticQuestionsStrategy:d,disableAskElseButton:f}=ni(),p=s?(w=(P=n==null?void 0:n.suggestions)==null?void 0:P.map(C=>C.displayText.trim()).filter(Boolean))!=null?w:[]:[],m=s?z0(p,c,d):[],T=!s,_=m.length>0&&!a&&!f,A=C=>()=>{const v=C.trim();v&&e(v)};return S.jsxs("div",{className:W(t,`${j}-prompts-button-group`),children:[T&&S.jsx(pc,{}),m.map(C=>S.jsx(aS,{label:C,disabled:r,onClick:A(C)},C)),_&&S.jsx(uB,{label:u,disabled:r})]})},cB=()=>{const{globalClassName:e}=nt(),{isInline:t,userPrompt:n}=ni();return!n||!t?null:S.jsx("div",{className:W(e,`${j}-prompts-user-message-container`),children:S.jsx("p",{className:W(e,`${j}-prompts-user-message`),children:n})})},dB=()=>{const{globalClassName:e,openLinksInNewTab:t}=nt(),{isInline:n,responseMessage:r,isResponseLoading:s}=ni();return!n||!r&&!s?null:s?S.jsx(pc,{}):r?S.jsx("div",{className:W(e,`${j}-prompts-response-container`,`${j}-message-container`),children:S.jsx(Ap,{globalClassName:e,openLinksInNewTab:t,text:r.message})}):null},fB=()=>{const{globalClassName:e,themeVariables:t}=nt(),{connected:n,copilot:r}=$n(),{handleCopilotRequestAck:s}=Gs(),{status:{isOpen:a}}=tr(),{isOpen:u,isInline:c,elementId:d,entryType:f,params:p,promptsDisplay:m}=ni(),T=m!=="buttons",y=m!=="input",{setActivePromptsId:_,setUserPrompt:A,setResponseMessage:P,setIsResponseLoading:w}=Cf(),[C,v]=F.useState(null);F.useEffect(()=>{if(!d||C)return;const q=document.getElementById(d);q&&v(q)},[d,C]);const U=F.useCallback(q=>{if(!r||!f||!p)return;const L=ne=>{c?(P(null),A(q),_(ne.id),w(!0)):(a||ti(!0),s(ne))},V={userPrompt:q,clientContext:B({_cimEventSource:"prompts-extension"},c?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(V,L);break;case"search":r.search(B({searchParams:p},V),L);break;case"browse":r.browse(B({browseParams:p},V),L);break;case"pdp":r.productView(B(B({},p),V),L);break}},[r,c,f,p,a,_,P,A,w,s]);return!n||!u||!C||!f?null:Xs.createPortal(S.jsxs("div",{className:W(e,`${j}-prompts-extension-container`),style:t,children:[T&&S.jsx(sB,{onSubmit:U}),!T&&S.jsx(oB,{}),y&&S.jsx(lB,{sendCopilotPrompt:U}),S.jsxs("div",{className:W(e,`${j}-prompts-extension-messages-container`),children:[S.jsx(cB,{}),S.jsx(dB,{})]})]}),C)},hB=()=>S.jsxs(S.Fragment,{children:[S.jsx(iB,{}),S.jsx(fB,{})]}),Cp=e=>S.jsxs(R1,me(B({},e),{children:[S.jsx(nB,{}),S.jsx(hB,{})]}));var gc={},uS;function pB(){if(uS)return gc;uS=1;var e=B1();return gc.createRoot=e.createRoot,gc.hydrateRoot=e.hydrateRoot,gc}var lS=pB();const mB=r=>{var s=r,{elementId:e,timeout:t=5e3}=s,n=hn(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&&(Ws(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=lS.createRoot(T))==null||p.render(S.jsx(Cp,B({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ws(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c};return Object.freeze(Object.defineProperty({__proto__:null,CopilotDialog:iS,CopilotEmbed:nS,CopilotModal:sS,CopilotWidget:Cp,CopilotWidgetProvider:R1,eventHandlers:{search:Ok,browse:hk,pdp:{setPdpContext:y1,updatePdpProductId:mk,updatePdpLink:gk},components:{setEntryType:ga,toggleWidgetOpen:ti,toggleWidgetMinimized:Ea,toggleModalFullscreen:xf,setWidgetType:pl,setWidgetDialogPosition:wf,togglePromptsExtensionOpen:b1,togglePromptsExtensionInline:T1,loadPromptsComponent:wk,getAskCimPrompts:Tk,getSearchPrompts:_k,getBrowsePrompts:Sk,getProductViewPrompts:xk},session:Ak},injectCopilotWidget:r=>{var s=r,{timeout:e,elementId:t}=s,n=hn(s,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Ws(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Ws(!0,"warn","Container element not found for id:",t),Ws(!0,"warn","Beginning observation for element"),mB(B({elementId:t,timeout:e},n));return}lS.createRoot(a).render(S.jsx(Cp,B({},n)))},state:()=>Object.freeze({search:Object.freeze(Tt.state),browse:Object.freeze(ut.state),pdp:Object.freeze(hr.state),isConnected:Je.state.connected,isOpen:Je.isOpen,entryType:Je.entryType}),useCopilot:Or},Symbol.toStringTag,{value:"Module"}))}));