@cimulate/copilot-widget 1.20.0 → 1.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cimulate-copilot-widget.d.ts +7 -0
- package/dist/cimulate-copilot-widget.es.js +1148 -1145
- package/dist/cimulate-copilot-widget.umd.js +14 -14
- package/dist/copilot.es.js +1148 -1145
- package/dist/copilot.umd.js +13 -13
- package/dist/messaging.css +1 -1
- package/dist/messaging.d.ts +40 -1
- package/dist/messaging.es.js +9337 -9091
- package/dist/messaging.umd.js +32 -32
- package/package.json +1 -1
package/dist/copilot.umd.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
(function(De,$e){typeof exports=="object"&&typeof module!="undefined"?$e(exports):typeof define=="function"&&define.amd?define(["exports"],$e):(De=typeof globalThis!="undefined"?globalThis:De||self,$e(De.CimulateCopilot={}))})(this,(function(De){"use strict";var rU=Object.defineProperty,iU=Object.defineProperties;var oU=Object.getOwnPropertyDescriptors;var kd=Object.getOwnPropertySymbols;var Xw=Object.prototype.hasOwnProperty,Kw=Object.prototype.propertyIsEnumerable;var ia=(De,$e)=>($e=Symbol[De])?$e:Symbol.for("Symbol."+De),sU=De=>{throw TypeError(De)},oa=Math.pow,y0=(De,$e,Ze)=>$e in De?rU(De,$e,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):De[$e]=Ze,F=(De,$e)=>{for(var Ze in $e||($e={}))Xw.call($e,Ze)&&y0(De,Ze,$e[Ze]);if(kd)for(var Ze of kd($e))Kw.call($e,Ze)&&y0(De,Ze,$e[Ze]);return De},pe=(De,$e)=>iU(De,oU($e));var mn=(De,$e)=>{var Ze={};for(var ft in De)Xw.call(De,ft)&&$e.indexOf(ft)<0&&(Ze[ft]=De[ft]);if(De!=null&&kd)for(var ft of kd(De))$e.indexOf(ft)<0&&Kw.call(De,ft)&&(Ze[ft]=De[ft]);return Ze};var xe=(De,$e,Ze)=>y0(De,typeof $e!="symbol"?$e+"":$e,Ze);var Je=(De,$e,Ze)=>new Promise((ft,Rt)=>{var wt=Dt=>{try{Qt(Ze.next(Dt))}catch(Rn){Rt(Rn)}},Fe=Dt=>{try{Qt(Ze.throw(Dt))}catch(Rn){Rt(Rn)}},Qt=Dt=>Dt.done?ft(Dt.value):Promise.resolve(Dt.value).then(wt,Fe);Qt((Ze=Ze.apply(De,$e)).next())}),ii=function(De,$e){this[0]=De,this[1]=$e},Pd=(De,$e,Ze)=>{var ft=(Fe,Qt,Dt,Rn)=>{try{var Uo=Ze[Fe](Qt),sa=(Qt=Uo.value)instanceof ii,Nd=Uo.done;Promise.resolve(sa?Qt[0]:Qt).then(br=>sa?ft(Fe==="return"?Fe:"next",Qt[1]?{done:br.done,value:br.value}:br,Dt,Rn):Dt({value:br,done:Nd})).catch(br=>ft("throw",br,Dt,Rn))}catch(br){Rn(br)}},Rt=Fe=>wt[Fe]=Qt=>new Promise((Dt,Rn)=>ft(Fe,Qt,Dt,Rn)),wt={};return Ze=Ze.apply(De,$e),wt[ia("asyncIterator")]=()=>wt,Rt("next"),Rt("throw"),Rt("return"),wt},b0=De=>{var $e=De[ia("asyncIterator")],Ze=!1,ft,Rt={};return $e==null?($e=De[ia("iterator")](),ft=wt=>Rt[wt]=Fe=>$e[wt](Fe)):($e=$e.call(De),ft=wt=>Rt[wt]=Fe=>{if(Ze){if(Ze=!1,wt==="throw")throw Fe;return Fe}return Ze=!0,{done:!1,value:new ii(new Promise(Qt=>{var Dt=$e[wt](Fe);Dt instanceof Object||sU("Object expected"),Qt(Dt)}),1)}}),Rt[ia("iterator")]=()=>Rt,ft("next"),"throw"in $e?ft("throw"):Rt.throw=wt=>{throw wt},"return"in $e&&ft("return"),Rt},Qw=(De,$e,Ze)=>($e=De[ia("asyncIterator")])?$e.call(De):(De=De[ia("iterator")](),$e={},Ze=(ft,Rt)=>(Rt=De[ft])&&($e[ft]=wt=>new Promise((Fe,Qt,Dt)=>(wt=Rt.call(De,wt),Dt=wt.done,Promise.resolve(wt.value).then(Rn=>Fe({value:Rn,done:Dt}),Qt)))),Ze("next"),Ze("return"),$e);var $e=document.createElement("style");$e.textContent=`.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;height:auto;line-height:normal;background-color:transparent;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-cancel-button{color:#8a8a8a}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-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-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild($e);function Ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ft={exports:{}},Rt={},wt={exports:{}},Fe={};var Qt;function Dt(){if(Qt)return Fe;Qt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function T(L){return L===null||typeof L!="object"?null:(L=m&&L[m]||L["@@iterator"],typeof L=="function"?L:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,w={};function C(L,ee,O){this.props=L,this.context=ee,this.refs=w,this.updater=O||y}C.prototype.isReactComponent={},C.prototype.setState=function(L,ee){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,ee,"setState")},C.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function A(){}A.prototype=C.prototype;function P(L,ee,O){this.props=L,this.context=ee,this.refs=w,this.updater=O||y}var v=P.prototype=new A;v.constructor=P,_(v,C.prototype),v.isPureReactComponent=!0;var H=Array.isArray,Y=Object.prototype.hasOwnProperty,D={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function re(L,ee,O){var we,Ue={},Te=null,Be=null;if(ee!=null)for(we in ee.ref!==void 0&&(Be=ee.ref),ee.key!==void 0&&(Te=""+ee.key),ee)Y.call(ee,we)&&!q.hasOwnProperty(we)&&(Ue[we]=ee[we]);var Ve=arguments.length-2;if(Ve===1)Ue.children=O;else if(1<Ve){for(var Ge=Array(Ve),_t=0;_t<Ve;_t++)Ge[_t]=arguments[_t+2];Ue.children=Ge}if(L&&L.defaultProps)for(we in Ve=L.defaultProps,Ve)Ue[we]===void 0&&(Ue[we]=Ve[we]);return{$$typeof:e,type:L,key:Te,ref:Be,props:Ue,_owner:D.current}}function me(L,ee){return{$$typeof:e,type:L.type,key:ee,ref:L.ref,props:L.props,_owner:L._owner}}function V(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function se(L){var ee={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(O){return ee[O]})}var ce=/\/+/g;function de(L,ee){return typeof L=="object"&&L!==null&&L.key!=null?se(""+L.key):ee.toString(36)}function ne(L,ee,O,we,Ue){var Te=typeof L;(Te==="undefined"||Te==="boolean")&&(L=null);var Be=!1;if(L===null)Be=!0;else switch(Te){case"string":case"number":Be=!0;break;case"object":switch(L.$$typeof){case e:case t:Be=!0}}if(Be)return Be=L,Ue=Ue(Be),L=we===""?"."+de(Be,0):we,H(Ue)?(O="",L!=null&&(O=L.replace(ce,"$&/")+"/"),ne(Ue,ee,O,"",function(_t){return _t})):Ue!=null&&(V(Ue)&&(Ue=me(Ue,O+(!Ue.key||Be&&Be.key===Ue.key?"":(""+Ue.key).replace(ce,"$&/")+"/")+L)),ee.push(Ue)),1;if(Be=0,we=we===""?".":we+":",H(L))for(var Ve=0;Ve<L.length;Ve++){Te=L[Ve];var Ge=we+de(Te,Ve);Be+=ne(Te,ee,O,Ge,Ue)}else if(Ge=T(L),typeof Ge=="function")for(L=Ge.call(L),Ve=0;!(Te=L.next()).done;)Te=Te.value,Ge=we+de(Te,Ve++),Be+=ne(Te,ee,O,Ge,Ue);else if(Te==="object")throw ee=String(L),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.");return Be}function Ee(L,ee,O){if(L==null)return L;var we=[],Ue=0;return ne(L,we,"","",function(Te){return ee.call(O,Te,Ue++)}),we}function Oe(L){if(L._status===-1){var ee=L._result;ee=ee(),ee.then(function(O){(L._status===0||L._status===-1)&&(L._status=1,L._result=O)},function(O){(L._status===0||L._status===-1)&&(L._status=2,L._result=O)}),L._status===-1&&(L._status=0,L._result=ee)}if(L._status===1)return L._result.default;throw L._result}var oe={current:null},Q={transition:null},ie={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:Q,ReactCurrentOwner:D};function k(){throw Error("act(...) is not supported in production builds of React.")}return Fe.Children={map:Ee,forEach:function(L,ee,O){Ee(L,function(){ee.apply(this,arguments)},O)},count:function(L){var ee=0;return Ee(L,function(){ee++}),ee},toArray:function(L){return Ee(L,function(ee){return ee})||[]},only:function(L){if(!V(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},Fe.Component=C,Fe.Fragment=n,Fe.Profiler=o,Fe.PureComponent=P,Fe.StrictMode=r,Fe.Suspense=d,Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ie,Fe.act=k,Fe.cloneElement=function(L,ee,O){if(L==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var we=_({},L.props),Ue=L.key,Te=L.ref,Be=L._owner;if(ee!=null){if(ee.ref!==void 0&&(Te=ee.ref,Be=D.current),ee.key!==void 0&&(Ue=""+ee.key),L.type&&L.type.defaultProps)var Ve=L.type.defaultProps;for(Ge in ee)Y.call(ee,Ge)&&!q.hasOwnProperty(Ge)&&(we[Ge]=ee[Ge]===void 0&&Ve!==void 0?Ve[Ge]:ee[Ge])}var Ge=arguments.length-2;if(Ge===1)we.children=O;else if(1<Ge){Ve=Array(Ge);for(var _t=0;_t<Ge;_t++)Ve[_t]=arguments[_t+2];we.children=Ve}return{$$typeof:e,type:L.type,key:Ue,ref:Te,props:we,_owner:Be}},Fe.createContext=function(L){return L={$$typeof:u,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},L.Provider={$$typeof:a,_context:L},L.Consumer=L},Fe.createElement=re,Fe.createFactory=function(L){var ee=re.bind(null,L);return ee.type=L,ee},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(L){return{$$typeof:c,render:L}},Fe.isValidElement=V,Fe.lazy=function(L){return{$$typeof:p,_payload:{_status:-1,_result:L},_init:Oe}},Fe.memo=function(L,ee){return{$$typeof:f,type:L,compare:ee===void 0?null:ee}},Fe.startTransition=function(L){var ee=Q.transition;Q.transition={};try{L()}finally{Q.transition=ee}},Fe.unstable_act=k,Fe.useCallback=function(L,ee){return oe.current.useCallback(L,ee)},Fe.useContext=function(L){return oe.current.useContext(L)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(L){return oe.current.useDeferredValue(L)},Fe.useEffect=function(L,ee){return oe.current.useEffect(L,ee)},Fe.useId=function(){return oe.current.useId()},Fe.useImperativeHandle=function(L,ee,O){return oe.current.useImperativeHandle(L,ee,O)},Fe.useInsertionEffect=function(L,ee){return oe.current.useInsertionEffect(L,ee)},Fe.useLayoutEffect=function(L,ee){return oe.current.useLayoutEffect(L,ee)},Fe.useMemo=function(L,ee){return oe.current.useMemo(L,ee)},Fe.useReducer=function(L,ee,O){return oe.current.useReducer(L,ee,O)},Fe.useRef=function(L){return oe.current.useRef(L)},Fe.useState=function(L){return oe.current.useState(L)},Fe.useSyncExternalStore=function(L,ee,O){return oe.current.useSyncExternalStore(L,ee,O)},Fe.useTransition=function(){return oe.current.useTransition()},Fe.version="18.3.1",Fe}var Rn;function Uo(){return Rn||(Rn=1,wt.exports=Dt()),wt.exports}var sa;function Nd(){if(sa)return Rt;sa=1;var e=Uo(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,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:o.current}}return Rt.Fragment=n,Rt.jsx=u,Rt.jsxs=u,Rt}var br;function t2(){return br||(br=1,ft.exports=Nd()),ft.exports}var x=t2();const Mr=Object.create(null);Mr.open="0",Mr.close="1",Mr.ping="2",Mr.pong="3",Mr.message="4",Mr.upgrade="5",Mr.noop="6";const Vu=Object.create(null);Object.keys(Mr).forEach(e=>{Vu[Mr[e]]=e});const Od={type:"error",data:"parser error"},T0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",_0=typeof ArrayBuffer=="function",S0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Id=({type:e,data:t},n,r)=>T0&&t instanceof Blob?n?r(t):x0(t,r):_0&&(t instanceof ArrayBuffer||S0(t))?n?r(t):x0(new Blob([t]),r):r(Mr[e]+(t||"")),x0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function w0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Rd;function n2(e,t){if(T0&&e.data instanceof Blob)return e.data.arrayBuffer().then(w0).then(t);if(_0&&(e.data instanceof ArrayBuffer||S0(e.data)))return t(w0(e.data));Id(e,!1,n=>{Rd||(Rd=new TextEncoder),t(Rd.encode(n))})}const A0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",aa=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<A0.length;e++)aa[A0.charCodeAt(e)]=e;const r2=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=aa[e.charCodeAt(r)],u=aa[e.charCodeAt(r+1)],c=aa[e.charCodeAt(r+2)],d=aa[e.charCodeAt(r+3)],p[o++]=a<<2|u>>4,p[o++]=(u&15)<<4|c>>2,p[o++]=(c&3)<<6|d&63;return f},i2=typeof ArrayBuffer=="function",Ld=(e,t)=>{if(typeof e!="string")return{type:"message",data:v0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:o2(e.substring(1),t)}:Vu[n]?e.length>1?{type:Vu[n],data:e.substring(1)}:{type:Vu[n]}:Od},o2=(e,t)=>{if(i2){const n=r2(e);return v0(n,t)}else return{base64:!0,data:e}},v0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,C0="",s2=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{Id(a,!1,c=>{r[u]=c,++o===n&&t(r.join(C0))})})},a2=(e,t)=>{const n=e.split(C0),r=[];for(let o=0;o<n.length;o++){const a=Ld(n[o],t);if(r.push(a),a.type==="error")break}return r};function u2(){return new TransformStream({transform(e,t){n2(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let Dd;function qu(e){return e.reduce((t,n)=>t+n.length,0)}function Yu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function l2(e,t){Dd||(Dd=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(qu(n)<1)break;const d=Yu(n,1);a=(d[0]&128)===128,o=d[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(qu(n)<2)break;const d=Yu(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(qu(n)<8)break;const d=Yu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(Od);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(qu(n)<o)break;const d=Yu(n,o);c.enqueue(Ld(a?d:Dd.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(Od);break}}}})}const k0=4;function Ht(e){if(e)return c2(e)}function c2(e){for(var t in Ht.prototype)e[t]=Ht.prototype[t];return e}Ht.prototype.on=Ht.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ht.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ht.prototype.off=Ht.prototype.removeListener=Ht.prototype.removeAllListeners=Ht.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Ht.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},Ht.prototype.emitReserved=Ht.prototype.emit,Ht.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ht.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Wu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),ir=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),d2="arraybuffer";function aU(){}function P0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const f2=ir.setTimeout,h2=ir.clearTimeout;function Gu(e,t){t.useNativeTimers?(e.setTimeoutFn=f2.bind(ir),e.clearTimeoutFn=h2.bind(ir)):(e.setTimeoutFn=ir.setTimeout.bind(ir),e.clearTimeoutFn=ir.clearTimeout.bind(ir))}const p2=1.33;function m2(e){return typeof e=="string"?g2(e):Math.ceil((e.byteLength||e.size)*p2)}function g2(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function N0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function E2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function y2(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class b2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Md extends Ht{constructor(t){super(),this.writable=!1,Gu(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 b2(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=Ld(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=E2(t);return n.length?"?"+n:""}}class T2 extends Md{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)};a2(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,s2(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]=N0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let O0=!1;try{O0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const _2=O0;function S2(){}class x2 extends T2{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Fr extends Ht{constructor(t,n,r){super(),this.createRequest=t,Gu(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=P0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=Fr.requestsCount++,Fr.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=S2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Fr.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(Fr.requestsCount=0,Fr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",I0);else if(typeof addEventListener=="function"){const e="onpagehide"in ir?"pagehide":"unload";addEventListener(e,I0,!1)}}function I0(){for(let e in Fr.requests)Fr.requests.hasOwnProperty(e)&&Fr.requests[e].abort()}const w2=(function(){const e=R0({xdomain:!1});return e&&e.responseType!==null})();class A2 extends x2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=w2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Fr(R0,this.uri(),t)}}function R0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||_2))return new XMLHttpRequest}catch(n){}if(!t)try{return new ir[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const L0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class v2 extends Md{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=L0?{}:P0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;Id(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&Wu(()=>{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]=N0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Fd=ir.WebSocket||ir.MozWebSocket;class C2 extends v2{createSocket(t,n,r){return L0?new Fd(t,n,r):n?new Fd(t,n):new Fd(t)}doWrite(t,n){this.ws.send(n)}}class k2 extends Md{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=l2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=u2();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&Wu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const P2={websocket:C2,webtransport:k2,polling:A2},N2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,O2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Bd(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=N2.exec(e||""),a={},u=14;for(;u--;)a[O2[u]]=o[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=I2(a,a.path),a.queryKey=R2(a,a.query),a}function I2(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 R2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Ud=typeof addEventListener=="function"&&typeof removeEventListener=="function",Xu=[];Ud&&addEventListener("offline",()=>{Xu.forEach(e=>e())},!1);class Ai extends Ht{constructor(t,n){if(super(),this.binaryType=d2,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=Bd(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=Bd(n.host).host);Gu(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=y2(this.opts.query)),Ud&&(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"})},Xu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=k0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Ai.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Ai.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=m2(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Wu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Ai.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Ud&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Xu.indexOf(this._offlineEventListener);r!==-1&&Xu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ai.protocol=k0;class L2 extends Ai{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Ai.priorWebsocketSuccess=!1;const o=()=>{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;Ai.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",o),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",o),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 D2=class extends L2{constructor(t,n={}){const r=typeof t=="object",o=r?F({},t):F({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>P2[a]).filter(a=>!!a)),super(r?o:t,o)}};function M2(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=Bd(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 F2=typeof ArrayBuffer=="function",B2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,D0=Object.prototype.toString,U2=typeof Blob=="function"||typeof Blob!="undefined"&&D0.call(Blob)==="[object BlobConstructor]",H2=typeof File=="function"||typeof File!="undefined"&&D0.call(File)==="[object FileConstructor]";function Hd(e){return F2&&(e instanceof ArrayBuffer||B2(e))||U2&&e instanceof Blob||H2&&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(Hd(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 z2(e){const t=[],n=e.data,r=e;return r.data=zd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function zd(e,t){if(!e)return e;if(Hd(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=zd(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=zd(e[r],t));return n}return e}function j2(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")}else 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 $2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var nt;(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"})(nt||(nt={}));class V2{constructor(t){this.replacer=t}encode(t){return(t.type===nt.EVENT||t.type===nt.ACK)&&Ku(t)?this.encodeAsBinary({type:t.type===nt.EVENT?nt.BINARY_EVENT:nt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===nt.BINARY_EVENT||t.type===nt.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=z2(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class $d extends Ht{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===nt.BINARY_EVENT;r||n.type===nt.BINARY_ACK?(n.type=r?nt.EVENT:nt.ACK,this.reconstructor=new q2(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Hd(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(nt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===nt.BINARY_EVENT||r.type===nt.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(!Y2(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if($d.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case nt.CONNECT:return M0(n);case nt.DISCONNECT:return n===void 0;case nt.CONNECT_ERROR:return typeof n=="string"||M0(n);case nt.EVENT:case nt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&$2.indexOf(n[0])===-1);case nt.ACK:case nt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class q2{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=j2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Y2=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 W2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:$d,Encoder:V2,get PacketType(){return nt}},Symbol.toStringTag,{value:"Module"}));function Tr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const G2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class F0 extends Ht{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=[Tr(t,"open",this.onopen.bind(this)),Tr(t,"packet",this.onpacket.bind(this)),Tr(t,"error",this.onerror.bind(this)),Tr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,a;if(G2.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:nt.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=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,c)=>u?o(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:nt.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 nt.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 nt.EVENT:case nt.BINARY_EVENT:this.onevent(t);break;case nt.ACK:case nt.BINARY_ACK:this.onack(t);break;case nt.DISCONNECT:this.ondisconnect();break;case nt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:nt.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nt.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 Ho(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}Ho.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},Ho.prototype.reset=function(){this.attempts=0},Ho.prototype.setMin=function(e){this.ms=e},Ho.prototype.setMax=function(e){this.max=e},Ho.prototype.setJitter=function(e){this.jitter=e};class Vd extends Ht{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,Gu(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 Ho({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||W2;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new D2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Tr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=Tr(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Tr(t,"ping",this.onping.bind(this)),Tr(t,"data",this.ondata.bind(this)),Tr(t,"error",this.onerror.bind(this)),Tr(t,"close",this.onclose.bind(this)),Tr(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){Wu(()=>{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 F0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ua={};function Qu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=M2(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=ua[o]&&a in ua[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Vd(r,t):(ua[o]||(ua[o]=new Vd(r,t)),d=ua[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Qu,{Manager:Vd,Socket:F0,io:Qu,connect:Qu});var X2=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===K2})(t)})(e)},K2=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function la(e,t){return t.clone!==!1&&t.isMergeableObject(e)?zo((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Q2(e,t,n){return e.concat(t).map((function(r){return la(r,n)}))}function B0(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 U0(e,t){try{return t in e}catch(n){return!1}}function J2(e,t,n){var r={};return n.isMergeableObject(e)&&B0(e).forEach((function(o){r[o]=la(e[o],n)})),B0(t).forEach((function(o){(function(a,u){return U0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(U0(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,u){if(!u.customMerge)return zo;var c=u.customMerge(a);return typeof c=="function"?c:zo})(o,n)(e[o],t[o],n):r[o]=la(t[o],n))})),r}function zo(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Q2,n.isMergeableObject=n.isMergeableObject||X2,n.cloneUnlessOtherwiseSpecified=la;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):J2(e,t,n):la(t,n)}zo.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return zo(n,r,t)}),{})};var Z2=zo;let eA=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 o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,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 o=(n=n.slice(0)).length;r<o;++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 tA=typeof ArrayBuffer=="function",H0=Object.prototype.toString,nA=typeof Blob=="function"||typeof Blob!="undefined"&&H0.call(Blob)==="[object BlobConstructor]",rA=typeof File=="function"||typeof File!="undefined"&&H0.call(File)==="[object FileConstructor]";function qd(e){return tA&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||nA&&e instanceof Blob||rA&&e instanceof File}function Ju(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ju(e[n]))return!0;return!1}if(qd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ju(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ju(e[n]))return!0;return!1}function iA(e){const t=[],n=e.data,r=e;return r.data=Yd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Yd(e,t){if(!e)return e;if(qd(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]=Yd(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]=Yd(e[r],t));return n}return e}function oA(e,t){return e.data=Wd(e.data,t),delete e.attachments,e}function Wd(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]=Wd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Wd(e[n],t));return e}const sA=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Pt;(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"})(Pt||(Pt={}));class aA{constructor(t){this.replacer=t}encode(t){return t.type!==Pt.EVENT&&t.type!==Pt.ACK||!Ju(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Pt.EVENT?Pt.BINARY_EVENT:Pt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==Pt.BINARY_EVENT&&t.type!==Pt.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=iA(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Gd 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===Pt.BINARY_EVENT;r||n.type===Pt.BINARY_ACK?(n.type=r?Pt.EVENT:Pt.ACK,this.reconstructor=new uA(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!qd(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(Pt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Pt.BINARY_EVENT||r.type===Pt.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(!lA(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(!Gd.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 Pt.CONNECT:return z0(n);case Pt.DISCONNECT:return n===void 0;case Pt.CONNECT_ERROR:return typeof n=="string"||z0(n);case Pt.EVENT:case Pt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&sA.indexOf(n[0])===-1);case Pt.ACK:case Pt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class uA{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=oA(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const lA=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function z0(e){return Object.prototype.toString.call(e)==="[object Object]"}const j0=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],$0=(e,t,n)=>function r(o,a=[]){const u=Object.entries(o).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(o)?u.map((c=>c[1])):Object.fromEntries(u)},V0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),cA=$0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),j0),q0=$0(V0,V0,j0),dA={Encoder:class extends aA{encode(e){var t,n;return super.encode(pe(F({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],cA(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 Gd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?q0(r):r)):n instanceof Object?q0(n):n)):t))}}},fA={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class hA{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/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}${o}`,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=[fA,c,{parser:dA,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=Qu(d,Z2.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*oa(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 Je(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return Je(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return Je(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return Je(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return Je(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 Je(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return Je(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return Je(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return Je(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return Je(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return Je(this,null,function*(){return new Promise((r=>{this.socket.emit("conversation_events",t,(o=>{n&&n(o),r(o)}))}))})}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 Je(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const a=(function(u){return Pd(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new ii(u({emit:m=>{c.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new ii(new Promise((m=>{f=m})));for(;c.length>0;)yield c.shift()}finally{yield new ii(p==null?void 0:p())}})})((({emit:u,cancel:c})=>{const d=(f,p)=>{["done","error"].includes(p.name)&&c(),p.eventSourceId==o&&u(p)};return this.socket.onAny(d),()=>Je(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 eA(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}var B=Uo();const to=Ze(B);var Y0=Symbol.for("immer-nothing"),W0=Symbol.for("immer-draftable"),ut=Symbol.for("immer-state");function or(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var jo=Object.getPrototypeOf;function $o(e){return!!e&&!!e[ut]}function oi(e){var t;return e?G0(e)||Array.isArray(e)||!!e[W0]||!!((t=e.constructor)!=null&&t[W0])||el(e)||tl(e):!1}var pA=Object.prototype.constructor.toString();function G0(e){if(!e||typeof e!="object")return!1;const t=jo(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)===pA}function ca(e,t){Zu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Zu(e){const t=e[ut];return t?t.type_:Array.isArray(e)?1:el(e)?2:tl(e)?3:0}function Xd(e,t){return Zu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function X0(e,t,n){const r=Zu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function mA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function el(e){return e instanceof Map}function tl(e){return e instanceof Set}function Jt(e){return e.copy_||e.base_}function Kd(e,t){if(el(e))return new Map(e);if(tl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=G0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[ut];let o=Reflect.ownKeys(r);for(let a=0;a<o.length;a++){const u=o[a],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(jo(e),r)}else{const r=jo(e);if(r!==null&&n)return F({},e);const o=Object.create(r);return Object.assign(o,e)}}function Qd(e,t=!1){return nl(e)||$o(e)||!oi(e)||(Zu(e)>1&&(e.set=e.add=e.clear=e.delete=gA),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Qd(r,!0))),e}function gA(){or(2)}function nl(e){return Object.isFrozen(e)}var Jd={};function no(e){const t=Jd[e];return t||or(0,e),t}function EA(e,t){Jd[e]||(Jd[e]=t)}var da;function rl(){return da}function yA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function K0(e,t){t&&(no("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Zd(e){ef(e),e.drafts_.forEach(bA),e.drafts_=null}function ef(e){e===da&&(da=e.parent_)}function Q0(e){return da=yA(da,e)}function bA(e){const t=e[ut];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function J0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ut].modified_&&(Zd(t),or(4)),oi(e)&&(e=il(t,e),t.parent_||ol(t,e)),t.patches_&&no("Patches").generateReplacementPatches_(n[ut].base_,e,t.patches_,t.inversePatches_)):e=il(t,n,[]),Zd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Y0?e:void 0}function il(e,t,n){if(nl(t))return t;const r=t[ut];if(!r)return ca(t,(o,a)=>Z0(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return ol(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let a=o,u=!1;r.type_===3&&(a=new Set(o),o.clear(),u=!0),ca(a,(c,d)=>Z0(e,r,o,c,d,n,u)),ol(e,o,!1),n&&e.patches_&&no("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Z0(e,t,n,r,o,a,u){if($o(o)){const c=a&&t&&t.type_!==3&&!Xd(t.assigned_,r)?a.concat(r):void 0,d=il(e,o,c);if(X0(n,r,d),$o(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(oi(o)&&!nl(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;il(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&ol(e,o)}}function ol(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Qd(t,n)}function TA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:rl(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=tf;n&&(o=[r],a=fa);const{revoke:u,proxy:c}=Proxy.revocable(o,a);return r.draft_=c,r.revoke_=u,c}var tf={get(e,t){if(t===ut)return e;const n=Jt(e);if(!Xd(n,t))return _A(e,n,t);const r=n[t];return e.finalized_||!oi(r)?r:r===nf(e.base_,t)?(rf(e),e.copy_[t]=ha(r,e)):r},has(e,t){return t in Jt(e)},ownKeys(e){return Reflect.ownKeys(Jt(e))},set(e,t,n){const r=eg(Jt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=nf(Jt(e),t),a=o==null?void 0:o[ut];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(mA(n,o)&&(n!==void 0||Xd(e.base_,t)))return!0;rf(e),si(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 nf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,rf(e),si(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Jt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){or(11)},getPrototypeOf(e){return jo(e.base_)},setPrototypeOf(){or(12)}},fa={};ca(tf,(e,t)=>{fa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),fa.deleteProperty=function(e,t){return fa.set.call(this,e,t,void 0)},fa.set=function(e,t,n){return tf.set.call(this,e[0],t,n,e[0])};function nf(e,t){const n=e[ut];return(n?Jt(n):e)[t]}function _A(e,t,n){var o;const r=eg(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function eg(e,t){if(!(t in e))return;let n=jo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=jo(n)}}function si(e){e.modified_||(e.modified_=!0,e.parent_&&si(e.parent_))}function rf(e){e.copy_||(e.copy_=Kd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var SA=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&or(6),r!==void 0&&typeof r!="function"&&or(7);let o;if(oi(t)){const a=Q0(this),u=ha(t,void 0);let c=!0;try{o=n(u),c=!1}finally{c?Zd(a):ef(a)}return K0(a,r),J0(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Y0&&(o=void 0),this.autoFreeze_&&Qd(o,!0),r){const a=[],u=[];no("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else or(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,o;return[this.produce(t,n,(u,c)=>{r=u,o=c}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){oi(e)||or(8),$o(e)&&(e=xA(e));const t=Q0(this),n=ha(e,void 0);return n[ut].isManual_=!0,ef(t),n}finishDraft(e,t){const n=e&&e[ut];(!n||!n.isManual_)&&or(9);const{scope_:r}=n;return K0(r,t),J0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=no("Patches").applyPatches_;return $o(e)?r(e,t):this.produce(e,o=>r(o,t))}};function ha(e,t){const n=el(e)?no("MapSet").proxyMap_(e,t):tl(e)?no("MapSet").proxySet_(e,t):TA(e,t);return(t?t.scope_:rl()).drafts_.push(n),n}function xA(e){return $o(e)||or(10,e),tg(e)}function tg(e){if(!oi(e)||nl(e))return e;const t=e[ut];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Kd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Kd(e,!0);return ca(n,(r,o)=>{X0(n,r,tg(o))}),t&&(t.finalized_=!1),n}function wA(){class e extends Map{constructor(d,f){super(),this[ut]={type_:2,parent_:f,scope_:f?f.scope_:rl(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Jt(this[ut]).size}has(d){return Jt(this[ut]).has(d)}set(d,f){const p=this[ut];return u(p),(!Jt(p).has(d)||Jt(p).get(d)!==f)&&(n(p),si(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[ut];return u(f),n(f),si(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[ut];u(d),Jt(d).size&&(n(d),si(d),d.assigned_=new Map,ca(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[ut];Jt(p).forEach((m,T,y)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[ut];u(f);const p=Jt(f).get(d);if(f.finalized_||!oi(p)||p!==f.base_.get(d))return p;const m=ha(p,f);return n(f),f.copy_.set(d,m),m}keys(){return Jt(this[ut]).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[ut]={type_:3,parent_:f,scope_:f?f.scope_:rl(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Jt(this[ut]).size}has(d){const f=this[ut];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[ut];return u(f),this.has(d)||(a(f),si(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[ut];return u(f),a(f),si(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[ut];u(d),Jt(d).size&&(a(d),si(d),d.copy_.clear())}values(){const d=this[ut];return u(d),a(d),d.copy_.values()}entries(){const d=this[ut];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 o(c,d){return new r(c,d)}function a(c){c.copy_||(c.copy_=new Set,c.base_.forEach(d=>{if(oi(d)){const f=ha(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&or(3,JSON.stringify(Jt(c)))}EA("MapSet",{proxyMap_:t,proxySet_:o})}var Yn=new SA,AA=Yn.produce;Yn.produceWithPatches.bind(Yn),Yn.setAutoFreeze.bind(Yn),Yn.setUseStrictShallowCopy.bind(Yn),Yn.applyPatches.bind(Yn),Yn.createDraft.bind(Yn),Yn.finishDraft.bind(Yn);function ng(e,t,n){var r=B.useMemo(function(){return AA(e)},[e]);return B.useReducer(r,t,n)}const rg={PAGE_CHANGED:"page-changed",PAGE_SIZE_CHANGED:"page-size-changed",FACET_FILTERS_CHANGED:"facet-filters-changed",RANGE_FILTERS_CHANGED:"range-filters-changed",CATALOG_SEGMENT_CHANGED:"catalog-segment-changed",PRICEBOOKS_CHANGED:"pricebooks-changed"},mt={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",ADD_LOADING_MESSAGE:"ADD_LOADING_MESSAGE",REMOVE_LOADING_MESSAGE:"REMOVE_LOADING_MESSAGE",SET_ACTIVE_CONVERSATION_ID:"SET_ACTIVE_CONVERSATION_ID",ADD_CONVERSATION_ID:"ADD_CONVERSATION_ID",SET_CONVERSATION_IDS:"SET_CONVERSATION_IDS",SET_CONVERSATION_HISTORY_LOADED:"SET_CONVERSATION_HISTORY_LOADED",SET_IMAGE_FILE:"SET_IMAGE_FILE",SET_ASK_CIM_PROMPTS:"SET_ASK_CIM_PROMPTS"},ro={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},vA=e=>{switch(!0){case e==="copilot_search":return"search";case e==="copilot_browse":return"browse";case e==="product_view":return"pdp";case e==="ask_cim":return"ask_cim";default:return null}},Vo="cimulate",of=`${Vo}:pdp-update`,sf=`${Vo}:browse-update`,af=`${Vo}:search-update`,uf=`${Vo}:ui-state-update`,lf=`${Vo}:prompts-state-update`,cf=`${Vo}:session-state`,Br=F({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},rg),CA={"browse-context":Br.CONTEXT_UPDATED,categoryId:Br.CATEGORY_ID_CHANGED,categoryName:Br.CATEGORY_NAME_CHANGED,page:Br.PAGE_CHANGED,pageSize:Br.PAGE_SIZE_CHANGED,includeFacets:Br.FACET_FILTERS_CHANGED,facetFilters:Br.FACET_FILTERS_CHANGED,rangeFilters:Br.RANGE_FILTERS_CHANGED,catalogSegment:Br.CATALOG_SEGMENT_CHANGED,pricebooks:Br.PRICEBOOKS_CHANGED},ai=F({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},rg),kA={"search-context":ai.SEARCH_CONTEXT_UPDATED,query:ai.QUERY_CHANGED,page:ai.PAGE_CHANGED,pageSize:ai.PAGE_SIZE_CHANGED,includeFacets:ai.FACET_FILTERS_CHANGED,facetFilters:ai.FACET_FILTERS_CHANGED,rangeFilters:ai.RANGE_FILTERS_CHANGED,catalogSegment:ai.CATALOG_SEGMENT_CHANGED,pricebooks:ai.PRICEBOOKS_CHANGED},z="cim-widget",Wn=`--${z}`,vi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},PA=(e=vi)=>({[`${Wn}-primary-color`]:e.primaryColor||vi.primaryColor,[`${Wn}-secondary-color`]:e.secondaryColor||vi.secondaryColor,[`${Wn}-font-color`]:e.fontColor||vi.fontColor,[`${Wn}-font-family`]:e.fontFamily||vi.fontFamily,[`${Wn}-background-color`]:e.backgroundColor||vi.backgroundColor,[`${Wn}-border-color`]:e.borderColor||vi.borderColor,[`${Wn}-border-radius`]:e.borderRadius||vi.borderRadius}),Ci={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},ig=B.createContext(null),og=B.createContext(null);function sg(e,t){return function(){return e.apply(t,arguments)}}const{toString:NA}=Object.prototype,{getPrototypeOf:qo}=Object,{iterator:pa,toStringTag:ag}=Symbol,sl=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ma=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),sl(n,t))return!0;n=qo(n)}return!1},OA=(e,t)=>e!=null&&ma(e,t)?e[t]:void 0,df=(e=>t=>{const n=NA.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),_r=e=>(e=e.toLowerCase(),t=>df(t)===e),al=e=>t=>typeof t===e,{isArray:io}=Array,Yo=al("undefined");function Wo(e){return e!==null&&!Yo(e)&&e.constructor!==null&&!Yo(e.constructor)&&Ln(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ug=_r("ArrayBuffer");function IA(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ug(e.buffer),t}const RA=al("string"),Ln=al("function"),lg=al("number"),Go=e=>e!==null&&typeof e=="object",LA=e=>e===!0||e===!1,ul=e=>{if(!Go(e))return!1;const t=qo(e);return(t===null||t===Object.prototype||qo(t)===null)&&!ma(e,ag)&&!ma(e,pa)},DA=e=>{if(!Go(e)||Wo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},MA=_r("Date"),FA=_r("File"),BA=e=>!!(e&&typeof e.uri!="undefined"),UA=e=>e&&typeof e.getParts!="undefined",HA=_r("Blob"),zA=_r("FileList"),jA=e=>Go(e)&&Ln(e.pipe);function $A(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const cg=$A(),dg=typeof cg.FormData!="undefined"?cg.FormData:void 0,VA=e=>{if(!e)return!1;if(dg&&e instanceof dg)return!0;const t=qo(e);if(!t||t===Object.prototype||!Ln(e.append))return!1;const n=df(e);return n==="formdata"||n==="object"&&Ln(e.toString)&&e.toString()==="[object FormData]"},qA=_r("URLSearchParams"),[YA,WA,GA,XA]=["ReadableStream","Request","Response","Headers"].map(_r),KA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ga(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),io(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Wo(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 fg(e,t){if(Wo(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const oo=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,hg=e=>!Yo(e)&&e!==oo;function ff(...e){const{caseless:t,skipUndefined:n}=hg(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&typeof u=="string"&&fg(r,u)||u,d=sl(r,c)?r[c]:void 0;ul(d)&&ul(a)?r[c]=ff(d,a):ul(a)?r[c]=ff({},a):io(a)?r[c]=a.slice():(!n||!Yo(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++){const c=e[a];if(!c||Wo(c)||(ga(c,o),typeof c!="object"||io(c)))continue;const d=Object.getOwnPropertySymbols(c);for(let f=0;f<d.length;f++){const p=d[f];uv.call(c,p)&&o(c[p],p)}}return r}const QA=(e,t,n,{allOwnKeys:r}={})=>(ga(t,(o,a)=>{n&&Ln(o)?Object.defineProperty(e,a,{__proto__:null,value:sg(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),JA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ZA=(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)},ev=(e,t,n,r)=>{let o,a,u;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&qo(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},tv=(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},nv=e=>{if(!e)return null;if(io(e))return e;let t=e.length;if(!lg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},rv=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&qo(Uint8Array)),iv=(e,t)=>{const r=(e&&e[pa]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},ov=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},sv=_r("HTMLFormElement"),av=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),{propertyIsEnumerable:uv}=Object.prototype,lv=_r("RegExp"),pg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ga(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},cv=e=>{pg(e,(t,n)=>{if(Ln(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Ln(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},dv=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return io(e)?r(e):r(String(e).split(t)),n},fv=()=>{},hv=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function pv(e){return!!(e&&Ln(e.append)&&e[ag]==="FormData"&&e[pa])}const mv=e=>{const t=new WeakSet,n=r=>{if(Go(r)){if(t.has(r))return;if(Wo(r))return r;if(!("toJSON"in r)){t.add(r);const o=io(r)?[]:{};return ga(r,(a,u)=>{const c=n(a);!Yo(c)&&(o[u]=c)}),t.delete(r),o}}return r};return n(e)},gv=_r("AsyncFunction"),Ev=e=>e&&(Go(e)||Ln(e))&&Ln(e.then)&&Ln(e.catch),mg=((e,t)=>e?setImmediate:t?((n,r)=>(oo.addEventListener("message",({source:o,data:a})=>{o===oo&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),oo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ln(oo.postMessage)),yv=typeof queueMicrotask!="undefined"?queueMicrotask.bind(oo):typeof process!="undefined"&&process.nextTick||mg,gg=e=>e!=null&&Ln(e[pa]),$={isArray:io,isArrayBuffer:ug,isBuffer:Wo,isFormData:VA,isArrayBufferView:IA,isString:RA,isNumber:lg,isBoolean:LA,isObject:Go,isPlainObject:ul,isEmptyObject:DA,isReadableStream:YA,isRequest:WA,isResponse:GA,isHeaders:XA,isUndefined:Yo,isDate:MA,isFile:FA,isReactNativeBlob:BA,isReactNative:UA,isBlob:HA,isRegExp:lv,isFunction:Ln,isStream:jA,isURLSearchParams:qA,isTypedArray:rv,isFileList:zA,forEach:ga,merge:ff,extend:QA,trim:KA,stripBOM:JA,inherits:ZA,toFlatObject:ev,kindOf:df,kindOfTest:_r,endsWith:tv,toArray:nv,forEachEntry:iv,matchAll:ov,isHTMLForm:sv,hasOwnProperty:sl,hasOwnProp:sl,hasOwnInPrototypeChain:ma,getSafeProp:OA,reduceDescriptors:pg,freezeMethods:cv,toObjectSet:dv,toCamelCase:av,noop:fv,toFiniteNumber:hv,findKey:fg,global:oo,isContextDefined:hg,isSpecCompliantForm:pv,toJSONObject:mv,isAsyncFn:gv,isThenable:Ev,setImmediate:mg,asap:yv,isIterable:gg,isSafeIterable:e=>e!=null&&ma(e,pa)&&gg(e)},bv=$.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"]),Tv=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
1
|
+
(function(De,$e){typeof exports=="object"&&typeof module!="undefined"?$e(exports):typeof define=="function"&&define.amd?define(["exports"],$e):(De=typeof globalThis!="undefined"?globalThis:De||self,$e(De.CimulateCopilot={}))})(this,(function(De){"use strict";var rU=Object.defineProperty,iU=Object.defineProperties;var oU=Object.getOwnPropertyDescriptors;var kd=Object.getOwnPropertySymbols;var Xw=Object.prototype.hasOwnProperty,Kw=Object.prototype.propertyIsEnumerable;var ia=(De,$e)=>($e=Symbol[De])?$e:Symbol.for("Symbol."+De),sU=De=>{throw TypeError(De)},oa=Math.pow,y0=(De,$e,Ze)=>$e in De?rU(De,$e,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):De[$e]=Ze,F=(De,$e)=>{for(var Ze in $e||($e={}))Xw.call($e,Ze)&&y0(De,Ze,$e[Ze]);if(kd)for(var Ze of kd($e))Kw.call($e,Ze)&&y0(De,Ze,$e[Ze]);return De},pe=(De,$e)=>iU(De,oU($e));var mn=(De,$e)=>{var Ze={};for(var ft in De)Xw.call(De,ft)&&$e.indexOf(ft)<0&&(Ze[ft]=De[ft]);if(De!=null&&kd)for(var ft of kd(De))$e.indexOf(ft)<0&&Kw.call(De,ft)&&(Ze[ft]=De[ft]);return Ze};var we=(De,$e,Ze)=>y0(De,typeof $e!="symbol"?$e+"":$e,Ze);var Je=(De,$e,Ze)=>new Promise((ft,Rt)=>{var wt=Dt=>{try{Qt(Ze.next(Dt))}catch(Rn){Rt(Rn)}},Fe=Dt=>{try{Qt(Ze.throw(Dt))}catch(Rn){Rt(Rn)}},Qt=Dt=>Dt.done?ft(Dt.value):Promise.resolve(Dt.value).then(wt,Fe);Qt((Ze=Ze.apply(De,$e)).next())}),ii=function(De,$e){this[0]=De,this[1]=$e},Pd=(De,$e,Ze)=>{var ft=(Fe,Qt,Dt,Rn)=>{try{var Uo=Ze[Fe](Qt),sa=(Qt=Uo.value)instanceof ii,Nd=Uo.done;Promise.resolve(sa?Qt[0]:Qt).then(br=>sa?ft(Fe==="return"?Fe:"next",Qt[1]?{done:br.done,value:br.value}:br,Dt,Rn):Dt({value:br,done:Nd})).catch(br=>ft("throw",br,Dt,Rn))}catch(br){Rn(br)}},Rt=Fe=>wt[Fe]=Qt=>new Promise((Dt,Rn)=>ft(Fe,Qt,Dt,Rn)),wt={};return Ze=Ze.apply(De,$e),wt[ia("asyncIterator")]=()=>wt,Rt("next"),Rt("throw"),Rt("return"),wt},b0=De=>{var $e=De[ia("asyncIterator")],Ze=!1,ft,Rt={};return $e==null?($e=De[ia("iterator")](),ft=wt=>Rt[wt]=Fe=>$e[wt](Fe)):($e=$e.call(De),ft=wt=>Rt[wt]=Fe=>{if(Ze){if(Ze=!1,wt==="throw")throw Fe;return Fe}return Ze=!0,{done:!1,value:new ii(new Promise(Qt=>{var Dt=$e[wt](Fe);Dt instanceof Object||sU("Object expected"),Qt(Dt)}),1)}}),Rt[ia("iterator")]=()=>Rt,ft("next"),"throw"in $e?ft("throw"):Rt.throw=wt=>{throw wt},"return"in $e&&ft("return"),Rt},Qw=(De,$e,Ze)=>($e=De[ia("asyncIterator")])?$e.call(De):(De=De[ia("iterator")](),$e={},Ze=(ft,Rt)=>(Rt=De[ft])&&($e[ft]=wt=>new Promise((Fe,Qt,Dt)=>(wt=Rt.call(De,wt),Dt=wt.done,Promise.resolve(wt.value).then(Rn=>Fe({value:Rn,done:Dt}),Qt)))),Ze("next"),Ze("return"),$e);var $e=document.createElement("style");$e.textContent=`.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;height:auto;line-height:normal;background-color:transparent;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-cancel-button{color:#8a8a8a}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-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-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild($e);function Ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ft={exports:{}},Rt={},wt={exports:{}},Fe={};var Qt;function Dt(){if(Qt)return Fe;Qt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function T(L){return L===null||typeof L!="object"?null:(L=m&&L[m]||L["@@iterator"],typeof L=="function"?L:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,w={};function C(L,ee,I){this.props=L,this.context=ee,this.refs=w,this.updater=I||y}C.prototype.isReactComponent={},C.prototype.setState=function(L,ee){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,ee,"setState")},C.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function A(){}A.prototype=C.prototype;function P(L,ee,I){this.props=L,this.context=ee,this.refs=w,this.updater=I||y}var v=P.prototype=new A;v.constructor=P,_(v,C.prototype),v.isPureReactComponent=!0;var H=Array.isArray,Y=Object.prototype.hasOwnProperty,D={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function re(L,ee,I){var Se,je={},Ee=null,Be=null;if(ee!=null)for(Se in ee.ref!==void 0&&(Be=ee.ref),ee.key!==void 0&&(Ee=""+ee.key),ee)Y.call(ee,Se)&&!q.hasOwnProperty(Se)&&(je[Se]=ee[Se]);var Ve=arguments.length-2;if(Ve===1)je.children=I;else if(1<Ve){for(var Ge=Array(Ve),_t=0;_t<Ve;_t++)Ge[_t]=arguments[_t+2];je.children=Ge}if(L&&L.defaultProps)for(Se in Ve=L.defaultProps,Ve)je[Se]===void 0&&(je[Se]=Ve[Se]);return{$$typeof:e,type:L,key:Ee,ref:Be,props:je,_owner:D.current}}function me(L,ee){return{$$typeof:e,type:L.type,key:ee,ref:L.ref,props:L.props,_owner:L._owner}}function V(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function oe(L){var ee={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(I){return ee[I]})}var ce=/\/+/g;function de(L,ee){return typeof L=="object"&&L!==null&&L.key!=null?oe(""+L.key):ee.toString(36)}function ne(L,ee,I,Se,je){var Ee=typeof L;(Ee==="undefined"||Ee==="boolean")&&(L=null);var Be=!1;if(L===null)Be=!0;else switch(Ee){case"string":case"number":Be=!0;break;case"object":switch(L.$$typeof){case e:case t:Be=!0}}if(Be)return Be=L,je=je(Be),L=Se===""?"."+de(Be,0):Se,H(je)?(I="",L!=null&&(I=L.replace(ce,"$&/")+"/"),ne(je,ee,I,"",function(_t){return _t})):je!=null&&(V(je)&&(je=me(je,I+(!je.key||Be&&Be.key===je.key?"":(""+je.key).replace(ce,"$&/")+"/")+L)),ee.push(je)),1;if(Be=0,Se=Se===""?".":Se+":",H(L))for(var Ve=0;Ve<L.length;Ve++){Ee=L[Ve];var Ge=Se+de(Ee,Ve);Be+=ne(Ee,ee,I,Ge,je)}else if(Ge=T(L),typeof Ge=="function")for(L=Ge.call(L),Ve=0;!(Ee=L.next()).done;)Ee=Ee.value,Ge=Se+de(Ee,Ve++),Be+=ne(Ee,ee,I,Ge,je);else if(Ee==="object")throw ee=String(L),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.");return Be}function Te(L,ee,I){if(L==null)return L;var Se=[],je=0;return ne(L,Se,"","",function(Ee){return ee.call(I,Ee,je++)}),Se}function Pe(L){if(L._status===-1){var ee=L._result;ee=ee(),ee.then(function(I){(L._status===0||L._status===-1)&&(L._status=1,L._result=I)},function(I){(L._status===0||L._status===-1)&&(L._status=2,L._result=I)}),L._status===-1&&(L._status=0,L._result=ee)}if(L._status===1)return L._result.default;throw L._result}var se={current:null},K={transition:null},ie={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:K,ReactCurrentOwner:D};function k(){throw Error("act(...) is not supported in production builds of React.")}return Fe.Children={map:Te,forEach:function(L,ee,I){Te(L,function(){ee.apply(this,arguments)},I)},count:function(L){var ee=0;return Te(L,function(){ee++}),ee},toArray:function(L){return Te(L,function(ee){return ee})||[]},only:function(L){if(!V(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},Fe.Component=C,Fe.Fragment=n,Fe.Profiler=o,Fe.PureComponent=P,Fe.StrictMode=r,Fe.Suspense=d,Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ie,Fe.act=k,Fe.cloneElement=function(L,ee,I){if(L==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var Se=_({},L.props),je=L.key,Ee=L.ref,Be=L._owner;if(ee!=null){if(ee.ref!==void 0&&(Ee=ee.ref,Be=D.current),ee.key!==void 0&&(je=""+ee.key),L.type&&L.type.defaultProps)var Ve=L.type.defaultProps;for(Ge in ee)Y.call(ee,Ge)&&!q.hasOwnProperty(Ge)&&(Se[Ge]=ee[Ge]===void 0&&Ve!==void 0?Ve[Ge]:ee[Ge])}var Ge=arguments.length-2;if(Ge===1)Se.children=I;else if(1<Ge){Ve=Array(Ge);for(var _t=0;_t<Ge;_t++)Ve[_t]=arguments[_t+2];Se.children=Ve}return{$$typeof:e,type:L.type,key:je,ref:Ee,props:Se,_owner:Be}},Fe.createContext=function(L){return L={$$typeof:u,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},L.Provider={$$typeof:a,_context:L},L.Consumer=L},Fe.createElement=re,Fe.createFactory=function(L){var ee=re.bind(null,L);return ee.type=L,ee},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(L){return{$$typeof:c,render:L}},Fe.isValidElement=V,Fe.lazy=function(L){return{$$typeof:p,_payload:{_status:-1,_result:L},_init:Pe}},Fe.memo=function(L,ee){return{$$typeof:f,type:L,compare:ee===void 0?null:ee}},Fe.startTransition=function(L){var ee=K.transition;K.transition={};try{L()}finally{K.transition=ee}},Fe.unstable_act=k,Fe.useCallback=function(L,ee){return se.current.useCallback(L,ee)},Fe.useContext=function(L){return se.current.useContext(L)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(L){return se.current.useDeferredValue(L)},Fe.useEffect=function(L,ee){return se.current.useEffect(L,ee)},Fe.useId=function(){return se.current.useId()},Fe.useImperativeHandle=function(L,ee,I){return se.current.useImperativeHandle(L,ee,I)},Fe.useInsertionEffect=function(L,ee){return se.current.useInsertionEffect(L,ee)},Fe.useLayoutEffect=function(L,ee){return se.current.useLayoutEffect(L,ee)},Fe.useMemo=function(L,ee){return se.current.useMemo(L,ee)},Fe.useReducer=function(L,ee,I){return se.current.useReducer(L,ee,I)},Fe.useRef=function(L){return se.current.useRef(L)},Fe.useState=function(L){return se.current.useState(L)},Fe.useSyncExternalStore=function(L,ee,I){return se.current.useSyncExternalStore(L,ee,I)},Fe.useTransition=function(){return se.current.useTransition()},Fe.version="18.3.1",Fe}var Rn;function Uo(){return Rn||(Rn=1,wt.exports=Dt()),wt.exports}var sa;function Nd(){if(sa)return Rt;sa=1;var e=Uo(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,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:o.current}}return Rt.Fragment=n,Rt.jsx=u,Rt.jsxs=u,Rt}var br;function t2(){return br||(br=1,ft.exports=Nd()),ft.exports}var x=t2();const Mr=Object.create(null);Mr.open="0",Mr.close="1",Mr.ping="2",Mr.pong="3",Mr.message="4",Mr.upgrade="5",Mr.noop="6";const Vu=Object.create(null);Object.keys(Mr).forEach(e=>{Vu[Mr[e]]=e});const Od={type:"error",data:"parser error"},T0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",_0=typeof ArrayBuffer=="function",S0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Id=({type:e,data:t},n,r)=>T0&&t instanceof Blob?n?r(t):x0(t,r):_0&&(t instanceof ArrayBuffer||S0(t))?n?r(t):x0(new Blob([t]),r):r(Mr[e]+(t||"")),x0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function w0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Rd;function n2(e,t){if(T0&&e.data instanceof Blob)return e.data.arrayBuffer().then(w0).then(t);if(_0&&(e.data instanceof ArrayBuffer||S0(e.data)))return t(w0(e.data));Id(e,!1,n=>{Rd||(Rd=new TextEncoder),t(Rd.encode(n))})}const A0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",aa=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<A0.length;e++)aa[A0.charCodeAt(e)]=e;const r2=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=aa[e.charCodeAt(r)],u=aa[e.charCodeAt(r+1)],c=aa[e.charCodeAt(r+2)],d=aa[e.charCodeAt(r+3)],p[o++]=a<<2|u>>4,p[o++]=(u&15)<<4|c>>2,p[o++]=(c&3)<<6|d&63;return f},i2=typeof ArrayBuffer=="function",Ld=(e,t)=>{if(typeof e!="string")return{type:"message",data:v0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:o2(e.substring(1),t)}:Vu[n]?e.length>1?{type:Vu[n],data:e.substring(1)}:{type:Vu[n]}:Od},o2=(e,t)=>{if(i2){const n=r2(e);return v0(n,t)}else return{base64:!0,data:e}},v0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,C0="",s2=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{Id(a,!1,c=>{r[u]=c,++o===n&&t(r.join(C0))})})},a2=(e,t)=>{const n=e.split(C0),r=[];for(let o=0;o<n.length;o++){const a=Ld(n[o],t);if(r.push(a),a.type==="error")break}return r};function u2(){return new TransformStream({transform(e,t){n2(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let Dd;function qu(e){return e.reduce((t,n)=>t+n.length,0)}function Yu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function l2(e,t){Dd||(Dd=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(qu(n)<1)break;const d=Yu(n,1);a=(d[0]&128)===128,o=d[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(qu(n)<2)break;const d=Yu(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(qu(n)<8)break;const d=Yu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(Od);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(qu(n)<o)break;const d=Yu(n,o);c.enqueue(Ld(a?d:Dd.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(Od);break}}}})}const k0=4;function Ht(e){if(e)return c2(e)}function c2(e){for(var t in Ht.prototype)e[t]=Ht.prototype[t];return e}Ht.prototype.on=Ht.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ht.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ht.prototype.off=Ht.prototype.removeListener=Ht.prototype.removeAllListeners=Ht.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Ht.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},Ht.prototype.emitReserved=Ht.prototype.emit,Ht.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ht.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Wu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),ir=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),d2="arraybuffer";function aU(){}function P0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const f2=ir.setTimeout,h2=ir.clearTimeout;function Gu(e,t){t.useNativeTimers?(e.setTimeoutFn=f2.bind(ir),e.clearTimeoutFn=h2.bind(ir)):(e.setTimeoutFn=ir.setTimeout.bind(ir),e.clearTimeoutFn=ir.clearTimeout.bind(ir))}const p2=1.33;function m2(e){return typeof e=="string"?g2(e):Math.ceil((e.byteLength||e.size)*p2)}function g2(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function N0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function E2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function y2(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class b2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Md extends Ht{constructor(t){super(),this.writable=!1,Gu(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 b2(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=Ld(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=E2(t);return n.length?"?"+n:""}}class T2 extends Md{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)};a2(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,s2(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]=N0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let O0=!1;try{O0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const _2=O0;function S2(){}class x2 extends T2{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Fr extends Ht{constructor(t,n,r){super(),this.createRequest=t,Gu(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=P0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=Fr.requestsCount++,Fr.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=S2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Fr.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(Fr.requestsCount=0,Fr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",I0);else if(typeof addEventListener=="function"){const e="onpagehide"in ir?"pagehide":"unload";addEventListener(e,I0,!1)}}function I0(){for(let e in Fr.requests)Fr.requests.hasOwnProperty(e)&&Fr.requests[e].abort()}const w2=(function(){const e=R0({xdomain:!1});return e&&e.responseType!==null})();class A2 extends x2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=w2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Fr(R0,this.uri(),t)}}function R0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||_2))return new XMLHttpRequest}catch(n){}if(!t)try{return new ir[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const L0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class v2 extends Md{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=L0?{}:P0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;Id(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&Wu(()=>{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]=N0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Fd=ir.WebSocket||ir.MozWebSocket;class C2 extends v2{createSocket(t,n,r){return L0?new Fd(t,n,r):n?new Fd(t,n):new Fd(t)}doWrite(t,n){this.ws.send(n)}}class k2 extends Md{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=l2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=u2();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&Wu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const P2={websocket:C2,webtransport:k2,polling:A2},N2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,O2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Bd(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=N2.exec(e||""),a={},u=14;for(;u--;)a[O2[u]]=o[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=I2(a,a.path),a.queryKey=R2(a,a.query),a}function I2(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 R2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Ud=typeof addEventListener=="function"&&typeof removeEventListener=="function",Xu=[];Ud&&addEventListener("offline",()=>{Xu.forEach(e=>e())},!1);class Ai extends Ht{constructor(t,n){if(super(),this.binaryType=d2,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=Bd(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=Bd(n.host).host);Gu(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=y2(this.opts.query)),Ud&&(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"})},Xu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=k0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Ai.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Ai.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=m2(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Wu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Ai.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Ud&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Xu.indexOf(this._offlineEventListener);r!==-1&&Xu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ai.protocol=k0;class L2 extends Ai{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Ai.priorWebsocketSuccess=!1;const o=()=>{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;Ai.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",o),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",o),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 D2=class extends L2{constructor(t,n={}){const r=typeof t=="object",o=r?F({},t):F({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>P2[a]).filter(a=>!!a)),super(r?o:t,o)}};function M2(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=Bd(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 F2=typeof ArrayBuffer=="function",B2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,D0=Object.prototype.toString,U2=typeof Blob=="function"||typeof Blob!="undefined"&&D0.call(Blob)==="[object BlobConstructor]",H2=typeof File=="function"||typeof File!="undefined"&&D0.call(File)==="[object FileConstructor]";function Hd(e){return F2&&(e instanceof ArrayBuffer||B2(e))||U2&&e instanceof Blob||H2&&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(Hd(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 z2(e){const t=[],n=e.data,r=e;return r.data=zd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function zd(e,t){if(!e)return e;if(Hd(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=zd(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=zd(e[r],t));return n}return e}function j2(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")}else 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 $2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var nt;(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"})(nt||(nt={}));class V2{constructor(t){this.replacer=t}encode(t){return(t.type===nt.EVENT||t.type===nt.ACK)&&Ku(t)?this.encodeAsBinary({type:t.type===nt.EVENT?nt.BINARY_EVENT:nt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===nt.BINARY_EVENT||t.type===nt.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=z2(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class $d extends Ht{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===nt.BINARY_EVENT;r||n.type===nt.BINARY_ACK?(n.type=r?nt.EVENT:nt.ACK,this.reconstructor=new q2(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Hd(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(nt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===nt.BINARY_EVENT||r.type===nt.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(!Y2(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if($d.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case nt.CONNECT:return M0(n);case nt.DISCONNECT:return n===void 0;case nt.CONNECT_ERROR:return typeof n=="string"||M0(n);case nt.EVENT:case nt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&$2.indexOf(n[0])===-1);case nt.ACK:case nt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class q2{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=j2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Y2=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 W2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:$d,Encoder:V2,get PacketType(){return nt}},Symbol.toStringTag,{value:"Module"}));function Tr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const G2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class F0 extends Ht{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=[Tr(t,"open",this.onopen.bind(this)),Tr(t,"packet",this.onpacket.bind(this)),Tr(t,"error",this.onerror.bind(this)),Tr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,a;if(G2.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:nt.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=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,c)=>u?o(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:nt.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 nt.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 nt.EVENT:case nt.BINARY_EVENT:this.onevent(t);break;case nt.ACK:case nt.BINARY_ACK:this.onack(t);break;case nt.DISCONNECT:this.ondisconnect();break;case nt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:nt.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nt.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 Ho(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}Ho.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},Ho.prototype.reset=function(){this.attempts=0},Ho.prototype.setMin=function(e){this.ms=e},Ho.prototype.setMax=function(e){this.max=e},Ho.prototype.setJitter=function(e){this.jitter=e};class Vd extends Ht{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,Gu(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 Ho({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||W2;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new D2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Tr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=Tr(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Tr(t,"ping",this.onping.bind(this)),Tr(t,"data",this.ondata.bind(this)),Tr(t,"error",this.onerror.bind(this)),Tr(t,"close",this.onclose.bind(this)),Tr(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){Wu(()=>{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 F0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ua={};function Qu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=M2(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=ua[o]&&a in ua[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Vd(r,t):(ua[o]||(ua[o]=new Vd(r,t)),d=ua[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Qu,{Manager:Vd,Socket:F0,io:Qu,connect:Qu});var X2=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===K2})(t)})(e)},K2=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function la(e,t){return t.clone!==!1&&t.isMergeableObject(e)?zo((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Q2(e,t,n){return e.concat(t).map((function(r){return la(r,n)}))}function B0(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 U0(e,t){try{return t in e}catch(n){return!1}}function J2(e,t,n){var r={};return n.isMergeableObject(e)&&B0(e).forEach((function(o){r[o]=la(e[o],n)})),B0(t).forEach((function(o){(function(a,u){return U0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(U0(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,u){if(!u.customMerge)return zo;var c=u.customMerge(a);return typeof c=="function"?c:zo})(o,n)(e[o],t[o],n):r[o]=la(t[o],n))})),r}function zo(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Q2,n.isMergeableObject=n.isMergeableObject||X2,n.cloneUnlessOtherwiseSpecified=la;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):J2(e,t,n):la(t,n)}zo.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return zo(n,r,t)}),{})};var Z2=zo;let eA=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 o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,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 o=(n=n.slice(0)).length;r<o;++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 tA=typeof ArrayBuffer=="function",H0=Object.prototype.toString,nA=typeof Blob=="function"||typeof Blob!="undefined"&&H0.call(Blob)==="[object BlobConstructor]",rA=typeof File=="function"||typeof File!="undefined"&&H0.call(File)==="[object FileConstructor]";function qd(e){return tA&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||nA&&e instanceof Blob||rA&&e instanceof File}function Ju(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ju(e[n]))return!0;return!1}if(qd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ju(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ju(e[n]))return!0;return!1}function iA(e){const t=[],n=e.data,r=e;return r.data=Yd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Yd(e,t){if(!e)return e;if(qd(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]=Yd(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]=Yd(e[r],t));return n}return e}function oA(e,t){return e.data=Wd(e.data,t),delete e.attachments,e}function Wd(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]=Wd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Wd(e[n],t));return e}const sA=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Pt;(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"})(Pt||(Pt={}));class aA{constructor(t){this.replacer=t}encode(t){return t.type!==Pt.EVENT&&t.type!==Pt.ACK||!Ju(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Pt.EVENT?Pt.BINARY_EVENT:Pt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==Pt.BINARY_EVENT&&t.type!==Pt.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=iA(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Gd 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===Pt.BINARY_EVENT;r||n.type===Pt.BINARY_ACK?(n.type=r?Pt.EVENT:Pt.ACK,this.reconstructor=new uA(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!qd(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(Pt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Pt.BINARY_EVENT||r.type===Pt.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(!lA(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(!Gd.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 Pt.CONNECT:return z0(n);case Pt.DISCONNECT:return n===void 0;case Pt.CONNECT_ERROR:return typeof n=="string"||z0(n);case Pt.EVENT:case Pt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&sA.indexOf(n[0])===-1);case Pt.ACK:case Pt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class uA{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=oA(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const lA=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function z0(e){return Object.prototype.toString.call(e)==="[object Object]"}const j0=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],$0=(e,t,n)=>function r(o,a=[]){const u=Object.entries(o).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(o)?u.map((c=>c[1])):Object.fromEntries(u)},V0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),cA=$0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),j0),q0=$0(V0,V0,j0),dA={Encoder:class extends aA{encode(e){var t,n;return super.encode(pe(F({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],cA(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 Gd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?q0(r):r)):n instanceof Object?q0(n):n)):t))}}},fA={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class hA{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/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}${o}`,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=[fA,c,{parser:dA,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=Qu(d,Z2.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*oa(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 Je(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return Je(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return Je(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return Je(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return Je(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 Je(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return Je(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return Je(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return Je(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return Je(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return Je(this,null,function*(){return new Promise((r=>{this.socket.emit("conversation_events",t,(o=>{n&&n(o),r(o)}))}))})}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 Je(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const a=(function(u){return Pd(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new ii(u({emit:m=>{c.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new ii(new Promise((m=>{f=m})));for(;c.length>0;)yield c.shift()}finally{yield new ii(p==null?void 0:p())}})})((({emit:u,cancel:c})=>{const d=(f,p)=>{["done","error"].includes(p.name)&&c(),p.eventSourceId==o&&u(p)};return this.socket.onAny(d),()=>Je(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 eA(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}var B=Uo();const to=Ze(B);var Y0=Symbol.for("immer-nothing"),W0=Symbol.for("immer-draftable"),ut=Symbol.for("immer-state");function or(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var jo=Object.getPrototypeOf;function $o(e){return!!e&&!!e[ut]}function oi(e){var t;return e?G0(e)||Array.isArray(e)||!!e[W0]||!!((t=e.constructor)!=null&&t[W0])||el(e)||tl(e):!1}var pA=Object.prototype.constructor.toString();function G0(e){if(!e||typeof e!="object")return!1;const t=jo(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)===pA}function ca(e,t){Zu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Zu(e){const t=e[ut];return t?t.type_:Array.isArray(e)?1:el(e)?2:tl(e)?3:0}function Xd(e,t){return Zu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function X0(e,t,n){const r=Zu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function mA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function el(e){return e instanceof Map}function tl(e){return e instanceof Set}function Jt(e){return e.copy_||e.base_}function Kd(e,t){if(el(e))return new Map(e);if(tl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=G0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[ut];let o=Reflect.ownKeys(r);for(let a=0;a<o.length;a++){const u=o[a],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(jo(e),r)}else{const r=jo(e);if(r!==null&&n)return F({},e);const o=Object.create(r);return Object.assign(o,e)}}function Qd(e,t=!1){return nl(e)||$o(e)||!oi(e)||(Zu(e)>1&&(e.set=e.add=e.clear=e.delete=gA),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Qd(r,!0))),e}function gA(){or(2)}function nl(e){return Object.isFrozen(e)}var Jd={};function no(e){const t=Jd[e];return t||or(0,e),t}function EA(e,t){Jd[e]||(Jd[e]=t)}var da;function rl(){return da}function yA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function K0(e,t){t&&(no("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Zd(e){ef(e),e.drafts_.forEach(bA),e.drafts_=null}function ef(e){e===da&&(da=e.parent_)}function Q0(e){return da=yA(da,e)}function bA(e){const t=e[ut];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function J0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ut].modified_&&(Zd(t),or(4)),oi(e)&&(e=il(t,e),t.parent_||ol(t,e)),t.patches_&&no("Patches").generateReplacementPatches_(n[ut].base_,e,t.patches_,t.inversePatches_)):e=il(t,n,[]),Zd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Y0?e:void 0}function il(e,t,n){if(nl(t))return t;const r=t[ut];if(!r)return ca(t,(o,a)=>Z0(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return ol(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let a=o,u=!1;r.type_===3&&(a=new Set(o),o.clear(),u=!0),ca(a,(c,d)=>Z0(e,r,o,c,d,n,u)),ol(e,o,!1),n&&e.patches_&&no("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Z0(e,t,n,r,o,a,u){if($o(o)){const c=a&&t&&t.type_!==3&&!Xd(t.assigned_,r)?a.concat(r):void 0,d=il(e,o,c);if(X0(n,r,d),$o(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(oi(o)&&!nl(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;il(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&ol(e,o)}}function ol(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Qd(t,n)}function TA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:rl(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=tf;n&&(o=[r],a=fa);const{revoke:u,proxy:c}=Proxy.revocable(o,a);return r.draft_=c,r.revoke_=u,c}var tf={get(e,t){if(t===ut)return e;const n=Jt(e);if(!Xd(n,t))return _A(e,n,t);const r=n[t];return e.finalized_||!oi(r)?r:r===nf(e.base_,t)?(rf(e),e.copy_[t]=ha(r,e)):r},has(e,t){return t in Jt(e)},ownKeys(e){return Reflect.ownKeys(Jt(e))},set(e,t,n){const r=eg(Jt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=nf(Jt(e),t),a=o==null?void 0:o[ut];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(mA(n,o)&&(n!==void 0||Xd(e.base_,t)))return!0;rf(e),si(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 nf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,rf(e),si(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Jt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){or(11)},getPrototypeOf(e){return jo(e.base_)},setPrototypeOf(){or(12)}},fa={};ca(tf,(e,t)=>{fa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),fa.deleteProperty=function(e,t){return fa.set.call(this,e,t,void 0)},fa.set=function(e,t,n){return tf.set.call(this,e[0],t,n,e[0])};function nf(e,t){const n=e[ut];return(n?Jt(n):e)[t]}function _A(e,t,n){var o;const r=eg(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function eg(e,t){if(!(t in e))return;let n=jo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=jo(n)}}function si(e){e.modified_||(e.modified_=!0,e.parent_&&si(e.parent_))}function rf(e){e.copy_||(e.copy_=Kd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var SA=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&or(6),r!==void 0&&typeof r!="function"&&or(7);let o;if(oi(t)){const a=Q0(this),u=ha(t,void 0);let c=!0;try{o=n(u),c=!1}finally{c?Zd(a):ef(a)}return K0(a,r),J0(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Y0&&(o=void 0),this.autoFreeze_&&Qd(o,!0),r){const a=[],u=[];no("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else or(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,o;return[this.produce(t,n,(u,c)=>{r=u,o=c}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){oi(e)||or(8),$o(e)&&(e=xA(e));const t=Q0(this),n=ha(e,void 0);return n[ut].isManual_=!0,ef(t),n}finishDraft(e,t){const n=e&&e[ut];(!n||!n.isManual_)&&or(9);const{scope_:r}=n;return K0(r,t),J0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=no("Patches").applyPatches_;return $o(e)?r(e,t):this.produce(e,o=>r(o,t))}};function ha(e,t){const n=el(e)?no("MapSet").proxyMap_(e,t):tl(e)?no("MapSet").proxySet_(e,t):TA(e,t);return(t?t.scope_:rl()).drafts_.push(n),n}function xA(e){return $o(e)||or(10,e),tg(e)}function tg(e){if(!oi(e)||nl(e))return e;const t=e[ut];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Kd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Kd(e,!0);return ca(n,(r,o)=>{X0(n,r,tg(o))}),t&&(t.finalized_=!1),n}function wA(){class e extends Map{constructor(d,f){super(),this[ut]={type_:2,parent_:f,scope_:f?f.scope_:rl(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Jt(this[ut]).size}has(d){return Jt(this[ut]).has(d)}set(d,f){const p=this[ut];return u(p),(!Jt(p).has(d)||Jt(p).get(d)!==f)&&(n(p),si(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[ut];return u(f),n(f),si(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[ut];u(d),Jt(d).size&&(n(d),si(d),d.assigned_=new Map,ca(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[ut];Jt(p).forEach((m,T,y)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[ut];u(f);const p=Jt(f).get(d);if(f.finalized_||!oi(p)||p!==f.base_.get(d))return p;const m=ha(p,f);return n(f),f.copy_.set(d,m),m}keys(){return Jt(this[ut]).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[ut]={type_:3,parent_:f,scope_:f?f.scope_:rl(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Jt(this[ut]).size}has(d){const f=this[ut];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[ut];return u(f),this.has(d)||(a(f),si(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[ut];return u(f),a(f),si(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[ut];u(d),Jt(d).size&&(a(d),si(d),d.copy_.clear())}values(){const d=this[ut];return u(d),a(d),d.copy_.values()}entries(){const d=this[ut];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 o(c,d){return new r(c,d)}function a(c){c.copy_||(c.copy_=new Set,c.base_.forEach(d=>{if(oi(d)){const f=ha(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&or(3,JSON.stringify(Jt(c)))}EA("MapSet",{proxyMap_:t,proxySet_:o})}var Yn=new SA,AA=Yn.produce;Yn.produceWithPatches.bind(Yn),Yn.setAutoFreeze.bind(Yn),Yn.setUseStrictShallowCopy.bind(Yn),Yn.applyPatches.bind(Yn),Yn.createDraft.bind(Yn),Yn.finishDraft.bind(Yn);function ng(e,t,n){var r=B.useMemo(function(){return AA(e)},[e]);return B.useReducer(r,t,n)}const rg={PAGE_CHANGED:"page-changed",PAGE_SIZE_CHANGED:"page-size-changed",FACET_FILTERS_CHANGED:"facet-filters-changed",RANGE_FILTERS_CHANGED:"range-filters-changed",CATALOG_SEGMENT_CHANGED:"catalog-segment-changed",PRICEBOOKS_CHANGED:"pricebooks-changed"},mt={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",ADD_LOADING_MESSAGE:"ADD_LOADING_MESSAGE",REMOVE_LOADING_MESSAGE:"REMOVE_LOADING_MESSAGE",SET_ACTIVE_CONVERSATION_ID:"SET_ACTIVE_CONVERSATION_ID",ADD_CONVERSATION_ID:"ADD_CONVERSATION_ID",SET_CONVERSATION_IDS:"SET_CONVERSATION_IDS",SET_CONVERSATION_HISTORY_LOADED:"SET_CONVERSATION_HISTORY_LOADED",SET_IMAGE_FILE:"SET_IMAGE_FILE",SET_ASK_CIM_PROMPTS:"SET_ASK_CIM_PROMPTS"},ro={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},vA=e=>{switch(!0){case e==="copilot_search":return"search";case e==="copilot_browse":return"browse";case e==="product_view":return"pdp";case e==="ask_cim":return"ask_cim";default:return null}},Vo="cimulate",of=`${Vo}:pdp-update`,sf=`${Vo}:browse-update`,af=`${Vo}:search-update`,uf=`${Vo}:ui-state-update`,lf=`${Vo}:prompts-state-update`,cf=`${Vo}:session-state`,Br=F({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},rg),CA={"browse-context":Br.CONTEXT_UPDATED,categoryId:Br.CATEGORY_ID_CHANGED,categoryName:Br.CATEGORY_NAME_CHANGED,page:Br.PAGE_CHANGED,pageSize:Br.PAGE_SIZE_CHANGED,includeFacets:Br.FACET_FILTERS_CHANGED,facetFilters:Br.FACET_FILTERS_CHANGED,rangeFilters:Br.RANGE_FILTERS_CHANGED,catalogSegment:Br.CATALOG_SEGMENT_CHANGED,pricebooks:Br.PRICEBOOKS_CHANGED},ai=F({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},rg),kA={"search-context":ai.SEARCH_CONTEXT_UPDATED,query:ai.QUERY_CHANGED,page:ai.PAGE_CHANGED,pageSize:ai.PAGE_SIZE_CHANGED,includeFacets:ai.FACET_FILTERS_CHANGED,facetFilters:ai.FACET_FILTERS_CHANGED,rangeFilters:ai.RANGE_FILTERS_CHANGED,catalogSegment:ai.CATALOG_SEGMENT_CHANGED,pricebooks:ai.PRICEBOOKS_CHANGED},z="cim-widget",Wn=`--${z}`,vi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},PA=(e=vi)=>({[`${Wn}-primary-color`]:e.primaryColor||vi.primaryColor,[`${Wn}-secondary-color`]:e.secondaryColor||vi.secondaryColor,[`${Wn}-font-color`]:e.fontColor||vi.fontColor,[`${Wn}-font-family`]:e.fontFamily||vi.fontFamily,[`${Wn}-background-color`]:e.backgroundColor||vi.backgroundColor,[`${Wn}-border-color`]:e.borderColor||vi.borderColor,[`${Wn}-border-radius`]:e.borderRadius||vi.borderRadius}),Ci={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},ig=B.createContext(null),og=B.createContext(null);function sg(e,t){return function(){return e.apply(t,arguments)}}const{toString:NA}=Object.prototype,{getPrototypeOf:qo}=Object,{iterator:pa,toStringTag:ag}=Symbol,sl=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ma=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),sl(n,t))return!0;n=qo(n)}return!1},OA=(e,t)=>e!=null&&ma(e,t)?e[t]:void 0,df=(e=>t=>{const n=NA.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),_r=e=>(e=e.toLowerCase(),t=>df(t)===e),al=e=>t=>typeof t===e,{isArray:io}=Array,Yo=al("undefined");function Wo(e){return e!==null&&!Yo(e)&&e.constructor!==null&&!Yo(e.constructor)&&Ln(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ug=_r("ArrayBuffer");function IA(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ug(e.buffer),t}const RA=al("string"),Ln=al("function"),lg=al("number"),Go=e=>e!==null&&typeof e=="object",LA=e=>e===!0||e===!1,ul=e=>{if(!Go(e))return!1;const t=qo(e);return(t===null||t===Object.prototype||qo(t)===null)&&!ma(e,ag)&&!ma(e,pa)},DA=e=>{if(!Go(e)||Wo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},MA=_r("Date"),FA=_r("File"),BA=e=>!!(e&&typeof e.uri!="undefined"),UA=e=>e&&typeof e.getParts!="undefined",HA=_r("Blob"),zA=_r("FileList"),jA=e=>Go(e)&&Ln(e.pipe);function $A(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const cg=$A(),dg=typeof cg.FormData!="undefined"?cg.FormData:void 0,VA=e=>{if(!e)return!1;if(dg&&e instanceof dg)return!0;const t=qo(e);if(!t||t===Object.prototype||!Ln(e.append))return!1;const n=df(e);return n==="formdata"||n==="object"&&Ln(e.toString)&&e.toString()==="[object FormData]"},qA=_r("URLSearchParams"),[YA,WA,GA,XA]=["ReadableStream","Request","Response","Headers"].map(_r),KA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ga(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),io(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Wo(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 fg(e,t){if(Wo(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const oo=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,hg=e=>!Yo(e)&&e!==oo;function ff(...e){const{caseless:t,skipUndefined:n}=hg(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&typeof u=="string"&&fg(r,u)||u,d=sl(r,c)?r[c]:void 0;ul(d)&&ul(a)?r[c]=ff(d,a):ul(a)?r[c]=ff({},a):io(a)?r[c]=a.slice():(!n||!Yo(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++){const c=e[a];if(!c||Wo(c)||(ga(c,o),typeof c!="object"||io(c)))continue;const d=Object.getOwnPropertySymbols(c);for(let f=0;f<d.length;f++){const p=d[f];uv.call(c,p)&&o(c[p],p)}}return r}const QA=(e,t,n,{allOwnKeys:r}={})=>(ga(t,(o,a)=>{n&&Ln(o)?Object.defineProperty(e,a,{__proto__:null,value:sg(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),JA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ZA=(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)},ev=(e,t,n,r)=>{let o,a,u;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&qo(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},tv=(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},nv=e=>{if(!e)return null;if(io(e))return e;let t=e.length;if(!lg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},rv=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&qo(Uint8Array)),iv=(e,t)=>{const r=(e&&e[pa]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},ov=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},sv=_r("HTMLFormElement"),av=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),{propertyIsEnumerable:uv}=Object.prototype,lv=_r("RegExp"),pg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ga(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},cv=e=>{pg(e,(t,n)=>{if(Ln(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Ln(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},dv=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return io(e)?r(e):r(String(e).split(t)),n},fv=()=>{},hv=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function pv(e){return!!(e&&Ln(e.append)&&e[ag]==="FormData"&&e[pa])}const mv=e=>{const t=new WeakSet,n=r=>{if(Go(r)){if(t.has(r))return;if(Wo(r))return r;if(!("toJSON"in r)){t.add(r);const o=io(r)?[]:{};return ga(r,(a,u)=>{const c=n(a);!Yo(c)&&(o[u]=c)}),t.delete(r),o}}return r};return n(e)},gv=_r("AsyncFunction"),Ev=e=>e&&(Go(e)||Ln(e))&&Ln(e.then)&&Ln(e.catch),mg=((e,t)=>e?setImmediate:t?((n,r)=>(oo.addEventListener("message",({source:o,data:a})=>{o===oo&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),oo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ln(oo.postMessage)),yv=typeof queueMicrotask!="undefined"?queueMicrotask.bind(oo):typeof process!="undefined"&&process.nextTick||mg,gg=e=>e!=null&&Ln(e[pa]),$={isArray:io,isArrayBuffer:ug,isBuffer:Wo,isFormData:VA,isArrayBufferView:IA,isString:RA,isNumber:lg,isBoolean:LA,isObject:Go,isPlainObject:ul,isEmptyObject:DA,isReadableStream:YA,isRequest:WA,isResponse:GA,isHeaders:XA,isUndefined:Yo,isDate:MA,isFile:FA,isReactNativeBlob:BA,isReactNative:UA,isBlob:HA,isRegExp:lv,isFunction:Ln,isStream:jA,isURLSearchParams:qA,isTypedArray:rv,isFileList:zA,forEach:ga,merge:ff,extend:QA,trim:KA,stripBOM:JA,inherits:ZA,toFlatObject:ev,kindOf:df,kindOfTest:_r,endsWith:tv,toArray:nv,forEachEntry:iv,matchAll:ov,isHTMLForm:sv,hasOwnProperty:sl,hasOwnProp:sl,hasOwnInPrototypeChain:ma,getSafeProp:OA,reduceDescriptors:pg,freezeMethods:cv,toObjectSet:dv,toCamelCase:av,noop:fv,toFiniteNumber:hv,findKey:fg,global:oo,isContextDefined:hg,isSpecCompliantForm:pv,toJSONObject:mv,isAsyncFn:gv,isThenable:Ev,setImmediate:mg,asap:yv,isIterable:gg,isSafeIterable:e=>e!=null&&ma(e,pa)&&gg(e)},bv=$.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"]),Tv=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
3
3
|
`).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||t[n]&&bv[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function _v(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 Sv=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),xv=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function hf(e,t){return $.isArray(e)?e.map(n=>hf(n,t)):_v(String(e).replace(t,""))}const wv=e=>hf(e,Sv),Av=e=>hf(e,xv);function Eg(e){const t=Object.create(null);return $.forEach(e.toJSON(),(n,r)=>{t[r]=Av(n)}),t}const yg=Symbol("internals");function Ea(e){return e&&String(e).trim().toLowerCase()}function ll(e){return e===!1||e==null?e:$.isArray(e)?e.map(ll):wv(String(e))}function vv(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 Cv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function pf(e,t,n,r,o){if($.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!$.isString(t)){if($.isString(r))return t.indexOf(r)!==-1;if($.isRegExp(r))return r.test(t)}}function kv(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(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let gn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(c,d,f){const p=Ea(d);if(!p)return;const m=$.findKey(o,p);(!m||o[m]===void 0||f===!0||f===void 0&&o[m]!==!1)&&(o[m||d]=ll(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())&&!Cv(t))u(Tv(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=Ea(t),t){const r=$.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return vv(o);if($.isFunction(n))return n.call(this,o,r);if($.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ea(t),t){const r=$.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||pf(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=Ea(u),u){const c=$.findKey(r,u);c&&(!n||pf(r,r[c],c,n))&&(delete r[c],o=!0)}}return $.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||pf(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return $.forEach(this,(o,a)=>{const u=$.findKey(r,a);if(u){n[u]=ll(o),delete n[a];return}const c=t?kv(a):String(a).trim();c!==a&&delete n[a],n[c]=ll(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return $.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=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(o=>r.set(o)),r}static accessor(t){const r=(this[yg]=this[yg]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=Ea(u);r[c]||(Pv(o,u),r[c]=!0)}return $.isArray(t)?t.forEach(a):a(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),$.freezeMethods(gn);const Nv="[REDACTED ****]";function Ov(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 Iv(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||$.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof gn&&(a=a.toJSON()),r.push(a);let u;if($.isArray(a))u=[],a.forEach((c,d)=>{const f=o(c);$.isUndefined(f)||(u[d]=f)});else{if(!$.isPlainObject(a)&&Ov(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?Nv:o(d);$.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return o(e)}let Se=class Jw extends Error{static from(t,n,r,o,a,u){const c=new Jw(t.message,n||t.code,r,o,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,o,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&$.hasOwnProp(t,"redact")?t.redact:void 0,r=$.isArray(n)&&n.length>0?Iv(t,n):$.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Se.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Se.ERR_BAD_OPTION="ERR_BAD_OPTION",Se.ECONNABORTED="ECONNABORTED",Se.ETIMEDOUT="ETIMEDOUT",Se.ECONNREFUSED="ECONNREFUSED",Se.ERR_NETWORK="ERR_NETWORK",Se.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Se.ERR_DEPRECATED="ERR_DEPRECATED",Se.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Se.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Se.ERR_CANCELED="ERR_CANCELED",Se.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Se.ERR_INVALID_URL="ERR_INVALID_URL",Se.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Rv=null,bg=100;function mf(e){return $.isPlainObject(e)||$.isArray(e)}function Tg(e){return $.endsWith(e,"[]")?e.slice(0,-2):e}function gf(e,t,n){return e?e.concat(t).map(function(o,a){return o=Tg(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function Lv(e){return $.isArray(e)&&!e.some(mf)}const Dv=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function cl(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(P,v){return!$.isUndefined(v[P])});const r=n.metaTokens,o=n.visitor||_,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?bg:n.maxDepth,f=c&&$.isSpecCompliantForm(t),p=[];if(!$.isFunction(o))throw new TypeError("visitor must be a function");function m(A){if(A===null)return"";if($.isDate(A))return A.toISOString();if($.isBoolean(A))return A.toString();if(!f&&$.isBlob(A))throw new Se("Blob is not supported. Use a Buffer instead.");if($.isArrayBuffer(A)||$.isTypedArray(A)){if(f&&typeof c=="function")return new c([A]);if(typeof Buffer!="undefined")return Buffer.from(A);throw new Se("Blob is not supported. Use a Buffer instead.",Se.ERR_NOT_SUPPORT)}return A}function T(A){if(A>d)throw new Se("Object is too deeply nested ("+A+" levels). Max depth: "+d,Se.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(A,P){if(d===1/0)return JSON.stringify(A);const v=[];return JSON.stringify(A,function(Y,D){if(!$.isObject(D))return D;for(;v.length&&v[v.length-1]!==this;)v.pop();return v.push(D),T(P+v.length-1),D})}function _(A,P,v){let H=A;if($.isReactNative(t)&&$.isReactNativeBlob(A))return t.append(gf(v,P,a),m(A)),!1;if(A&&!v&&typeof A=="object"){if($.endsWith(P,"{}"))P=r?P:P.slice(0,-2),A=y(A,1);else if($.isArray(A)&&Lv(A)||($.isFileList(A)||$.endsWith(P,"[]"))&&(H=$.toArray(A)))return P=Tg(P),H.forEach(function(D,q){!($.isUndefined(D)||D===null)&&t.append(u===!0?gf([P],q,a):u===null?P:P+"[]",m(D))}),!1}return mf(A)?!0:(t.append(gf(v,P,a),m(A)),!1)}const w=Object.assign(Dv,{defaultVisitor:_,convertValue:m,isVisitable:mf});function C(A,P,v=0){if(!$.isUndefined(A)){if(T(v),p.indexOf(A)!==-1)throw new Error("Circular reference detected in "+P.join("."));p.push(A),$.forEach(A,function(Y,D){(!($.isUndefined(Y)||Y===null)&&o.call(t,Y,$.isString(D)?D.trim():D,P,w))===!0&&C(Y,P?P.concat(D):[D],v+1)}),p.pop()}}if(!$.isObject(e))throw new TypeError("data must be an object");return C(e),t}function _g(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Ef(e,t){this._pairs=[],e&&cl(e,this,t)}const Sg=Ef.prototype;Sg.append=function(t,n){this._pairs.push([t,n])},Sg.toString=function(t){const n=t?r=>t.call(this,r,_g):_g;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Mv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function xg(e,t,n){if(!t)return e;e=e||"";const r=$.isFunction(n)?{serialize:n}:n,o=$.getSafeProp(r,"encode")||Mv,a=$.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=$.isURLSearchParams(t)?t.toString():new Ef(t,r).toString(o),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class wg{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 yf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Fv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Ef,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},bf=typeof window!="undefined"&&typeof document!="undefined",Tf=typeof navigator=="object"&&navigator||void 0,Bv=bf&&(!Tf||["ReactNative","NativeScript","NS"].indexOf(Tf.product)<0),Uv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Hv=bf&&window.location.href||"http://localhost",un=F(F({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bf,hasStandardBrowserEnv:Bv,hasStandardBrowserWebWorkerEnv:Uv,navigator:Tf,origin:Hv},Symbol.toStringTag,{value:"Module"}))),Fv);function zv(e,t){return cl(e,new un.classes.URLSearchParams,F({visitor:function(n,r,o,a){return un.isNode&&$.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const Ag=bg;function vg(e){if(e>Ag)throw new Se("FormData field is too deeply nested ("+e+" levels). Max depth: "+Ag,Se.ERR_FORM_DATA_DEPTH_EXCEEDED)}function jv(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)vg(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function $v(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Cg(e){function t(n,r,o,a){vg(a);let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&$.isArray(o)?o.length:u,d?($.hasOwnProp(o,u)?o[u]=$.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!c):((!$.hasOwnProp(o,u)||!$.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&$.isArray(o[u])&&(o[u]=$v(o[u])),!c)}if($.isFormData(e)&&$.isFunction(e.entries)){const n={};return $.forEachEntry(e,(r,o)=>{t(jv(r),o,n,0)}),n}return null}const Xo=(e,t)=>e!=null&&$.hasOwnProp(e,t)?e[t]:void 0;function Vv(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 ya={transitional:yf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=$.isObject(t);if(a&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return o?JSON.stringify(Cg(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=Xo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return zv(t,d).toString();if((c=$.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Xo(this,"env"),p=f&&f.FormData;return cl(c?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),Vv(t)):t}],transformResponse:[function(t){const n=Xo(this,"transitional")||ya.transitional,r=n&&n.forcedJSONParsing,o=Xo(this,"responseType"),a=o==="json";if($.isResponse(t)||$.isReadableStream(t))return t;if(t&&$.isString(t)&&(r&&!o||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Xo(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Se.from(d,Se.ERR_BAD_RESPONSE,this,null,Xo(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:un.classes.FormData,Blob:un.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=>{ya.headers[e]={}});function _f(e,t){const n=this||ya,r=t||n,o=gn.from(r.headers);let a=r.data;return $.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function kg(e){return!!(e&&e.__CANCEL__)}let ba=class extends Se{constructor(t,n,r){super(t==null?"canceled":t,Se.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Pg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Se("Request failed with status code "+n.status,n.status>=400&&n.status<500?Se.ERR_BAD_REQUEST:Se.ERR_BAD_RESPONSE,n.config,n.request,n))}function qv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Yv(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[o]=d,r[o]=f;let m=a,T=0;for(;m!==o;)T+=n[m++],m=m%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(T*1e3/y):void 0}}function Wv(e,t){let n=0,r=1e3/t,o,a;const u=(f,p=Date.now())=>{n=p,o=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),m=p-n;m>=r?u(f,p):(o=f,a||(a=setTimeout(()=>{a=null,u(o)},r-m)))},()=>o&&u(o)]}const dl=(e,t,n=3)=>{let r=0;const o=Yv(50,250);return Wv(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,f=Math.max(0,d-r),p=o(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)},Ng=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Og=e=>(...t)=>$.asap(()=>e(...t)),Gv=un.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,un.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(un.origin),un.navigator&&/(msie|trident)/i.test(un.navigator.userAgent)):()=>!0,Xv=un.hasStandardBrowserEnv?{write(e,t,n,r,o,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(o)&&c.push(`domain=${o}`),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+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)try{return decodeURIComponent(r.slice(o+1))}catch(a){return r.slice(o+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Kv(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Qv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const Jv=/^https?:(?!\/\/)/i,Zv=/[\t\n\r]/g;function eC(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function tC(e){return eC(e).replace(Zv,"")}function Ig(e,t){if(typeof e=="string"&&Jv.test(tC(e)))throw new Se('Invalid URL: missing "//" after protocol',Se.ERR_INVALID_URL,t)}function Rg(e,t,n,r){Ig(t,r);let o=!Kv(t);return e&&(o||n===!1)?(Ig(e,r),Qv(e,t)):t}const Lg=e=>e instanceof gn?F({},e):e;function so(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 o(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)=>o(Lg(p),Lg(m),T,!0)};return $.forEach(Object.keys(F(F({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=$.hasOwnProp(f,m)?f[m]:o,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 nC=["content-type","content-length"];function rC(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,o])=>{nC.includes(r.toLowerCase())&&e.set(r,o)})}const iC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Dg(e){const t=so({},e),n=T=>$.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=c=gn.from(c),t.url=xg(Rg(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?iC(y):"")))}catch(_){throw Se.from(_,Se.ERR_BAD_OPTION_VALUE,e)}}if($.isFormData(r)&&(un.hasStandardBrowserEnv||un.hasStandardBrowserWebWorkerEnv||$.isReactNative(r)?c.setContentType(void 0):$.isFunction(r.getHeaders)&&rC(c,r.getHeaders(),n("formDataHeaderPolicy"))),un.hasStandardBrowserEnv&&($.isFunction(o)&&(o=o(t)),o===!0||o==null&&Gv(t.url))){const y=a&&u&&Xv.read(u);y&&c.set(a,y)}return t}const oC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=Dg(e);let a=o.data;const u=gn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=o,p,m,T,y,_;function w(){y&&y(),_&&_(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let C=new XMLHttpRequest;C.open(o.method.toUpperCase(),o.url,!0),C.timeout=o.timeout;function A(){if(!C)return;const v=gn.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),Y={data:!c||c==="text"||c==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:v,config:e,request:C};Pg(function(q){n(q),w()},function(q){r(q),w()},Y),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 Se("Request aborted",Se.ECONNABORTED,e,C)),w(),C=null)},C.onerror=function(H){const Y=H&&H.message?H.message:"Network Error",D=new Se(Y,Se.ERR_NETWORK,e,C);D.event=H||null,r(D),w(),C=null},C.ontimeout=function(){let H=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const Y=o.transitional||yf;o.timeoutErrorMessage&&(H=o.timeoutErrorMessage),r(new Se(H,Y.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,e,C)),w(),C=null},a===void 0&&u.setContentType(null),"setRequestHeader"in C&&$.forEach(Eg(u),function(H,Y){C.setRequestHeader(Y,H)}),$.isUndefined(o.withCredentials)||(C.withCredentials=!!o.withCredentials),c&&c!=="json"&&(C.responseType=o.responseType),f&&([T,_]=dl(f,!0),C.addEventListener("progress",T)),d&&C.upload&&([m,y]=dl(d),C.upload.addEventListener("progress",m),C.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=v=>{C&&(r(!v||v.type?new ba(null,e,C):v),C.abort(),w(),C=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const P=qv(o.url);if(P&&!un.protocols.includes(P)){r(new Se("Unsupported protocol "+P+":",Se.ERR_BAD_REQUEST,e)),w();return}C.send(a||null)})},sC=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof Se?f:new ba(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,o(new Se(`timeout of ${t}ms exceeded`,Se.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o,{once:!0}));const{signal:c}=n;return c.unsubscribe=()=>$.asap(u),c},aC=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},uC=function(e,t){return Pd(this,null,function*(){try{for(var n=Qw(lC(e)),r,o,a;r=!(o=yield new ii(n.next())).done;r=!1){const u=o.value;yield*b0(aC(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new ii(o.call(n)))}finally{if(a)throw a[0]}}})},lC=function(e){return Pd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*b0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new ii(t.read());if(n)break;yield r}}finally{yield new ii(t.cancel())}})},Mg=(e,t,n,r)=>{const o=uC(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return Je(this,null,function*(){try{const{done:p,value:m}=yield o.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),o.return()}},{highWaterMark:2})},fl=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,cC=(e,t,n)=>t+2<n&&fl(e.charCodeAt(t+1))&&fl(e.charCodeAt(t+2));function dC(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);fl(_)&&fl(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&&cC(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 Sf="1.18.1",Fg=64*1024,{isFunction:hl}=$,fC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Bg=e=>{if(!$.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Ug=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},hC=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},pC=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:o,Request:a,Response:u}=e,c=o?hl(o):typeof fetch=="function",d=hl(a),f=hl(u);if(!c)return!1;const p=c&&hl(n),m=c&&(typeof r=="function"?(A=>P=>A.encode(P))(new r):A=>Je(null,null,function*(){return new Uint8Array(yield new a(A).arrayBuffer())})),T=d&&p&&Ug(()=>{let A=!1;const P=new a(un.origin,{body:new n,method:"POST",get duplex(){return A=!0,"half"}}),v=P.headers.has("Content-Type");return P.body!=null&&P.body.cancel(),A&&!v}),y=f&&p&&Ug(()=>$.isReadableStream(new u("").body)),_={stream:y&&(A=>A.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(A=>{!_[A]&&(_[A]=(P,v)=>{let H=P&&P[A];if(H)return H.call(P);throw new Se(`Response type '${A}' is not supported`,Se.ERR_NOT_SUPPORT,v)})});const w=A=>Je(null,null,function*(){if(A==null)return 0;if($.isBlob(A))return A.size;if($.isSpecCompliantForm(A))return(yield new a(un.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,P)=>Je(null,null,function*(){const v=$.toFiniteNumber(A.getContentLength());return v==null?w(P):v});return A=>Je(null,null,function*(){let{url:P,method:v,data:H,signal:Y,cancelToken:D,timeout:q,onDownloadProgress:re,onUploadProgress:me,responseType:V,headers:se,withCredentials:ce="same-origin",fetchOptions:de,maxContentLength:ne,maxBodyLength:Ee}=Dg(A);const Oe=$.isNumber(ne)&&ne>-1,oe=$.isNumber(Ee)&&Ee>-1,Q=Te=>$.hasOwnProp(A,Te)?A[Te]:void 0;let ie=o||fetch;V=V?(V+"").toLowerCase():"text";let k=sC([Y,D&&D.toAbortSignal()],q),L=null;const ee=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let O,we=null;const Ue=()=>new Se("Request body larger than maxBodyLength limit",Se.ERR_BAD_REQUEST,A,L);try{let Te;const Be=Q("auth");if(Be){const qe=$.getSafeProp(Be,"username")||"",Nt=$.getSafeProp(Be,"password")||"";Te={username:qe,password:Nt}}if(hC(P)){const qe=new URL(P,un.origin);if(!Te&&(qe.username||qe.password)){const Nt=Bg(qe.username),Nn=Bg(qe.password);Te={username:Nt,password:Nn}}(qe.username||qe.password)&&(qe.username="",qe.password="",P=qe.href)}if(Te&&(se.delete("authorization"),se.set("Authorization","Basic "+btoa(fC((Te.username||"")+":"+(Te.password||""))))),Oe&&typeof P=="string"&&P.startsWith("data:")&&dC(P)>ne)throw new Se("maxContentLength size of "+ne+" exceeded",Se.ERR_BAD_RESPONSE,A,L);if(oe&&v!=="get"&&v!=="head"){const qe=yield w(H);if(typeof qe=="number"&&isFinite(qe)&&(O=qe,qe>Ee))throw Ue()}const Ve=oe&&($.isReadableStream(H)||$.isStream(H)),Ge=(qe,Nt,Nn)=>Mg(qe,Fg,cn=>{if(oe&&cn>Ee)throw we=Ue();Nt&&Nt(cn)},Nn);if(T&&v!=="get"&&v!=="head"&&(me||Ve)){if(O=O==null?yield C(se,H):O,O!==0||Ve){let qe=new a(P,{method:"POST",body:H,duplex:"half"}),Nt;if($.isFormData(H)&&(Nt=qe.headers.get("content-type"))&&se.setContentType(Nt),qe.body){const[Nn,cn]=me&&Ng(O,dl(Og(me)))||[];H=Ge(qe.body,Nn,cn)}}}else if(Ve&&!d&&p&&v!=="get"&&v!=="head")H=Ge(H);else if(Ve&&d&&!T&&v!=="get"&&v!=="head")throw new Se("Stream request bodies are not supported by the current fetch implementation",Se.ERR_NOT_SUPPORT,A,L);$.isString(ce)||(ce=ce?"include":"omit");const _t=d&&"credentials"in a.prototype;if($.isFormData(H)){const qe=se.getContentType();qe&&/^multipart\/form-data/i.test(qe)&&!/boundary=/i.test(qe)&&se.delete("content-type")}se.set("User-Agent","axios/"+Sf,!1);const Pn=pe(F({},de),{signal:k,method:v.toUpperCase(),headers:Eg(se.normalize()),body:H,duplex:"half",credentials:_t?ce:void 0});L=d&&new a(P,Pn);let ln=yield d?ie(L,de):ie(P,Pn);const kr=gn.from(ln.headers);if(Oe){const qe=$.toFiniteNumber(kr.getContentLength());if(qe!=null&&qe>ne)throw new Se("maxContentLength size of "+ne+" exceeded",Se.ERR_BAD_RESPONSE,A,L)}const fr=y&&(V==="stream"||V==="response");if(y&&ln.body&&(re||Oe||fr&&ee)){const qe={};["status","statusText","headers"].forEach(Ne=>{qe[Ne]=ln[Ne]});const Nt=$.toFiniteNumber(kr.getContentLength()),[Nn,cn]=re&&Ng(Nt,dl(Og(re),!0))||[];let Hn=0;const Ae=Ne=>{if(Oe&&(Hn=Ne,Hn>ne))throw new Se("maxContentLength size of "+ne+" exceeded",Se.ERR_BAD_RESPONSE,A,L);Nn&&Nn(Ne)};ln=new u(Mg(ln.body,Fg,Ae,()=>{cn&&cn(),ee&&ee()}),qe)}V=V||"text";let rn=yield _[$.findKey(_,V)||"text"](ln,A);if(Oe&&!y&&!fr){let qe;if(rn!=null&&(typeof rn.byteLength=="number"?qe=rn.byteLength:typeof rn.size=="number"?qe=rn.size:typeof rn=="string"&&(qe=typeof r=="function"?new r().encode(rn).byteLength:rn.length)),typeof qe=="number"&&qe>ne)throw new Se("maxContentLength size of "+ne+" exceeded",Se.ERR_BAD_RESPONSE,A,L)}return!fr&&ee&&ee(),yield new Promise((qe,Nt)=>{Pg(qe,Nt,{data:rn,headers:gn.from(ln.headers),status:ln.status,statusText:ln.statusText,config:A,request:L})})}catch(Te){if(ee&&ee(),k&&k.aborted&&k.reason instanceof Se){const Be=k.reason;throw Be.config=A,L&&(Be.request=L),Te!==Be&&Object.defineProperty(Be,"cause",{__proto__:null,value:Te,writable:!0,enumerable:!1,configurable:!0}),Be}if(we)throw L&&!we.request&&(we.request=L),we;if(Te instanceof Se)throw L&&!Te.request&&(Te.request=L),Te;if(Te&&Te.name==="TypeError"&&/Load failed|fetch/i.test(Te.message)){const Be=new Se("Network Error",Se.ERR_NETWORK,A,L,Te&&Te.response);throw Object.defineProperty(Be,"cause",{__proto__:null,value:Te.cause||Te,writable:!0,enumerable:!1,configurable:!0}),Be}throw Se.from(Te,Te&&Te.code,A,L,Te&&Te.response)}})},mC=new Map,Hg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,c=u,d,f,p=mC;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:pC(t)),p=f;return f};Hg();const xf={http:Rv,xhr:oC,fetch:{get:Hg}};$.forEach(xf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const zg=e=>`- ${e}`,gC=e=>$.isFunction(e)||e===null||e===!1;function EC(e,t){e=$.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(o=r,!gC(r)&&(o=xf[(c=String(r)).toLowerCase()],o===void 0))throw new Se(`Unknown adapter '${c}'`);if(o&&($.isFunction(o)||(o=o.get(t))))break;a[c||"#"+u]=o}if(!o){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
|
|
4
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[yg]=this[yg]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=Ea(u);r[c]||(Pv(o,u),r[c]=!0)}return $.isArray(t)?t.forEach(a):a(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),$.freezeMethods(gn);const Nv="[REDACTED ****]";function Ov(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 Iv(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||$.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof gn&&(a=a.toJSON()),r.push(a);let u;if($.isArray(a))u=[],a.forEach((c,d)=>{const f=o(c);$.isUndefined(f)||(u[d]=f)});else{if(!$.isPlainObject(a)&&Ov(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?Nv:o(d);$.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return o(e)}let xe=class Jw extends Error{static from(t,n,r,o,a,u){const c=new Jw(t.message,n||t.code,r,o,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,o,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&$.hasOwnProp(t,"redact")?t.redact:void 0,r=$.isArray(n)&&n.length>0?Iv(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}}};xe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",xe.ERR_BAD_OPTION="ERR_BAD_OPTION",xe.ECONNABORTED="ECONNABORTED",xe.ETIMEDOUT="ETIMEDOUT",xe.ECONNREFUSED="ECONNREFUSED",xe.ERR_NETWORK="ERR_NETWORK",xe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",xe.ERR_DEPRECATED="ERR_DEPRECATED",xe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",xe.ERR_BAD_REQUEST="ERR_BAD_REQUEST",xe.ERR_CANCELED="ERR_CANCELED",xe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",xe.ERR_INVALID_URL="ERR_INVALID_URL",xe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Rv=null,bg=100;function mf(e){return $.isPlainObject(e)||$.isArray(e)}function Tg(e){return $.endsWith(e,"[]")?e.slice(0,-2):e}function gf(e,t,n){return e?e.concat(t).map(function(o,a){return o=Tg(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function Lv(e){return $.isArray(e)&&!e.some(mf)}const Dv=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function cl(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(P,v){return!$.isUndefined(v[P])});const r=n.metaTokens,o=n.visitor||_,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?bg:n.maxDepth,f=c&&$.isSpecCompliantForm(t),p=[];if(!$.isFunction(o))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 xe("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 xe("Blob is not supported. Use a Buffer instead.",xe.ERR_NOT_SUPPORT)}return A}function T(A){if(A>d)throw new xe("Object is too deeply nested ("+A+" levels). Max depth: "+d,xe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(A,P){if(d===1/0)return JSON.stringify(A);const v=[];return JSON.stringify(A,function(Y,D){if(!$.isObject(D))return D;for(;v.length&&v[v.length-1]!==this;)v.pop();return v.push(D),T(P+v.length-1),D})}function _(A,P,v){let H=A;if($.isReactNative(t)&&$.isReactNativeBlob(A))return t.append(gf(v,P,a),m(A)),!1;if(A&&!v&&typeof A=="object"){if($.endsWith(P,"{}"))P=r?P:P.slice(0,-2),A=y(A,1);else if($.isArray(A)&&Lv(A)||($.isFileList(A)||$.endsWith(P,"[]"))&&(H=$.toArray(A)))return P=Tg(P),H.forEach(function(D,q){!($.isUndefined(D)||D===null)&&t.append(u===!0?gf([P],q,a):u===null?P:P+"[]",m(D))}),!1}return mf(A)?!0:(t.append(gf(v,P,a),m(A)),!1)}const w=Object.assign(Dv,{defaultVisitor:_,convertValue:m,isVisitable:mf});function C(A,P,v=0){if(!$.isUndefined(A)){if(T(v),p.indexOf(A)!==-1)throw new Error("Circular reference detected in "+P.join("."));p.push(A),$.forEach(A,function(Y,D){(!($.isUndefined(Y)||Y===null)&&o.call(t,Y,$.isString(D)?D.trim():D,P,w))===!0&&C(Y,P?P.concat(D):[D],v+1)}),p.pop()}}if(!$.isObject(e))throw new TypeError("data must be an object");return C(e),t}function _g(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Ef(e,t){this._pairs=[],e&&cl(e,this,t)}const Sg=Ef.prototype;Sg.append=function(t,n){this._pairs.push([t,n])},Sg.toString=function(t){const n=t?r=>t.call(this,r,_g):_g;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Mv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function xg(e,t,n){if(!t)return e;e=e||"";const r=$.isFunction(n)?{serialize:n}:n,o=$.getSafeProp(r,"encode")||Mv,a=$.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=$.isURLSearchParams(t)?t.toString():new Ef(t,r).toString(o),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class wg{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 yf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Fv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Ef,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},bf=typeof window!="undefined"&&typeof document!="undefined",Tf=typeof navigator=="object"&&navigator||void 0,Bv=bf&&(!Tf||["ReactNative","NativeScript","NS"].indexOf(Tf.product)<0),Uv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Hv=bf&&window.location.href||"http://localhost",un=F(F({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bf,hasStandardBrowserEnv:Bv,hasStandardBrowserWebWorkerEnv:Uv,navigator:Tf,origin:Hv},Symbol.toStringTag,{value:"Module"}))),Fv);function zv(e,t){return cl(e,new un.classes.URLSearchParams,F({visitor:function(n,r,o,a){return un.isNode&&$.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const Ag=bg;function vg(e){if(e>Ag)throw new xe("FormData field is too deeply nested ("+e+" levels). Max depth: "+Ag,xe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function jv(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)vg(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function $v(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Cg(e){function t(n,r,o,a){vg(a);let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&$.isArray(o)?o.length:u,d?($.hasOwnProp(o,u)?o[u]=$.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!c):((!$.hasOwnProp(o,u)||!$.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&$.isArray(o[u])&&(o[u]=$v(o[u])),!c)}if($.isFormData(e)&&$.isFunction(e.entries)){const n={};return $.forEachEntry(e,(r,o)=>{t(jv(r),o,n,0)}),n}return null}const Xo=(e,t)=>e!=null&&$.hasOwnProp(e,t)?e[t]:void 0;function Vv(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 ya={transitional:yf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=$.isObject(t);if(a&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return o?JSON.stringify(Cg(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=Xo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return zv(t,d).toString();if((c=$.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Xo(this,"env"),p=f&&f.FormData;return cl(c?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),Vv(t)):t}],transformResponse:[function(t){const n=Xo(this,"transitional")||ya.transitional,r=n&&n.forcedJSONParsing,o=Xo(this,"responseType"),a=o==="json";if($.isResponse(t)||$.isReadableStream(t))return t;if(t&&$.isString(t)&&(r&&!o||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Xo(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?xe.from(d,xe.ERR_BAD_RESPONSE,this,null,Xo(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:un.classes.FormData,Blob:un.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=>{ya.headers[e]={}});function _f(e,t){const n=this||ya,r=t||n,o=gn.from(r.headers);let a=r.data;return $.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function kg(e){return!!(e&&e.__CANCEL__)}let ba=class extends xe{constructor(t,n,r){super(t==null?"canceled":t,xe.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Pg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new xe("Request failed with status code "+n.status,n.status>=400&&n.status<500?xe.ERR_BAD_REQUEST:xe.ERR_BAD_RESPONSE,n.config,n.request,n))}function qv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Yv(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[o]=d,r[o]=f;let m=a,T=0;for(;m!==o;)T+=n[m++],m=m%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(T*1e3/y):void 0}}function Wv(e,t){let n=0,r=1e3/t,o,a;const u=(f,p=Date.now())=>{n=p,o=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),m=p-n;m>=r?u(f,p):(o=f,a||(a=setTimeout(()=>{a=null,u(o)},r-m)))},()=>o&&u(o)]}const dl=(e,t,n=3)=>{let r=0;const o=Yv(50,250);return Wv(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,f=Math.max(0,d-r),p=o(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)},Ng=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Og=e=>(...t)=>$.asap(()=>e(...t)),Gv=un.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,un.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(un.origin),un.navigator&&/(msie|trident)/i.test(un.navigator.userAgent)):()=>!0,Xv=un.hasStandardBrowserEnv?{write(e,t,n,r,o,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(o)&&c.push(`domain=${o}`),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+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)try{return decodeURIComponent(r.slice(o+1))}catch(a){return r.slice(o+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Kv(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Qv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const Jv=/^https?:(?!\/\/)/i,Zv=/[\t\n\r]/g;function eC(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function tC(e){return eC(e).replace(Zv,"")}function Ig(e,t){if(typeof e=="string"&&Jv.test(tC(e)))throw new xe('Invalid URL: missing "//" after protocol',xe.ERR_INVALID_URL,t)}function Rg(e,t,n,r){Ig(t,r);let o=!Kv(t);return e&&(o||n===!1)?(Ig(e,r),Qv(e,t)):t}const Lg=e=>e instanceof gn?F({},e):e;function so(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 o(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)=>o(Lg(p),Lg(m),T,!0)};return $.forEach(Object.keys(F(F({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=$.hasOwnProp(f,m)?f[m]:o,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 nC=["content-type","content-length"];function rC(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,o])=>{nC.includes(r.toLowerCase())&&e.set(r,o)})}const iC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Dg(e){const t=so({},e),n=T=>$.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=c=gn.from(c),t.url=xg(Rg(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?iC(y):"")))}catch(_){throw xe.from(_,xe.ERR_BAD_OPTION_VALUE,e)}}if($.isFormData(r)&&(un.hasStandardBrowserEnv||un.hasStandardBrowserWebWorkerEnv||$.isReactNative(r)?c.setContentType(void 0):$.isFunction(r.getHeaders)&&rC(c,r.getHeaders(),n("formDataHeaderPolicy"))),un.hasStandardBrowserEnv&&($.isFunction(o)&&(o=o(t)),o===!0||o==null&&Gv(t.url))){const y=a&&u&&Xv.read(u);y&&c.set(a,y)}return t}const oC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=Dg(e);let a=o.data;const u=gn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=o,p,m,T,y,_;function w(){y&&y(),_&&_(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let C=new XMLHttpRequest;C.open(o.method.toUpperCase(),o.url,!0),C.timeout=o.timeout;function A(){if(!C)return;const v=gn.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),Y={data:!c||c==="text"||c==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:v,config:e,request:C};Pg(function(q){n(q),w()},function(q){r(q),w()},Y),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 xe("Request aborted",xe.ECONNABORTED,e,C)),w(),C=null)},C.onerror=function(H){const Y=H&&H.message?H.message:"Network Error",D=new xe(Y,xe.ERR_NETWORK,e,C);D.event=H||null,r(D),w(),C=null},C.ontimeout=function(){let H=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const Y=o.transitional||yf;o.timeoutErrorMessage&&(H=o.timeoutErrorMessage),r(new xe(H,Y.clarifyTimeoutError?xe.ETIMEDOUT:xe.ECONNABORTED,e,C)),w(),C=null},a===void 0&&u.setContentType(null),"setRequestHeader"in C&&$.forEach(Eg(u),function(H,Y){C.setRequestHeader(Y,H)}),$.isUndefined(o.withCredentials)||(C.withCredentials=!!o.withCredentials),c&&c!=="json"&&(C.responseType=o.responseType),f&&([T,_]=dl(f,!0),C.addEventListener("progress",T)),d&&C.upload&&([m,y]=dl(d),C.upload.addEventListener("progress",m),C.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=v=>{C&&(r(!v||v.type?new ba(null,e,C):v),C.abort(),w(),C=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const P=qv(o.url);if(P&&!un.protocols.includes(P)){r(new xe("Unsupported protocol "+P+":",xe.ERR_BAD_REQUEST,e)),w();return}C.send(a||null)})},sC=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof xe?f:new ba(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,o(new xe(`timeout of ${t}ms exceeded`,xe.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o,{once:!0}));const{signal:c}=n;return c.unsubscribe=()=>$.asap(u),c},aC=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},uC=function(e,t){return Pd(this,null,function*(){try{for(var n=Qw(lC(e)),r,o,a;r=!(o=yield new ii(n.next())).done;r=!1){const u=o.value;yield*b0(aC(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new ii(o.call(n)))}finally{if(a)throw a[0]}}})},lC=function(e){return Pd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*b0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new ii(t.read());if(n)break;yield r}}finally{yield new ii(t.cancel())}})},Mg=(e,t,n,r)=>{const o=uC(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return Je(this,null,function*(){try{const{done:p,value:m}=yield o.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),o.return()}},{highWaterMark:2})},fl=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,cC=(e,t,n)=>t+2<n&&fl(e.charCodeAt(t+1))&&fl(e.charCodeAt(t+2));function dC(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);fl(_)&&fl(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&&cC(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 Sf="1.18.1",Fg=64*1024,{isFunction:hl}=$,fC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Bg=e=>{if(!$.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Ug=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},hC=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},pC=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:o,Request:a,Response:u}=e,c=o?hl(o):typeof fetch=="function",d=hl(a),f=hl(u);if(!c)return!1;const p=c&&hl(n),m=c&&(typeof r=="function"?(A=>P=>A.encode(P))(new r):A=>Je(null,null,function*(){return new Uint8Array(yield new a(A).arrayBuffer())})),T=d&&p&&Ug(()=>{let A=!1;const P=new a(un.origin,{body:new n,method:"POST",get duplex(){return A=!0,"half"}}),v=P.headers.has("Content-Type");return P.body!=null&&P.body.cancel(),A&&!v}),y=f&&p&&Ug(()=>$.isReadableStream(new u("").body)),_={stream:y&&(A=>A.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(A=>{!_[A]&&(_[A]=(P,v)=>{let H=P&&P[A];if(H)return H.call(P);throw new xe(`Response type '${A}' is not supported`,xe.ERR_NOT_SUPPORT,v)})});const w=A=>Je(null,null,function*(){if(A==null)return 0;if($.isBlob(A))return A.size;if($.isSpecCompliantForm(A))return(yield new a(un.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,P)=>Je(null,null,function*(){const v=$.toFiniteNumber(A.getContentLength());return v==null?w(P):v});return A=>Je(null,null,function*(){let{url:P,method:v,data:H,signal:Y,cancelToken:D,timeout:q,onDownloadProgress:re,onUploadProgress:me,responseType:V,headers:oe,withCredentials:ce="same-origin",fetchOptions:de,maxContentLength:ne,maxBodyLength:Te}=Dg(A);const Pe=$.isNumber(ne)&&ne>-1,se=$.isNumber(Te)&&Te>-1,K=Ee=>$.hasOwnProp(A,Ee)?A[Ee]:void 0;let ie=o||fetch;V=V?(V+"").toLowerCase():"text";let k=sC([Y,D&&D.toAbortSignal()],q),L=null;const ee=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let I,Se=null;const je=()=>new xe("Request body larger than maxBodyLength limit",xe.ERR_BAD_REQUEST,A,L);try{let Ee;const Be=K("auth");if(Be){const qe=$.getSafeProp(Be,"username")||"",Nt=$.getSafeProp(Be,"password")||"";Ee={username:qe,password:Nt}}if(hC(P)){const qe=new URL(P,un.origin);if(!Ee&&(qe.username||qe.password)){const Nt=Bg(qe.username),Nn=Bg(qe.password);Ee={username:Nt,password:Nn}}(qe.username||qe.password)&&(qe.username="",qe.password="",P=qe.href)}if(Ee&&(oe.delete("authorization"),oe.set("Authorization","Basic "+btoa(fC((Ee.username||"")+":"+(Ee.password||""))))),Pe&&typeof P=="string"&&P.startsWith("data:")&&dC(P)>ne)throw new xe("maxContentLength size of "+ne+" exceeded",xe.ERR_BAD_RESPONSE,A,L);if(se&&v!=="get"&&v!=="head"){const qe=yield w(H);if(typeof qe=="number"&&isFinite(qe)&&(I=qe,qe>Te))throw je()}const Ve=se&&($.isReadableStream(H)||$.isStream(H)),Ge=(qe,Nt,Nn)=>Mg(qe,Fg,cn=>{if(se&&cn>Te)throw Se=je();Nt&&Nt(cn)},Nn);if(T&&v!=="get"&&v!=="head"&&(me||Ve)){if(I=I==null?yield C(oe,H):I,I!==0||Ve){let qe=new a(P,{method:"POST",body:H,duplex:"half"}),Nt;if($.isFormData(H)&&(Nt=qe.headers.get("content-type"))&&oe.setContentType(Nt),qe.body){const[Nn,cn]=me&&Ng(I,dl(Og(me)))||[];H=Ge(qe.body,Nn,cn)}}}else if(Ve&&!d&&p&&v!=="get"&&v!=="head")H=Ge(H);else if(Ve&&d&&!T&&v!=="get"&&v!=="head")throw new xe("Stream request bodies are not supported by the current fetch implementation",xe.ERR_NOT_SUPPORT,A,L);$.isString(ce)||(ce=ce?"include":"omit");const _t=d&&"credentials"in a.prototype;if($.isFormData(H)){const qe=oe.getContentType();qe&&/^multipart\/form-data/i.test(qe)&&!/boundary=/i.test(qe)&&oe.delete("content-type")}oe.set("User-Agent","axios/"+Sf,!1);const Pn=pe(F({},de),{signal:k,method:v.toUpperCase(),headers:Eg(oe.normalize()),body:H,duplex:"half",credentials:_t?ce:void 0});L=d&&new a(P,Pn);let ln=yield d?ie(L,de):ie(P,Pn);const kr=gn.from(ln.headers);if(Pe){const qe=$.toFiniteNumber(kr.getContentLength());if(qe!=null&&qe>ne)throw new xe("maxContentLength size of "+ne+" exceeded",xe.ERR_BAD_RESPONSE,A,L)}const fr=y&&(V==="stream"||V==="response");if(y&&ln.body&&(re||Pe||fr&&ee)){const qe={};["status","statusText","headers"].forEach(Oe=>{qe[Oe]=ln[Oe]});const Nt=$.toFiniteNumber(kr.getContentLength()),[Nn,cn]=re&&Ng(Nt,dl(Og(re),!0))||[];let Hn=0;const Ae=Oe=>{if(Pe&&(Hn=Oe,Hn>ne))throw new xe("maxContentLength size of "+ne+" exceeded",xe.ERR_BAD_RESPONSE,A,L);Nn&&Nn(Oe)};ln=new u(Mg(ln.body,Fg,Ae,()=>{cn&&cn(),ee&&ee()}),qe)}V=V||"text";let rn=yield _[$.findKey(_,V)||"text"](ln,A);if(Pe&&!y&&!fr){let qe;if(rn!=null&&(typeof rn.byteLength=="number"?qe=rn.byteLength:typeof rn.size=="number"?qe=rn.size:typeof rn=="string"&&(qe=typeof r=="function"?new r().encode(rn).byteLength:rn.length)),typeof qe=="number"&&qe>ne)throw new xe("maxContentLength size of "+ne+" exceeded",xe.ERR_BAD_RESPONSE,A,L)}return!fr&&ee&&ee(),yield new Promise((qe,Nt)=>{Pg(qe,Nt,{data:rn,headers:gn.from(ln.headers),status:ln.status,statusText:ln.statusText,config:A,request:L})})}catch(Ee){if(ee&&ee(),k&&k.aborted&&k.reason instanceof xe){const Be=k.reason;throw Be.config=A,L&&(Be.request=L),Ee!==Be&&Object.defineProperty(Be,"cause",{__proto__:null,value:Ee,writable:!0,enumerable:!1,configurable:!0}),Be}if(Se)throw L&&!Se.request&&(Se.request=L),Se;if(Ee instanceof xe)throw L&&!Ee.request&&(Ee.request=L),Ee;if(Ee&&Ee.name==="TypeError"&&/Load failed|fetch/i.test(Ee.message)){const Be=new xe("Network Error",xe.ERR_NETWORK,A,L,Ee&&Ee.response);throw Object.defineProperty(Be,"cause",{__proto__:null,value:Ee.cause||Ee,writable:!0,enumerable:!1,configurable:!0}),Be}throw xe.from(Ee,Ee&&Ee.code,A,L,Ee&&Ee.response)}})},mC=new Map,Hg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,c=u,d,f,p=mC;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:pC(t)),p=f;return f};Hg();const xf={http:Rv,xhr:oC,fetch:{get:Hg}};$.forEach(xf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const zg=e=>`- ${e}`,gC=e=>$.isFunction(e)||e===null||e===!1;function EC(e,t){e=$.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(o=r,!gC(r)&&(o=xf[(c=String(r)).toLowerCase()],o===void 0))throw new xe(`Unknown adapter '${c}'`);if(o&&($.isFunction(o)||(o=o.get(t))))break;a[c||"#"+u]=o}if(!o){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
|
|
5
5
|
`+u.map(zg).join(`
|
|
6
|
-
`):" "+zg(u[0]):"as no adapter specified";throw new
|
|
6
|
+
`):" "+zg(u[0]):"as no adapter specified";throw new xe("There is no suitable adapter to dispatch the request "+c,xe.ERR_NOT_SUPPORT)}return o}const jg={getAdapter:EC,adapters:xf};function wf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ba(null,e)}function $g(e){return wf(e),e.headers=gn.from(e.headers),e.data=_f.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),jg.getAdapter(e.adapter||ya.adapter,e)(e).then(function(r){wf(e),e.response=r;try{r.data=_f.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=gn.from(r.headers),r},function(r){if(!kg(r)&&(wf(e),r&&r.response)){e.response=r.response;try{r.response.data=_f.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=gn.from(r.response.headers)}return Promise.reject(r)})}const pl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{pl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Vg={};pl.transitional=function(t,n,r){function o(a,u){return"[Axios v"+Sf+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new xe(o(u," has been removed"+(n?" in "+n:"")),xe.ERR_DEPRECATED);return n&&!Vg[u]&&(Vg[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},pl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function yC(e,t,n){if(typeof e!="object"||e===null)throw new xe("options must be an object",xe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new xe("option "+a+" must be "+d,xe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new xe("Unknown option "+a,xe.ERR_BAD_OPTION)}}const ml={assertOptions:yC,validators:pl},En=ml.validators;let ao=class{constructor(t){this.defaults=t||{},this.interceptors={request:new wg,response:new wg}}request(t,n){return Je(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=(()=>{if(!o.stack)return"";const u=o.stack.indexOf(`
|
|
7
7
|
`);return u===-1?"":o.stack.slice(u+1)})();try{if(!r.stack)r.stack=a;else if(a){const u=a.indexOf(`
|
|
8
8
|
`),c=u===-1?-1:a.indexOf(`
|
|
9
9
|
`,u+1),d=c===-1?"":a.slice(c+1);String(r.stack).endsWith(d)||(r.stack+=`
|
|
10
|
-
`+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=so(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&ml.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),o!=null&&($.isFunction(o)?n.paramsSerializer={serialize:o}:ml.assertOptions(o,{encode:En.function,serialize:En.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ml.assertOptions(n,{baseUrl:En.spelling("baseURL"),withXsrfToken:En.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=gn.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||yf;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 _=[$g.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=$g.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=so(this.defaults,t);const n=Rg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return xg(n,t.params,t.paramsSerializer)}};$.forEach(["delete","get","head","options"],function(t){ao.prototype[t]=function(n,r){return this.request(so(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(so(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}ao.prototype[t]=n(),t!=="query"&&(ao.prototype[t+"Form"]=n(!0))});let bC=class Zw{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new ba(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 Zw(function(o){t=o}),cancel:t}}};function TC(e){return function(n){return e.apply(null,n)}}function _C(e){return $.isObject(e)&&e.isAxiosError===!0}const Af={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(Af).forEach(([e,t])=>{Af[t]=e});function qg(e){const t=new ao(e),n=sg(ao.prototype.request,t);return $.extend(n,ao.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return qg(so(e,o))},n}const Mt=qg(ya);Mt.Axios=ao,Mt.CanceledError=ba,Mt.CancelToken=bC,Mt.isCancel=kg,Mt.VERSION=Sf,Mt.toFormData=cl,Mt.AxiosError=Se,Mt.Cancel=Mt.CanceledError,Mt.all=function(t){return Promise.all(t)},Mt.spread=TC,Mt.isAxiosError=_C,Mt.mergeConfig=so,Mt.AxiosHeaders=gn,Mt.formToJSON=e=>Cg($.isHTMLForm(e)?new FormData(e):e),Mt.getAdapter=jg.getAdapter,Mt.HttpStatusCode=Af,Mt.default=Mt;const{Axios:pU,AxiosError:mU,CanceledError:gU,isCancel:EU,CancelToken:yU,VERSION:bU,all:TU,Cancel:_U,isAxiosError:SU,spread:xU,toFormData:wU,AxiosHeaders:AU,HttpStatusCode:vU,formToJSON:CU,getAdapter:kU,mergeConfig:PU,create:NU}=Mt;class SC{constructor(t,n,r,o=!1,a,u){xe(this,"CIMULATE_API_HEADER","x-cimulate-api-key");xe(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");xe(this,"CIMULATE_SEARCH_API_PATH","api/v1");xe(this,"baseApiUrl");xe(this,"headers",{});xe(this,"fetchConfig",()=>Je(this,null,function*(){try{const t=yield Mt.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}}));xe(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const o=new URL(t);return o.hostname=o.hostname.replace(/^copilot\./,"api."),o.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,o)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class xC{constructor(t,n,r,o=!1,a,u){xe(this,"apiService");xe(this,"config",null);xe(this,"getConfig",()=>Je(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}}));xe(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));xe(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));xe(this,"getDescription",t=>this.getProductFieldValue(t,"description"));xe(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));xe(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));xe(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));xe(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));xe(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));xe(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});xe(this,"getProductField",t=>this.config?this.config[t]:"");xe(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new SC(t,n,r,o,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Ko=(e,t,n,...r)=>{if(!e)return;const o=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",o,n,...r)};class wC{constructor(t=!1){xe(this,"isDevelopment");xe(this,"_log",(t,n,...r)=>{Ko(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 AC={copilot:"Your Search Assistant",messaging:"Commerce Client"},Yg=B.createContext(null),vC=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:o="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:T,searchConfig:y,suggestionButtonConfig:_,messageAlignment:w="start",autoScroll:C=!0,componentConfig:A,conversationHistory:P,resetConversationMessage:v="",apiKey:H,apiToken:Y,baseUrl:D,customerId:q,tenantId:re,theme:me,isDevelopment:V,__features:se,routingAttributes:ce,enableDownloadTranscript:de=!0,children:ne})=>{const Ee=e==="messaging",Oe=B.useMemo(()=>{const O=ce==null?void 0:ce.isCartMgmtSupported;return O===!0||O==="true"},[ce]),oe=B.useMemo(()=>Ee?{config:null}:new xC(D,H,Y,V,q,re),[Ee,D,H,Y,V,q,re]),Q=B.useMemo(()=>new wC(V),[V]);B.useEffect(()=>{Ee||!oe||oe.config||oe.getConfig()},[oe,Ee]);const ie=B.useMemo(()=>PA(me),[me]),k=B.useMemo(()=>{const O=(y==null?void 0:y.placeholder)||m,we=(y==null?void 0:y.buttonLabel)||T;let Ue="icon";return y!=null&&y.buttonType?Ue=y.buttonType:T&&(Ue="text"),pe(F({},y||{}),{placeholder:O,buttonLabel:we,buttonType:Ue})},[y,m,T]),L=B.useMemo(()=>pe(F({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||AC[e!=null?e:"copilot"]}),[r,t,n,e]),ee=B.useMemo(()=>({configModule:oe,mode:e!=null?e:"copilot",headerConfig:L,entryMessage:a,globalClassName:o,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:ie,logger:Q,searchConfig:k,suggestionButtonConfig:_,messageAlignment:w,autoScroll:C,enableMinimize:!!(A!=null&&A.enableMinimize),enableDownloadTranscript:de,resetConversationMessage:v,conversationHistory:{sinceHours:typeof(P==null?void 0:P.sinceHours)=="number"?P.sinceHours:1,limit:P==null?void 0:P.limit},features:se,isCartMgmtSupported:Oe}),[oe,e,L,a,o,f,p,c,d,u,k,_,w,C,A,de,v,Q,ie,P,se,Oe]);return x.jsx(Yg.Provider,{value:ee,children:ne})},rt=()=>{const e=B.useContext(Yg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class CC{constructor(){xe(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}});xe(this,"connectedProxy");xe(this,"modeProxy");xe(this,"entryTypeProxy");xe(this,"statusProxy");xe(this,"dialogProxy");xe(this,"modalProxy",{isFullscreen:!1});xe(this,"_fullGet",(t,n)=>Reflect.get(t,n));xe(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return NC(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 et=new CC,uo=()=>et.connected,Ta=()=>et.isOpen,kC=e=>{window.addEventListener(uf,e)},PC=e=>{window.removeEventListener(uf,e)},NC=(e,t)=>{const n=new CustomEvent(uf,{detail:{property:e,value:t}});window.dispatchEvent(n)},OC=e=>{et.connectedProxy.connected=e},_a=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);et.entryTypeProxy.entryType=e},ui=e=>{const t=et.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;et.statusProxy.isOpen=n,n&&(et.statusProxy.isMinimized=!1)},gl=e=>{const t=et.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;et.statusProxy.isMinimized=n,n&&(et.statusProxy.isOpen=!1)},vf=e=>{et.modalProxy.isFullscreen=e},El=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);et.statusProxy.type=e,e==="dialog"||e==="chat"?et.modeProxy.mode="embedded":et.modeProxy.mode="standalone"},Cf=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(", ")}.`);et.dialogProxy.position=e},IC=e=>{const t=et.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;et.dialogProxy.isFullHeight=n},RC=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=rt(),o=B.useCallback(v=>{n({type:mt.SET_COPILOT,payload:v})},[n]),a=B.useCallback(v=>{OC(v),n({type:mt.SET_CONNECTED,payload:v})},[n]),u=B.useCallback(()=>{n({type:mt.RESET_COPILOT,payload:{}})},[n]),c=B.useCallback(()=>{n({type:mt.RESET_STATE,payload:{}})},[n]),d=B.useCallback(v=>{r==null||r.log(`${v.name} event received`,v),n({type:mt.ADD_MESSAGE,payload:v}),v.bypassHandlers||e==null||e(v)},[e,r,n]),f=B.useCallback(v=>{n({type:mt.ADD_LOADING_MESSAGE,payload:v})},[n]),p=B.useCallback(v=>{n({type:mt.REMOVE_LOADING_MESSAGE,payload:v})},[n]),m=B.useCallback(v=>{d(v),f(v.id)},[d,f]),T=B.useCallback(v=>{n({type:mt.SET_ACTIVE_CONVERSATION_ID,payload:v})},[n]),y=B.useCallback(v=>{n({type:mt.ADD_CONVERSATION_ID,payload:v})},[n]),_=B.useCallback(v=>{n({type:mt.SET_CONVERSATION_IDS,payload:v})},[n]),w=B.useCallback(v=>{n({type:mt.SET_IMAGE_FILE,payload:v})},[n]),C=B.useCallback(v=>{n({type:mt.SET_ASK_CIM_PROMPTS,payload:v})},[n]),A=B.useCallback(v=>{n({type:mt.SET_CONVERSATION_HISTORY_LOADED,payload:v})},[n]),P=B.useMemo(()=>({setCopilot:o,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}),[o,a,u,c,d,f,p,m,T,y,_,w,C,A]);return x.jsx(og.Provider,{value:P,children:t})};wA();const LC=(e,t)=>{const{type:n,payload:r}=t;if(n===mt.ADD_MESSAGE){const o=r;if(e.messages.push(o),o.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===o.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const c=u.findIndex(d=>d.id===o.id);if(c!==-1){u[c]=o;return}u.push(o);return}else{e.groupedMessages.push({type:"group",eventSourceId:o.eventSourceId,messages:[o],createdAt:new Date(o.createdAt)});return}}e.groupedMessages.push({type:"individual",message:o,createdAt:new Date(o.createdAt)});return}switch(n){case mt.RESET_STATE:e.messages=ro.messages,e.groupedMessages=ro.groupedMessages,e.loadingMessages=ro.loadingMessages,e.imageFile=ro.imageFile,e.askCimPrompts=ro.askCimPrompts,e.conversationHistoryLoaded=ro.conversationHistoryLoaded;break;case mt.RESET_COPILOT:e.copilot=null;break;case mt.SET_COPILOT:e.copilot=r;break;case mt.SET_CONNECTED:e.connected=r;break;case mt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case mt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case mt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case mt.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case mt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case mt.SET_IMAGE_FILE:e.imageFile=r;break;case mt.SET_ASK_CIM_PROMPTS:e.askCimPrompts.requestId=(r==null?void 0:r.requestId)||null,e.askCimPrompts.message=(r==null?void 0:r.message)||null;break;case mt.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},DC=({onCopilotEvent:e,children:t})=>{const[n,r]=ng(LC,ro);return x.jsx(ig.Provider,{value:n,children:x.jsx(RC,{onCopilotEvent:e,dispatch:r,children:t})})};function MC(){var e=B.useRef(!0);return e.current?(e.current=!1,!0):e.current}function FC(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function BC(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var kf=typeof window!="undefined",Sa=function(e){B.useEffect(e,[])},UC=function(e){var t=B.useRef(e);t.current=e,Sa(function(){return function(){return t.current()}})},HC=function(e){var t=B.useRef(0),n=B.useState(e),r=n[0],o=n[1],a=B.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return UC(function(){cancelAnimationFrame(t.current)}),[r,a]},zC=function(e,t){return e===t};function jC(e,t){t===void 0&&(t=zC);var n=B.useRef(),r=B.useRef(e),o=MC();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var $C=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,o=t.initialHeight,a=o===void 0?1/0:o,u=t.onChange,c=HC({width:kf?window.innerWidth:r,height:kf?window.innerHeight:a}),d=c[0],f=c[1];return B.useEffect(function(){if(kf){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return FC(window,"resize",p),function(){BC(window,"resize",p)}}},[]),d};class VC{constructor(){xe(this,"items",[]);xe(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});xe(this,"remove",()=>this.items.shift());xe(this,"first",()=>this.items.length>0?this.items[0]:null);xe(this,"clear",()=>{this.items.length=0});xe(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 VC,Wg=e=>{window.addEventListener(af,e)},Gg=e=>{window.removeEventListener(af,e)},qC=(e,t,n)=>{const r=new CustomEvent(af,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Xg=e=>{window.addEventListener(sf,e)},Kg=e=>{window.removeEventListener(sf,e)},YC=(e,t,n)=>{const r=new CustomEvent(sf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Qg=e=>{window.addEventListener(of,e)},Jg=e=>{window.removeEventListener(of,e)},Zg=(e,t,n)=>{const r=new CustomEvent(of,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},WC=e=>{window.addEventListener(cf,e)},GC=e=>{window.removeEventListener(cf,e)},yl=(e,t,n)=>{const r=new CustomEvent(cf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class XC{constructor(){xe(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});xe(this,"categoryIdProxy");xe(this,"facetFiltersProxy");xe(this,"rangeFiltersProxy");xe(this,"catalogSegmentProxy");xe(this,"pricebooksProxy");xe(this,"_fullGet",(t,n)=>Reflect.get(t,n));xe(this,"_fullSet",(t,n,r)=>{const o=CA[n];return YC(o,n,r),Reflect.set(t,n,r)});xe(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));xe(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));xe(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 lt=new XC,e1=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},t1=(e,t,n)=>{var u,c;const r=F({},((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},n1=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},r1=({field:e,value:t},n)=>{const[r,o]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof o=="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:o},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:o});const c=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=c.rangeFilters},i1=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},o1=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},KC=e=>{if(!uo()||!Ta()){uo()&&yn.clear(),yn.add({context:"browse",payload:pe(F({},lt.state),{categoryId:e})});return}lt.categoryIdProxy.categoryId=e},s1=e=>{e1(e,lt)},QC=(e,t)=>{t1(e,t,lt)},a1=e=>{n1(e,lt)},JC=({field:e,value:t})=>{r1({field:e,value:t},lt)},ZC=e=>{i1(e,lt)},u1=e=>{o1(e,lt)},l1=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=uo(),n=Ta();if(!t||!n){t&&yn.clear(),yn.add({context:"browse",payload:F({},e)});return}"facetFilters"in e&&s1(e.facetFilters||{}),"rangeFilters"in e&&a1(e.rangeFilters||[]),"catalogSegment"in e&&(lt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&u1(e.pricebooks||[]),"categoryName"in e&&(lt.categoryIdProxy.categoryName=e.categoryName||""),lt.categoryIdProxy.categoryId=e.categoryId},ek=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:l1,updateBrowseCategoryId:KC,updateCatalogSegment:ZC,updateFacetFilter:QC,updateFacetFilters:s1,updatePricebooks:u1,updateRangeFilter:JC,updateRangeFilters:a1},Symbol.toStringTag,{value:"Module"}));class tk{constructor(){xe(this,"initialParams",{productId:"",productName:"",pdpLink:""});xe(this,"proxy");xe(this,"_fullGet",(t,n)=>Reflect.get(t,n));xe(this,"_fullSet",(t,n,r)=>(Zg(n,r),Reflect.set(t,n,r)));xe(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const Sr=new tk,c1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=uo(),n=Ta();if(!t||!n){t&&yn.clear(),yn.add({context:"pdp",payload:F({},e)});return}Sr.updateProxy(e),Zg("pdp-context",e)},nk=e=>{Sr.proxy.productId=e,uo()||yn.add({context:"pdp",payload:F({},Sr.state)})},rk=e=>{Sr.proxy.pdpLink=e},gt={SET_PROMPTS_EXTENSION_INITIALIZED:"SET_PROMPTS_EXTENSION_INITIALIZED",SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},d1={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",disableAskElseButton:!1};class ik{constructor(){xe(this,"initialState",d1);xe(this,"promptsStateProxy");xe(this,"promptsParamsProxy");xe(this,"_fullGet",(t,n)=>Reflect.get(t,n));xe(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return xa(n,r),Reflect.set(t,n,r)});xe(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));xe(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));xe(this,"updatePromptsParamsProxy",t=>new Proxy(F({},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 zt=new ik,ok=e=>{window.addEventListener(lf,e)},sk=e=>{window.removeEventListener(lf,e)},xa=(e,t)=>{const n=new CustomEvent(lf,{detail:{property:e,value:t}});window.dispatchEvent(n)},f1=e=>{const t=zt.isOpen,n=typeof e=="boolean"?e:!t;zt.promptsStateProxy.isOpen=n},h1=e=>{const t=zt.isInline,n=typeof e=="boolean"?e:!t;zt.promptsStateProxy.isInline=n},ak=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),xa("params",e),zt.promptsStateProxy.entryType="ask_cim"},uk=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),xa("params",e),zt.promptsStateProxy.entryType="search"},lk=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),xa("params",e),zt.promptsStateProxy.entryType="browse"},ck=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),xa("params",e),zt.promptsStateProxy.entryType="pdp"},dk=({elementId:e,entryType:t,params:n,isInline:r})=>{zt.promptsStateProxy.elementId=e,t&&(zt.promptsStateProxy.entryType=t),typeof r=="boolean"&&h1(r),n&&zt.updatePromptsParamsProxy(n),zt.isOpen||f1(!0)},fk=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{yl("getConversationMessages",{payload:e,callback:t},Ci.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{yl("getSessionInformation",{callback:e},Ci.GET_SESSION_INFORMATION)},loadConversation:e=>{yl("loadConversation",e,Ci.LOAD_CONVERSATION)},resetConversation:()=>{yl("resetConversation",!0,Ci.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class hk{constructor(){xe(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});xe(this,"queryProxy");xe(this,"facetFiltersProxy");xe(this,"rangeFiltersProxy");xe(this,"catalogSegmentProxy");xe(this,"pricebooksProxy");xe(this,"_fullGet",(t,n)=>Reflect.get(t,n));xe(this,"_fullSet",(t,n,r)=>{const o=kA[n];return qC(o,n,r),Reflect.set(t,n,r)});xe(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));xe(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));xe(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 hk,pk=e=>{const t=Ta(),n=uo();if(!n||!t){n&&yn.clear(),yn.add({context:"search",payload:pe(F({},Tt.state),{query:e})});return}Tt.queryProxy.query=e},p1=e=>{e1(e,Tt)},mk=(e,t)=>{t1(e,t,Tt)},m1=e=>{n1(e,Tt)},gk=({field:e,value:t})=>{r1({field:e,value:t},Tt)},Ek=e=>{i1(e,Tt)},g1=e=>{o1(e,Tt)},E1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=Ta(),n=uo();if(!n||!t){n&&yn.clear(),yn.add({context:"search",payload:F({},e)});return}"facetFilters"in e&&p1(e.facetFilters||{}),"rangeFilters"in e&&m1(e.rangeFilters||[]),"catalogSegment"in e&&(Tt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&g1(e.pricebooks||[]),Tt.queryProxy.query=e.query},yk=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:E1,updateCatalogSegment:Ek,updateFacetFilter:mk,updateFacetFilters:p1,updatePricebooks:g1,updateRangeFilter:gk,updateRangeFilters:m1,updateSearchQuery:pk},Symbol.toStringTag,{value:"Module"})),bk={categoryId:lt.categoryId,categoryName:lt.categoryIdProxy.categoryName||"",facetFilters:lt.facetFilters,rangeFilters:lt.rangeFilters,catalogSegment:lt.catalogSegment,pricebooks:lt.pricebooks},y1=B.createContext(bk),Tk=({children:e})=>{const[t,n]=B.useState(lt.categoryId),[r,o]=B.useState(lt.categoryIdProxy.categoryName||""),[a,u]=B.useState(lt.facetFilters||{}),[c,d]=B.useState(lt.rangeFilters||[]),[f,p]=B.useState(lt.catalogSegment||null),[m,T]=B.useState(lt.pricebooks||null);B.useEffect(()=>{const _=({detail:w})=>{(w==null?void 0:w.property)==="categoryId"&&n(w.value),(w==null?void 0:w.property)==="categoryName"&&o(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 Xg(_),()=>{Kg(_)}},[]);const y=B.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:m}),[t,r,a,c,f,m]);return x.jsx(y1.Provider,{value:y,children:e})},_k=()=>{const e=B.useContext(y1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},Sk={searchQuery:Tt.query,facetFilters:Tt.facetFilters,rangeFilters:Tt.rangeFilters,catalogSegment:Tt.catalogSegment,pricebooks:Tt.pricebooks},b1=B.createContext(Sk),xk=({children:e})=>{const[t,n]=B.useState(Tt.query),[r,o]=B.useState(Tt.facetFilters),[a,u]=B.useState(Tt.rangeFilters),[c,d]=B.useState(Tt.catalogSegment),[f,p]=B.useState(Tt.pricebooks);B.useEffect(()=>{const T=({detail:y})=>{(y==null?void 0:y.property)==="query"&&n(y.value),(y==null?void 0:y.property)==="facetFilters"&&o(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 Wg(T),()=>{Gg(T)}},[]);const m=B.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return x.jsx(b1.Provider,{value:m,children:e})},wk=()=>{const e=B.useContext(b1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},Ak={productId:Sr.productId,pdpLink:Sr.pdpLink},T1=B.createContext(Ak),vk=({children:e})=>{const[t,n]=B.useState(Sr.productId),[r,o]=B.useState(Sr.pdpLink);B.useEffect(()=>{const u=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const d=c.value;n(d.productId),o(d.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&o(c.value)};return Qg(u),()=>{Jg(u)}},[]);const a=B.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return x.jsx(T1.Provider,{value:a,children:e})},Ck=()=>{const e=B.useContext(T1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},_1=B.createContext({mode:et.modeProxy.mode,entryType:et.entryType,status:et.statusProxy,dialogPosition:et.dialogProxy.position,isDialogFullHeight:et.dialogProxy.isFullHeight,dialogWidth:et.dialogProxy.width,isModalFullscreen:et.modalProxy.isFullscreen,previousComponentType:et.statusProxy.type}),kk=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=B.useState(e!=null?e:et.entryTypeProxy.entryType),[u,c]=B.useState(et.modeProxy.mode),[d,f]=B.useState({type:n||et.statusProxy.type,isOpen:et.statusProxy.isOpen,isMinimized:et.statusProxy.isMinimized}),[p,m]=B.useState(et.dialogProxy.position),[T,y]=B.useState(et.dialogProxy.isFullHeight),[_,w]=B.useState(et.dialogProxy.width),[C,A]=B.useState(et.modalProxy.isFullscreen),P=jC(d.type);B.useEffect(()=>{const H=Y=>{const{property:D,value:q}=Y.detail||{};if(!(!D||q===void 0)){if(D==="mode"){c(q);return}if(D==="entryType"){a(q);return}if(D==="isMinimized"){f(re=>pe(F({},re),{isMinimized:q}));return}if(D==="isOpen"){f(re=>pe(F({},re),{isOpen:q}));return}if(D==="type"){f(re=>pe(F({},re),{type:q}));return}if(D==="position"){m(q);return}if(D==="isFullHeight"){y(q);return}if(D==="width"){w(q);return}if(D==="isFullscreen"){A(q);return}}};return kC(H),()=>{PC(H)}},[]),Sa(()=>{e&&_a(e)}),Sa(()=>{const H=n||(t==null?void 0:t.type);H&&El(H),t&&"isOpen"in t&&ui(!!t.isOpen),t&&"isMinimized"in t&&gl(!!t.isMinimized)}),Sa(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:H}=t.options;H&&Cf(H),"dialogFullHeight"in t.options&&IC(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&w(t.options.dialogWidth),"isModalFullscreen"in t.options&&vf(!!t.options.isModalFullscreen)});const v=B.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:P||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:_,isModalFullscreen:C}),[u,o,d,P,p,T,_,C]);return x.jsx(_1.Provider,{value:v,children:r})},sr=()=>{const e=B.useContext(_1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},S1=B.createContext(null),x1=B.createContext(null),Pf=()=>{const e=B.useContext(x1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},li=()=>{const e=B.useContext(S1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},Qo=()=>{const e=B.useContext(og);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},ar=()=>{const e=B.useContext(ig);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},Pk=({copilot:e})=>{const{logger:t,conversationHistory:n}=rt(),{isInline:r}=li(),{addCopilotEvent:o,setConversationHistoryLoaded:a}=Qo(),{activeConversationId:u}=ar(),c=B.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=B.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 B.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(P=>P.id===w.eventSourceId);(A=C==null?void 0:C.name)!=null&&A.endsWith("_suggestions")||(w.bypassHandlers=!0,y.unshift(w))}),y.forEach(w=>{o(w)}),a(!0)})},[t,r,u,d,o,a,n]),{getSessionInformation:c,getConversationMessages:d}},w1=B.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),Nk=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>{const{logger:p,clientContext:m,baseCatalogParams:T}=rt(),cn=wk(),{searchQuery:y}=cn,_=mn(cn,["searchQuery"]),Hn=_k(),{categoryId:w}=Hn,C=mn(Hn,["categoryId"]),{productId:A,pdpLink:P}=Ck(),{setCopilot:v,setConnected:H,resetCopilot:Y,resetCopilotState:D,addCopilotEvent:q,removeLoadingMessage:re,handleCopilotRequestAck:me,setActiveConversationId:V,setConversationIds:se,setAskCimPrompts:ce}=Qo(),{connected:de,copilot:ne,messages:Ee,groupedMessages:Oe,loadingMessages:oe,askCimPrompts:Q}=ar(),{status:ie,entryType:k}=sr(),{isInline:L}=li(),{getConversationMessages:ee,getSessionInformation:O}=Pk({copilot:ne}),we=B.useMemo(()=>oe.size>0,[oe]),Ue=B.useCallback(Ae=>oe.has(Ae),[oe]),Te=B.useCallback(({query:Ae,facetFilters:Ne,rangeFilters:Me,catalogSegment:ot,pricebooks:pt,userPrompt:J,imageFile:ge})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}if(!Ae)return;const Ce={searchParams:{query:Ae}};J&&(Ce.userPrompt=J),ge&&(Ce.attachments={image:ge}),Ne&&Object.keys(Ne).length>0&&(Ce.searchParams.facetFilters=Ne),Me&&Me.length>0&&(Ce.searchParams.rangeFilters=Me),ot&&(Ce.searchParams.catalogSegment=ot),pt&&(Ce.searchParams.pricebooks=pt),m&&(Ce.clientContext=m),_a("search"),ne.search(Ce,Ye=>{const Re=F({},Ye);me(Re)})},[p,me,ne,m]),Be=B.useCallback(({categoryId:Ae,categoryName:Ne,facetFilters:Me,rangeFilters:ot,catalogSegment:pt,pricebooks:J,userPrompt:ge,imageFile:Ce})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}const Ye=Me&&Object.keys(Me).length>0;if(Ae===""&&!Ye){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const Re={browseParams:{categoryId:Ae||""}};ge&&(Re.userPrompt=ge),Ce&&(Re.attachments={image:Ce}),Ye&&(Re.browseParams.facetFilters=Me),ot&&ot.length>0&&(Re.browseParams.rangeFilters=ot),pt&&(Re.browseParams.catalogSegment=pt),Array.isArray(J)&&J.length>0&&(Re.browseParams.pricebooks=J),(m||Ne)&&(Re.clientContext={},m&&(Re.clientContext=F({},m)),Ne&&(Re.clientContext.cimLabel=Ne)),_a("browse"),ne.browse(Re,ct=>{var Qr;const Gt=F({},ct),Vt=((Qr=Gt.request)==null?void 0:Qr.clientContext)||{},dn=(Vt==null?void 0:Vt.cimLabel)||Ne;dn&&Gt.request&&(Gt.request.label=dn),me(Gt)})},[p,me,ne,m]),Ve=B.useCallback(({productId:Ae,productName:Ne,pdpLink:Me,userPrompt:ot,imageFile:pt})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}if(!Ae)return;const J={productId:Ae};ot&&(J.userPrompt=ot),Me&&(J.pdpLink=Me),pt&&(J.attachments={image:pt}),(m||Ne)&&(J.clientContext={},m&&(J.clientContext=F({},m)),Ne&&(J.clientContext.cimLabel=Ne)),T&&(J.baseCatalogParams=T),_a("pdp"),ne.productView(J,ge=>{var ct;const Ce=F({},ge),Ye=((ct=Ce.request)==null?void 0:ct.clientContext)||{},Re=(Ye==null?void 0:Ye.cimLabel)||Ne;Re&&Ce.request&&(Ce.request.label=Re),me(Ce)})},[p,ne,me,m,T]),Ge=B.useCallback(({userPrompt:Ae,imageFile:Ne})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}if(!Ae)return;const Me={userPrompt:Ae};Ne&&(Me.attachments={image:Ne}),m&&(Me.clientContext=m),T&&(Me.baseCatalogParams=T),ne.askCim(Me,ot=>{const pt=F({},ot);me(pt)})},[p,ne,me,m,T]),_t=B.useCallback(Ae=>{q(Ae),c==null||c(Ae)},[q,c]),Pn=B.useCallback(Ae=>{q(Ae),d==null||d(Ae)},[q,d]),ln=B.useCallback(Ae=>{u==null||u(Ae),H(!0)},[u,H]);B.useEffect(()=>{!ne||!de||!ie.isOpen||yn.size>0&&yn.processQueue(Ae=>{if(Ae.context==="search"){const Ne=F({},Ae.payload);E1(Ne)}if(Ae.context==="browse"){const Ne=F({},Ae.payload);l1(Ne)}if(Ae.context==="pdp"){const Ne=F({},Ae.payload);c1(Ne)}})},[ie.isOpen,ne,de]);const kr=B.useCallback(Ae=>{const Ne=Me=>{const ot=pe(F({},Me),{id:Me.inquiryLinkId||Me.id});q(ot)};Ae.on("connect_ack",ln),Ae.on("partial_inquiry",Ne),Ae.on("display_products",q),Ae.on("progress",q),Ae.on("refined_search",_t),Ae.on("refined_browse",Pn),Ae.on("done",Me=>{re(Me.eventSourceId)}),Ae.on("error",Me=>{q(Me),re(Me.eventSourceId)}),Ae.onDisconnect(Me=>{const ot=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Me),!ot.includes(Me)){H(!1);return}p==null||p.log("De-registering event listeners");const pt=new Date().toISOString();q({name:"error",message:"Connection was lost. Please try again.",createdAt:pt,id:`error-${pt}`,sessionId:"session"}),Ae.off()})},[p,H,re,_t,Pn,q,ln]);B.useEffect(()=>{if(!ne)return;const Ae=Ne=>{if(!L){if(!Ne.message&&Ne.eventSourceId&&Ne.eventSourceId===Q.requestId){ce({requestId:Ne.eventSourceId,message:Ne});return}q(Ne)}};return ne.on("follow_up",Ae),()=>{ne.off("follow_up",Ae)}},[ne,Ee,Q.requestId,L,q,ce]),B.useEffect(()=>{if(!ne)return;const Ae=Ne=>{if(L)return;const Me=pe(F({},Ne),{id:Ne.inquiryLinkId||Ne.id});q(Me)};return ne.on("inquiry",Ae),()=>{ne.off("inquiry",Ae)}},[ne,L,q]),Sa(()=>{let Ae;n?Ae=n:Ae=a?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Ne={baseUrl:Ae};e?Ne.apiKey=e:t&&(Ne.apiToken=t),r&&(Ne.customerId=r),o&&(Ne.tenantId=o);const Me=new hA(Ne);return v(Me),kr(Me),Me.connect(),Me.requestSessionInformation(ot=>{p==null||p.log("Session Information: ",ot);const{activeConversationId:pt,conversationIds:J}=ot.data||{};pt&&V(pt),J!=null&&J.length&&se(J)}),()=>{Me.disconnect(),Me.off(),Y()}});const fr=B.useCallback(Ae=>{if(!ne)return;const Ne={eventId:Ae,reason:"User cancelled the request"};ne.cancelRequest(Ne,Me=>{q(Me),re(Ae)})},[q,re,ne]),rn=B.useCallback(()=>{ne&&ne.conversationReset({},Ae=>{D(),q(Ae),ne.requestSessionInformation(Ne=>{p==null||p.log("Session Information: ",Ne);const{activeConversationId:Me,conversationIds:ot}=Ne.data||{};Me&&V(Me),ot!=null&&ot.length&&se(ot)})})},[ne,p,q,D,V,se]),qe=B.useCallback((Ae,Ne)=>{if(!Ae)return;const Me={userPrompt:Ae};switch(Ne&&(Me.imageFile=Ne),k){case"ask_cim":Ge(Me);return;case"search":y?Te(F(F({query:y},_),Me)):Ge(Me);return;case"browse":Be(F(F({categoryId:w},C),Me));return;case"pdp":A?Ve(F({productId:A,pdpLink:P||""},Me)):Ge(Me);return}},[k,y,_,Te,Ge,w,C,Be,Ve,A,P]),Nt=B.useCallback((Ae,Ne)=>{var ge,Ce,Ye;const ot=Ae.params.userPrompt||"";if(!ot)return;const pt=Ee.find(Re=>Re.id===Ne);if(!pt)return;const J=pt.name.replace("_suggestions","");if(J==="ask_cim"){Ge({userPrompt:ot});return}if(J==="copilot_search"){const Re=((ge=pt.request)==null?void 0:ge.searchParams)||{},Gt=Re.query===y;Te(pe(F({query:Re.query||y},Gt?_:{}),{userPrompt:ot}));return}if(J==="copilot_browse"){const Re=pt.request,ct=Re.browseParams||{},Vt=ct.categoryId===w,dn=((Ce=Re.clientContext)==null?void 0:Ce.cimLabel)||"";Be(pe(F({categoryId:ct.categoryId||w||""},Vt?C:{}),{categoryName:dn,userPrompt:ot}));return}if(J==="product_view"){const Re=pt.request||{},ct=Re.productId,Gt=ct===A,Vt=((Ye=Re.clientContext)==null?void 0:Ye.cimLabel)||"";let dn="";Gt?dn=P||"":dn=Re.pdpLink||"",Ve({productId:ct||A,pdpLink:dn,productName:Vt,userPrompt:ot})}},[Ee,y,_,Te,Ge,w,C,Be,Ve,A,P]),Nn=B.useMemo(()=>({copilot:ne,messages:Ee,groupedMessages:Oe,isLoading:we,isResponseLoading:Ue,handleAskCim:Ge,handleSearch:Te,handleBrowse:Be,handlePdp:Ve,handleUserInput:qe,handleSuggestion:Nt,handleCancel:fr,resetConversation:rn,getSessionInformation:O,getConversationMessages:ee}),[ne,Ee,Oe,we,Ue,Ge,Te,Be,Ve,qe,Nt,fr,rn,O,ee]);return x.jsx(w1.Provider,{value:Nn,children:f})},A1=()=>{const{copilot:e}=ar(),{addCopilotEvent:t}=Qo();return{getCopilotSuggestions:B.useCallback((r,o,a)=>{if(!e||!o||!r)return;const u=c=>{t(c),a(c)};switch(o){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])}},Ur=()=>{const e=B.useContext(w1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},Ok=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=ar(),{entryType:o}=sr(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:c}=Qo(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:T,getConversationMessages:y}=Ur(),{getCopilotSuggestions:_}=A1();B.useEffect(()=>{!e||!o||!t||!r||n.requestId||o==="ask_cim"&&_({},o,P=>{c({requestId:P.id,message:null})})},[e,t,n.requestId,o,r,_,c]);const w=B.useCallback(({query:P})=>{if(!e||!P)return;const{facetFilters:v}=Tt.facetFiltersProxy,{rangeFilters:H}=Tt.rangeFiltersProxy,{catalogSegment:Y}=Tt.catalogSegmentProxy,{pricebooks:D}=Tt.pricebooksProxy,q={query:P};q.facetFilters=v||{},q.rangeFilters=H||[],q.catalogSegment=Y||"",q.pricebooks=D||[],d(F({},q))},[e,d]),C=B.useCallback(({categoryId:P})=>{if(!e)return;const v=lt.categoryIdProxy.categoryName,{facetFilters:H}=lt.facetFiltersProxy,{rangeFilters:Y}=lt.rangeFiltersProxy,{catalogSegment:D}=lt.catalogSegmentProxy,{pricebooks:q}=lt.pricebooksProxy,re={categoryId:P};re.categoryName=v||"",re.facetFilters=H||{},re.rangeFilters=Y||[],re.catalogSegment=D||"",re.pricebooks=q||[],f(F({},re))},[e,f]),A=B.useCallback(({productId:P})=>{if(!e||!P)return;const v={productId:P,pdpLink:Sr.pdpLink,productName:Sr.proxy.productName||""};p(v)},[e,p]);return B.useEffect(()=>{const P=({detail:v})=>{(v==null?void 0:v.property)==="query"&&w({query:v.value})};return Wg(P),()=>{Gg(P)}},[w]),B.useEffect(()=>{const P=({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 Qg(P),()=>{Jg(P)}},[A]),B.useEffect(()=>{const P=({detail:v})=>{(v==null?void 0:v.property)==="categoryId"&&C({categoryId:v.value})};return Xg(P),()=>{Kg(P)}},[C]),B.useEffect(()=>{const P=({detail:v})=>{if((v==null?void 0:v.event)==Ci.RESET_CONVERSATION&&m(),(v==null?void 0:v.event)==Ci.GET_SESSION_INFORMATION){const H=v.value.callback;T(H)}if((v==null?void 0:v.event)==Ci.GET_CONVERSATION_MESSAGES){const{payload:H,callback:Y}=v.value;if(!H.conversationId||typeof Y!="function")return;y(H,Y)}if((v==null?void 0:v.event)==Ci.LOAD_CONVERSATION){const H=v.value;if(!H.conversationId)return;y(H,D=>{a(),D.forEach(q=>{u(q)})})}};return WC(P),()=>{GC(P)}},[m,T,y,a,u]),null},Ik=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>x.jsxs(Nk,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:[x.jsx(Ok,{}),f]}),Rk=({children:e,dispatch:t})=>{const n=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),o=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),c=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),m=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),T=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),y=B.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:o,setElementId:a,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:T}),[n,r,o,a,u,c,d,f,p,m,T]);return x.jsx(x1.Provider,{value:y,children:e})},Lk=(e,t)=>{const{type:n,payload:r}=t;switch(n){case gt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case gt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case gt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case gt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case gt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case gt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case gt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case gt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},Dk=({promptsConfig:e,children:t})=>{const[n,r]=ng(Lk,F(F({},d1),e||{}));return x.jsx(S1.Provider,{value:n,children:x.jsx(Rk,{dispatch:r,children:t})})},v1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,customerId:o,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,theme:f,openLinksInNewTab:p,globalClassName:m,isDevelopment:T=!1,componentType:y,componentConfig:_,entryType:w,entryMessage:C,disclaimerText:A,disclaimerMarkdown:P,clientContext:v,baseCatalogParams:H,searchPlaceholder:Y,searchButtonLabel:D,searchConfig:q,suggestionButtonConfig:re,messageAlignment:me,autoScroll:V,promptsConfig:se,resetConversationMessage:ce,conversationHistory:de,onConnect:ne,onCopilotEvent:Ee,onRefinedSearch:Oe,onRefinedBrowse:oe,__features:Q,children:ie})=>x.jsx(vC,{mode:e,baseUrl:r,apiKey:t,apiToken:n,customerId:o,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,entryMessage:C,theme:f,globalClassName:m,openLinksInNewTab:p,searchPlaceholder:Y,searchButtonLabel:D,searchConfig:q,suggestionButtonConfig:re,messageAlignment:me,autoScroll:V,componentConfig:_,clientContext:v,baseCatalogParams:H,disclaimerMarkdown:P,disclaimerText:A,resetConversationMessage:ce,conversationHistory:de,isDevelopment:T,__features:Q,children:x.jsx(kk,{entryType:w,componentConfig:_,componentType:y,children:x.jsx(DC,{onCopilotEvent:Ee,children:x.jsx(vk,{children:x.jsx(Tk,{children:x.jsx(xk,{children:x.jsx(Dk,{promptsConfig:se,children:x.jsx(Ik,{apiKey:t,apiToken:n,baseUrl:r,customerId:o,tenantId:a,isDevelopment:T,entryType:w,onConnect:ne,onRefinedSearch:Oe,onRefinedBrowse:oe,onCopilotEvent:Ee,children:ie})})})})})})})});var Nf={exports:{}},Dn={},Of={exports:{}},If={};var C1;function Mk(){return C1||(C1=1,(function(e){function t(Q,ie){var k=Q.length;Q.push(ie);e:for(;0<k;){var L=k-1>>>1,ee=Q[L];if(0<o(ee,ie))Q[L]=ie,Q[k]=ee,k=L;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var ie=Q[0],k=Q.pop();if(k!==ie){Q[0]=k;e:for(var L=0,ee=Q.length,O=ee>>>1;L<O;){var we=2*(L+1)-1,Ue=Q[we],Te=we+1,Be=Q[Te];if(0>o(Ue,k))Te<ee&&0>o(Be,Ue)?(Q[L]=Be,Q[Te]=k,L=Te):(Q[L]=Ue,Q[we]=k,L=we);else if(Te<ee&&0>o(Be,k))Q[L]=Be,Q[Te]=k,L=Te;else break e}}return ie}function o(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,P=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,Oe(Y);else{var ie=n(f);ie!==null&&oe(H,ie.startTime-Q)}}function Y(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 L=m.callback;if(typeof L=="function"){m.callback=null,T=m.priorityLevel;var ee=L(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 we=n(f);we!==null&&oe(H,we.startTime-ie),O=!1}return O}finally{m=null,T=k,y=!1}}var D=!1,q=null,re=-1,me=5,V=-1;function se(){return!(e.unstable_now()-V<me)}function ce(){if(q!==null){var Q=e.unstable_now();V=Q;var ie=!0;try{ie=q(!0,Q)}finally{ie?de():(D=!1,q=null)}}else D=!1}var de;if(typeof P=="function")de=function(){P(ce)};else if(typeof MessageChannel!="undefined"){var ne=new MessageChannel,Ee=ne.port2;ne.port1.onmessage=ce,de=function(){Ee.postMessage(null)}}else de=function(){C(ce,0)};function Oe(Q){q=Q,D||(D=!0,de())}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,Oe(Y))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):me=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 L=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?L+k:L):k=L,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>L?(Q.sortIndex=k,t(f,Q),n(d)===null&&Q===n(f)&&(w?(A(re),re=-1):w=!0,oe(H,k-L))):(Q.sortIndex=ee,t(d,Q),_||y||(_=!0,Oe(Y))),Q},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(Q){var ie=T;return function(){var k=T;T=ie;try{return Q.apply(this,arguments)}finally{T=k}}}})(If)),If}var k1;function Fk(){return k1||(k1=1,Of.exports=Mk()),Of.exports}var P1;function Bk(){if(P1)return Dn;P1=1;var e=Uo(),t=Fk();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,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,s,l,h){if(l!==null&&l.type===0)return!1;switch(typeof s){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,s,l,h){if(s===null||typeof s=="undefined"||y(i,s,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function w(i,s,l,h,E,b,S){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=b,this.removeEmptyString=S}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 s=i[0];C[s]=new w(s,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 P(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(A,P);C[s]=new w(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(A,P);C[s]=new w(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(A,P);C[s]=new w(s,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,s,l,h){var E=C.hasOwnProperty(s)?C[s]:null;(E!==null?E.type!==0:h||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(_(s,l,E,h)&&(l=null),h||E===null?T(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(s=E.attributeName,h=E.attributeNamespace,l===null?i.removeAttribute(s):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,h?i.setAttributeNS(h,s,l):i.setAttribute(s,l))))}var H=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),D=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),re=Symbol.for("react.strict_mode"),me=Symbol.for("react.profiler"),V=Symbol.for("react.provider"),se=Symbol.for("react.context"),ce=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),ne=Symbol.for("react.suspense_list"),Ee=Symbol.for("react.memo"),Oe=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,L;function ee(i){if(L===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);L=s&&s[1]||""}return`
|
|
11
|
-
`+L+i}var
|
|
10
|
+
`+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=so(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&ml.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),o!=null&&($.isFunction(o)?n.paramsSerializer={serialize:o}:ml.assertOptions(o,{encode:En.function,serialize:En.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ml.assertOptions(n,{baseUrl:En.spelling("baseURL"),withXsrfToken:En.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=gn.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||yf;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 _=[$g.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=$g.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=so(this.defaults,t);const n=Rg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return xg(n,t.params,t.paramsSerializer)}};$.forEach(["delete","get","head","options"],function(t){ao.prototype[t]=function(n,r){return this.request(so(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(so(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}ao.prototype[t]=n(),t!=="query"&&(ao.prototype[t+"Form"]=n(!0))});let bC=class Zw{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new ba(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 Zw(function(o){t=o}),cancel:t}}};function TC(e){return function(n){return e.apply(null,n)}}function _C(e){return $.isObject(e)&&e.isAxiosError===!0}const Af={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(Af).forEach(([e,t])=>{Af[t]=e});function qg(e){const t=new ao(e),n=sg(ao.prototype.request,t);return $.extend(n,ao.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return qg(so(e,o))},n}const Mt=qg(ya);Mt.Axios=ao,Mt.CanceledError=ba,Mt.CancelToken=bC,Mt.isCancel=kg,Mt.VERSION=Sf,Mt.toFormData=cl,Mt.AxiosError=xe,Mt.Cancel=Mt.CanceledError,Mt.all=function(t){return Promise.all(t)},Mt.spread=TC,Mt.isAxiosError=_C,Mt.mergeConfig=so,Mt.AxiosHeaders=gn,Mt.formToJSON=e=>Cg($.isHTMLForm(e)?new FormData(e):e),Mt.getAdapter=jg.getAdapter,Mt.HttpStatusCode=Af,Mt.default=Mt;const{Axios:pU,AxiosError:mU,CanceledError:gU,isCancel:EU,CancelToken:yU,VERSION:bU,all:TU,Cancel:_U,isAxiosError:SU,spread:xU,toFormData:wU,AxiosHeaders:AU,HttpStatusCode:vU,formToJSON:CU,getAdapter:kU,mergeConfig:PU,create:NU}=Mt;class SC{constructor(t,n,r,o=!1,a,u){we(this,"CIMULATE_API_HEADER","x-cimulate-api-key");we(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");we(this,"CIMULATE_SEARCH_API_PATH","api/v1");we(this,"baseApiUrl");we(this,"headers",{});we(this,"fetchConfig",()=>Je(this,null,function*(){try{const t=yield Mt.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}}));we(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const o=new URL(t);return o.hostname=o.hostname.replace(/^copilot\./,"api."),o.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,o)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class xC{constructor(t,n,r,o=!1,a,u){we(this,"apiService");we(this,"config",null);we(this,"getConfig",()=>Je(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}}));we(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));we(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));we(this,"getDescription",t=>this.getProductFieldValue(t,"description"));we(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));we(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));we(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));we(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));we(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));we(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});we(this,"getProductField",t=>this.config?this.config[t]:"");we(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new SC(t,n,r,o,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Ko=(e,t,n,...r)=>{if(!e)return;const o=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",o,n,...r)};class wC{constructor(t=!1){we(this,"isDevelopment");we(this,"_log",(t,n,...r)=>{Ko(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 AC={copilot:"Your Search Assistant",messaging:"Commerce Client"},Yg=B.createContext(null),vC=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:o="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:T,searchConfig:y,suggestionButtonConfig:_,messageAlignment:w="start",autoScroll:C=!0,componentConfig:A,conversationHistory:P,resetConversationMessage:v="",apiKey:H,apiToken:Y,baseUrl:D,customerId:q,tenantId:re,theme:me,isDevelopment:V,__features:oe,routingAttributes:ce,enableDownloadTranscript:de=!0,enableEscalationToAgent:ne=!1,children:Te})=>{const Pe=e==="messaging",se=B.useMemo(()=>{const Se=ce==null?void 0:ce.isCartMgmtSupported;return Se===!0||Se==="true"},[ce]),K=B.useMemo(()=>Pe?{config:null}:new xC(D,H,Y,V,q,re),[Pe,D,H,Y,V,q,re]),ie=B.useMemo(()=>new wC(V),[V]);B.useEffect(()=>{Pe||!K||K.config||K.getConfig()},[K,Pe]);const k=B.useMemo(()=>PA(me),[me]),L=B.useMemo(()=>{const Se=(y==null?void 0:y.placeholder)||m,je=(y==null?void 0:y.buttonLabel)||T;let Ee="icon";return y!=null&&y.buttonType?Ee=y.buttonType:T&&(Ee="text"),pe(F({},y||{}),{placeholder:Se,buttonLabel:je,buttonType:Ee})},[y,m,T]),ee=B.useMemo(()=>pe(F({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||AC[e!=null?e:"copilot"]}),[r,t,n,e]),I=B.useMemo(()=>({configModule:K,mode:e!=null?e:"copilot",headerConfig:ee,entryMessage:a,globalClassName:o,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:k,logger:ie,searchConfig:L,suggestionButtonConfig:_,messageAlignment:w,autoScroll:C,enableMinimize:!!(A!=null&&A.enableMinimize),enableDownloadTranscript:de,enableEscalationToAgent:ne,resetConversationMessage:v,conversationHistory:{sinceHours:typeof(P==null?void 0:P.sinceHours)=="number"?P.sinceHours:1,limit:P==null?void 0:P.limit},features:oe,isCartMgmtSupported:se}),[K,e,ee,a,o,f,p,c,d,u,L,_,w,C,A,de,ne,v,ie,k,P,oe,se]);return x.jsx(Yg.Provider,{value:I,children:Te})},rt=()=>{const e=B.useContext(Yg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class CC{constructor(){we(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}});we(this,"connectedProxy");we(this,"modeProxy");we(this,"entryTypeProxy");we(this,"statusProxy");we(this,"dialogProxy");we(this,"modalProxy",{isFullscreen:!1});we(this,"_fullGet",(t,n)=>Reflect.get(t,n));we(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return NC(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 et=new CC,uo=()=>et.connected,Ta=()=>et.isOpen,kC=e=>{window.addEventListener(uf,e)},PC=e=>{window.removeEventListener(uf,e)},NC=(e,t)=>{const n=new CustomEvent(uf,{detail:{property:e,value:t}});window.dispatchEvent(n)},OC=e=>{et.connectedProxy.connected=e},_a=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);et.entryTypeProxy.entryType=e},ui=e=>{const t=et.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;et.statusProxy.isOpen=n,n&&(et.statusProxy.isMinimized=!1)},gl=e=>{const t=et.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;et.statusProxy.isMinimized=n,n&&(et.statusProxy.isOpen=!1)},vf=e=>{et.modalProxy.isFullscreen=e},El=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);et.statusProxy.type=e,e==="dialog"||e==="chat"?et.modeProxy.mode="embedded":et.modeProxy.mode="standalone"},Cf=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(", ")}.`);et.dialogProxy.position=e},IC=e=>{const t=et.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;et.dialogProxy.isFullHeight=n},RC=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=rt(),o=B.useCallback(v=>{n({type:mt.SET_COPILOT,payload:v})},[n]),a=B.useCallback(v=>{OC(v),n({type:mt.SET_CONNECTED,payload:v})},[n]),u=B.useCallback(()=>{n({type:mt.RESET_COPILOT,payload:{}})},[n]),c=B.useCallback(()=>{n({type:mt.RESET_STATE,payload:{}})},[n]),d=B.useCallback(v=>{r==null||r.log(`${v.name} event received`,v),n({type:mt.ADD_MESSAGE,payload:v}),v.bypassHandlers||e==null||e(v)},[e,r,n]),f=B.useCallback(v=>{n({type:mt.ADD_LOADING_MESSAGE,payload:v})},[n]),p=B.useCallback(v=>{n({type:mt.REMOVE_LOADING_MESSAGE,payload:v})},[n]),m=B.useCallback(v=>{d(v),f(v.id)},[d,f]),T=B.useCallback(v=>{n({type:mt.SET_ACTIVE_CONVERSATION_ID,payload:v})},[n]),y=B.useCallback(v=>{n({type:mt.ADD_CONVERSATION_ID,payload:v})},[n]),_=B.useCallback(v=>{n({type:mt.SET_CONVERSATION_IDS,payload:v})},[n]),w=B.useCallback(v=>{n({type:mt.SET_IMAGE_FILE,payload:v})},[n]),C=B.useCallback(v=>{n({type:mt.SET_ASK_CIM_PROMPTS,payload:v})},[n]),A=B.useCallback(v=>{n({type:mt.SET_CONVERSATION_HISTORY_LOADED,payload:v})},[n]),P=B.useMemo(()=>({setCopilot:o,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}),[o,a,u,c,d,f,p,m,T,y,_,w,C,A]);return x.jsx(og.Provider,{value:P,children:t})};wA();const LC=(e,t)=>{const{type:n,payload:r}=t;if(n===mt.ADD_MESSAGE){const o=r;if(e.messages.push(o),o.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===o.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const c=u.findIndex(d=>d.id===o.id);if(c!==-1){u[c]=o;return}u.push(o);return}else{e.groupedMessages.push({type:"group",eventSourceId:o.eventSourceId,messages:[o],createdAt:new Date(o.createdAt)});return}}e.groupedMessages.push({type:"individual",message:o,createdAt:new Date(o.createdAt)});return}switch(n){case mt.RESET_STATE:e.messages=ro.messages,e.groupedMessages=ro.groupedMessages,e.loadingMessages=ro.loadingMessages,e.imageFile=ro.imageFile,e.askCimPrompts=ro.askCimPrompts,e.conversationHistoryLoaded=ro.conversationHistoryLoaded;break;case mt.RESET_COPILOT:e.copilot=null;break;case mt.SET_COPILOT:e.copilot=r;break;case mt.SET_CONNECTED:e.connected=r;break;case mt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case mt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case mt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case mt.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case mt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case mt.SET_IMAGE_FILE:e.imageFile=r;break;case mt.SET_ASK_CIM_PROMPTS:e.askCimPrompts.requestId=(r==null?void 0:r.requestId)||null,e.askCimPrompts.message=(r==null?void 0:r.message)||null;break;case mt.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},DC=({onCopilotEvent:e,children:t})=>{const[n,r]=ng(LC,ro);return x.jsx(ig.Provider,{value:n,children:x.jsx(RC,{onCopilotEvent:e,dispatch:r,children:t})})};function MC(){var e=B.useRef(!0);return e.current?(e.current=!1,!0):e.current}function FC(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function BC(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var kf=typeof window!="undefined",Sa=function(e){B.useEffect(e,[])},UC=function(e){var t=B.useRef(e);t.current=e,Sa(function(){return function(){return t.current()}})},HC=function(e){var t=B.useRef(0),n=B.useState(e),r=n[0],o=n[1],a=B.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return UC(function(){cancelAnimationFrame(t.current)}),[r,a]},zC=function(e,t){return e===t};function jC(e,t){t===void 0&&(t=zC);var n=B.useRef(),r=B.useRef(e),o=MC();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var $C=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,o=t.initialHeight,a=o===void 0?1/0:o,u=t.onChange,c=HC({width:kf?window.innerWidth:r,height:kf?window.innerHeight:a}),d=c[0],f=c[1];return B.useEffect(function(){if(kf){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return FC(window,"resize",p),function(){BC(window,"resize",p)}}},[]),d};class VC{constructor(){we(this,"items",[]);we(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});we(this,"remove",()=>this.items.shift());we(this,"first",()=>this.items.length>0?this.items[0]:null);we(this,"clear",()=>{this.items.length=0});we(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 VC,Wg=e=>{window.addEventListener(af,e)},Gg=e=>{window.removeEventListener(af,e)},qC=(e,t,n)=>{const r=new CustomEvent(af,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Xg=e=>{window.addEventListener(sf,e)},Kg=e=>{window.removeEventListener(sf,e)},YC=(e,t,n)=>{const r=new CustomEvent(sf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Qg=e=>{window.addEventListener(of,e)},Jg=e=>{window.removeEventListener(of,e)},Zg=(e,t,n)=>{const r=new CustomEvent(of,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},WC=e=>{window.addEventListener(cf,e)},GC=e=>{window.removeEventListener(cf,e)},yl=(e,t,n)=>{const r=new CustomEvent(cf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class XC{constructor(){we(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});we(this,"categoryIdProxy");we(this,"facetFiltersProxy");we(this,"rangeFiltersProxy");we(this,"catalogSegmentProxy");we(this,"pricebooksProxy");we(this,"_fullGet",(t,n)=>Reflect.get(t,n));we(this,"_fullSet",(t,n,r)=>{const o=CA[n];return YC(o,n,r),Reflect.set(t,n,r)});we(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));we(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));we(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 lt=new XC,e1=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},t1=(e,t,n)=>{var u,c;const r=F({},((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},n1=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},r1=({field:e,value:t},n)=>{const[r,o]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof o=="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:o},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:o});const c=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=c.rangeFilters},i1=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},o1=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},KC=e=>{if(!uo()||!Ta()){uo()&&yn.clear(),yn.add({context:"browse",payload:pe(F({},lt.state),{categoryId:e})});return}lt.categoryIdProxy.categoryId=e},s1=e=>{e1(e,lt)},QC=(e,t)=>{t1(e,t,lt)},a1=e=>{n1(e,lt)},JC=({field:e,value:t})=>{r1({field:e,value:t},lt)},ZC=e=>{i1(e,lt)},u1=e=>{o1(e,lt)},l1=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=uo(),n=Ta();if(!t||!n){t&&yn.clear(),yn.add({context:"browse",payload:F({},e)});return}"facetFilters"in e&&s1(e.facetFilters||{}),"rangeFilters"in e&&a1(e.rangeFilters||[]),"catalogSegment"in e&&(lt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&u1(e.pricebooks||[]),"categoryName"in e&&(lt.categoryIdProxy.categoryName=e.categoryName||""),lt.categoryIdProxy.categoryId=e.categoryId},ek=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:l1,updateBrowseCategoryId:KC,updateCatalogSegment:ZC,updateFacetFilter:QC,updateFacetFilters:s1,updatePricebooks:u1,updateRangeFilter:JC,updateRangeFilters:a1},Symbol.toStringTag,{value:"Module"}));class tk{constructor(){we(this,"initialParams",{productId:"",productName:"",pdpLink:""});we(this,"proxy");we(this,"_fullGet",(t,n)=>Reflect.get(t,n));we(this,"_fullSet",(t,n,r)=>(Zg(n,r),Reflect.set(t,n,r)));we(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const Sr=new tk,c1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=uo(),n=Ta();if(!t||!n){t&&yn.clear(),yn.add({context:"pdp",payload:F({},e)});return}Sr.updateProxy(e),Zg("pdp-context",e)},nk=e=>{Sr.proxy.productId=e,uo()||yn.add({context:"pdp",payload:F({},Sr.state)})},rk=e=>{Sr.proxy.pdpLink=e},gt={SET_PROMPTS_EXTENSION_INITIALIZED:"SET_PROMPTS_EXTENSION_INITIALIZED",SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},d1={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",disableAskElseButton:!1};class ik{constructor(){we(this,"initialState",d1);we(this,"promptsStateProxy");we(this,"promptsParamsProxy");we(this,"_fullGet",(t,n)=>Reflect.get(t,n));we(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return xa(n,r),Reflect.set(t,n,r)});we(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));we(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));we(this,"updatePromptsParamsProxy",t=>new Proxy(F({},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 zt=new ik,ok=e=>{window.addEventListener(lf,e)},sk=e=>{window.removeEventListener(lf,e)},xa=(e,t)=>{const n=new CustomEvent(lf,{detail:{property:e,value:t}});window.dispatchEvent(n)},f1=e=>{const t=zt.isOpen,n=typeof e=="boolean"?e:!t;zt.promptsStateProxy.isOpen=n},h1=e=>{const t=zt.isInline,n=typeof e=="boolean"?e:!t;zt.promptsStateProxy.isInline=n},ak=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),xa("params",e),zt.promptsStateProxy.entryType="ask_cim"},uk=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),xa("params",e),zt.promptsStateProxy.entryType="search"},lk=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),xa("params",e),zt.promptsStateProxy.entryType="browse"},ck=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),xa("params",e),zt.promptsStateProxy.entryType="pdp"},dk=({elementId:e,entryType:t,params:n,isInline:r})=>{zt.promptsStateProxy.elementId=e,t&&(zt.promptsStateProxy.entryType=t),typeof r=="boolean"&&h1(r),n&&zt.updatePromptsParamsProxy(n),zt.isOpen||f1(!0)},fk=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{yl("getConversationMessages",{payload:e,callback:t},Ci.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{yl("getSessionInformation",{callback:e},Ci.GET_SESSION_INFORMATION)},loadConversation:e=>{yl("loadConversation",e,Ci.LOAD_CONVERSATION)},resetConversation:()=>{yl("resetConversation",!0,Ci.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class hk{constructor(){we(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});we(this,"queryProxy");we(this,"facetFiltersProxy");we(this,"rangeFiltersProxy");we(this,"catalogSegmentProxy");we(this,"pricebooksProxy");we(this,"_fullGet",(t,n)=>Reflect.get(t,n));we(this,"_fullSet",(t,n,r)=>{const o=kA[n];return qC(o,n,r),Reflect.set(t,n,r)});we(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));we(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));we(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 hk,pk=e=>{const t=Ta(),n=uo();if(!n||!t){n&&yn.clear(),yn.add({context:"search",payload:pe(F({},Tt.state),{query:e})});return}Tt.queryProxy.query=e},p1=e=>{e1(e,Tt)},mk=(e,t)=>{t1(e,t,Tt)},m1=e=>{n1(e,Tt)},gk=({field:e,value:t})=>{r1({field:e,value:t},Tt)},Ek=e=>{i1(e,Tt)},g1=e=>{o1(e,Tt)},E1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=Ta(),n=uo();if(!n||!t){n&&yn.clear(),yn.add({context:"search",payload:F({},e)});return}"facetFilters"in e&&p1(e.facetFilters||{}),"rangeFilters"in e&&m1(e.rangeFilters||[]),"catalogSegment"in e&&(Tt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&g1(e.pricebooks||[]),Tt.queryProxy.query=e.query},yk=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:E1,updateCatalogSegment:Ek,updateFacetFilter:mk,updateFacetFilters:p1,updatePricebooks:g1,updateRangeFilter:gk,updateRangeFilters:m1,updateSearchQuery:pk},Symbol.toStringTag,{value:"Module"})),bk={categoryId:lt.categoryId,categoryName:lt.categoryIdProxy.categoryName||"",facetFilters:lt.facetFilters,rangeFilters:lt.rangeFilters,catalogSegment:lt.catalogSegment,pricebooks:lt.pricebooks},y1=B.createContext(bk),Tk=({children:e})=>{const[t,n]=B.useState(lt.categoryId),[r,o]=B.useState(lt.categoryIdProxy.categoryName||""),[a,u]=B.useState(lt.facetFilters||{}),[c,d]=B.useState(lt.rangeFilters||[]),[f,p]=B.useState(lt.catalogSegment||null),[m,T]=B.useState(lt.pricebooks||null);B.useEffect(()=>{const _=({detail:w})=>{(w==null?void 0:w.property)==="categoryId"&&n(w.value),(w==null?void 0:w.property)==="categoryName"&&o(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 Xg(_),()=>{Kg(_)}},[]);const y=B.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:m}),[t,r,a,c,f,m]);return x.jsx(y1.Provider,{value:y,children:e})},_k=()=>{const e=B.useContext(y1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},Sk={searchQuery:Tt.query,facetFilters:Tt.facetFilters,rangeFilters:Tt.rangeFilters,catalogSegment:Tt.catalogSegment,pricebooks:Tt.pricebooks},b1=B.createContext(Sk),xk=({children:e})=>{const[t,n]=B.useState(Tt.query),[r,o]=B.useState(Tt.facetFilters),[a,u]=B.useState(Tt.rangeFilters),[c,d]=B.useState(Tt.catalogSegment),[f,p]=B.useState(Tt.pricebooks);B.useEffect(()=>{const T=({detail:y})=>{(y==null?void 0:y.property)==="query"&&n(y.value),(y==null?void 0:y.property)==="facetFilters"&&o(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 Wg(T),()=>{Gg(T)}},[]);const m=B.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return x.jsx(b1.Provider,{value:m,children:e})},wk=()=>{const e=B.useContext(b1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},Ak={productId:Sr.productId,pdpLink:Sr.pdpLink},T1=B.createContext(Ak),vk=({children:e})=>{const[t,n]=B.useState(Sr.productId),[r,o]=B.useState(Sr.pdpLink);B.useEffect(()=>{const u=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const d=c.value;n(d.productId),o(d.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&o(c.value)};return Qg(u),()=>{Jg(u)}},[]);const a=B.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return x.jsx(T1.Provider,{value:a,children:e})},Ck=()=>{const e=B.useContext(T1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},_1=B.createContext({mode:et.modeProxy.mode,entryType:et.entryType,status:et.statusProxy,dialogPosition:et.dialogProxy.position,isDialogFullHeight:et.dialogProxy.isFullHeight,dialogWidth:et.dialogProxy.width,isModalFullscreen:et.modalProxy.isFullscreen,previousComponentType:et.statusProxy.type}),kk=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=B.useState(e!=null?e:et.entryTypeProxy.entryType),[u,c]=B.useState(et.modeProxy.mode),[d,f]=B.useState({type:n||et.statusProxy.type,isOpen:et.statusProxy.isOpen,isMinimized:et.statusProxy.isMinimized}),[p,m]=B.useState(et.dialogProxy.position),[T,y]=B.useState(et.dialogProxy.isFullHeight),[_,w]=B.useState(et.dialogProxy.width),[C,A]=B.useState(et.modalProxy.isFullscreen),P=jC(d.type);B.useEffect(()=>{const H=Y=>{const{property:D,value:q}=Y.detail||{};if(!(!D||q===void 0)){if(D==="mode"){c(q);return}if(D==="entryType"){a(q);return}if(D==="isMinimized"){f(re=>pe(F({},re),{isMinimized:q}));return}if(D==="isOpen"){f(re=>pe(F({},re),{isOpen:q}));return}if(D==="type"){f(re=>pe(F({},re),{type:q}));return}if(D==="position"){m(q);return}if(D==="isFullHeight"){y(q);return}if(D==="width"){w(q);return}if(D==="isFullscreen"){A(q);return}}};return kC(H),()=>{PC(H)}},[]),Sa(()=>{e&&_a(e)}),Sa(()=>{const H=n||(t==null?void 0:t.type);H&&El(H),t&&"isOpen"in t&&ui(!!t.isOpen),t&&"isMinimized"in t&&gl(!!t.isMinimized)}),Sa(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:H}=t.options;H&&Cf(H),"dialogFullHeight"in t.options&&IC(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&w(t.options.dialogWidth),"isModalFullscreen"in t.options&&vf(!!t.options.isModalFullscreen)});const v=B.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:P||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:_,isModalFullscreen:C}),[u,o,d,P,p,T,_,C]);return x.jsx(_1.Provider,{value:v,children:r})},sr=()=>{const e=B.useContext(_1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},S1=B.createContext(null),x1=B.createContext(null),Pf=()=>{const e=B.useContext(x1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},li=()=>{const e=B.useContext(S1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},Qo=()=>{const e=B.useContext(og);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},ar=()=>{const e=B.useContext(ig);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},Pk=({copilot:e})=>{const{logger:t,conversationHistory:n}=rt(),{isInline:r}=li(),{addCopilotEvent:o,setConversationHistoryLoaded:a}=Qo(),{activeConversationId:u}=ar(),c=B.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=B.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 B.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(P=>P.id===w.eventSourceId);(A=C==null?void 0:C.name)!=null&&A.endsWith("_suggestions")||(w.bypassHandlers=!0,y.unshift(w))}),y.forEach(w=>{o(w)}),a(!0)})},[t,r,u,d,o,a,n]),{getSessionInformation:c,getConversationMessages:d}},w1=B.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),Nk=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>{const{logger:p,clientContext:m,baseCatalogParams:T}=rt(),cn=wk(),{searchQuery:y}=cn,_=mn(cn,["searchQuery"]),Hn=_k(),{categoryId:w}=Hn,C=mn(Hn,["categoryId"]),{productId:A,pdpLink:P}=Ck(),{setCopilot:v,setConnected:H,resetCopilot:Y,resetCopilotState:D,addCopilotEvent:q,removeLoadingMessage:re,handleCopilotRequestAck:me,setActiveConversationId:V,setConversationIds:oe,setAskCimPrompts:ce}=Qo(),{connected:de,copilot:ne,messages:Te,groupedMessages:Pe,loadingMessages:se,askCimPrompts:K}=ar(),{status:ie,entryType:k}=sr(),{isInline:L}=li(),{getConversationMessages:ee,getSessionInformation:I}=Pk({copilot:ne}),Se=B.useMemo(()=>se.size>0,[se]),je=B.useCallback(Ae=>se.has(Ae),[se]),Ee=B.useCallback(({query:Ae,facetFilters:Oe,rangeFilters:Me,catalogSegment:ot,pricebooks:pt,userPrompt:J,imageFile:ge})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}if(!Ae)return;const Ce={searchParams:{query:Ae}};J&&(Ce.userPrompt=J),ge&&(Ce.attachments={image:ge}),Oe&&Object.keys(Oe).length>0&&(Ce.searchParams.facetFilters=Oe),Me&&Me.length>0&&(Ce.searchParams.rangeFilters=Me),ot&&(Ce.searchParams.catalogSegment=ot),pt&&(Ce.searchParams.pricebooks=pt),m&&(Ce.clientContext=m),_a("search"),ne.search(Ce,Ye=>{const Re=F({},Ye);me(Re)})},[p,me,ne,m]),Be=B.useCallback(({categoryId:Ae,categoryName:Oe,facetFilters:Me,rangeFilters:ot,catalogSegment:pt,pricebooks:J,userPrompt:ge,imageFile:Ce})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}const Ye=Me&&Object.keys(Me).length>0;if(Ae===""&&!Ye){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const Re={browseParams:{categoryId:Ae||""}};ge&&(Re.userPrompt=ge),Ce&&(Re.attachments={image:Ce}),Ye&&(Re.browseParams.facetFilters=Me),ot&&ot.length>0&&(Re.browseParams.rangeFilters=ot),pt&&(Re.browseParams.catalogSegment=pt),Array.isArray(J)&&J.length>0&&(Re.browseParams.pricebooks=J),(m||Oe)&&(Re.clientContext={},m&&(Re.clientContext=F({},m)),Oe&&(Re.clientContext.cimLabel=Oe)),_a("browse"),ne.browse(Re,ct=>{var Qr;const Gt=F({},ct),Vt=((Qr=Gt.request)==null?void 0:Qr.clientContext)||{},dn=(Vt==null?void 0:Vt.cimLabel)||Oe;dn&&Gt.request&&(Gt.request.label=dn),me(Gt)})},[p,me,ne,m]),Ve=B.useCallback(({productId:Ae,productName:Oe,pdpLink:Me,userPrompt:ot,imageFile:pt})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}if(!Ae)return;const J={productId:Ae};ot&&(J.userPrompt=ot),Me&&(J.pdpLink=Me),pt&&(J.attachments={image:pt}),(m||Oe)&&(J.clientContext={},m&&(J.clientContext=F({},m)),Oe&&(J.clientContext.cimLabel=Oe)),T&&(J.baseCatalogParams=T),_a("pdp"),ne.productView(J,ge=>{var ct;const Ce=F({},ge),Ye=((ct=Ce.request)==null?void 0:ct.clientContext)||{},Re=(Ye==null?void 0:Ye.cimLabel)||Oe;Re&&Ce.request&&(Ce.request.label=Re),me(Ce)})},[p,ne,me,m,T]),Ge=B.useCallback(({userPrompt:Ae,imageFile:Oe})=>{if(!ne){p==null||p.error("Copilot is not initialized");return}if(!Ae)return;const Me={userPrompt:Ae};Oe&&(Me.attachments={image:Oe}),m&&(Me.clientContext=m),T&&(Me.baseCatalogParams=T),ne.askCim(Me,ot=>{const pt=F({},ot);me(pt)})},[p,ne,me,m,T]),_t=B.useCallback(Ae=>{q(Ae),c==null||c(Ae)},[q,c]),Pn=B.useCallback(Ae=>{q(Ae),d==null||d(Ae)},[q,d]),ln=B.useCallback(Ae=>{u==null||u(Ae),H(!0)},[u,H]);B.useEffect(()=>{!ne||!de||!ie.isOpen||yn.size>0&&yn.processQueue(Ae=>{if(Ae.context==="search"){const Oe=F({},Ae.payload);E1(Oe)}if(Ae.context==="browse"){const Oe=F({},Ae.payload);l1(Oe)}if(Ae.context==="pdp"){const Oe=F({},Ae.payload);c1(Oe)}})},[ie.isOpen,ne,de]);const kr=B.useCallback(Ae=>{const Oe=Me=>{const ot=pe(F({},Me),{id:Me.inquiryLinkId||Me.id});q(ot)};Ae.on("connect_ack",ln),Ae.on("partial_inquiry",Oe),Ae.on("display_products",q),Ae.on("progress",q),Ae.on("refined_search",_t),Ae.on("refined_browse",Pn),Ae.on("done",Me=>{re(Me.eventSourceId)}),Ae.on("error",Me=>{q(Me),re(Me.eventSourceId)}),Ae.onDisconnect(Me=>{const ot=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Me),!ot.includes(Me)){H(!1);return}p==null||p.log("De-registering event listeners");const pt=new Date().toISOString();q({name:"error",message:"Connection was lost. Please try again.",createdAt:pt,id:`error-${pt}`,sessionId:"session"}),Ae.off()})},[p,H,re,_t,Pn,q,ln]);B.useEffect(()=>{if(!ne)return;const Ae=Oe=>{if(!L){if(!Oe.message&&Oe.eventSourceId&&Oe.eventSourceId===K.requestId){ce({requestId:Oe.eventSourceId,message:Oe});return}q(Oe)}};return ne.on("follow_up",Ae),()=>{ne.off("follow_up",Ae)}},[ne,Te,K.requestId,L,q,ce]),B.useEffect(()=>{if(!ne)return;const Ae=Oe=>{if(L)return;const Me=pe(F({},Oe),{id:Oe.inquiryLinkId||Oe.id});q(Me)};return ne.on("inquiry",Ae),()=>{ne.off("inquiry",Ae)}},[ne,L,q]),Sa(()=>{let Ae;n?Ae=n:Ae=a?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Oe={baseUrl:Ae};e?Oe.apiKey=e:t&&(Oe.apiToken=t),r&&(Oe.customerId=r),o&&(Oe.tenantId=o);const Me=new hA(Oe);return v(Me),kr(Me),Me.connect(),Me.requestSessionInformation(ot=>{p==null||p.log("Session Information: ",ot);const{activeConversationId:pt,conversationIds:J}=ot.data||{};pt&&V(pt),J!=null&&J.length&&oe(J)}),()=>{Me.disconnect(),Me.off(),Y()}});const fr=B.useCallback(Ae=>{if(!ne)return;const Oe={eventId:Ae,reason:"User cancelled the request"};ne.cancelRequest(Oe,Me=>{q(Me),re(Ae)})},[q,re,ne]),rn=B.useCallback(()=>{ne&&ne.conversationReset({},Ae=>{D(),q(Ae),ne.requestSessionInformation(Oe=>{p==null||p.log("Session Information: ",Oe);const{activeConversationId:Me,conversationIds:ot}=Oe.data||{};Me&&V(Me),ot!=null&&ot.length&&oe(ot)})})},[ne,p,q,D,V,oe]),qe=B.useCallback((Ae,Oe)=>{if(!Ae)return;const Me={userPrompt:Ae};switch(Oe&&(Me.imageFile=Oe),k){case"ask_cim":Ge(Me);return;case"search":y?Ee(F(F({query:y},_),Me)):Ge(Me);return;case"browse":Be(F(F({categoryId:w},C),Me));return;case"pdp":A?Ve(F({productId:A,pdpLink:P||""},Me)):Ge(Me);return}},[k,y,_,Ee,Ge,w,C,Be,Ve,A,P]),Nt=B.useCallback((Ae,Oe)=>{var ge,Ce,Ye;const ot=Ae.params.userPrompt||"";if(!ot)return;const pt=Te.find(Re=>Re.id===Oe);if(!pt)return;const J=pt.name.replace("_suggestions","");if(J==="ask_cim"){Ge({userPrompt:ot});return}if(J==="copilot_search"){const Re=((ge=pt.request)==null?void 0:ge.searchParams)||{},Gt=Re.query===y;Ee(pe(F({query:Re.query||y},Gt?_:{}),{userPrompt:ot}));return}if(J==="copilot_browse"){const Re=pt.request,ct=Re.browseParams||{},Vt=ct.categoryId===w,dn=((Ce=Re.clientContext)==null?void 0:Ce.cimLabel)||"";Be(pe(F({categoryId:ct.categoryId||w||""},Vt?C:{}),{categoryName:dn,userPrompt:ot}));return}if(J==="product_view"){const Re=pt.request||{},ct=Re.productId,Gt=ct===A,Vt=((Ye=Re.clientContext)==null?void 0:Ye.cimLabel)||"";let dn="";Gt?dn=P||"":dn=Re.pdpLink||"",Ve({productId:ct||A,pdpLink:dn,productName:Vt,userPrompt:ot})}},[Te,y,_,Ee,Ge,w,C,Be,Ve,A,P]),Nn=B.useMemo(()=>({copilot:ne,messages:Te,groupedMessages:Pe,isLoading:Se,isResponseLoading:je,handleAskCim:Ge,handleSearch:Ee,handleBrowse:Be,handlePdp:Ve,handleUserInput:qe,handleSuggestion:Nt,handleCancel:fr,resetConversation:rn,getSessionInformation:I,getConversationMessages:ee}),[ne,Te,Pe,Se,je,Ge,Ee,Be,Ve,qe,Nt,fr,rn,I,ee]);return x.jsx(w1.Provider,{value:Nn,children:f})},A1=()=>{const{copilot:e}=ar(),{addCopilotEvent:t}=Qo();return{getCopilotSuggestions:B.useCallback((r,o,a)=>{if(!e||!o||!r)return;const u=c=>{t(c),a(c)};switch(o){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])}},Ur=()=>{const e=B.useContext(w1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},Ok=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=ar(),{entryType:o}=sr(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:c}=Qo(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:T,getConversationMessages:y}=Ur(),{getCopilotSuggestions:_}=A1();B.useEffect(()=>{!e||!o||!t||!r||n.requestId||o==="ask_cim"&&_({},o,P=>{c({requestId:P.id,message:null})})},[e,t,n.requestId,o,r,_,c]);const w=B.useCallback(({query:P})=>{if(!e||!P)return;const{facetFilters:v}=Tt.facetFiltersProxy,{rangeFilters:H}=Tt.rangeFiltersProxy,{catalogSegment:Y}=Tt.catalogSegmentProxy,{pricebooks:D}=Tt.pricebooksProxy,q={query:P};q.facetFilters=v||{},q.rangeFilters=H||[],q.catalogSegment=Y||"",q.pricebooks=D||[],d(F({},q))},[e,d]),C=B.useCallback(({categoryId:P})=>{if(!e)return;const v=lt.categoryIdProxy.categoryName,{facetFilters:H}=lt.facetFiltersProxy,{rangeFilters:Y}=lt.rangeFiltersProxy,{catalogSegment:D}=lt.catalogSegmentProxy,{pricebooks:q}=lt.pricebooksProxy,re={categoryId:P};re.categoryName=v||"",re.facetFilters=H||{},re.rangeFilters=Y||[],re.catalogSegment=D||"",re.pricebooks=q||[],f(F({},re))},[e,f]),A=B.useCallback(({productId:P})=>{if(!e||!P)return;const v={productId:P,pdpLink:Sr.pdpLink,productName:Sr.proxy.productName||""};p(v)},[e,p]);return B.useEffect(()=>{const P=({detail:v})=>{(v==null?void 0:v.property)==="query"&&w({query:v.value})};return Wg(P),()=>{Gg(P)}},[w]),B.useEffect(()=>{const P=({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 Qg(P),()=>{Jg(P)}},[A]),B.useEffect(()=>{const P=({detail:v})=>{(v==null?void 0:v.property)==="categoryId"&&C({categoryId:v.value})};return Xg(P),()=>{Kg(P)}},[C]),B.useEffect(()=>{const P=({detail:v})=>{if((v==null?void 0:v.event)==Ci.RESET_CONVERSATION&&m(),(v==null?void 0:v.event)==Ci.GET_SESSION_INFORMATION){const H=v.value.callback;T(H)}if((v==null?void 0:v.event)==Ci.GET_CONVERSATION_MESSAGES){const{payload:H,callback:Y}=v.value;if(!H.conversationId||typeof Y!="function")return;y(H,Y)}if((v==null?void 0:v.event)==Ci.LOAD_CONVERSATION){const H=v.value;if(!H.conversationId)return;y(H,D=>{a(),D.forEach(q=>{u(q)})})}};return WC(P),()=>{GC(P)}},[m,T,y,a,u]),null},Ik=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>x.jsxs(Nk,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:[x.jsx(Ok,{}),f]}),Rk=({children:e,dispatch:t})=>{const n=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),o=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),c=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),m=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),T=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),y=B.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:o,setElementId:a,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:T}),[n,r,o,a,u,c,d,f,p,m,T]);return x.jsx(x1.Provider,{value:y,children:e})},Lk=(e,t)=>{const{type:n,payload:r}=t;switch(n){case gt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case gt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case gt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case gt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case gt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case gt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case gt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case gt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},Dk=({promptsConfig:e,children:t})=>{const[n,r]=ng(Lk,F(F({},d1),e||{}));return x.jsx(S1.Provider,{value:n,children:x.jsx(Rk,{dispatch:r,children:t})})},v1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,customerId:o,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,theme:f,openLinksInNewTab:p,globalClassName:m,isDevelopment:T=!1,componentType:y,componentConfig:_,entryType:w,entryMessage:C,disclaimerText:A,disclaimerMarkdown:P,clientContext:v,baseCatalogParams:H,searchPlaceholder:Y,searchButtonLabel:D,searchConfig:q,suggestionButtonConfig:re,messageAlignment:me,autoScroll:V,promptsConfig:oe,resetConversationMessage:ce,conversationHistory:de,onConnect:ne,onCopilotEvent:Te,onRefinedSearch:Pe,onRefinedBrowse:se,__features:K,children:ie})=>x.jsx(vC,{mode:e,baseUrl:r,apiKey:t,apiToken:n,customerId:o,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,entryMessage:C,theme:f,globalClassName:m,openLinksInNewTab:p,searchPlaceholder:Y,searchButtonLabel:D,searchConfig:q,suggestionButtonConfig:re,messageAlignment:me,autoScroll:V,componentConfig:_,clientContext:v,baseCatalogParams:H,disclaimerMarkdown:P,disclaimerText:A,resetConversationMessage:ce,conversationHistory:de,isDevelopment:T,__features:K,children:x.jsx(kk,{entryType:w,componentConfig:_,componentType:y,children:x.jsx(DC,{onCopilotEvent:Te,children:x.jsx(vk,{children:x.jsx(Tk,{children:x.jsx(xk,{children:x.jsx(Dk,{promptsConfig:oe,children:x.jsx(Ik,{apiKey:t,apiToken:n,baseUrl:r,customerId:o,tenantId:a,isDevelopment:T,entryType:w,onConnect:ne,onRefinedSearch:Pe,onRefinedBrowse:se,onCopilotEvent:Te,children:ie})})})})})})})});var Nf={exports:{}},Dn={},Of={exports:{}},If={};var C1;function Mk(){return C1||(C1=1,(function(e){function t(K,ie){var k=K.length;K.push(ie);e:for(;0<k;){var L=k-1>>>1,ee=K[L];if(0<o(ee,ie))K[L]=ie,K[k]=ee,k=L;else break e}}function n(K){return K.length===0?null:K[0]}function r(K){if(K.length===0)return null;var ie=K[0],k=K.pop();if(k!==ie){K[0]=k;e:for(var L=0,ee=K.length,I=ee>>>1;L<I;){var Se=2*(L+1)-1,je=K[Se],Ee=Se+1,Be=K[Ee];if(0>o(je,k))Ee<ee&&0>o(Be,je)?(K[L]=Be,K[Ee]=k,L=Ee):(K[L]=je,K[Se]=k,L=Se);else if(Ee<ee&&0>o(Be,k))K[L]=Be,K[Ee]=k,L=Ee;else break e}}return ie}function o(K,ie){var k=K.sortIndex-ie.sortIndex;return k!==0?k:K.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,P=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(K){for(var ie=n(f);ie!==null;){if(ie.callback===null)r(f);else if(ie.startTime<=K)r(f),ie.sortIndex=ie.expirationTime,t(d,ie);else break;ie=n(f)}}function H(K){if(w=!1,v(K),!_)if(n(d)!==null)_=!0,Pe(Y);else{var ie=n(f);ie!==null&&se(H,ie.startTime-K)}}function Y(K,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)||K&&!oe());){var L=m.callback;if(typeof L=="function"){m.callback=null,T=m.priorityLevel;var ee=L(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 I=!0;else{var Se=n(f);Se!==null&&se(H,Se.startTime-ie),I=!1}return I}finally{m=null,T=k,y=!1}}var D=!1,q=null,re=-1,me=5,V=-1;function oe(){return!(e.unstable_now()-V<me)}function ce(){if(q!==null){var K=e.unstable_now();V=K;var ie=!0;try{ie=q(!0,K)}finally{ie?de():(D=!1,q=null)}}else D=!1}var de;if(typeof P=="function")de=function(){P(ce)};else if(typeof MessageChannel!="undefined"){var ne=new MessageChannel,Te=ne.port2;ne.port1.onmessage=ce,de=function(){Te.postMessage(null)}}else de=function(){C(ce,0)};function Pe(K){q=K,D||(D=!0,de())}function se(K,ie){re=C(function(){K(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(K){K.callback=null},e.unstable_continueExecution=function(){_||y||(_=!0,Pe(Y))},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):me=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(K){switch(T){case 1:case 2:case 3:var ie=3;break;default:ie=T}var k=T;T=ie;try{return K()}finally{T=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(K,ie){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var k=T;T=K;try{return ie()}finally{T=k}},e.unstable_scheduleCallback=function(K,ie,k){var L=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?L+k:L):k=L,K){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,K={id:p++,callback:ie,priorityLevel:K,startTime:k,expirationTime:ee,sortIndex:-1},k>L?(K.sortIndex=k,t(f,K),n(d)===null&&K===n(f)&&(w?(A(re),re=-1):w=!0,se(H,k-L))):(K.sortIndex=ee,t(d,K),_||y||(_=!0,Pe(Y))),K},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(K){var ie=T;return function(){var k=T;T=ie;try{return K.apply(this,arguments)}finally{T=k}}}})(If)),If}var k1;function Fk(){return k1||(k1=1,Of.exports=Mk()),Of.exports}var P1;function Bk(){if(P1)return Dn;P1=1;var e=Uo(),t=Fk();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,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,s,l,h){if(l!==null&&l.type===0)return!1;switch(typeof s){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,s,l,h){if(s===null||typeof s=="undefined"||y(i,s,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function w(i,s,l,h,E,b,S){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=b,this.removeEmptyString=S}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 s=i[0];C[s]=new w(s,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 P(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(A,P);C[s]=new w(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(A,P);C[s]=new w(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(A,P);C[s]=new w(s,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,s,l,h){var E=C.hasOwnProperty(s)?C[s]:null;(E!==null?E.type!==0:h||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(_(s,l,E,h)&&(l=null),h||E===null?T(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(s=E.attributeName,h=E.attributeNamespace,l===null?i.removeAttribute(s):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,h?i.setAttributeNS(h,s,l):i.setAttribute(s,l))))}var H=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),D=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),re=Symbol.for("react.strict_mode"),me=Symbol.for("react.profiler"),V=Symbol.for("react.provider"),oe=Symbol.for("react.context"),ce=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),ne=Symbol.for("react.suspense_list"),Te=Symbol.for("react.memo"),Pe=Symbol.for("react.lazy"),se=Symbol.for("react.offscreen"),K=Symbol.iterator;function ie(i){return i===null||typeof i!="object"?null:(i=K&&i[K]||i["@@iterator"],typeof i=="function"?i:null)}var k=Object.assign,L;function ee(i){if(L===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);L=s&&s[1]||""}return`
|
|
11
|
+
`+L+i}var I=!1;function Se(i,s){if(!i||I)return"";I=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(Z){var h=Z}Reflect.construct(i,[],s)}else{try{s.call()}catch(Z){h=Z}i.call(s.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(`
|
|
12
12
|
`),b=h.stack.split(`
|
|
13
13
|
`),S=E.length-1,R=b.length-1;1<=S&&0<=R&&E[S]!==b[R];)R--;for(;1<=S&&0<=R;S--,R--)if(E[S]!==b[R]){if(S!==1||R!==1)do if(S--,R--,0>R||E[S]!==b[R]){var U=`
|
|
14
|
-
`+E[S].replace(" at new "," at ");return i.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",i.displayName)),U}while(1<=S&&0<=R);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?ee(i):""}function Ue(i){switch(i.tag){case 5:return ee(i.type);case 16:return ee("Lazy");case 13:return ee("Suspense");case 19:return ee("SuspenseList");case 0:case 2:case 15:return i=we(i.type,!1),i;case 11:return i=we(i.type.render,!1),i;case 1:return i=we(i.type,!0),i;default:return""}}function Te(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case q:return"Fragment";case D:return"Portal";case me:return"Profiler";case re:return"StrictMode";case de: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 ce:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case Ee:return s=i.displayName||null,s!==null?s:Te(i.type)||"Memo";case Oe:s=i._payload,i=i._init;try{return Te(i(s))}catch(l){}}return null}function Be(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Te(s);case 8:return s===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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ve(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ge(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function _t(i){var s=Ge(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),h=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,b=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return E.call(this)},set:function(S){h=""+S,b.call(this,S)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(S){h=""+S},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Pn(i){i._valueTracker||(i._valueTracker=_t(i))}function ln(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),h="";return i&&(h=Ge(i)?i.checked?"true":"false":i.value),i=h,i!==l?(s.setValue(i),!0):!1}function kr(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function fr(i,s){var l=s.checked;return k({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function rn(i,s){var l=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;l=Ve(s.value!=null?s.value:l),i._wrapperState={initialChecked:h,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function qe(i,s){s=s.checked,s!=null&&v(i,"checked",s,!1)}function Nt(i,s){qe(i,s);var l=Ve(s.value),h=s.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}s.hasOwnProperty("value")?cn(i,s.type,l):s.hasOwnProperty("defaultValue")&&cn(i,s.type,Ve(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Nn(i,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var h=s.type;if(!(h!=="submit"&&h!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,l||s===i.value||(i.value=s),i.defaultValue=s}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function cn(i,s,l){(s!=="number"||kr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var Hn=Array.isArray;function Ae(i,s,l,h){if(i=i.options,s){s={};for(var E=0;E<l.length;E++)s["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=s.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&h&&(i[l].defaultSelected=!0)}else{for(l=""+Ve(l),s=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}s!==null||i[E].disabled||(s=i[E])}s!==null&&(s.selected=!0)}}function Ne(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Me(i,s){var l=s.value;if(l==null){if(l=s.children,s=s.defaultValue,l!=null){if(s!=null)throw Error(n(92));if(Hn(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:Ve(l)}}function ot(i,s){var l=Ve(s.value),h=Ve(s.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),s.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),h!=null&&(i.defaultValue=""+h)}function pt(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function J(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ge(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?J(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ce,Ye=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,h,E){MSApp.execUnsafeLocalFunction(function(){return i(s,l,h,E)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Ce=Ce||document.createElement("div"),Ce.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Ce.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Re(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var ct={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(ct).forEach(function(i){Gt.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),ct[s]=ct[i]})});function Vt(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||ct.hasOwnProperty(i)&&ct[i]?(""+s).trim():s+"px"}function dn(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var h=l.indexOf("--")===0,E=Vt(l,s[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,E):i[l]=E}}var Qr=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 fn(i,s){if(s){if(Qr[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Jr(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Zn=null;function Rp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Lp=null,Ls=null,Ds=null;function fS(i){if(i=Pu(i)){if(typeof Lp!="function")throw Error(n(280));var s=i.stateNode;s&&(s=$c(s),Lp(i.stateNode,i.type,s))}}function hS(i){Ls?Ds?Ds.push(i):Ds=[i]:Ls=i}function pS(){if(Ls){var i=Ls,s=Ds;if(Ds=Ls=null,fS(i),s)for(i=0;i<s.length;i++)fS(s[i])}}function mS(i,s){return i(s)}function gS(){}var Dp=!1;function ES(i,s,l){if(Dp)return i(s,l);Dp=!0;try{return mS(i,s,l)}finally{Dp=!1,(Ls!==null||Ds!==null)&&(gS(),pS())}}function uu(i,s){var l=i.stateNode;if(l===null)return null;var h=$c(l);if(h===null)return null;l=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(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,s,typeof l));return l}var Mp=!1;if(c)try{var lu={};Object.defineProperty(lu,"passive",{get:function(){Mp=!0}}),window.addEventListener("test",lu,lu),window.removeEventListener("test",lu,lu)}catch(i){Mp=!1}function lB(i,s,l,h,E,b,S,R,U){var Z=Array.prototype.slice.call(arguments,3);try{s.apply(l,Z)}catch(le){this.onError(le)}}var cu=!1,_c=null,Sc=!1,Fp=null,cB={onError:function(i){cu=!0,_c=i}};function dB(i,s,l,h,E,b,S,R,U){cu=!1,_c=null,lB.apply(cB,arguments)}function fB(i,s,l,h,E,b,S,R,U){if(dB.apply(this,arguments),cu){if(cu){var Z=_c;cu=!1,_c=null}else throw Error(n(198));Sc||(Sc=!0,Fp=Z)}}function vo(i){var s=i,l=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(l=s.return),i=s.return;while(i)}return s.tag===3?l:null}function yS(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function bS(i){if(vo(i)!==i)throw Error(n(188))}function hB(i){var s=i.alternate;if(!s){if(s=vo(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,h=s;;){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 bS(E),i;if(b===h)return bS(E),s;b=b.sibling}throw Error(n(188))}if(l.return!==h.return)l=E,h=b;else{for(var S=!1,R=E.child;R;){if(R===l){S=!0,l=E,h=b;break}if(R===h){S=!0,h=E,l=b;break}R=R.sibling}if(!S){for(R=b.child;R;){if(R===l){S=!0,l=b,h=E;break}if(R===h){S=!0,h=b,l=E;break}R=R.sibling}if(!S)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:s}function TS(i){return i=hB(i),i!==null?_S(i):null}function _S(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=_S(i);if(s!==null)return s;i=i.sibling}return null}var SS=t.unstable_scheduleCallback,xS=t.unstable_cancelCallback,pB=t.unstable_shouldYield,mB=t.unstable_requestPaint,Bt=t.unstable_now,gB=t.unstable_getCurrentPriorityLevel,Bp=t.unstable_ImmediatePriority,wS=t.unstable_UserBlockingPriority,xc=t.unstable_NormalPriority,EB=t.unstable_LowPriority,AS=t.unstable_IdlePriority,wc=null,Zr=null;function yB(i){if(Zr&&typeof Zr.onCommitFiberRoot=="function")try{Zr.onCommitFiberRoot(wc,i,void 0,(i.current.flags&128)===128)}catch(s){}}var Pr=Math.clz32?Math.clz32:_B,bB=Math.log,TB=Math.LN2;function _B(i){return i>>>=0,i===0?32:31-(bB(i)/TB|0)|0}var Ac=64,vc=4194304;function du(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 Cc(i,s){var l=i.pendingLanes;if(l===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,S=l&268435455;if(S!==0){var R=S&~E;R!==0?h=du(R):(b&=S,b!==0&&(h=du(b)))}else S=l&~E,S!==0?h=du(S):b!==0&&(h=du(b));if(h===0)return 0;if(s!==0&&s!==h&&(s&E)===0&&(E=h&-h,b=s&-s,E>=b||E===16&&(b&4194240)!==0))return s;if((h&4)!==0&&(h|=l&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=h;0<s;)l=31-Pr(s),E=1<<l,h|=i[l],s&=~E;return h}function SB(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function xB(i,s){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var S=31-Pr(b),R=1<<S,U=E[S];U===-1?((R&l)===0||(R&h)!==0)&&(E[S]=SB(R,s)):U<=s&&(i.expiredLanes|=R),b&=~R}}function Up(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function vS(){var i=Ac;return Ac<<=1,(Ac&4194240)===0&&(Ac=64),i}function Hp(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function fu(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Pr(s),i[s]=l}function wB(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-Pr(l),b=1<<E;s[E]=0,h[E]=-1,i[E]=-1,l&=~b}}function zp(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var h=31-Pr(l),E=1<<h;E&s|i[h]&s&&(i[h]|=s),l&=~E}}var dt=0;function CS(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var kS,jp,PS,NS,OS,$p=!1,kc=[],Mi=null,Fi=null,Bi=null,hu=new Map,pu=new Map,Ui=[],AB="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 IS(i,s){switch(i){case"focusin":case"focusout":Mi=null;break;case"dragenter":case"dragleave":Fi=null;break;case"mouseover":case"mouseout":Bi=null;break;case"pointerover":case"pointerout":hu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":pu.delete(s.pointerId)}}function mu(i,s,l,h,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:s,domEventName:l,eventSystemFlags:h,nativeEvent:b,targetContainers:[E]},s!==null&&(s=Pu(s),s!==null&&jp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function vB(i,s,l,h,E){switch(s){case"focusin":return Mi=mu(Mi,i,s,l,h,E),!0;case"dragenter":return Fi=mu(Fi,i,s,l,h,E),!0;case"mouseover":return Bi=mu(Bi,i,s,l,h,E),!0;case"pointerover":var b=E.pointerId;return hu.set(b,mu(hu.get(b)||null,i,s,l,h,E)),!0;case"gotpointercapture":return b=E.pointerId,pu.set(b,mu(pu.get(b)||null,i,s,l,h,E)),!0}return!1}function RS(i){var s=Co(i.target);if(s!==null){var l=vo(s);if(l!==null){if(s=l.tag,s===13){if(s=yS(l),s!==null){i.blockedOn=s,OS(i.priority,function(){PS(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Pc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=qp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Zn=h,l.target.dispatchEvent(h),Zn=null}else return s=Pu(l),s!==null&&jp(s),i.blockedOn=l,!1;s.shift()}return!0}function LS(i,s,l){Pc(i)&&l.delete(s)}function CB(){$p=!1,Mi!==null&&Pc(Mi)&&(Mi=null),Fi!==null&&Pc(Fi)&&(Fi=null),Bi!==null&&Pc(Bi)&&(Bi=null),hu.forEach(LS),pu.forEach(LS)}function gu(i,s){i.blockedOn===s&&(i.blockedOn=null,$p||($p=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,CB)))}function Eu(i){function s(E){return gu(E,i)}if(0<kc.length){gu(kc[0],i);for(var l=1;l<kc.length;l++){var h=kc[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Mi!==null&&gu(Mi,i),Fi!==null&&gu(Fi,i),Bi!==null&&gu(Bi,i),hu.forEach(s),pu.forEach(s),l=0;l<Ui.length;l++)h=Ui[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ui.length&&(l=Ui[0],l.blockedOn===null);)RS(l),l.blockedOn===null&&Ui.shift()}var Ms=H.ReactCurrentBatchConfig,Nc=!0;function kB(i,s,l,h){var E=dt,b=Ms.transition;Ms.transition=null;try{dt=1,Vp(i,s,l,h)}finally{dt=E,Ms.transition=b}}function PB(i,s,l,h){var E=dt,b=Ms.transition;Ms.transition=null;try{dt=4,Vp(i,s,l,h)}finally{dt=E,Ms.transition=b}}function Vp(i,s,l,h){if(Nc){var E=qp(i,s,l,h);if(E===null)um(i,s,h,Oc,l),IS(i,h);else if(vB(E,i,s,l,h))h.stopPropagation();else if(IS(i,h),s&4&&-1<AB.indexOf(i)){for(;E!==null;){var b=Pu(E);if(b!==null&&kS(b),b=qp(i,s,l,h),b===null&&um(i,s,h,Oc,l),b===E)break;E=b}E!==null&&h.stopPropagation()}else um(i,s,h,null,l)}}var Oc=null;function qp(i,s,l,h){if(Oc=null,i=Rp(h),i=Co(i),i!==null)if(s=vo(i),s===null)i=null;else if(l=s.tag,l===13){if(i=yS(s),i!==null)return i;i=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return Oc=i,null}function DS(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(gB()){case Bp:return 1;case wS:return 4;case xc:case EB:return 16;case AS:return 536870912;default:return 16}default:return 16}}var Hi=null,Yp=null,Ic=null;function MS(){if(Ic)return Ic;var i,s=Yp,l=s.length,h,E="value"in Hi?Hi.value:Hi.textContent,b=E.length;for(i=0;i<l&&s[i]===E[i];i++);var S=l-i;for(h=1;h<=S&&s[l-h]===E[b-h];h++);return Ic=E.slice(i,1<h?1-h:void 0)}function Rc(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Lc(){return!0}function FS(){return!1}function er(i){function s(l,h,E,b,S){this._reactName=l,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=S,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)?Lc:FS,this.isPropagationStopped=FS,this}return k(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Lc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Lc)},persist:function(){},isPersistent:Lc}),s}var Fs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wp=er(Fs),yu=k({},Fs,{view:0,detail:0}),NB=er(yu),Gp,Xp,bu,Dc=k({},yu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qp,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!==bu&&(bu&&i.type==="mousemove"?(Gp=i.screenX-bu.screenX,Xp=i.screenY-bu.screenY):Xp=Gp=0,bu=i),Gp)},movementY:function(i){return"movementY"in i?i.movementY:Xp}}),BS=er(Dc),OB=k({},Dc,{dataTransfer:0}),IB=er(OB),RB=k({},yu,{relatedTarget:0}),Kp=er(RB),LB=k({},Fs,{animationName:0,elapsedTime:0,pseudoElement:0}),DB=er(LB),MB=k({},Fs,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),FB=er(MB),BB=k({},Fs,{data:0}),US=er(BB),UB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},HB={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"},zB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jB(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=zB[i])?!!s[i]:!1}function Qp(){return jB}var $B=k({},yu,{key:function(i){if(i.key){var s=UB[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Rc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?HB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qp,charCode:function(i){return i.type==="keypress"?Rc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Rc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),VB=er($B),qB=k({},Dc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),HS=er(qB),YB=k({},yu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qp}),WB=er(YB),GB=k({},Fs,{propertyName:0,elapsedTime:0,pseudoElement:0}),XB=er(GB),KB=k({},Dc,{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}),QB=er(KB),JB=[9,13,27,32],Jp=c&&"CompositionEvent"in window,Tu=null;c&&"documentMode"in document&&(Tu=document.documentMode);var ZB=c&&"TextEvent"in window&&!Tu,zS=c&&(!Jp||Tu&&8<Tu&&11>=Tu),jS=" ",$S=!1;function VS(i,s){switch(i){case"keyup":return JB.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qS(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Bs=!1;function e7(i,s){switch(i){case"compositionend":return qS(s);case"keypress":return s.which!==32?null:($S=!0,jS);case"textInput":return i=s.data,i===jS&&$S?null:i;default:return null}}function t7(i,s){if(Bs)return i==="compositionend"||!Jp&&VS(i,s)?(i=MS(),Ic=Yp=Hi=null,Bs=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return zS&&s.locale!=="ko"?null:s.data;default:return null}}var n7={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 YS(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!n7[i.type]:s==="textarea"}function WS(i,s,l,h){hS(h),s=Hc(s,"onChange"),0<s.length&&(l=new Wp("onChange","change",null,l,h),i.push({event:l,listeners:s}))}var _u=null,Su=null;function r7(i){dx(i,0)}function Mc(i){var s=$s(i);if(ln(s))return i}function i7(i,s){if(i==="change")return s}var GS=!1;if(c){var Zp;if(c){var em="oninput"in document;if(!em){var XS=document.createElement("div");XS.setAttribute("oninput","return;"),em=typeof XS.oninput=="function"}Zp=em}else Zp=!1;GS=Zp&&(!document.documentMode||9<document.documentMode)}function KS(){_u&&(_u.detachEvent("onpropertychange",QS),Su=_u=null)}function QS(i){if(i.propertyName==="value"&&Mc(Su)){var s=[];WS(s,Su,i,Rp(i)),ES(r7,s)}}function o7(i,s,l){i==="focusin"?(KS(),_u=s,Su=l,_u.attachEvent("onpropertychange",QS)):i==="focusout"&&KS()}function s7(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Mc(Su)}function a7(i,s){if(i==="click")return Mc(s)}function u7(i,s){if(i==="input"||i==="change")return Mc(s)}function l7(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Nr=typeof Object.is=="function"?Object.is:l7;function xu(i,s){if(Nr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),h=Object.keys(s);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var E=l[h];if(!d.call(s,E)||!Nr(i[E],s[E]))return!1}return!0}function JS(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function ZS(i,s){var l=JS(i);i=0;for(var h;l;){if(l.nodeType===3){if(h=i+l.textContent.length,i<=s&&h>=s)return{node:l,offset:s-i};i=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=JS(l)}}function ex(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?ex(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function tx(){for(var i=window,s=kr();s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch(h){l=!1}if(l)i=s.contentWindow;else break;s=kr(i.document)}return s}function tm(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function c7(i){var s=tx(),l=i.focusedElem,h=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&ex(l.ownerDocument.documentElement,l)){if(h!==null&&tm(l)){if(s=h.start,i=h.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,b=Math.min(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=ZS(l,b);var S=ZS(l,h);E&&S&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==S.node||i.focusOffset!==S.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(s),i.extend(S.node,S.offset)):(s.setEnd(S.node,S.offset),i.addRange(s)))}}for(s=[],i=l;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<s.length;l++)i=s[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var d7=c&&"documentMode"in document&&11>=document.documentMode,Us=null,nm=null,wu=null,rm=!1;function nx(i,s,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;rm||Us==null||Us!==kr(h)||(h=Us,"selectionStart"in h&&tm(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}),wu&&xu(wu,h)||(wu=h,h=Hc(nm,"onSelect"),0<h.length&&(s=new Wp("onSelect","select",null,s,l),i.push({event:s,listeners:h}),s.target=Us)))}function Fc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var Hs={animationend:Fc("Animation","AnimationEnd"),animationiteration:Fc("Animation","AnimationIteration"),animationstart:Fc("Animation","AnimationStart"),transitionend:Fc("Transition","TransitionEnd")},im={},rx={};c&&(rx=document.createElement("div").style,"AnimationEvent"in window||(delete Hs.animationend.animation,delete Hs.animationiteration.animation,delete Hs.animationstart.animation),"TransitionEvent"in window||delete Hs.transitionend.transition);function Bc(i){if(im[i])return im[i];if(!Hs[i])return i;var s=Hs[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in rx)return im[i]=s[l];return i}var ix=Bc("animationend"),ox=Bc("animationiteration"),sx=Bc("animationstart"),ax=Bc("transitionend"),ux=new Map,lx="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 zi(i,s){ux.set(i,s),a(s,[i])}for(var om=0;om<lx.length;om++){var sm=lx[om],f7=sm.toLowerCase(),h7=sm[0].toUpperCase()+sm.slice(1);zi(f7,"on"+h7)}zi(ix,"onAnimationEnd"),zi(ox,"onAnimationIteration"),zi(sx,"onAnimationStart"),zi("dblclick","onDoubleClick"),zi("focusin","onFocus"),zi("focusout","onBlur"),zi(ax,"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 Au="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(" "),p7=new Set("cancel close invalid load scroll toggle".split(" ").concat(Au));function cx(i,s,l){var h=i.type||"unknown-event";i.currentTarget=l,fB(h,s,void 0,i),i.currentTarget=null}function dx(i,s){s=(s&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(s)for(var S=h.length-1;0<=S;S--){var R=h[S],U=R.instance,Z=R.currentTarget;if(R=R.listener,U!==b&&E.isPropagationStopped())break e;cx(E,R,Z),b=U}else for(S=0;S<h.length;S++){if(R=h[S],U=R.instance,Z=R.currentTarget,R=R.listener,U!==b&&E.isPropagationStopped())break e;cx(E,R,Z),b=U}}}if(Sc)throw i=Fp,Sc=!1,Fp=null,i}function St(i,s){var l=s[pm];l===void 0&&(l=s[pm]=new Set);var h=i+"__bubble";l.has(h)||(fx(s,i,2,!1),l.add(h))}function am(i,s,l){var h=0;s&&(h|=4),fx(l,i,h,s)}var Uc="_reactListening"+Math.random().toString(36).slice(2);function vu(i){if(!i[Uc]){i[Uc]=!0,r.forEach(function(l){l!=="selectionchange"&&(p7.has(l)||am(l,!1,i),am(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Uc]||(s[Uc]=!0,am("selectionchange",!1,s))}}function fx(i,s,l,h){switch(DS(s)){case 1:var E=kB;break;case 4:E=PB;break;default:E=Vp}l=E.bind(null,s,l,i),E=void 0,!Mp||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(s,l,{capture:!0,passive:E}):i.addEventListener(s,l,!0):E!==void 0?i.addEventListener(s,l,{passive:E}):i.addEventListener(s,l,!1)}function um(i,s,l,h,E){var b=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var S=h.tag;if(S===3||S===4){var R=h.stateNode.containerInfo;if(R===E||R.nodeType===8&&R.parentNode===E)break;if(S===4)for(S=h.return;S!==null;){var U=S.tag;if((U===3||U===4)&&(U=S.stateNode.containerInfo,U===E||U.nodeType===8&&U.parentNode===E))return;S=S.return}for(;R!==null;){if(S=Co(R),S===null)return;if(U=S.tag,U===5||U===6){h=b=S;continue e}R=R.parentNode}}h=h.return}ES(function(){var Z=b,le=Rp(l),he=[];e:{var ae=ux.get(i);if(ae!==void 0){var ve=Wp,Pe=i;switch(i){case"keypress":if(Rc(l)===0)break e;case"keydown":case"keyup":ve=VB;break;case"focusin":Pe="focus",ve=Kp;break;case"focusout":Pe="blur",ve=Kp;break;case"beforeblur":case"afterblur":ve=Kp;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":ve=BS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=IB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=WB;break;case ix:case ox:case sx:ve=DB;break;case ax:ve=XB;break;case"scroll":ve=NB;break;case"wheel":ve=QB;break;case"copy":case"cut":case"paste":ve=FB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=HS}var Ie=(s&4)!==0,Ut=!Ie&&i==="scroll",G=Ie?ae!==null?ae+"Capture":null:ae;Ie=[];for(var j=Z,K;j!==null;){K=j;var _e=K.stateNode;if(K.tag===5&&_e!==null&&(K=_e,G!==null&&(_e=uu(j,G),_e!=null&&Ie.push(Cu(j,_e,K)))),Ut)break;j=j.return}0<Ie.length&&(ae=new ve(ae,Pe,null,l,le),he.push({event:ae,listeners:Ie}))}}if((s&7)===0){e:{if(ae=i==="mouseover"||i==="pointerover",ve=i==="mouseout"||i==="pointerout",ae&&l!==Zn&&(Pe=l.relatedTarget||l.fromElement)&&(Co(Pe)||Pe[Ei]))break e;if((ve||ae)&&(ae=le.window===le?le:(ae=le.ownerDocument)?ae.defaultView||ae.parentWindow:window,ve?(Pe=l.relatedTarget||l.toElement,ve=Z,Pe=Pe?Co(Pe):null,Pe!==null&&(Ut=vo(Pe),Pe!==Ut||Pe.tag!==5&&Pe.tag!==6)&&(Pe=null)):(ve=null,Pe=Z),ve!==Pe)){if(Ie=BS,_e="onMouseLeave",G="onMouseEnter",j="mouse",(i==="pointerout"||i==="pointerover")&&(Ie=HS,_e="onPointerLeave",G="onPointerEnter",j="pointer"),Ut=ve==null?ae:$s(ve),K=Pe==null?ae:$s(Pe),ae=new Ie(_e,j+"leave",ve,l,le),ae.target=Ut,ae.relatedTarget=K,_e=null,Co(le)===Z&&(Ie=new Ie(G,j+"enter",Pe,l,le),Ie.target=K,Ie.relatedTarget=Ut,_e=Ie),Ut=_e,ve&&Pe)t:{for(Ie=ve,G=Pe,j=0,K=Ie;K;K=zs(K))j++;for(K=0,_e=G;_e;_e=zs(_e))K++;for(;0<j-K;)Ie=zs(Ie),j--;for(;0<K-j;)G=zs(G),K--;for(;j--;){if(Ie===G||G!==null&&Ie===G.alternate)break t;Ie=zs(Ie),G=zs(G)}Ie=null}else Ie=null;ve!==null&&hx(he,ae,ve,Ie,!1),Pe!==null&&Ut!==null&&hx(he,Ut,Pe,Ie,!0)}}e:{if(ae=Z?$s(Z):window,ve=ae.nodeName&&ae.nodeName.toLowerCase(),ve==="select"||ve==="input"&&ae.type==="file")var Le=i7;else if(YS(ae))if(GS)Le=u7;else{Le=s7;var ze=o7}else(ve=ae.nodeName)&&ve.toLowerCase()==="input"&&(ae.type==="checkbox"||ae.type==="radio")&&(Le=a7);if(Le&&(Le=Le(i,Z))){WS(he,Le,l,le);break e}ze&&ze(i,ae,Z),i==="focusout"&&(ze=ae._wrapperState)&&ze.controlled&&ae.type==="number"&&cn(ae,"number",ae.value)}switch(ze=Z?$s(Z):window,i){case"focusin":(YS(ze)||ze.contentEditable==="true")&&(Us=ze,nm=Z,wu=null);break;case"focusout":wu=nm=Us=null;break;case"mousedown":rm=!0;break;case"contextmenu":case"mouseup":case"dragend":rm=!1,nx(he,l,le);break;case"selectionchange":if(d7)break;case"keydown":case"keyup":nx(he,l,le)}var je;if(Jp)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 Bs?VS(i,l)&&(We="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(We="onCompositionStart");We&&(zS&&l.locale!=="ko"&&(Bs||We!=="onCompositionStart"?We==="onCompositionEnd"&&Bs&&(je=MS()):(Hi=le,Yp="value"in Hi?Hi.value:Hi.textContent,Bs=!0)),ze=Hc(Z,We),0<ze.length&&(We=new US(We,i,null,l,le),he.push({event:We,listeners:ze}),je?We.data=je:(je=qS(l),je!==null&&(We.data=je)))),(je=ZB?e7(i,l):t7(i,l))&&(Z=Hc(Z,"onBeforeInput"),0<Z.length&&(le=new US("onBeforeInput","beforeinput",null,l,le),he.push({event:le,listeners:Z}),le.data=je))}dx(he,s)})}function Cu(i,s,l){return{instance:i,listener:s,currentTarget:l}}function Hc(i,s){for(var l=s+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=uu(i,l),b!=null&&h.unshift(Cu(i,b,E)),b=uu(i,s),b!=null&&h.push(Cu(i,b,E))),i=i.return}return h}function zs(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function hx(i,s,l,h,E){for(var b=s._reactName,S=[];l!==null&&l!==h;){var R=l,U=R.alternate,Z=R.stateNode;if(U!==null&&U===h)break;R.tag===5&&Z!==null&&(R=Z,E?(U=uu(l,b),U!=null&&S.unshift(Cu(l,U,R))):E||(U=uu(l,b),U!=null&&S.push(Cu(l,U,R)))),l=l.return}S.length!==0&&i.push({event:s,listeners:S})}var m7=/\r\n?/g,g7=/\u0000|\uFFFD/g;function px(i){return(typeof i=="string"?i:""+i).replace(m7,`
|
|
15
|
-
`).replace(g7,"")}function zc(i,s,l){if(s=px(s),px(i)!==s&&l)throw Error(n(425))}function jc(){}var lm=null,cm=null;function dm(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var fm=typeof setTimeout=="function"?setTimeout:void 0,E7=typeof clearTimeout=="function"?clearTimeout:void 0,mx=typeof Promise=="function"?Promise:void 0,y7=typeof queueMicrotask=="function"?queueMicrotask:typeof mx!="undefined"?function(i){return mx.resolve(null).then(i).catch(b7)}:fm;function b7(i){setTimeout(function(){throw i})}function hm(i,s){var l=s,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),Eu(s);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);Eu(s)}function ji(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function gx(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(s===0)return i;s--}else l==="/$"&&s++}i=i.previousSibling}return null}var js=Math.random().toString(36).slice(2),ei="__reactFiber$"+js,ku="__reactProps$"+js,Ei="__reactContainer$"+js,pm="__reactEvents$"+js,T7="__reactListeners$"+js,_7="__reactHandles$"+js;function Co(i){var s=i[ei];if(s)return s;for(var l=i.parentNode;l;){if(s=l[Ei]||l[ei]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=gx(i);i!==null;){if(l=i[ei])return l;i=gx(i)}return s}i=l,l=i.parentNode}return null}function Pu(i){return i=i[ei]||i[Ei],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function $s(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function $c(i){return i[ku]||null}var mm=[],Vs=-1;function $i(i){return{current:i}}function xt(i){0>Vs||(i.current=mm[Vs],mm[Vs]=null,Vs--)}function bt(i,s){Vs++,mm[Vs]=i.current,i.current=s}var Vi={},xn=$i(Vi),zn=$i(!1),ko=Vi;function qs(i,s){var l=i.type.contextTypes;if(!l)return Vi;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===s)return h.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in l)E[b]=s[b];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=E),E}function jn(i){return i=i.childContextTypes,i!=null}function Vc(){xt(zn),xt(xn)}function Ex(i,s,l){if(xn.current!==Vi)throw Error(n(168));bt(xn,s),bt(zn,l)}function yx(i,s,l){var h=i.stateNode;if(s=s.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var E in h)if(!(E in s))throw Error(n(108,Be(i)||"Unknown",E));return k({},l,h)}function qc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Vi,ko=xn.current,bt(xn,i),bt(zn,zn.current),!0}function bx(i,s,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=yx(i,s,ko),h.__reactInternalMemoizedMergedChildContext=i,xt(zn),xt(xn),bt(xn,i)):xt(zn),bt(zn,l)}var yi=null,Yc=!1,gm=!1;function Tx(i){yi===null?yi=[i]:yi.push(i)}function S7(i){Yc=!0,Tx(i)}function qi(){if(!gm&&yi!==null){gm=!0;var i=0,s=dt;try{var l=yi;for(dt=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}yi=null,Yc=!1}catch(E){throw yi!==null&&(yi=yi.slice(i+1)),SS(Bp,qi),E}finally{dt=s,gm=!1}}return null}var Ys=[],Ws=0,Wc=null,Gc=0,hr=[],pr=0,Po=null,bi=1,Ti="";function No(i,s){Ys[Ws++]=Gc,Ys[Ws++]=Wc,Wc=i,Gc=s}function _x(i,s,l){hr[pr++]=bi,hr[pr++]=Ti,hr[pr++]=Po,Po=i;var h=bi;i=Ti;var E=32-Pr(h)-1;h&=~(1<<E),l+=1;var b=32-Pr(s)+E;if(30<b){var S=E-E%5;b=(h&(1<<S)-1).toString(32),h>>=S,E-=S,bi=1<<32-Pr(s)+E|l<<E|h,Ti=b+i}else bi=1<<b|l<<E|h,Ti=i}function Em(i){i.return!==null&&(No(i,1),_x(i,1,0))}function ym(i){for(;i===Wc;)Wc=Ys[--Ws],Ys[Ws]=null,Gc=Ys[--Ws],Ys[Ws]=null;for(;i===Po;)Po=hr[--pr],hr[pr]=null,Ti=hr[--pr],hr[pr]=null,bi=hr[--pr],hr[pr]=null}var tr=null,nr=null,kt=!1,Or=null;function Sx(i,s){var l=yr(5,null,null,0);l.elementType="DELETED",l.stateNode=s,l.return=i,s=i.deletions,s===null?(i.deletions=[l],i.flags|=16):s.push(l)}function xx(i,s){switch(i.tag){case 5:var l=i.type;return s=s.nodeType!==1||l.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,tr=i,nr=ji(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,tr=i,nr=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=Po!==null?{id:bi,overflow:Ti}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=yr(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,tr=i,nr=null,!0):!1;default:return!1}}function bm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Tm(i){if(kt){var s=nr;if(s){var l=s;if(!xx(i,s)){if(bm(i))throw Error(n(418));s=ji(l.nextSibling);var h=tr;s&&xx(i,s)?Sx(h,l):(i.flags=i.flags&-4097|2,kt=!1,tr=i)}}else{if(bm(i))throw Error(n(418));i.flags=i.flags&-4097|2,kt=!1,tr=i}}}function wx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;tr=i}function Xc(i){if(i!==tr)return!1;if(!kt)return wx(i),kt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!dm(i.type,i.memoizedProps)),s&&(s=nr)){if(bm(i))throw Ax(),Error(n(418));for(;s;)Sx(i,s),s=ji(s.nextSibling)}if(wx(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){nr=ji(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}nr=null}}else nr=tr?ji(i.stateNode.nextSibling):null;return!0}function Ax(){for(var i=nr;i;)i=ji(i.nextSibling)}function Gs(){nr=tr=null,kt=!1}function _m(i){Or===null?Or=[i]:Or.push(i)}var x7=H.ReactCurrentBatchConfig;function Nu(i,s,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var h=l.stateNode}if(!h)throw Error(n(147,i));var E=h,b=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===b?s.ref:(s=function(S){var R=E.refs;S===null?delete R[b]:R[b]=S},s._stringRef=b,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Kc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function vx(i){var s=i._init;return s(i._payload)}function Cx(i){function s(G,j){if(i){var K=G.deletions;K===null?(G.deletions=[j],G.flags|=16):K.push(j)}}function l(G,j){if(!i)return null;for(;j!==null;)s(G,j),j=j.sibling;return null}function h(G,j){for(G=new Map;j!==null;)j.key!==null?G.set(j.key,j):G.set(j.index,j),j=j.sibling;return G}function E(G,j){return G=Zi(G,j),G.index=0,G.sibling=null,G}function b(G,j,K){return G.index=K,i?(K=G.alternate,K!==null?(K=K.index,K<j?(G.flags|=2,j):K):(G.flags|=2,j)):(G.flags|=1048576,j)}function S(G){return i&&G.alternate===null&&(G.flags|=2),G}function R(G,j,K,_e){return j===null||j.tag!==6?(j=f0(K,G.mode,_e),j.return=G,j):(j=E(j,K),j.return=G,j)}function U(G,j,K,_e){var Le=K.type;return Le===q?le(G,j,K.props.children,_e,K.key):j!==null&&(j.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===Oe&&vx(Le)===j.type)?(_e=E(j,K.props),_e.ref=Nu(G,j,K),_e.return=G,_e):(_e=Td(K.type,K.key,K.props,null,G.mode,_e),_e.ref=Nu(G,j,K),_e.return=G,_e)}function Z(G,j,K,_e){return j===null||j.tag!==4||j.stateNode.containerInfo!==K.containerInfo||j.stateNode.implementation!==K.implementation?(j=h0(K,G.mode,_e),j.return=G,j):(j=E(j,K.children||[]),j.return=G,j)}function le(G,j,K,_e,Le){return j===null||j.tag!==7?(j=Bo(K,G.mode,_e,Le),j.return=G,j):(j=E(j,K),j.return=G,j)}function he(G,j,K){if(typeof j=="string"&&j!==""||typeof j=="number")return j=f0(""+j,G.mode,K),j.return=G,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Y:return K=Td(j.type,j.key,j.props,null,G.mode,K),K.ref=Nu(G,null,j),K.return=G,K;case D:return j=h0(j,G.mode,K),j.return=G,j;case Oe:var _e=j._init;return he(G,_e(j._payload),K)}if(Hn(j)||ie(j))return j=Bo(j,G.mode,K,null),j.return=G,j;Kc(G,j)}return null}function ae(G,j,K,_e){var Le=j!==null?j.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return Le!==null?null:R(G,j,""+K,_e);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case Y:return K.key===Le?U(G,j,K,_e):null;case D:return K.key===Le?Z(G,j,K,_e):null;case Oe:return Le=K._init,ae(G,j,Le(K._payload),_e)}if(Hn(K)||ie(K))return Le!==null?null:le(G,j,K,_e,null);Kc(G,K)}return null}function ve(G,j,K,_e,Le){if(typeof _e=="string"&&_e!==""||typeof _e=="number")return G=G.get(K)||null,R(j,G,""+_e,Le);if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case Y:return G=G.get(_e.key===null?K:_e.key)||null,U(j,G,_e,Le);case D:return G=G.get(_e.key===null?K:_e.key)||null,Z(j,G,_e,Le);case Oe:var ze=_e._init;return ve(G,j,K,ze(_e._payload),Le)}if(Hn(_e)||ie(_e))return G=G.get(K)||null,le(j,G,_e,Le,null);Kc(j,_e)}return null}function Pe(G,j,K,_e){for(var Le=null,ze=null,je=j,We=j=0,an=null;je!==null&&We<K.length;We++){je.index>We?(an=je,je=null):an=je.sibling;var at=ae(G,je,K[We],_e);if(at===null){je===null&&(je=an);break}i&&je&&at.alternate===null&&s(G,je),j=b(at,j,We),ze===null?Le=at:ze.sibling=at,ze=at,je=an}if(We===K.length)return l(G,je),kt&&No(G,We),Le;if(je===null){for(;We<K.length;We++)je=he(G,K[We],_e),je!==null&&(j=b(je,j,We),ze===null?Le=je:ze.sibling=je,ze=je);return kt&&No(G,We),Le}for(je=h(G,je);We<K.length;We++)an=ve(je,G,We,K[We],_e),an!==null&&(i&&an.alternate!==null&&je.delete(an.key===null?We:an.key),j=b(an,j,We),ze===null?Le=an:ze.sibling=an,ze=an);return i&&je.forEach(function(eo){return s(G,eo)}),kt&&No(G,We),Le}function Ie(G,j,K,_e){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 ze=Le=null,je=j,We=j=0,an=null,at=K.next();je!==null&&!at.done;We++,at=K.next()){je.index>We?(an=je,je=null):an=je.sibling;var eo=ae(G,je,at.value,_e);if(eo===null){je===null&&(je=an);break}i&&je&&eo.alternate===null&&s(G,je),j=b(eo,j,We),ze===null?Le=eo:ze.sibling=eo,ze=eo,je=an}if(at.done)return l(G,je),kt&&No(G,We),Le;if(je===null){for(;!at.done;We++,at=K.next())at=he(G,at.value,_e),at!==null&&(j=b(at,j,We),ze===null?Le=at:ze.sibling=at,ze=at);return kt&&No(G,We),Le}for(je=h(G,je);!at.done;We++,at=K.next())at=ve(je,G,We,at.value,_e),at!==null&&(i&&at.alternate!==null&&je.delete(at.key===null?We:at.key),j=b(at,j,We),ze===null?Le=at:ze.sibling=at,ze=at);return i&&je.forEach(function(nU){return s(G,nU)}),kt&&No(G,We),Le}function Ut(G,j,K,_e){if(typeof K=="object"&&K!==null&&K.type===q&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case Y:e:{for(var Le=K.key,ze=j;ze!==null;){if(ze.key===Le){if(Le=K.type,Le===q){if(ze.tag===7){l(G,ze.sibling),j=E(ze,K.props.children),j.return=G,G=j;break e}}else if(ze.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===Oe&&vx(Le)===ze.type){l(G,ze.sibling),j=E(ze,K.props),j.ref=Nu(G,ze,K),j.return=G,G=j;break e}l(G,ze);break}else s(G,ze);ze=ze.sibling}K.type===q?(j=Bo(K.props.children,G.mode,_e,K.key),j.return=G,G=j):(_e=Td(K.type,K.key,K.props,null,G.mode,_e),_e.ref=Nu(G,j,K),_e.return=G,G=_e)}return S(G);case D:e:{for(ze=K.key;j!==null;){if(j.key===ze)if(j.tag===4&&j.stateNode.containerInfo===K.containerInfo&&j.stateNode.implementation===K.implementation){l(G,j.sibling),j=E(j,K.children||[]),j.return=G,G=j;break e}else{l(G,j);break}else s(G,j);j=j.sibling}j=h0(K,G.mode,_e),j.return=G,G=j}return S(G);case Oe:return ze=K._init,Ut(G,j,ze(K._payload),_e)}if(Hn(K))return Pe(G,j,K,_e);if(ie(K))return Ie(G,j,K,_e);Kc(G,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,j!==null&&j.tag===6?(l(G,j.sibling),j=E(j,K),j.return=G,G=j):(l(G,j),j=f0(K,G.mode,_e),j.return=G,G=j),S(G)):l(G,j)}return Ut}var Xs=Cx(!0),kx=Cx(!1),Qc=$i(null),Jc=null,Ks=null,Sm=null;function xm(){Sm=Ks=Jc=null}function wm(i){var s=Qc.current;xt(Qc),i._currentValue=s}function Am(i,s,l){for(;i!==null;){var h=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),i===l)break;i=i.return}}function Qs(i,s){Jc=i,Sm=Ks=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&($n=!0),i.firstContext=null)}function mr(i){var s=i._currentValue;if(Sm!==i)if(i={context:i,memoizedValue:s,next:null},Ks===null){if(Jc===null)throw Error(n(308));Ks=i,Jc.dependencies={lanes:0,firstContext:i}}else Ks=Ks.next=i;return s}var Oo=null;function vm(i){Oo===null?Oo=[i]:Oo.push(i)}function Px(i,s,l,h){var E=s.interleaved;return E===null?(l.next=l,vm(s)):(l.next=E.next,E.next=l),s.interleaved=l,_i(i,h)}function _i(i,s){i.lanes|=s;var l=i.alternate;for(l!==null&&(l.lanes|=s),l=i,i=i.return;i!==null;)i.childLanes|=s,l=i.alternate,l!==null&&(l.childLanes|=s),l=i,i=i.return;return l.tag===3?l.stateNode:null}var Yi=!1;function Cm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Nx(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Si(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Wi(i,s,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(st&2)!==0){var E=h.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),h.pending=s,_i(i,l)}return E=h.interleaved,E===null?(s.next=s,vm(h)):(s.next=E.next,E.next=s),h.interleaved=s,_i(i,l)}function Zc(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var h=s.lanes;h&=i.pendingLanes,l|=h,s.lanes=l,zp(i,l)}}function Ox(i,s){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 S={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};b===null?E=b=S:b=b.next=S,l=l.next}while(l!==null);b===null?E=b=s:b=b.next=s}else E=b=s;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=s:i.next=s,l.lastBaseUpdate=s}function ed(i,s,l,h){var E=i.updateQueue;Yi=!1;var b=E.firstBaseUpdate,S=E.lastBaseUpdate,R=E.shared.pending;if(R!==null){E.shared.pending=null;var U=R,Z=U.next;U.next=null,S===null?b=Z:S.next=Z,S=U;var le=i.alternate;le!==null&&(le=le.updateQueue,R=le.lastBaseUpdate,R!==S&&(R===null?le.firstBaseUpdate=Z:R.next=Z,le.lastBaseUpdate=U))}if(b!==null){var he=E.baseState;S=0,le=Z=U=null,R=b;do{var ae=R.lane,ve=R.eventTime;if((h&ae)===ae){le!==null&&(le=le.next={eventTime:ve,lane:0,tag:R.tag,payload:R.payload,callback:R.callback,next:null});e:{var Pe=i,Ie=R;switch(ae=s,ve=l,Ie.tag){case 1:if(Pe=Ie.payload,typeof Pe=="function"){he=Pe.call(ve,he,ae);break e}he=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=Ie.payload,ae=typeof Pe=="function"?Pe.call(ve,he,ae):Pe,ae==null)break e;he=k({},he,ae);break e;case 2:Yi=!0}}R.callback!==null&&R.lane!==0&&(i.flags|=64,ae=E.effects,ae===null?E.effects=[R]:ae.push(R))}else ve={eventTime:ve,lane:ae,tag:R.tag,payload:R.payload,callback:R.callback,next:null},le===null?(Z=le=ve,U=he):le=le.next=ve,S|=ae;if(R=R.next,R===null){if(R=E.shared.pending,R===null)break;ae=R,R=ae.next,ae.next=null,E.lastBaseUpdate=ae,E.shared.pending=null}}while(!0);if(le===null&&(U=he),E.baseState=U,E.firstBaseUpdate=Z,E.lastBaseUpdate=le,s=E.shared.interleaved,s!==null){E=s;do S|=E.lane,E=E.next;while(E!==s)}else b===null&&(E.shared.lanes=0);Lo|=S,i.lanes=S,i.memoizedState=he}}function Ix(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var h=i[s],E=h.callback;if(E!==null){if(h.callback=null,h=l,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var Ou={},ti=$i(Ou),Iu=$i(Ou),Ru=$i(Ou);function Io(i){if(i===Ou)throw Error(n(174));return i}function km(i,s){switch(bt(Ru,s),bt(Iu,i),bt(ti,Ou),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:ge(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=ge(s,i)}xt(ti),bt(ti,s)}function Js(){xt(ti),xt(Iu),xt(Ru)}function Rx(i){Io(Ru.current);var s=Io(ti.current),l=ge(s,i.type);s!==l&&(bt(Iu,i),bt(ti,l))}function Pm(i){Iu.current===i&&(xt(ti),xt(Iu))}var Ot=$i(0);function td(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Nm=[];function Om(){for(var i=0;i<Nm.length;i++)Nm[i]._workInProgressVersionPrimary=null;Nm.length=0}var nd=H.ReactCurrentDispatcher,Im=H.ReactCurrentBatchConfig,Ro=0,It=null,Xt=null,on=null,rd=!1,Lu=!1,Du=0,w7=0;function wn(){throw Error(n(321))}function Rm(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!Nr(i[l],s[l]))return!1;return!0}function Lm(i,s,l,h,E,b){if(Ro=b,It=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,nd.current=i===null||i.memoizedState===null?k7:P7,i=l(h,E),Lu){b=0;do{if(Lu=!1,Du=0,25<=b)throw Error(n(301));b+=1,on=Xt=null,s.updateQueue=null,nd.current=N7,i=l(h,E)}while(Lu)}if(nd.current=sd,s=Xt!==null&&Xt.next!==null,Ro=0,on=Xt=It=null,rd=!1,s)throw Error(n(300));return i}function Dm(){var i=Du!==0;return Du=0,i}function ni(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return on===null?It.memoizedState=on=i:on=on.next=i,on}function gr(){if(Xt===null){var i=It.alternate;i=i!==null?i.memoizedState:null}else i=Xt.next;var s=on===null?It.memoizedState:on.next;if(s!==null)on=s,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},on===null?It.memoizedState=on=i:on=on.next=i}return on}function Mu(i,s){return typeof s=="function"?s(i):s}function Mm(i){var s=gr(),l=s.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 S=E.next;E.next=b.next,b.next=S}h.baseQueue=E=b,l.pending=null}if(E!==null){b=E.next,h=h.baseState;var R=S=null,U=null,Z=b;do{var le=Z.lane;if((Ro&le)===le)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 he={lane:le,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};U===null?(R=U=he,S=h):U=U.next=he,It.lanes|=le,Lo|=le}Z=Z.next}while(Z!==null&&Z!==b);U===null?S=h:U.next=R,Nr(h,s.memoizedState)||($n=!0),s.memoizedState=h,s.baseState=S,s.baseQueue=U,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do b=E.lane,It.lanes|=b,Lo|=b,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function Fm(i){var s=gr(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,E=l.pending,b=s.memoizedState;if(E!==null){l.pending=null;var S=E=E.next;do b=i(b,S.action),S=S.next;while(S!==E);Nr(b,s.memoizedState)||($n=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),l.lastRenderedState=b}return[b,h]}function Lx(){}function Dx(i,s){var l=It,h=gr(),E=s(),b=!Nr(h.memoizedState,E);if(b&&(h.memoizedState=E,$n=!0),h=h.queue,Bm(Bx.bind(null,l,h,i),[i]),h.getSnapshot!==s||b||on!==null&&on.memoizedState.tag&1){if(l.flags|=2048,Fu(9,Fx.bind(null,l,h,E,s),void 0,null),sn===null)throw Error(n(349));(Ro&30)!==0||Mx(l,s,E)}return E}function Mx(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=It.updateQueue,s===null?(s={lastEffect:null,stores:null},It.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function Fx(i,s,l,h){s.value=l,s.getSnapshot=h,Ux(s)&&Hx(i)}function Bx(i,s,l){return l(function(){Ux(s)&&Hx(i)})}function Ux(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!Nr(i,l)}catch(h){return!0}}function Hx(i){var s=_i(i,1);s!==null&&Dr(s,i,1,-1)}function zx(i){var s=ni();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Mu,lastRenderedState:i},s.queue=i,i=i.dispatch=C7.bind(null,It,i),[s.memoizedState,i]}function Fu(i,s,l,h){return i={tag:i,create:s,destroy:l,deps:h,next:null},s=It.updateQueue,s===null?(s={lastEffect:null,stores:null},It.updateQueue=s,s.lastEffect=i.next=i):(l=s.lastEffect,l===null?s.lastEffect=i.next=i:(h=l.next,l.next=i,i.next=h,s.lastEffect=i)),i}function jx(){return gr().memoizedState}function id(i,s,l,h){var E=ni();It.flags|=i,E.memoizedState=Fu(1|s,l,void 0,h===void 0?null:h)}function od(i,s,l,h){var E=gr();h=h===void 0?null:h;var b=void 0;if(Xt!==null){var S=Xt.memoizedState;if(b=S.destroy,h!==null&&Rm(h,S.deps)){E.memoizedState=Fu(s,l,b,h);return}}It.flags|=i,E.memoizedState=Fu(1|s,l,b,h)}function $x(i,s){return id(8390656,8,i,s)}function Bm(i,s){return od(2048,8,i,s)}function Vx(i,s){return od(4,2,i,s)}function qx(i,s){return od(4,4,i,s)}function Yx(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function Wx(i,s,l){return l=l!=null?l.concat([i]):null,od(4,4,Yx.bind(null,s,i),l)}function Um(){}function Gx(i,s){var l=gr();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&Rm(s,h[1])?h[0]:(l.memoizedState=[i,s],i)}function Xx(i,s){var l=gr();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&Rm(s,h[1])?h[0]:(i=i(),l.memoizedState=[i,s],i)}function Kx(i,s,l){return(Ro&21)===0?(i.baseState&&(i.baseState=!1,$n=!0),i.memoizedState=l):(Nr(l,s)||(l=vS(),It.lanes|=l,Lo|=l,i.baseState=!0),s)}function A7(i,s){var l=dt;dt=l!==0&&4>l?l:4,i(!0);var h=Im.transition;Im.transition={};try{i(!1),s()}finally{dt=l,Im.transition=h}}function Qx(){return gr().memoizedState}function v7(i,s,l){var h=Qi(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},Jx(i))Zx(s,l);else if(l=Px(i,s,l,h),l!==null){var E=In();Dr(l,i,h,E),ew(l,s,h)}}function C7(i,s,l){var h=Qi(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(Jx(i))Zx(s,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var S=s.lastRenderedState,R=b(S,l);if(E.hasEagerState=!0,E.eagerState=R,Nr(R,S)){var U=s.interleaved;U===null?(E.next=E,vm(s)):(E.next=U.next,U.next=E),s.interleaved=E;return}}catch(Z){}l=Px(i,s,E,h),l!==null&&(E=In(),Dr(l,i,h,E),ew(l,s,h))}}function Jx(i){var s=i.alternate;return i===It||s!==null&&s===It}function Zx(i,s){Lu=rd=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function ew(i,s,l){if((l&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,l|=h,s.lanes=l,zp(i,l)}}var sd={readContext:mr,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},k7={readContext:mr,useCallback:function(i,s){return ni().memoizedState=[i,s===void 0?null:s],i},useContext:mr,useEffect:$x,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,id(4194308,4,Yx.bind(null,s,i),l)},useLayoutEffect:function(i,s){return id(4194308,4,i,s)},useInsertionEffect:function(i,s){return id(4,2,i,s)},useMemo:function(i,s){var l=ni();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var h=ni();return s=l!==void 0?l(s):s,h.memoizedState=h.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},h.queue=i,i=i.dispatch=v7.bind(null,It,i),[h.memoizedState,i]},useRef:function(i){var s=ni();return i={current:i},s.memoizedState=i},useState:zx,useDebugValue:Um,useDeferredValue:function(i){return ni().memoizedState=i},useTransition:function(){var i=zx(!1),s=i[0];return i=A7.bind(null,i[1]),ni().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var h=It,E=ni();if(kt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),sn===null)throw Error(n(349));(Ro&30)!==0||Mx(h,s,l)}E.memoizedState=l;var b={value:l,getSnapshot:s};return E.queue=b,$x(Bx.bind(null,h,b,i),[i]),h.flags|=2048,Fu(9,Fx.bind(null,h,b,l,s),void 0,null),l},useId:function(){var i=ni(),s=sn.identifierPrefix;if(kt){var l=Ti,h=bi;l=(h&~(1<<32-Pr(h)-1)).toString(32)+l,s=":"+s+"R"+l,l=Du++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=w7++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},P7={readContext:mr,useCallback:Gx,useContext:mr,useEffect:Bm,useImperativeHandle:Wx,useInsertionEffect:Vx,useLayoutEffect:qx,useMemo:Xx,useReducer:Mm,useRef:jx,useState:function(){return Mm(Mu)},useDebugValue:Um,useDeferredValue:function(i){var s=gr();return Kx(s,Xt.memoizedState,i)},useTransition:function(){var i=Mm(Mu)[0],s=gr().memoizedState;return[i,s]},useMutableSource:Lx,useSyncExternalStore:Dx,useId:Qx,unstable_isNewReconciler:!1},N7={readContext:mr,useCallback:Gx,useContext:mr,useEffect:Bm,useImperativeHandle:Wx,useInsertionEffect:Vx,useLayoutEffect:qx,useMemo:Xx,useReducer:Fm,useRef:jx,useState:function(){return Fm(Mu)},useDebugValue:Um,useDeferredValue:function(i){var s=gr();return Xt===null?s.memoizedState=i:Kx(s,Xt.memoizedState,i)},useTransition:function(){var i=Fm(Mu)[0],s=gr().memoizedState;return[i,s]},useMutableSource:Lx,useSyncExternalStore:Dx,useId:Qx,unstable_isNewReconciler:!1};function Ir(i,s){if(i&&i.defaultProps){s=k({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function Hm(i,s,l,h){s=i.memoizedState,l=l(h,s),l=l==null?s:k({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var ad={isMounted:function(i){return(i=i._reactInternals)?vo(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var h=In(),E=Qi(i),b=Si(h,E);b.payload=s,l!=null&&(b.callback=l),s=Wi(i,b,E),s!==null&&(Dr(s,i,E,h),Zc(s,i,E))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var h=In(),E=Qi(i),b=Si(h,E);b.tag=1,b.payload=s,l!=null&&(b.callback=l),s=Wi(i,b,E),s!==null&&(Dr(s,i,E,h),Zc(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=In(),h=Qi(i),E=Si(l,h);E.tag=2,s!=null&&(E.callback=s),s=Wi(i,E,h),s!==null&&(Dr(s,i,h,l),Zc(s,i,h))}};function tw(i,s,l,h,E,b,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,S):s.prototype&&s.prototype.isPureReactComponent?!xu(l,h)||!xu(E,b):!0}function nw(i,s,l){var h=!1,E=Vi,b=s.contextType;return typeof b=="object"&&b!==null?b=mr(b):(E=jn(s)?ko:xn.current,h=s.contextTypes,b=(h=h!=null)?qs(i,E):Vi),s=new s(l,b),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ad,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),s}function rw(i,s,l,h){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,h),s.state!==i&&ad.enqueueReplaceState(s,s.state,null)}function zm(i,s,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},Cm(i);var b=s.contextType;typeof b=="object"&&b!==null?E.context=mr(b):(b=jn(s)?ko:xn.current,E.context=qs(i,b)),E.state=i.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(Hm(i,s,b,l),E.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(s=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),s!==E.state&&ad.enqueueReplaceState(E,E.state,null),ed(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Zs(i,s){try{var l="",h=s;do l+=Ue(h),h=h.return;while(h);var E=l}catch(b){E=`
|
|
14
|
+
`+E[S].replace(" at new "," at ");return i.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",i.displayName)),U}while(1<=S&&0<=R);break}}}finally{I=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?ee(i):""}function je(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 Ee(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case q:return"Fragment";case D:return"Portal";case me:return"Profiler";case re:return"StrictMode";case de:return"Suspense";case ne:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case oe:return(i.displayName||"Context")+".Consumer";case V:return(i._context.displayName||"Context")+".Provider";case ce:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case Te:return s=i.displayName||null,s!==null?s:Ee(i.type)||"Memo";case Pe:s=i._payload,i=i._init;try{return Ee(i(s))}catch(l){}}return null}function Be(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ee(s);case 8:return s===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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ve(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ge(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function _t(i){var s=Ge(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),h=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,b=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return E.call(this)},set:function(S){h=""+S,b.call(this,S)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(S){h=""+S},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Pn(i){i._valueTracker||(i._valueTracker=_t(i))}function ln(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),h="";return i&&(h=Ge(i)?i.checked?"true":"false":i.value),i=h,i!==l?(s.setValue(i),!0):!1}function kr(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function fr(i,s){var l=s.checked;return k({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function rn(i,s){var l=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;l=Ve(s.value!=null?s.value:l),i._wrapperState={initialChecked:h,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function qe(i,s){s=s.checked,s!=null&&v(i,"checked",s,!1)}function Nt(i,s){qe(i,s);var l=Ve(s.value),h=s.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}s.hasOwnProperty("value")?cn(i,s.type,l):s.hasOwnProperty("defaultValue")&&cn(i,s.type,Ve(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Nn(i,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var h=s.type;if(!(h!=="submit"&&h!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,l||s===i.value||(i.value=s),i.defaultValue=s}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function cn(i,s,l){(s!=="number"||kr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var Hn=Array.isArray;function Ae(i,s,l,h){if(i=i.options,s){s={};for(var E=0;E<l.length;E++)s["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=s.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&h&&(i[l].defaultSelected=!0)}else{for(l=""+Ve(l),s=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}s!==null||i[E].disabled||(s=i[E])}s!==null&&(s.selected=!0)}}function Oe(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Me(i,s){var l=s.value;if(l==null){if(l=s.children,s=s.defaultValue,l!=null){if(s!=null)throw Error(n(92));if(Hn(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:Ve(l)}}function ot(i,s){var l=Ve(s.value),h=Ve(s.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),s.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),h!=null&&(i.defaultValue=""+h)}function pt(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function J(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ge(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?J(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ce,Ye=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,h,E){MSApp.execUnsafeLocalFunction(function(){return i(s,l,h,E)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Ce=Ce||document.createElement("div"),Ce.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Ce.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Re(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var ct={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(ct).forEach(function(i){Gt.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),ct[s]=ct[i]})});function Vt(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||ct.hasOwnProperty(i)&&ct[i]?(""+s).trim():s+"px"}function dn(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var h=l.indexOf("--")===0,E=Vt(l,s[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,E):i[l]=E}}var Qr=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 fn(i,s){if(s){if(Qr[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Jr(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Zn=null;function Rp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Lp=null,Ls=null,Ds=null;function fS(i){if(i=Pu(i)){if(typeof Lp!="function")throw Error(n(280));var s=i.stateNode;s&&(s=$c(s),Lp(i.stateNode,i.type,s))}}function hS(i){Ls?Ds?Ds.push(i):Ds=[i]:Ls=i}function pS(){if(Ls){var i=Ls,s=Ds;if(Ds=Ls=null,fS(i),s)for(i=0;i<s.length;i++)fS(s[i])}}function mS(i,s){return i(s)}function gS(){}var Dp=!1;function ES(i,s,l){if(Dp)return i(s,l);Dp=!0;try{return mS(i,s,l)}finally{Dp=!1,(Ls!==null||Ds!==null)&&(gS(),pS())}}function uu(i,s){var l=i.stateNode;if(l===null)return null;var h=$c(l);if(h===null)return null;l=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(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,s,typeof l));return l}var Mp=!1;if(c)try{var lu={};Object.defineProperty(lu,"passive",{get:function(){Mp=!0}}),window.addEventListener("test",lu,lu),window.removeEventListener("test",lu,lu)}catch(i){Mp=!1}function lB(i,s,l,h,E,b,S,R,U){var Z=Array.prototype.slice.call(arguments,3);try{s.apply(l,Z)}catch(le){this.onError(le)}}var cu=!1,_c=null,Sc=!1,Fp=null,cB={onError:function(i){cu=!0,_c=i}};function dB(i,s,l,h,E,b,S,R,U){cu=!1,_c=null,lB.apply(cB,arguments)}function fB(i,s,l,h,E,b,S,R,U){if(dB.apply(this,arguments),cu){if(cu){var Z=_c;cu=!1,_c=null}else throw Error(n(198));Sc||(Sc=!0,Fp=Z)}}function vo(i){var s=i,l=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(l=s.return),i=s.return;while(i)}return s.tag===3?l:null}function yS(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function bS(i){if(vo(i)!==i)throw Error(n(188))}function hB(i){var s=i.alternate;if(!s){if(s=vo(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,h=s;;){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 bS(E),i;if(b===h)return bS(E),s;b=b.sibling}throw Error(n(188))}if(l.return!==h.return)l=E,h=b;else{for(var S=!1,R=E.child;R;){if(R===l){S=!0,l=E,h=b;break}if(R===h){S=!0,h=E,l=b;break}R=R.sibling}if(!S){for(R=b.child;R;){if(R===l){S=!0,l=b,h=E;break}if(R===h){S=!0,h=b,l=E;break}R=R.sibling}if(!S)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:s}function TS(i){return i=hB(i),i!==null?_S(i):null}function _S(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=_S(i);if(s!==null)return s;i=i.sibling}return null}var SS=t.unstable_scheduleCallback,xS=t.unstable_cancelCallback,pB=t.unstable_shouldYield,mB=t.unstable_requestPaint,Bt=t.unstable_now,gB=t.unstable_getCurrentPriorityLevel,Bp=t.unstable_ImmediatePriority,wS=t.unstable_UserBlockingPriority,xc=t.unstable_NormalPriority,EB=t.unstable_LowPriority,AS=t.unstable_IdlePriority,wc=null,Zr=null;function yB(i){if(Zr&&typeof Zr.onCommitFiberRoot=="function")try{Zr.onCommitFiberRoot(wc,i,void 0,(i.current.flags&128)===128)}catch(s){}}var Pr=Math.clz32?Math.clz32:_B,bB=Math.log,TB=Math.LN2;function _B(i){return i>>>=0,i===0?32:31-(bB(i)/TB|0)|0}var Ac=64,vc=4194304;function du(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 Cc(i,s){var l=i.pendingLanes;if(l===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,S=l&268435455;if(S!==0){var R=S&~E;R!==0?h=du(R):(b&=S,b!==0&&(h=du(b)))}else S=l&~E,S!==0?h=du(S):b!==0&&(h=du(b));if(h===0)return 0;if(s!==0&&s!==h&&(s&E)===0&&(E=h&-h,b=s&-s,E>=b||E===16&&(b&4194240)!==0))return s;if((h&4)!==0&&(h|=l&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=h;0<s;)l=31-Pr(s),E=1<<l,h|=i[l],s&=~E;return h}function SB(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function xB(i,s){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var S=31-Pr(b),R=1<<S,U=E[S];U===-1?((R&l)===0||(R&h)!==0)&&(E[S]=SB(R,s)):U<=s&&(i.expiredLanes|=R),b&=~R}}function Up(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function vS(){var i=Ac;return Ac<<=1,(Ac&4194240)===0&&(Ac=64),i}function Hp(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function fu(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Pr(s),i[s]=l}function wB(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-Pr(l),b=1<<E;s[E]=0,h[E]=-1,i[E]=-1,l&=~b}}function zp(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var h=31-Pr(l),E=1<<h;E&s|i[h]&s&&(i[h]|=s),l&=~E}}var dt=0;function CS(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var kS,jp,PS,NS,OS,$p=!1,kc=[],Mi=null,Fi=null,Bi=null,hu=new Map,pu=new Map,Ui=[],AB="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 IS(i,s){switch(i){case"focusin":case"focusout":Mi=null;break;case"dragenter":case"dragleave":Fi=null;break;case"mouseover":case"mouseout":Bi=null;break;case"pointerover":case"pointerout":hu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":pu.delete(s.pointerId)}}function mu(i,s,l,h,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:s,domEventName:l,eventSystemFlags:h,nativeEvent:b,targetContainers:[E]},s!==null&&(s=Pu(s),s!==null&&jp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function vB(i,s,l,h,E){switch(s){case"focusin":return Mi=mu(Mi,i,s,l,h,E),!0;case"dragenter":return Fi=mu(Fi,i,s,l,h,E),!0;case"mouseover":return Bi=mu(Bi,i,s,l,h,E),!0;case"pointerover":var b=E.pointerId;return hu.set(b,mu(hu.get(b)||null,i,s,l,h,E)),!0;case"gotpointercapture":return b=E.pointerId,pu.set(b,mu(pu.get(b)||null,i,s,l,h,E)),!0}return!1}function RS(i){var s=Co(i.target);if(s!==null){var l=vo(s);if(l!==null){if(s=l.tag,s===13){if(s=yS(l),s!==null){i.blockedOn=s,OS(i.priority,function(){PS(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Pc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=qp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Zn=h,l.target.dispatchEvent(h),Zn=null}else return s=Pu(l),s!==null&&jp(s),i.blockedOn=l,!1;s.shift()}return!0}function LS(i,s,l){Pc(i)&&l.delete(s)}function CB(){$p=!1,Mi!==null&&Pc(Mi)&&(Mi=null),Fi!==null&&Pc(Fi)&&(Fi=null),Bi!==null&&Pc(Bi)&&(Bi=null),hu.forEach(LS),pu.forEach(LS)}function gu(i,s){i.blockedOn===s&&(i.blockedOn=null,$p||($p=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,CB)))}function Eu(i){function s(E){return gu(E,i)}if(0<kc.length){gu(kc[0],i);for(var l=1;l<kc.length;l++){var h=kc[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Mi!==null&&gu(Mi,i),Fi!==null&&gu(Fi,i),Bi!==null&&gu(Bi,i),hu.forEach(s),pu.forEach(s),l=0;l<Ui.length;l++)h=Ui[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ui.length&&(l=Ui[0],l.blockedOn===null);)RS(l),l.blockedOn===null&&Ui.shift()}var Ms=H.ReactCurrentBatchConfig,Nc=!0;function kB(i,s,l,h){var E=dt,b=Ms.transition;Ms.transition=null;try{dt=1,Vp(i,s,l,h)}finally{dt=E,Ms.transition=b}}function PB(i,s,l,h){var E=dt,b=Ms.transition;Ms.transition=null;try{dt=4,Vp(i,s,l,h)}finally{dt=E,Ms.transition=b}}function Vp(i,s,l,h){if(Nc){var E=qp(i,s,l,h);if(E===null)um(i,s,h,Oc,l),IS(i,h);else if(vB(E,i,s,l,h))h.stopPropagation();else if(IS(i,h),s&4&&-1<AB.indexOf(i)){for(;E!==null;){var b=Pu(E);if(b!==null&&kS(b),b=qp(i,s,l,h),b===null&&um(i,s,h,Oc,l),b===E)break;E=b}E!==null&&h.stopPropagation()}else um(i,s,h,null,l)}}var Oc=null;function qp(i,s,l,h){if(Oc=null,i=Rp(h),i=Co(i),i!==null)if(s=vo(i),s===null)i=null;else if(l=s.tag,l===13){if(i=yS(s),i!==null)return i;i=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return Oc=i,null}function DS(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(gB()){case Bp:return 1;case wS:return 4;case xc:case EB:return 16;case AS:return 536870912;default:return 16}default:return 16}}var Hi=null,Yp=null,Ic=null;function MS(){if(Ic)return Ic;var i,s=Yp,l=s.length,h,E="value"in Hi?Hi.value:Hi.textContent,b=E.length;for(i=0;i<l&&s[i]===E[i];i++);var S=l-i;for(h=1;h<=S&&s[l-h]===E[b-h];h++);return Ic=E.slice(i,1<h?1-h:void 0)}function Rc(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Lc(){return!0}function FS(){return!1}function er(i){function s(l,h,E,b,S){this._reactName=l,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=S,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)?Lc:FS,this.isPropagationStopped=FS,this}return k(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Lc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Lc)},persist:function(){},isPersistent:Lc}),s}var Fs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wp=er(Fs),yu=k({},Fs,{view:0,detail:0}),NB=er(yu),Gp,Xp,bu,Dc=k({},yu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qp,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!==bu&&(bu&&i.type==="mousemove"?(Gp=i.screenX-bu.screenX,Xp=i.screenY-bu.screenY):Xp=Gp=0,bu=i),Gp)},movementY:function(i){return"movementY"in i?i.movementY:Xp}}),BS=er(Dc),OB=k({},Dc,{dataTransfer:0}),IB=er(OB),RB=k({},yu,{relatedTarget:0}),Kp=er(RB),LB=k({},Fs,{animationName:0,elapsedTime:0,pseudoElement:0}),DB=er(LB),MB=k({},Fs,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),FB=er(MB),BB=k({},Fs,{data:0}),US=er(BB),UB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},HB={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"},zB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jB(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=zB[i])?!!s[i]:!1}function Qp(){return jB}var $B=k({},yu,{key:function(i){if(i.key){var s=UB[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Rc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?HB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qp,charCode:function(i){return i.type==="keypress"?Rc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Rc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),VB=er($B),qB=k({},Dc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),HS=er(qB),YB=k({},yu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qp}),WB=er(YB),GB=k({},Fs,{propertyName:0,elapsedTime:0,pseudoElement:0}),XB=er(GB),KB=k({},Dc,{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}),QB=er(KB),JB=[9,13,27,32],Jp=c&&"CompositionEvent"in window,Tu=null;c&&"documentMode"in document&&(Tu=document.documentMode);var ZB=c&&"TextEvent"in window&&!Tu,zS=c&&(!Jp||Tu&&8<Tu&&11>=Tu),jS=" ",$S=!1;function VS(i,s){switch(i){case"keyup":return JB.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qS(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Bs=!1;function e7(i,s){switch(i){case"compositionend":return qS(s);case"keypress":return s.which!==32?null:($S=!0,jS);case"textInput":return i=s.data,i===jS&&$S?null:i;default:return null}}function t7(i,s){if(Bs)return i==="compositionend"||!Jp&&VS(i,s)?(i=MS(),Ic=Yp=Hi=null,Bs=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return zS&&s.locale!=="ko"?null:s.data;default:return null}}var n7={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 YS(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!n7[i.type]:s==="textarea"}function WS(i,s,l,h){hS(h),s=Hc(s,"onChange"),0<s.length&&(l=new Wp("onChange","change",null,l,h),i.push({event:l,listeners:s}))}var _u=null,Su=null;function r7(i){dx(i,0)}function Mc(i){var s=$s(i);if(ln(s))return i}function i7(i,s){if(i==="change")return s}var GS=!1;if(c){var Zp;if(c){var em="oninput"in document;if(!em){var XS=document.createElement("div");XS.setAttribute("oninput","return;"),em=typeof XS.oninput=="function"}Zp=em}else Zp=!1;GS=Zp&&(!document.documentMode||9<document.documentMode)}function KS(){_u&&(_u.detachEvent("onpropertychange",QS),Su=_u=null)}function QS(i){if(i.propertyName==="value"&&Mc(Su)){var s=[];WS(s,Su,i,Rp(i)),ES(r7,s)}}function o7(i,s,l){i==="focusin"?(KS(),_u=s,Su=l,_u.attachEvent("onpropertychange",QS)):i==="focusout"&&KS()}function s7(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Mc(Su)}function a7(i,s){if(i==="click")return Mc(s)}function u7(i,s){if(i==="input"||i==="change")return Mc(s)}function l7(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Nr=typeof Object.is=="function"?Object.is:l7;function xu(i,s){if(Nr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),h=Object.keys(s);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var E=l[h];if(!d.call(s,E)||!Nr(i[E],s[E]))return!1}return!0}function JS(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function ZS(i,s){var l=JS(i);i=0;for(var h;l;){if(l.nodeType===3){if(h=i+l.textContent.length,i<=s&&h>=s)return{node:l,offset:s-i};i=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=JS(l)}}function ex(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?ex(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function tx(){for(var i=window,s=kr();s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch(h){l=!1}if(l)i=s.contentWindow;else break;s=kr(i.document)}return s}function tm(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function c7(i){var s=tx(),l=i.focusedElem,h=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&ex(l.ownerDocument.documentElement,l)){if(h!==null&&tm(l)){if(s=h.start,i=h.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,b=Math.min(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=ZS(l,b);var S=ZS(l,h);E&&S&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==S.node||i.focusOffset!==S.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(s),i.extend(S.node,S.offset)):(s.setEnd(S.node,S.offset),i.addRange(s)))}}for(s=[],i=l;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<s.length;l++)i=s[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var d7=c&&"documentMode"in document&&11>=document.documentMode,Us=null,nm=null,wu=null,rm=!1;function nx(i,s,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;rm||Us==null||Us!==kr(h)||(h=Us,"selectionStart"in h&&tm(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}),wu&&xu(wu,h)||(wu=h,h=Hc(nm,"onSelect"),0<h.length&&(s=new Wp("onSelect","select",null,s,l),i.push({event:s,listeners:h}),s.target=Us)))}function Fc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var Hs={animationend:Fc("Animation","AnimationEnd"),animationiteration:Fc("Animation","AnimationIteration"),animationstart:Fc("Animation","AnimationStart"),transitionend:Fc("Transition","TransitionEnd")},im={},rx={};c&&(rx=document.createElement("div").style,"AnimationEvent"in window||(delete Hs.animationend.animation,delete Hs.animationiteration.animation,delete Hs.animationstart.animation),"TransitionEvent"in window||delete Hs.transitionend.transition);function Bc(i){if(im[i])return im[i];if(!Hs[i])return i;var s=Hs[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in rx)return im[i]=s[l];return i}var ix=Bc("animationend"),ox=Bc("animationiteration"),sx=Bc("animationstart"),ax=Bc("transitionend"),ux=new Map,lx="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 zi(i,s){ux.set(i,s),a(s,[i])}for(var om=0;om<lx.length;om++){var sm=lx[om],f7=sm.toLowerCase(),h7=sm[0].toUpperCase()+sm.slice(1);zi(f7,"on"+h7)}zi(ix,"onAnimationEnd"),zi(ox,"onAnimationIteration"),zi(sx,"onAnimationStart"),zi("dblclick","onDoubleClick"),zi("focusin","onFocus"),zi("focusout","onBlur"),zi(ax,"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 Au="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(" "),p7=new Set("cancel close invalid load scroll toggle".split(" ").concat(Au));function cx(i,s,l){var h=i.type||"unknown-event";i.currentTarget=l,fB(h,s,void 0,i),i.currentTarget=null}function dx(i,s){s=(s&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(s)for(var S=h.length-1;0<=S;S--){var R=h[S],U=R.instance,Z=R.currentTarget;if(R=R.listener,U!==b&&E.isPropagationStopped())break e;cx(E,R,Z),b=U}else for(S=0;S<h.length;S++){if(R=h[S],U=R.instance,Z=R.currentTarget,R=R.listener,U!==b&&E.isPropagationStopped())break e;cx(E,R,Z),b=U}}}if(Sc)throw i=Fp,Sc=!1,Fp=null,i}function St(i,s){var l=s[pm];l===void 0&&(l=s[pm]=new Set);var h=i+"__bubble";l.has(h)||(fx(s,i,2,!1),l.add(h))}function am(i,s,l){var h=0;s&&(h|=4),fx(l,i,h,s)}var Uc="_reactListening"+Math.random().toString(36).slice(2);function vu(i){if(!i[Uc]){i[Uc]=!0,r.forEach(function(l){l!=="selectionchange"&&(p7.has(l)||am(l,!1,i),am(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Uc]||(s[Uc]=!0,am("selectionchange",!1,s))}}function fx(i,s,l,h){switch(DS(s)){case 1:var E=kB;break;case 4:E=PB;break;default:E=Vp}l=E.bind(null,s,l,i),E=void 0,!Mp||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(s,l,{capture:!0,passive:E}):i.addEventListener(s,l,!0):E!==void 0?i.addEventListener(s,l,{passive:E}):i.addEventListener(s,l,!1)}function um(i,s,l,h,E){var b=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var S=h.tag;if(S===3||S===4){var R=h.stateNode.containerInfo;if(R===E||R.nodeType===8&&R.parentNode===E)break;if(S===4)for(S=h.return;S!==null;){var U=S.tag;if((U===3||U===4)&&(U=S.stateNode.containerInfo,U===E||U.nodeType===8&&U.parentNode===E))return;S=S.return}for(;R!==null;){if(S=Co(R),S===null)return;if(U=S.tag,U===5||U===6){h=b=S;continue e}R=R.parentNode}}h=h.return}ES(function(){var Z=b,le=Rp(l),he=[];e:{var ae=ux.get(i);if(ae!==void 0){var ve=Wp,Ne=i;switch(i){case"keypress":if(Rc(l)===0)break e;case"keydown":case"keyup":ve=VB;break;case"focusin":Ne="focus",ve=Kp;break;case"focusout":Ne="blur",ve=Kp;break;case"beforeblur":case"afterblur":ve=Kp;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":ve=BS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=IB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=WB;break;case ix:case ox:case sx:ve=DB;break;case ax:ve=XB;break;case"scroll":ve=NB;break;case"wheel":ve=QB;break;case"copy":case"cut":case"paste":ve=FB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=HS}var Ie=(s&4)!==0,Ut=!Ie&&i==="scroll",G=Ie?ae!==null?ae+"Capture":null:ae;Ie=[];for(var j=Z,Q;j!==null;){Q=j;var _e=Q.stateNode;if(Q.tag===5&&_e!==null&&(Q=_e,G!==null&&(_e=uu(j,G),_e!=null&&Ie.push(Cu(j,_e,Q)))),Ut)break;j=j.return}0<Ie.length&&(ae=new ve(ae,Ne,null,l,le),he.push({event:ae,listeners:Ie}))}}if((s&7)===0){e:{if(ae=i==="mouseover"||i==="pointerover",ve=i==="mouseout"||i==="pointerout",ae&&l!==Zn&&(Ne=l.relatedTarget||l.fromElement)&&(Co(Ne)||Ne[Ei]))break e;if((ve||ae)&&(ae=le.window===le?le:(ae=le.ownerDocument)?ae.defaultView||ae.parentWindow:window,ve?(Ne=l.relatedTarget||l.toElement,ve=Z,Ne=Ne?Co(Ne):null,Ne!==null&&(Ut=vo(Ne),Ne!==Ut||Ne.tag!==5&&Ne.tag!==6)&&(Ne=null)):(ve=null,Ne=Z),ve!==Ne)){if(Ie=BS,_e="onMouseLeave",G="onMouseEnter",j="mouse",(i==="pointerout"||i==="pointerover")&&(Ie=HS,_e="onPointerLeave",G="onPointerEnter",j="pointer"),Ut=ve==null?ae:$s(ve),Q=Ne==null?ae:$s(Ne),ae=new Ie(_e,j+"leave",ve,l,le),ae.target=Ut,ae.relatedTarget=Q,_e=null,Co(le)===Z&&(Ie=new Ie(G,j+"enter",Ne,l,le),Ie.target=Q,Ie.relatedTarget=Ut,_e=Ie),Ut=_e,ve&&Ne)t:{for(Ie=ve,G=Ne,j=0,Q=Ie;Q;Q=zs(Q))j++;for(Q=0,_e=G;_e;_e=zs(_e))Q++;for(;0<j-Q;)Ie=zs(Ie),j--;for(;0<Q-j;)G=zs(G),Q--;for(;j--;){if(Ie===G||G!==null&&Ie===G.alternate)break t;Ie=zs(Ie),G=zs(G)}Ie=null}else Ie=null;ve!==null&&hx(he,ae,ve,Ie,!1),Ne!==null&&Ut!==null&&hx(he,Ut,Ne,Ie,!0)}}e:{if(ae=Z?$s(Z):window,ve=ae.nodeName&&ae.nodeName.toLowerCase(),ve==="select"||ve==="input"&&ae.type==="file")var Le=i7;else if(YS(ae))if(GS)Le=u7;else{Le=s7;var He=o7}else(ve=ae.nodeName)&&ve.toLowerCase()==="input"&&(ae.type==="checkbox"||ae.type==="radio")&&(Le=a7);if(Le&&(Le=Le(i,Z))){WS(he,Le,l,le);break e}He&&He(i,ae,Z),i==="focusout"&&(He=ae._wrapperState)&&He.controlled&&ae.type==="number"&&cn(ae,"number",ae.value)}switch(He=Z?$s(Z):window,i){case"focusin":(YS(He)||He.contentEditable==="true")&&(Us=He,nm=Z,wu=null);break;case"focusout":wu=nm=Us=null;break;case"mousedown":rm=!0;break;case"contextmenu":case"mouseup":case"dragend":rm=!1,nx(he,l,le);break;case"selectionchange":if(d7)break;case"keydown":case"keyup":nx(he,l,le)}var ze;if(Jp)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 Bs?VS(i,l)&&(We="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(We="onCompositionStart");We&&(zS&&l.locale!=="ko"&&(Bs||We!=="onCompositionStart"?We==="onCompositionEnd"&&Bs&&(ze=MS()):(Hi=le,Yp="value"in Hi?Hi.value:Hi.textContent,Bs=!0)),He=Hc(Z,We),0<He.length&&(We=new US(We,i,null,l,le),he.push({event:We,listeners:He}),ze?We.data=ze:(ze=qS(l),ze!==null&&(We.data=ze)))),(ze=ZB?e7(i,l):t7(i,l))&&(Z=Hc(Z,"onBeforeInput"),0<Z.length&&(le=new US("onBeforeInput","beforeinput",null,l,le),he.push({event:le,listeners:Z}),le.data=ze))}dx(he,s)})}function Cu(i,s,l){return{instance:i,listener:s,currentTarget:l}}function Hc(i,s){for(var l=s+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=uu(i,l),b!=null&&h.unshift(Cu(i,b,E)),b=uu(i,s),b!=null&&h.push(Cu(i,b,E))),i=i.return}return h}function zs(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function hx(i,s,l,h,E){for(var b=s._reactName,S=[];l!==null&&l!==h;){var R=l,U=R.alternate,Z=R.stateNode;if(U!==null&&U===h)break;R.tag===5&&Z!==null&&(R=Z,E?(U=uu(l,b),U!=null&&S.unshift(Cu(l,U,R))):E||(U=uu(l,b),U!=null&&S.push(Cu(l,U,R)))),l=l.return}S.length!==0&&i.push({event:s,listeners:S})}var m7=/\r\n?/g,g7=/\u0000|\uFFFD/g;function px(i){return(typeof i=="string"?i:""+i).replace(m7,`
|
|
15
|
+
`).replace(g7,"")}function zc(i,s,l){if(s=px(s),px(i)!==s&&l)throw Error(n(425))}function jc(){}var lm=null,cm=null;function dm(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var fm=typeof setTimeout=="function"?setTimeout:void 0,E7=typeof clearTimeout=="function"?clearTimeout:void 0,mx=typeof Promise=="function"?Promise:void 0,y7=typeof queueMicrotask=="function"?queueMicrotask:typeof mx!="undefined"?function(i){return mx.resolve(null).then(i).catch(b7)}:fm;function b7(i){setTimeout(function(){throw i})}function hm(i,s){var l=s,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),Eu(s);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);Eu(s)}function ji(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function gx(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(s===0)return i;s--}else l==="/$"&&s++}i=i.previousSibling}return null}var js=Math.random().toString(36).slice(2),ei="__reactFiber$"+js,ku="__reactProps$"+js,Ei="__reactContainer$"+js,pm="__reactEvents$"+js,T7="__reactListeners$"+js,_7="__reactHandles$"+js;function Co(i){var s=i[ei];if(s)return s;for(var l=i.parentNode;l;){if(s=l[Ei]||l[ei]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=gx(i);i!==null;){if(l=i[ei])return l;i=gx(i)}return s}i=l,l=i.parentNode}return null}function Pu(i){return i=i[ei]||i[Ei],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function $s(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function $c(i){return i[ku]||null}var mm=[],Vs=-1;function $i(i){return{current:i}}function xt(i){0>Vs||(i.current=mm[Vs],mm[Vs]=null,Vs--)}function bt(i,s){Vs++,mm[Vs]=i.current,i.current=s}var Vi={},xn=$i(Vi),zn=$i(!1),ko=Vi;function qs(i,s){var l=i.type.contextTypes;if(!l)return Vi;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===s)return h.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in l)E[b]=s[b];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=E),E}function jn(i){return i=i.childContextTypes,i!=null}function Vc(){xt(zn),xt(xn)}function Ex(i,s,l){if(xn.current!==Vi)throw Error(n(168));bt(xn,s),bt(zn,l)}function yx(i,s,l){var h=i.stateNode;if(s=s.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var E in h)if(!(E in s))throw Error(n(108,Be(i)||"Unknown",E));return k({},l,h)}function qc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Vi,ko=xn.current,bt(xn,i),bt(zn,zn.current),!0}function bx(i,s,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=yx(i,s,ko),h.__reactInternalMemoizedMergedChildContext=i,xt(zn),xt(xn),bt(xn,i)):xt(zn),bt(zn,l)}var yi=null,Yc=!1,gm=!1;function Tx(i){yi===null?yi=[i]:yi.push(i)}function S7(i){Yc=!0,Tx(i)}function qi(){if(!gm&&yi!==null){gm=!0;var i=0,s=dt;try{var l=yi;for(dt=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}yi=null,Yc=!1}catch(E){throw yi!==null&&(yi=yi.slice(i+1)),SS(Bp,qi),E}finally{dt=s,gm=!1}}return null}var Ys=[],Ws=0,Wc=null,Gc=0,hr=[],pr=0,Po=null,bi=1,Ti="";function No(i,s){Ys[Ws++]=Gc,Ys[Ws++]=Wc,Wc=i,Gc=s}function _x(i,s,l){hr[pr++]=bi,hr[pr++]=Ti,hr[pr++]=Po,Po=i;var h=bi;i=Ti;var E=32-Pr(h)-1;h&=~(1<<E),l+=1;var b=32-Pr(s)+E;if(30<b){var S=E-E%5;b=(h&(1<<S)-1).toString(32),h>>=S,E-=S,bi=1<<32-Pr(s)+E|l<<E|h,Ti=b+i}else bi=1<<b|l<<E|h,Ti=i}function Em(i){i.return!==null&&(No(i,1),_x(i,1,0))}function ym(i){for(;i===Wc;)Wc=Ys[--Ws],Ys[Ws]=null,Gc=Ys[--Ws],Ys[Ws]=null;for(;i===Po;)Po=hr[--pr],hr[pr]=null,Ti=hr[--pr],hr[pr]=null,bi=hr[--pr],hr[pr]=null}var tr=null,nr=null,kt=!1,Or=null;function Sx(i,s){var l=yr(5,null,null,0);l.elementType="DELETED",l.stateNode=s,l.return=i,s=i.deletions,s===null?(i.deletions=[l],i.flags|=16):s.push(l)}function xx(i,s){switch(i.tag){case 5:var l=i.type;return s=s.nodeType!==1||l.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,tr=i,nr=ji(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,tr=i,nr=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=Po!==null?{id:bi,overflow:Ti}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=yr(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,tr=i,nr=null,!0):!1;default:return!1}}function bm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Tm(i){if(kt){var s=nr;if(s){var l=s;if(!xx(i,s)){if(bm(i))throw Error(n(418));s=ji(l.nextSibling);var h=tr;s&&xx(i,s)?Sx(h,l):(i.flags=i.flags&-4097|2,kt=!1,tr=i)}}else{if(bm(i))throw Error(n(418));i.flags=i.flags&-4097|2,kt=!1,tr=i}}}function wx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;tr=i}function Xc(i){if(i!==tr)return!1;if(!kt)return wx(i),kt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!dm(i.type,i.memoizedProps)),s&&(s=nr)){if(bm(i))throw Ax(),Error(n(418));for(;s;)Sx(i,s),s=ji(s.nextSibling)}if(wx(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){nr=ji(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}nr=null}}else nr=tr?ji(i.stateNode.nextSibling):null;return!0}function Ax(){for(var i=nr;i;)i=ji(i.nextSibling)}function Gs(){nr=tr=null,kt=!1}function _m(i){Or===null?Or=[i]:Or.push(i)}var x7=H.ReactCurrentBatchConfig;function Nu(i,s,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var h=l.stateNode}if(!h)throw Error(n(147,i));var E=h,b=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===b?s.ref:(s=function(S){var R=E.refs;S===null?delete R[b]:R[b]=S},s._stringRef=b,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Kc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function vx(i){var s=i._init;return s(i._payload)}function Cx(i){function s(G,j){if(i){var Q=G.deletions;Q===null?(G.deletions=[j],G.flags|=16):Q.push(j)}}function l(G,j){if(!i)return null;for(;j!==null;)s(G,j),j=j.sibling;return null}function h(G,j){for(G=new Map;j!==null;)j.key!==null?G.set(j.key,j):G.set(j.index,j),j=j.sibling;return G}function E(G,j){return G=Zi(G,j),G.index=0,G.sibling=null,G}function b(G,j,Q){return G.index=Q,i?(Q=G.alternate,Q!==null?(Q=Q.index,Q<j?(G.flags|=2,j):Q):(G.flags|=2,j)):(G.flags|=1048576,j)}function S(G){return i&&G.alternate===null&&(G.flags|=2),G}function R(G,j,Q,_e){return j===null||j.tag!==6?(j=f0(Q,G.mode,_e),j.return=G,j):(j=E(j,Q),j.return=G,j)}function U(G,j,Q,_e){var Le=Q.type;return Le===q?le(G,j,Q.props.children,_e,Q.key):j!==null&&(j.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===Pe&&vx(Le)===j.type)?(_e=E(j,Q.props),_e.ref=Nu(G,j,Q),_e.return=G,_e):(_e=Td(Q.type,Q.key,Q.props,null,G.mode,_e),_e.ref=Nu(G,j,Q),_e.return=G,_e)}function Z(G,j,Q,_e){return j===null||j.tag!==4||j.stateNode.containerInfo!==Q.containerInfo||j.stateNode.implementation!==Q.implementation?(j=h0(Q,G.mode,_e),j.return=G,j):(j=E(j,Q.children||[]),j.return=G,j)}function le(G,j,Q,_e,Le){return j===null||j.tag!==7?(j=Bo(Q,G.mode,_e,Le),j.return=G,j):(j=E(j,Q),j.return=G,j)}function he(G,j,Q){if(typeof j=="string"&&j!==""||typeof j=="number")return j=f0(""+j,G.mode,Q),j.return=G,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Y:return Q=Td(j.type,j.key,j.props,null,G.mode,Q),Q.ref=Nu(G,null,j),Q.return=G,Q;case D:return j=h0(j,G.mode,Q),j.return=G,j;case Pe:var _e=j._init;return he(G,_e(j._payload),Q)}if(Hn(j)||ie(j))return j=Bo(j,G.mode,Q,null),j.return=G,j;Kc(G,j)}return null}function ae(G,j,Q,_e){var Le=j!==null?j.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Le!==null?null:R(G,j,""+Q,_e);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Y:return Q.key===Le?U(G,j,Q,_e):null;case D:return Q.key===Le?Z(G,j,Q,_e):null;case Pe:return Le=Q._init,ae(G,j,Le(Q._payload),_e)}if(Hn(Q)||ie(Q))return Le!==null?null:le(G,j,Q,_e,null);Kc(G,Q)}return null}function ve(G,j,Q,_e,Le){if(typeof _e=="string"&&_e!==""||typeof _e=="number")return G=G.get(Q)||null,R(j,G,""+_e,Le);if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case Y:return G=G.get(_e.key===null?Q:_e.key)||null,U(j,G,_e,Le);case D:return G=G.get(_e.key===null?Q:_e.key)||null,Z(j,G,_e,Le);case Pe:var He=_e._init;return ve(G,j,Q,He(_e._payload),Le)}if(Hn(_e)||ie(_e))return G=G.get(Q)||null,le(j,G,_e,Le,null);Kc(j,_e)}return null}function Ne(G,j,Q,_e){for(var Le=null,He=null,ze=j,We=j=0,an=null;ze!==null&&We<Q.length;We++){ze.index>We?(an=ze,ze=null):an=ze.sibling;var at=ae(G,ze,Q[We],_e);if(at===null){ze===null&&(ze=an);break}i&&ze&&at.alternate===null&&s(G,ze),j=b(at,j,We),He===null?Le=at:He.sibling=at,He=at,ze=an}if(We===Q.length)return l(G,ze),kt&&No(G,We),Le;if(ze===null){for(;We<Q.length;We++)ze=he(G,Q[We],_e),ze!==null&&(j=b(ze,j,We),He===null?Le=ze:He.sibling=ze,He=ze);return kt&&No(G,We),Le}for(ze=h(G,ze);We<Q.length;We++)an=ve(ze,G,We,Q[We],_e),an!==null&&(i&&an.alternate!==null&&ze.delete(an.key===null?We:an.key),j=b(an,j,We),He===null?Le=an:He.sibling=an,He=an);return i&&ze.forEach(function(eo){return s(G,eo)}),kt&&No(G,We),Le}function Ie(G,j,Q,_e){var Le=ie(Q);if(typeof Le!="function")throw Error(n(150));if(Q=Le.call(Q),Q==null)throw Error(n(151));for(var He=Le=null,ze=j,We=j=0,an=null,at=Q.next();ze!==null&&!at.done;We++,at=Q.next()){ze.index>We?(an=ze,ze=null):an=ze.sibling;var eo=ae(G,ze,at.value,_e);if(eo===null){ze===null&&(ze=an);break}i&&ze&&eo.alternate===null&&s(G,ze),j=b(eo,j,We),He===null?Le=eo:He.sibling=eo,He=eo,ze=an}if(at.done)return l(G,ze),kt&&No(G,We),Le;if(ze===null){for(;!at.done;We++,at=Q.next())at=he(G,at.value,_e),at!==null&&(j=b(at,j,We),He===null?Le=at:He.sibling=at,He=at);return kt&&No(G,We),Le}for(ze=h(G,ze);!at.done;We++,at=Q.next())at=ve(ze,G,We,at.value,_e),at!==null&&(i&&at.alternate!==null&&ze.delete(at.key===null?We:at.key),j=b(at,j,We),He===null?Le=at:He.sibling=at,He=at);return i&&ze.forEach(function(nU){return s(G,nU)}),kt&&No(G,We),Le}function Ut(G,j,Q,_e){if(typeof Q=="object"&&Q!==null&&Q.type===q&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Y:e:{for(var Le=Q.key,He=j;He!==null;){if(He.key===Le){if(Le=Q.type,Le===q){if(He.tag===7){l(G,He.sibling),j=E(He,Q.props.children),j.return=G,G=j;break e}}else if(He.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===Pe&&vx(Le)===He.type){l(G,He.sibling),j=E(He,Q.props),j.ref=Nu(G,He,Q),j.return=G,G=j;break e}l(G,He);break}else s(G,He);He=He.sibling}Q.type===q?(j=Bo(Q.props.children,G.mode,_e,Q.key),j.return=G,G=j):(_e=Td(Q.type,Q.key,Q.props,null,G.mode,_e),_e.ref=Nu(G,j,Q),_e.return=G,G=_e)}return S(G);case D:e:{for(He=Q.key;j!==null;){if(j.key===He)if(j.tag===4&&j.stateNode.containerInfo===Q.containerInfo&&j.stateNode.implementation===Q.implementation){l(G,j.sibling),j=E(j,Q.children||[]),j.return=G,G=j;break e}else{l(G,j);break}else s(G,j);j=j.sibling}j=h0(Q,G.mode,_e),j.return=G,G=j}return S(G);case Pe:return He=Q._init,Ut(G,j,He(Q._payload),_e)}if(Hn(Q))return Ne(G,j,Q,_e);if(ie(Q))return Ie(G,j,Q,_e);Kc(G,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,j!==null&&j.tag===6?(l(G,j.sibling),j=E(j,Q),j.return=G,G=j):(l(G,j),j=f0(Q,G.mode,_e),j.return=G,G=j),S(G)):l(G,j)}return Ut}var Xs=Cx(!0),kx=Cx(!1),Qc=$i(null),Jc=null,Ks=null,Sm=null;function xm(){Sm=Ks=Jc=null}function wm(i){var s=Qc.current;xt(Qc),i._currentValue=s}function Am(i,s,l){for(;i!==null;){var h=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),i===l)break;i=i.return}}function Qs(i,s){Jc=i,Sm=Ks=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&($n=!0),i.firstContext=null)}function mr(i){var s=i._currentValue;if(Sm!==i)if(i={context:i,memoizedValue:s,next:null},Ks===null){if(Jc===null)throw Error(n(308));Ks=i,Jc.dependencies={lanes:0,firstContext:i}}else Ks=Ks.next=i;return s}var Oo=null;function vm(i){Oo===null?Oo=[i]:Oo.push(i)}function Px(i,s,l,h){var E=s.interleaved;return E===null?(l.next=l,vm(s)):(l.next=E.next,E.next=l),s.interleaved=l,_i(i,h)}function _i(i,s){i.lanes|=s;var l=i.alternate;for(l!==null&&(l.lanes|=s),l=i,i=i.return;i!==null;)i.childLanes|=s,l=i.alternate,l!==null&&(l.childLanes|=s),l=i,i=i.return;return l.tag===3?l.stateNode:null}var Yi=!1;function Cm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Nx(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Si(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Wi(i,s,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(st&2)!==0){var E=h.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),h.pending=s,_i(i,l)}return E=h.interleaved,E===null?(s.next=s,vm(h)):(s.next=E.next,E.next=s),h.interleaved=s,_i(i,l)}function Zc(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var h=s.lanes;h&=i.pendingLanes,l|=h,s.lanes=l,zp(i,l)}}function Ox(i,s){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 S={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};b===null?E=b=S:b=b.next=S,l=l.next}while(l!==null);b===null?E=b=s:b=b.next=s}else E=b=s;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=s:i.next=s,l.lastBaseUpdate=s}function ed(i,s,l,h){var E=i.updateQueue;Yi=!1;var b=E.firstBaseUpdate,S=E.lastBaseUpdate,R=E.shared.pending;if(R!==null){E.shared.pending=null;var U=R,Z=U.next;U.next=null,S===null?b=Z:S.next=Z,S=U;var le=i.alternate;le!==null&&(le=le.updateQueue,R=le.lastBaseUpdate,R!==S&&(R===null?le.firstBaseUpdate=Z:R.next=Z,le.lastBaseUpdate=U))}if(b!==null){var he=E.baseState;S=0,le=Z=U=null,R=b;do{var ae=R.lane,ve=R.eventTime;if((h&ae)===ae){le!==null&&(le=le.next={eventTime:ve,lane:0,tag:R.tag,payload:R.payload,callback:R.callback,next:null});e:{var Ne=i,Ie=R;switch(ae=s,ve=l,Ie.tag){case 1:if(Ne=Ie.payload,typeof Ne=="function"){he=Ne.call(ve,he,ae);break e}he=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Ie.payload,ae=typeof Ne=="function"?Ne.call(ve,he,ae):Ne,ae==null)break e;he=k({},he,ae);break e;case 2:Yi=!0}}R.callback!==null&&R.lane!==0&&(i.flags|=64,ae=E.effects,ae===null?E.effects=[R]:ae.push(R))}else ve={eventTime:ve,lane:ae,tag:R.tag,payload:R.payload,callback:R.callback,next:null},le===null?(Z=le=ve,U=he):le=le.next=ve,S|=ae;if(R=R.next,R===null){if(R=E.shared.pending,R===null)break;ae=R,R=ae.next,ae.next=null,E.lastBaseUpdate=ae,E.shared.pending=null}}while(!0);if(le===null&&(U=he),E.baseState=U,E.firstBaseUpdate=Z,E.lastBaseUpdate=le,s=E.shared.interleaved,s!==null){E=s;do S|=E.lane,E=E.next;while(E!==s)}else b===null&&(E.shared.lanes=0);Lo|=S,i.lanes=S,i.memoizedState=he}}function Ix(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var h=i[s],E=h.callback;if(E!==null){if(h.callback=null,h=l,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var Ou={},ti=$i(Ou),Iu=$i(Ou),Ru=$i(Ou);function Io(i){if(i===Ou)throw Error(n(174));return i}function km(i,s){switch(bt(Ru,s),bt(Iu,i),bt(ti,Ou),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:ge(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=ge(s,i)}xt(ti),bt(ti,s)}function Js(){xt(ti),xt(Iu),xt(Ru)}function Rx(i){Io(Ru.current);var s=Io(ti.current),l=ge(s,i.type);s!==l&&(bt(Iu,i),bt(ti,l))}function Pm(i){Iu.current===i&&(xt(ti),xt(Iu))}var Ot=$i(0);function td(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Nm=[];function Om(){for(var i=0;i<Nm.length;i++)Nm[i]._workInProgressVersionPrimary=null;Nm.length=0}var nd=H.ReactCurrentDispatcher,Im=H.ReactCurrentBatchConfig,Ro=0,It=null,Xt=null,on=null,rd=!1,Lu=!1,Du=0,w7=0;function wn(){throw Error(n(321))}function Rm(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!Nr(i[l],s[l]))return!1;return!0}function Lm(i,s,l,h,E,b){if(Ro=b,It=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,nd.current=i===null||i.memoizedState===null?k7:P7,i=l(h,E),Lu){b=0;do{if(Lu=!1,Du=0,25<=b)throw Error(n(301));b+=1,on=Xt=null,s.updateQueue=null,nd.current=N7,i=l(h,E)}while(Lu)}if(nd.current=sd,s=Xt!==null&&Xt.next!==null,Ro=0,on=Xt=It=null,rd=!1,s)throw Error(n(300));return i}function Dm(){var i=Du!==0;return Du=0,i}function ni(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return on===null?It.memoizedState=on=i:on=on.next=i,on}function gr(){if(Xt===null){var i=It.alternate;i=i!==null?i.memoizedState:null}else i=Xt.next;var s=on===null?It.memoizedState:on.next;if(s!==null)on=s,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},on===null?It.memoizedState=on=i:on=on.next=i}return on}function Mu(i,s){return typeof s=="function"?s(i):s}function Mm(i){var s=gr(),l=s.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 S=E.next;E.next=b.next,b.next=S}h.baseQueue=E=b,l.pending=null}if(E!==null){b=E.next,h=h.baseState;var R=S=null,U=null,Z=b;do{var le=Z.lane;if((Ro&le)===le)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 he={lane:le,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};U===null?(R=U=he,S=h):U=U.next=he,It.lanes|=le,Lo|=le}Z=Z.next}while(Z!==null&&Z!==b);U===null?S=h:U.next=R,Nr(h,s.memoizedState)||($n=!0),s.memoizedState=h,s.baseState=S,s.baseQueue=U,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do b=E.lane,It.lanes|=b,Lo|=b,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function Fm(i){var s=gr(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,E=l.pending,b=s.memoizedState;if(E!==null){l.pending=null;var S=E=E.next;do b=i(b,S.action),S=S.next;while(S!==E);Nr(b,s.memoizedState)||($n=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),l.lastRenderedState=b}return[b,h]}function Lx(){}function Dx(i,s){var l=It,h=gr(),E=s(),b=!Nr(h.memoizedState,E);if(b&&(h.memoizedState=E,$n=!0),h=h.queue,Bm(Bx.bind(null,l,h,i),[i]),h.getSnapshot!==s||b||on!==null&&on.memoizedState.tag&1){if(l.flags|=2048,Fu(9,Fx.bind(null,l,h,E,s),void 0,null),sn===null)throw Error(n(349));(Ro&30)!==0||Mx(l,s,E)}return E}function Mx(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=It.updateQueue,s===null?(s={lastEffect:null,stores:null},It.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function Fx(i,s,l,h){s.value=l,s.getSnapshot=h,Ux(s)&&Hx(i)}function Bx(i,s,l){return l(function(){Ux(s)&&Hx(i)})}function Ux(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!Nr(i,l)}catch(h){return!0}}function Hx(i){var s=_i(i,1);s!==null&&Dr(s,i,1,-1)}function zx(i){var s=ni();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Mu,lastRenderedState:i},s.queue=i,i=i.dispatch=C7.bind(null,It,i),[s.memoizedState,i]}function Fu(i,s,l,h){return i={tag:i,create:s,destroy:l,deps:h,next:null},s=It.updateQueue,s===null?(s={lastEffect:null,stores:null},It.updateQueue=s,s.lastEffect=i.next=i):(l=s.lastEffect,l===null?s.lastEffect=i.next=i:(h=l.next,l.next=i,i.next=h,s.lastEffect=i)),i}function jx(){return gr().memoizedState}function id(i,s,l,h){var E=ni();It.flags|=i,E.memoizedState=Fu(1|s,l,void 0,h===void 0?null:h)}function od(i,s,l,h){var E=gr();h=h===void 0?null:h;var b=void 0;if(Xt!==null){var S=Xt.memoizedState;if(b=S.destroy,h!==null&&Rm(h,S.deps)){E.memoizedState=Fu(s,l,b,h);return}}It.flags|=i,E.memoizedState=Fu(1|s,l,b,h)}function $x(i,s){return id(8390656,8,i,s)}function Bm(i,s){return od(2048,8,i,s)}function Vx(i,s){return od(4,2,i,s)}function qx(i,s){return od(4,4,i,s)}function Yx(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function Wx(i,s,l){return l=l!=null?l.concat([i]):null,od(4,4,Yx.bind(null,s,i),l)}function Um(){}function Gx(i,s){var l=gr();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&Rm(s,h[1])?h[0]:(l.memoizedState=[i,s],i)}function Xx(i,s){var l=gr();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&Rm(s,h[1])?h[0]:(i=i(),l.memoizedState=[i,s],i)}function Kx(i,s,l){return(Ro&21)===0?(i.baseState&&(i.baseState=!1,$n=!0),i.memoizedState=l):(Nr(l,s)||(l=vS(),It.lanes|=l,Lo|=l,i.baseState=!0),s)}function A7(i,s){var l=dt;dt=l!==0&&4>l?l:4,i(!0);var h=Im.transition;Im.transition={};try{i(!1),s()}finally{dt=l,Im.transition=h}}function Qx(){return gr().memoizedState}function v7(i,s,l){var h=Qi(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},Jx(i))Zx(s,l);else if(l=Px(i,s,l,h),l!==null){var E=In();Dr(l,i,h,E),ew(l,s,h)}}function C7(i,s,l){var h=Qi(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(Jx(i))Zx(s,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var S=s.lastRenderedState,R=b(S,l);if(E.hasEagerState=!0,E.eagerState=R,Nr(R,S)){var U=s.interleaved;U===null?(E.next=E,vm(s)):(E.next=U.next,U.next=E),s.interleaved=E;return}}catch(Z){}l=Px(i,s,E,h),l!==null&&(E=In(),Dr(l,i,h,E),ew(l,s,h))}}function Jx(i){var s=i.alternate;return i===It||s!==null&&s===It}function Zx(i,s){Lu=rd=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function ew(i,s,l){if((l&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,l|=h,s.lanes=l,zp(i,l)}}var sd={readContext:mr,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},k7={readContext:mr,useCallback:function(i,s){return ni().memoizedState=[i,s===void 0?null:s],i},useContext:mr,useEffect:$x,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,id(4194308,4,Yx.bind(null,s,i),l)},useLayoutEffect:function(i,s){return id(4194308,4,i,s)},useInsertionEffect:function(i,s){return id(4,2,i,s)},useMemo:function(i,s){var l=ni();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var h=ni();return s=l!==void 0?l(s):s,h.memoizedState=h.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},h.queue=i,i=i.dispatch=v7.bind(null,It,i),[h.memoizedState,i]},useRef:function(i){var s=ni();return i={current:i},s.memoizedState=i},useState:zx,useDebugValue:Um,useDeferredValue:function(i){return ni().memoizedState=i},useTransition:function(){var i=zx(!1),s=i[0];return i=A7.bind(null,i[1]),ni().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var h=It,E=ni();if(kt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),sn===null)throw Error(n(349));(Ro&30)!==0||Mx(h,s,l)}E.memoizedState=l;var b={value:l,getSnapshot:s};return E.queue=b,$x(Bx.bind(null,h,b,i),[i]),h.flags|=2048,Fu(9,Fx.bind(null,h,b,l,s),void 0,null),l},useId:function(){var i=ni(),s=sn.identifierPrefix;if(kt){var l=Ti,h=bi;l=(h&~(1<<32-Pr(h)-1)).toString(32)+l,s=":"+s+"R"+l,l=Du++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=w7++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},P7={readContext:mr,useCallback:Gx,useContext:mr,useEffect:Bm,useImperativeHandle:Wx,useInsertionEffect:Vx,useLayoutEffect:qx,useMemo:Xx,useReducer:Mm,useRef:jx,useState:function(){return Mm(Mu)},useDebugValue:Um,useDeferredValue:function(i){var s=gr();return Kx(s,Xt.memoizedState,i)},useTransition:function(){var i=Mm(Mu)[0],s=gr().memoizedState;return[i,s]},useMutableSource:Lx,useSyncExternalStore:Dx,useId:Qx,unstable_isNewReconciler:!1},N7={readContext:mr,useCallback:Gx,useContext:mr,useEffect:Bm,useImperativeHandle:Wx,useInsertionEffect:Vx,useLayoutEffect:qx,useMemo:Xx,useReducer:Fm,useRef:jx,useState:function(){return Fm(Mu)},useDebugValue:Um,useDeferredValue:function(i){var s=gr();return Xt===null?s.memoizedState=i:Kx(s,Xt.memoizedState,i)},useTransition:function(){var i=Fm(Mu)[0],s=gr().memoizedState;return[i,s]},useMutableSource:Lx,useSyncExternalStore:Dx,useId:Qx,unstable_isNewReconciler:!1};function Ir(i,s){if(i&&i.defaultProps){s=k({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function Hm(i,s,l,h){s=i.memoizedState,l=l(h,s),l=l==null?s:k({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var ad={isMounted:function(i){return(i=i._reactInternals)?vo(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var h=In(),E=Qi(i),b=Si(h,E);b.payload=s,l!=null&&(b.callback=l),s=Wi(i,b,E),s!==null&&(Dr(s,i,E,h),Zc(s,i,E))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var h=In(),E=Qi(i),b=Si(h,E);b.tag=1,b.payload=s,l!=null&&(b.callback=l),s=Wi(i,b,E),s!==null&&(Dr(s,i,E,h),Zc(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=In(),h=Qi(i),E=Si(l,h);E.tag=2,s!=null&&(E.callback=s),s=Wi(i,E,h),s!==null&&(Dr(s,i,h,l),Zc(s,i,h))}};function tw(i,s,l,h,E,b,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,S):s.prototype&&s.prototype.isPureReactComponent?!xu(l,h)||!xu(E,b):!0}function nw(i,s,l){var h=!1,E=Vi,b=s.contextType;return typeof b=="object"&&b!==null?b=mr(b):(E=jn(s)?ko:xn.current,h=s.contextTypes,b=(h=h!=null)?qs(i,E):Vi),s=new s(l,b),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ad,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),s}function rw(i,s,l,h){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,h),s.state!==i&&ad.enqueueReplaceState(s,s.state,null)}function zm(i,s,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},Cm(i);var b=s.contextType;typeof b=="object"&&b!==null?E.context=mr(b):(b=jn(s)?ko:xn.current,E.context=qs(i,b)),E.state=i.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(Hm(i,s,b,l),E.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(s=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),s!==E.state&&ad.enqueueReplaceState(E,E.state,null),ed(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Zs(i,s){try{var l="",h=s;do l+=je(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:s,stack:E,digest:null}}function jm(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function $m(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var O7=typeof WeakMap=="function"?WeakMap:Map;function iw(i,s,l){l=Si(-1,l),l.tag=3,l.payload={element:null};var h=s.value;return l.callback=function(){pd||(pd=!0,i0=h),$m(i,s)},l}function ow(i,s,l){l=Si(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=s.value;l.payload=function(){return h(E)},l.callback=function(){$m(i,s)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(l.callback=function(){$m(i,s),typeof h!="function"&&(Xi===null?Xi=new Set([this]):Xi.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})}),l}function sw(i,s,l){var h=i.pingCache;if(h===null){h=i.pingCache=new O7;var E=new Set;h.set(s,E)}else E=h.get(s),E===void 0&&(E=new Set,h.set(s,E));E.has(l)||(E.add(l),i=q7.bind(null,i,s,l),s.then(i,i))}function aw(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function uw(i,s,l,h,E){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=Si(-1,1),s.tag=2,Wi(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var I7=H.ReactCurrentOwner,$n=!1;function On(i,s,l,h){s.child=i===null?kx(s,null,l,h):Xs(s,i.child,l,h)}function lw(i,s,l,h,E){l=l.render;var b=s.ref;return Qs(s,E),h=Lm(i,s,l,h,b,E),l=Dm(),i!==null&&!$n?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,xi(i,s,E)):(kt&&l&&Em(s),s.flags|=1,On(i,s,h,E),s.child)}function cw(i,s,l,h,E){if(i===null){var b=l.type;return typeof b=="function"&&!d0(b)&&b.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=b,dw(i,s,b,h,E)):(i=Td(l.type,null,h,s,s.mode,E),i.ref=s.ref,i.return=s,s.child=i)}if(b=i.child,(i.lanes&E)===0){var S=b.memoizedProps;if(l=l.compare,l=l!==null?l:xu,l(S,h)&&i.ref===s.ref)return xi(i,s,E)}return s.flags|=1,i=Zi(b,h),i.ref=s.ref,i.return=s,s.child=i}function dw(i,s,l,h,E){if(i!==null){var b=i.memoizedProps;if(xu(b,h)&&i.ref===s.ref)if($n=!1,s.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&($n=!0);else return s.lanes=i.lanes,xi(i,s,E)}return Vm(i,s,l,h,E)}function fw(i,s,l){var h=s.pendingProps,E=h.children,b=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(ta,rr),rr|=l;else{if((l&1073741824)===0)return i=b!==null?b.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,bt(ta,rr),rr|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:l,bt(ta,rr),rr|=h}else b!==null?(h=b.baseLanes|l,s.memoizedState=null):h=l,bt(ta,rr),rr|=h;return On(i,s,E,l),s.child}function hw(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function Vm(i,s,l,h,E){var b=jn(l)?ko:xn.current;return b=qs(s,b),Qs(s,E),l=Lm(i,s,l,h,b,E),h=Dm(),i!==null&&!$n?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,xi(i,s,E)):(kt&&h&&Em(s),s.flags|=1,On(i,s,l,E),s.child)}function pw(i,s,l,h,E){if(jn(l)){var b=!0;qc(s)}else b=!1;if(Qs(s,E),s.stateNode===null)ld(i,s),nw(s,l,h),zm(s,l,h,E),h=!0;else if(i===null){var S=s.stateNode,R=s.memoizedProps;S.props=R;var U=S.context,Z=l.contextType;typeof Z=="object"&&Z!==null?Z=mr(Z):(Z=jn(l)?ko:xn.current,Z=qs(s,Z));var le=l.getDerivedStateFromProps,he=typeof le=="function"||typeof S.getSnapshotBeforeUpdate=="function";he||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(R!==h||U!==Z)&&rw(s,S,h,Z),Yi=!1;var ae=s.memoizedState;S.state=ae,ed(s,h,S,E),U=s.memoizedState,R!==h||ae!==U||zn.current||Yi?(typeof le=="function"&&(Hm(s,l,le,h),U=s.memoizedState),(R=Yi||tw(s,l,R,h,ae,U,Z))?(he||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(s.flags|=4194308)):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=U),S.props=h,S.state=U,S.context=Z,h=R):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{S=s.stateNode,Nx(i,s),R=s.memoizedProps,Z=s.type===s.elementType?R:Ir(s.type,R),S.props=Z,he=s.pendingProps,ae=S.context,U=l.contextType,typeof U=="object"&&U!==null?U=mr(U):(U=jn(l)?ko:xn.current,U=qs(s,U));var ve=l.getDerivedStateFromProps;(le=typeof ve=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(R!==he||ae!==U)&&rw(s,S,h,U),Yi=!1,ae=s.memoizedState,S.state=ae,ed(s,h,S,E);var Pe=s.memoizedState;R!==he||ae!==Pe||zn.current||Yi?(typeof ve=="function"&&(Hm(s,l,ve,h),Pe=s.memoizedState),(Z=Yi||tw(s,l,Z,h,ae,Pe,U)||!1)?(le||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(h,Pe,U),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(h,Pe,U)),typeof S.componentDidUpdate=="function"&&(s.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof S.componentDidUpdate!="function"||R===i.memoizedProps&&ae===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&ae===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=Pe),S.props=h,S.state=Pe,S.context=U,h=Z):(typeof S.componentDidUpdate!="function"||R===i.memoizedProps&&ae===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&ae===i.memoizedState||(s.flags|=1024),h=!1)}return qm(i,s,l,h,b,E)}function qm(i,s,l,h,E,b){hw(i,s);var S=(s.flags&128)!==0;if(!h&&!S)return E&&bx(s,l,!1),xi(i,s,b);h=s.stateNode,I7.current=s;var R=S&&typeof l.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&S?(s.child=Xs(s,i.child,null,b),s.child=Xs(s,null,R,b)):On(i,s,R,b),s.memoizedState=h.state,E&&bx(s,l,!0),s.child}function mw(i){var s=i.stateNode;s.pendingContext?Ex(i,s.pendingContext,s.pendingContext!==s.context):s.context&&Ex(i,s.context,!1),km(i,s.containerInfo)}function gw(i,s,l,h,E){return Gs(),_m(E),s.flags|=256,On(i,s,l,h),s.child}var Ym={dehydrated:null,treeContext:null,retryLane:0};function Wm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Ew(i,s,l){var h=s.pendingProps,E=Ot.current,b=!1,S=(s.flags&128)!==0,R;if((R=S)||(R=i!==null&&i.memoizedState===null?!1:(E&2)!==0),R?(b=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),bt(Ot,E&1),i===null)return Tm(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(S=h.children,i=h.fallback,b?(h=s.mode,b=s.child,S={mode:"hidden",children:S},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=S):b=_d(S,h,0,null),i=Bo(i,h,l,null),b.return=s,i.return=s,b.sibling=i,s.child=b,s.child.memoizedState=Wm(l),s.memoizedState=Ym,i):Gm(s,S));if(E=i.memoizedState,E!==null&&(R=E.dehydrated,R!==null))return R7(i,s,S,h,R,E,l);if(b){b=h.fallback,S=s.mode,E=i.child,R=E.sibling;var U={mode:"hidden",children:h.children};return(S&1)===0&&s.child!==E?(h=s.child,h.childLanes=0,h.pendingProps=U,s.deletions=null):(h=Zi(E,U),h.subtreeFlags=E.subtreeFlags&14680064),R!==null?b=Zi(R,b):(b=Bo(b,S,l,null),b.flags|=2),b.return=s,h.return=s,h.sibling=b,s.child=h,h=b,b=s.child,S=i.child.memoizedState,S=S===null?Wm(l):{baseLanes:S.baseLanes|l,cachePool:null,transitions:S.transitions},b.memoizedState=S,b.childLanes=i.childLanes&~l,s.memoizedState=Ym,h}return b=i.child,i=b.sibling,h=Zi(b,{mode:"visible",children:h.children}),(s.mode&1)===0&&(h.lanes=l),h.return=s,h.sibling=null,i!==null&&(l=s.deletions,l===null?(s.deletions=[i],s.flags|=16):l.push(i)),s.child=h,s.memoizedState=null,h}function Gm(i,s){return s=_d({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function ud(i,s,l,h){return h!==null&&_m(h),Xs(s,i.child,null,l),i=Gm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function R7(i,s,l,h,E,b,S){if(l)return s.flags&256?(s.flags&=-257,h=jm(Error(n(422))),ud(i,s,S,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(b=h.fallback,E=s.mode,h=_d({mode:"visible",children:h.children},E,0,null),b=Bo(b,E,S,null),b.flags|=2,h.return=s,b.return=s,h.sibling=b,s.child=h,(s.mode&1)!==0&&Xs(s,i.child,null,S),s.child.memoizedState=Wm(S),s.memoizedState=Ym,b);if((s.mode&1)===0)return ud(i,s,S,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var R=h.dgst;return h=R,b=Error(n(419)),h=jm(b,h,void 0),ud(i,s,S,h)}if(R=(S&i.childLanes)!==0,$n||R){if(h=sn,h!==null){switch(S&-S){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|S))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,_i(i,E),Dr(h,i,E,-1))}return c0(),h=jm(Error(n(421))),ud(i,s,S,h)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=Y7.bind(null,i),E._reactRetry=s,null):(i=b.treeContext,nr=ji(E.nextSibling),tr=s,kt=!0,Or=null,i!==null&&(hr[pr++]=bi,hr[pr++]=Ti,hr[pr++]=Po,bi=i.id,Ti=i.overflow,Po=s),s=Gm(s,h.children),s.flags|=4096,s)}function yw(i,s,l){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),Am(i.return,s,l)}function Xm(i,s,l,h,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:E}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=h,b.tail=l,b.tailMode=E)}function bw(i,s,l){var h=s.pendingProps,E=h.revealOrder,b=h.tail;if(On(i,s,h.children,l),h=Ot.current,(h&2)!==0)h=h&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&yw(i,l,s);else if(i.tag===19)yw(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(bt(Ot,h),(s.mode&1)===0)s.memoizedState=null;else switch(E){case"forwards":for(l=s.child,E=null;l!==null;)i=l.alternate,i!==null&&td(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=s.child,s.child=null):(E=l.sibling,l.sibling=null),Xm(s,!1,E,l,b);break;case"backwards":for(l=null,E=s.child,s.child=null;E!==null;){if(i=E.alternate,i!==null&&td(i)===null){s.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Xm(s,!0,l,null,b);break;case"together":Xm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function ld(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function xi(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),Lo|=s.lanes,(l&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=Zi(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=Zi(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function L7(i,s,l){switch(s.tag){case 3:mw(s),Gs();break;case 5:Rx(s);break;case 1:jn(s.type)&&qc(s);break;case 4:km(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,E=s.memoizedProps.value;bt(Qc,h._currentValue),h._currentValue=E;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(bt(Ot,Ot.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?Ew(i,s,l):(bt(Ot,Ot.current&1),i=xi(i,s,l),i!==null?i.sibling:null);bt(Ot,Ot.current&1);break;case 19:if(h=(l&s.childLanes)!==0,(i.flags&128)!==0){if(h)return bw(i,s,l);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),bt(Ot,Ot.current),h)break;return null;case 22:case 23:return s.lanes=0,fw(i,s,l)}return xi(i,s,l)}var Tw,Km,_w,Sw;Tw=function(i,s){for(var l=s.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Km=function(){},_w=function(i,s,l,h){var E=i.memoizedProps;if(E!==h){i=s.stateNode,Io(ti.current);var b=null;switch(l){case"input":E=fr(i,E),h=fr(i,h),b=[];break;case"select":E=k({},E,{value:void 0}),h=k({},h,{value:void 0}),b=[];break;case"textarea":E=Ne(i,E),h=Ne(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=jc)}fn(l,h);var S;l=null;for(Z in E)if(!h.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var R=E[Z];for(S in R)R.hasOwnProperty(S)&&(l||(l={}),l[S]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(o.hasOwnProperty(Z)?b||(b=[]):(b=b||[]).push(Z,null));for(Z in h){var U=h[Z];if(R=E!=null?E[Z]:void 0,h.hasOwnProperty(Z)&&U!==R&&(U!=null||R!=null))if(Z==="style")if(R){for(S in R)!R.hasOwnProperty(S)||U&&U.hasOwnProperty(S)||(l||(l={}),l[S]="");for(S in U)U.hasOwnProperty(S)&&R[S]!==U[S]&&(l||(l={}),l[S]=U[S])}else l||(b||(b=[]),b.push(Z,l)),l=U;else Z==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,R=R?R.__html:void 0,U!=null&&R!==U&&(b=b||[]).push(Z,U)):Z==="children"?typeof U!="string"&&typeof U!="number"||(b=b||[]).push(Z,""+U):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(o.hasOwnProperty(Z)?(U!=null&&Z==="onScroll"&&St("scroll",i),b||R===U||(b=[])):(b=b||[]).push(Z,U))}l&&(b=b||[]).push("style",l);var Z=b;(s.updateQueue=Z)&&(s.flags|=4)}},Sw=function(i,s,l,h){l!==h&&(s.flags|=4)};function Bu(i,s){if(!kt)switch(i.tailMode){case"hidden":s=i.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function An(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(s)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,s}function D7(i,s,l){var h=s.pendingProps;switch(ym(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return An(s),null;case 1:return jn(s.type)&&Vc(),An(s),null;case 3:return h=s.stateNode,Js(),xt(zn),xt(xn),Om(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Xc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Or!==null&&(a0(Or),Or=null))),Km(i,s),An(s),null;case 5:Pm(s);var E=Io(Ru.current);if(l=s.type,i!==null&&s.stateNode!=null)_w(i,s,l,h,E),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!h){if(s.stateNode===null)throw Error(n(166));return An(s),null}if(i=Io(ti.current),Xc(s)){h=s.stateNode,l=s.type;var b=s.memoizedProps;switch(h[ei]=s,h[ku]=b,i=(s.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<Au.length;E++)St(Au[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":rn(h,b),St("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},St("invalid",h);break;case"textarea":Me(h,b),St("invalid",h)}fn(l,b),E=null;for(var S in b)if(b.hasOwnProperty(S)){var R=b[S];S==="children"?typeof R=="string"?h.textContent!==R&&(b.suppressHydrationWarning!==!0&&zc(h.textContent,R,i),E=["children",R]):typeof R=="number"&&h.textContent!==""+R&&(b.suppressHydrationWarning!==!0&&zc(h.textContent,R,i),E=["children",""+R]):o.hasOwnProperty(S)&&R!=null&&S==="onScroll"&&St("scroll",h)}switch(l){case"input":Pn(h),Nn(h,b,!0);break;case"textarea":Pn(h),pt(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=jc)}h=E,s.updateQueue=h,h!==null&&(s.flags|=4)}else{S=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=S.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=S.createElement(l,{is:h.is}):(i=S.createElement(l),l==="select"&&(S=i,h.multiple?S.multiple=!0:h.size&&(S.size=h.size))):i=S.createElementNS(i,l),i[ei]=s,i[ku]=h,Tw(i,s,!1,!1),s.stateNode=i;e:{switch(S=Jr(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<Au.length;E++)St(Au[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":rn(i,h),E=fr(i,h),St("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),St("invalid",i);break;case"textarea":Me(i,h),E=Ne(i,h),St("invalid",i);break;default:E=h}fn(l,E),R=E;for(b in R)if(R.hasOwnProperty(b)){var U=R[b];b==="style"?dn(i,U):b==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&Ye(i,U)):b==="children"?typeof U=="string"?(l!=="textarea"||U!=="")&&Re(i,U):typeof U=="number"&&Re(i,""+U):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(o.hasOwnProperty(b)?U!=null&&b==="onScroll"&&St("scroll",i):U!=null&&v(i,b,U,S))}switch(l){case"input":Pn(i),Nn(i,h,!1);break;case"textarea":Pn(i),pt(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Ve(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?Ae(i,!!h.multiple,b,!1):h.defaultValue!=null&&Ae(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=jc)}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&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return An(s),null;case 6:if(i&&s.stateNode!=null)Sw(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(l=Io(Ru.current),Io(ti.current),Xc(s)){if(h=s.stateNode,l=s.memoizedProps,h[ei]=s,(b=h.nodeValue!==l)&&(i=tr,i!==null))switch(i.tag){case 3:zc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&zc(h.nodeValue,l,(i.mode&1)!==0)}b&&(s.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[ei]=s,s.stateNode=h}return An(s),null;case 13:if(xt(Ot),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(kt&&nr!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Ax(),Gs(),s.flags|=98560,b=!1;else if(b=Xc(s),h!==null&&h.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[ei]=s}else Gs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;An(s),b=!1}else Or!==null&&(a0(Or),Or=null),b=!0;if(!b)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=l,s):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(Ot.current&1)!==0?Kt===0&&(Kt=3):c0())),s.updateQueue!==null&&(s.flags|=4),An(s),null);case 4:return Js(),Km(i,s),i===null&&vu(s.stateNode.containerInfo),An(s),null;case 10:return wm(s.type._context),An(s),null;case 17:return jn(s.type)&&Vc(),An(s),null;case 19:if(xt(Ot),b=s.memoizedState,b===null)return An(s),null;if(h=(s.flags&128)!==0,S=b.rendering,S===null)if(h)Bu(b,!1);else{if(Kt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(S=td(i),S!==null){for(s.flags|=128,Bu(b,!1),h=S.updateQueue,h!==null&&(s.updateQueue=h,s.flags|=4),s.subtreeFlags=0,h=l,l=s.child;l!==null;)b=l,i=h,b.flags&=14680066,S=b.alternate,S===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=S.childLanes,b.lanes=S.lanes,b.child=S.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=S.memoizedProps,b.memoizedState=S.memoizedState,b.updateQueue=S.updateQueue,b.type=S.type,i=S.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return bt(Ot,Ot.current&1|2),s.child}i=i.sibling}b.tail!==null&&Bt()>na&&(s.flags|=128,h=!0,Bu(b,!1),s.lanes=4194304)}else{if(!h)if(i=td(S),i!==null){if(s.flags|=128,h=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),Bu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!S.alternate&&!kt)return An(s),null}else 2*Bt()-b.renderingStartTime>na&&l!==1073741824&&(s.flags|=128,h=!0,Bu(b,!1),s.lanes=4194304);b.isBackwards?(S.sibling=s.child,s.child=S):(l=b.last,l!==null?l.sibling=S:s.child=S,b.last=S)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=Bt(),s.sibling=null,l=Ot.current,bt(Ot,h?l&1|2:l&1),s):(An(s),null);case 22:case 23:return l0(),h=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(rr&1073741824)!==0&&(An(s),s.subtreeFlags&6&&(s.flags|=8192)):An(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function M7(i,s){switch(ym(s),s.tag){case 1:return jn(s.type)&&Vc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Js(),xt(zn),xt(xn),Om(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Pm(s),null;case 13:if(xt(Ot),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Gs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return xt(Ot),null;case 4:return Js(),null;case 10:return wm(s.type._context),null;case 22:case 23:return l0(),null;case 24:return null;default:return null}}var cd=!1,vn=!1,F7=typeof WeakSet=="function"?WeakSet:Set,ke=null;function ea(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){Lt(i,s,h)}else l.current=null}function Qm(i,s,l){try{l()}catch(h){Lt(i,s,h)}}var xw=!1;function B7(i,s){if(lm=Nc,i=tx(),tm(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(_e){l=null;break e}var S=0,R=-1,U=-1,Z=0,le=0,he=i,ae=null;t:for(;;){for(var ve;he!==l||E!==0&&he.nodeType!==3||(R=S+E),he!==b||h!==0&&he.nodeType!==3||(U=S+h),he.nodeType===3&&(S+=he.nodeValue.length),(ve=he.firstChild)!==null;)ae=he,he=ve;for(;;){if(he===i)break t;if(ae===l&&++Z===E&&(R=S),ae===b&&++le===h&&(U=S),(ve=he.nextSibling)!==null)break;he=ae,ae=he.parentNode}he=ve}l=R===-1||U===-1?null:{start:R,end:U}}else l=null}l=l||{start:0,end:0}}else l=null;for(cm={focusedElem:i,selectionRange:l},Nc=!1,ke=s;ke!==null;)if(s=ke,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,ke=i;else for(;ke!==null;){s=ke;try{var Pe=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Pe!==null){var Ie=Pe.memoizedProps,Ut=Pe.memoizedState,G=s.stateNode,j=G.getSnapshotBeforeUpdate(s.elementType===s.type?Ie:Ir(s.type,Ie),Ut);G.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var K=s.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(_e){Lt(s,s.return,_e)}if(i=s.sibling,i!==null){i.return=s.return,ke=i;break}ke=s.return}return Pe=xw,xw=!1,Pe}function Uu(i,s,l){var h=s.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&&Qm(s,l,b)}E=E.next}while(E!==h)}}function dd(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&i)===i){var h=l.create;l.destroy=h()}l=l.next}while(l!==s)}}function Jm(i){var s=i.ref;if(s!==null){var l=i.stateNode;i.tag,i=l,typeof s=="function"?s(i):s.current=i}}function ww(i){var s=i.alternate;s!==null&&(i.alternate=null,ww(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[ei],delete s[ku],delete s[pm],delete s[T7],delete s[_7])),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 Aw(i){return i.tag===5||i.tag===3||i.tag===4}function vw(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Aw(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 Zm(i,s,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(i,s):l.insertBefore(i,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(i,l)):(s=l,s.appendChild(i)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=jc));else if(h!==4&&(i=i.child,i!==null))for(Zm(i,s,l),i=i.sibling;i!==null;)Zm(i,s,l),i=i.sibling}function e0(i,s,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(e0(i,s,l),i=i.sibling;i!==null;)e0(i,s,l),i=i.sibling}var hn=null,Rr=!1;function Gi(i,s,l){for(l=l.child;l!==null;)Cw(i,s,l),l=l.sibling}function Cw(i,s,l){if(Zr&&typeof Zr.onCommitFiberUnmount=="function")try{Zr.onCommitFiberUnmount(wc,l)}catch(R){}switch(l.tag){case 5:vn||ea(l,s);case 6:var h=hn,E=Rr;hn=null,Gi(i,s,l),hn=h,Rr=E,hn!==null&&(Rr?(i=hn,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):hn.removeChild(l.stateNode));break;case 18:hn!==null&&(Rr?(i=hn,l=l.stateNode,i.nodeType===8?hm(i.parentNode,l):i.nodeType===1&&hm(i,l),Eu(i)):hm(hn,l.stateNode));break;case 4:h=hn,E=Rr,hn=l.stateNode.containerInfo,Rr=!0,Gi(i,s,l),hn=h,Rr=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,S=b.destroy;b=b.tag,S!==void 0&&((b&2)!==0||(b&4)!==0)&&Qm(l,s,S),E=E.next}while(E!==h)}Gi(i,s,l);break;case 1:if(!vn&&(ea(l,s),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(R){Lt(l,s,R)}Gi(i,s,l);break;case 21:Gi(i,s,l);break;case 22:l.mode&1?(vn=(h=vn)||l.memoizedState!==null,Gi(i,s,l),vn=h):Gi(i,s,l);break;default:Gi(i,s,l)}}function kw(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new F7),s.forEach(function(h){var E=W7.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function Lr(i,s){var l=s.deletions;if(l!==null)for(var h=0;h<l.length;h++){var E=l[h];try{var b=i,S=s,R=S;e:for(;R!==null;){switch(R.tag){case 5:hn=R.stateNode,Rr=!1;break e;case 3:hn=R.stateNode.containerInfo,Rr=!0;break e;case 4:hn=R.stateNode.containerInfo,Rr=!0;break e}R=R.return}if(hn===null)throw Error(n(160));Cw(b,S,E),hn=null,Rr=!1;var U=E.alternate;U!==null&&(U.return=null),E.return=null}catch(Z){Lt(E,s,Z)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Pw(s,i),s=s.sibling}function Pw(i,s){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Lr(s,i),ri(i),h&4){try{Uu(3,i,i.return),dd(3,i)}catch(Ie){Lt(i,i.return,Ie)}try{Uu(5,i,i.return)}catch(Ie){Lt(i,i.return,Ie)}}break;case 1:Lr(s,i),ri(i),h&512&&l!==null&&ea(l,l.return);break;case 5:if(Lr(s,i),ri(i),h&512&&l!==null&&ea(l,l.return),i.flags&32){var E=i.stateNode;try{Re(E,"")}catch(Ie){Lt(i,i.return,Ie)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,S=l!==null?l.memoizedProps:b,R=i.type,U=i.updateQueue;if(i.updateQueue=null,U!==null)try{R==="input"&&b.type==="radio"&&b.name!=null&&qe(E,b),Jr(R,S);var Z=Jr(R,b);for(S=0;S<U.length;S+=2){var le=U[S],he=U[S+1];le==="style"?dn(E,he):le==="dangerouslySetInnerHTML"?Ye(E,he):le==="children"?Re(E,he):v(E,le,he,Z)}switch(R){case"input":Nt(E,b);break;case"textarea":ot(E,b);break;case"select":var ae=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var ve=b.value;ve!=null?Ae(E,!!b.multiple,ve,!1):ae!==!!b.multiple&&(b.defaultValue!=null?Ae(E,!!b.multiple,b.defaultValue,!0):Ae(E,!!b.multiple,b.multiple?[]:"",!1))}E[ku]=b}catch(Ie){Lt(i,i.return,Ie)}}break;case 6:if(Lr(s,i),ri(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Ie){Lt(i,i.return,Ie)}}break;case 3:if(Lr(s,i),ri(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{Eu(s.containerInfo)}catch(Ie){Lt(i,i.return,Ie)}break;case 4:Lr(s,i),ri(i);break;case 13:Lr(s,i),ri(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(r0=Bt())),h&4&&kw(i);break;case 22:if(le=l!==null&&l.memoizedState!==null,i.mode&1?(vn=(Z=vn)||le,Lr(s,i),vn=Z):Lr(s,i),ri(i),h&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!le&&(i.mode&1)!==0)for(ke=i,le=i.child;le!==null;){for(he=ke=le;ke!==null;){switch(ae=ke,ve=ae.child,ae.tag){case 0:case 11:case 14:case 15:Uu(4,ae,ae.return);break;case 1:ea(ae,ae.return);var Pe=ae.stateNode;if(typeof Pe.componentWillUnmount=="function"){h=ae,l=ae.return;try{s=h,Pe.props=s.memoizedProps,Pe.state=s.memoizedState,Pe.componentWillUnmount()}catch(Ie){Lt(h,l,Ie)}}break;case 5:ea(ae,ae.return);break;case 22:if(ae.memoizedState!==null){Iw(he);continue}}ve!==null?(ve.return=ae,ke=ve):Iw(he)}le=le.sibling}e:for(le=null,he=i;;){if(he.tag===5){if(le===null){le=he;try{E=he.stateNode,Z?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(R=he.stateNode,U=he.memoizedProps.style,S=U!=null&&U.hasOwnProperty("display")?U.display:null,R.style.display=Vt("display",S))}catch(Ie){Lt(i,i.return,Ie)}}}else if(he.tag===6){if(le===null)try{he.stateNode.nodeValue=Z?"":he.memoizedProps}catch(Ie){Lt(i,i.return,Ie)}}else if((he.tag!==22&&he.tag!==23||he.memoizedState===null||he===i)&&he.child!==null){he.child.return=he,he=he.child;continue}if(he===i)break e;for(;he.sibling===null;){if(he.return===null||he.return===i)break e;le===he&&(le=null),he=he.return}le===he&&(le=null),he.sibling.return=he.return,he=he.sibling}}break;case 19:Lr(s,i),ri(i),h&4&&kw(i);break;case 21:break;default:Lr(s,i),ri(i)}}function ri(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(Aw(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=vw(i);e0(i,b,E);break;case 3:case 4:var S=h.stateNode.containerInfo,R=vw(i);Zm(i,R,S);break;default:throw Error(n(161))}}catch(U){Lt(i,i.return,U)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function U7(i,s,l){ke=i,Nw(i)}function Nw(i,s,l){for(var h=(i.mode&1)!==0;ke!==null;){var E=ke,b=E.child;if(E.tag===22&&h){var S=E.memoizedState!==null||cd;if(!S){var R=E.alternate,U=R!==null&&R.memoizedState!==null||vn;R=cd;var Z=vn;if(cd=S,(vn=U)&&!Z)for(ke=E;ke!==null;)S=ke,U=S.child,S.tag===22&&S.memoizedState!==null?Rw(E):U!==null?(U.return=S,ke=U):Rw(E);for(;b!==null;)ke=b,Nw(b),b=b.sibling;ke=E,cd=R,vn=Z}Ow(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,ke=b):Ow(i)}}function Ow(i){for(;ke!==null;){var s=ke;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:vn||dd(5,s);break;case 1:var h=s.stateNode;if(s.flags&4&&!vn)if(l===null)h.componentDidMount();else{var E=s.elementType===s.type?l.memoizedProps:Ir(s.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&Ix(s,b,h);break;case 3:var S=s.updateQueue;if(S!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}Ix(s,S,l)}break;case 5:var R=s.stateNode;if(l===null&&s.flags&4){l=R;var U=s.memoizedProps;switch(s.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(s.memoizedState===null){var Z=s.alternate;if(Z!==null){var le=Z.memoizedState;if(le!==null){var he=le.dehydrated;he!==null&&Eu(he)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}vn||s.flags&512&&Jm(s)}catch(ae){Lt(s,s.return,ae)}}if(s===i){ke=null;break}if(l=s.sibling,l!==null){l.return=s.return,ke=l;break}ke=s.return}}function Iw(i){for(;ke!==null;){var s=ke;if(s===i){ke=null;break}var l=s.sibling;if(l!==null){l.return=s.return,ke=l;break}ke=s.return}}function Rw(i){for(;ke!==null;){var s=ke;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{dd(4,s)}catch(U){Lt(s,l,U)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var E=s.return;try{h.componentDidMount()}catch(U){Lt(s,E,U)}}var b=s.return;try{Jm(s)}catch(U){Lt(s,b,U)}break;case 5:var S=s.return;try{Jm(s)}catch(U){Lt(s,S,U)}}}catch(U){Lt(s,s.return,U)}if(s===i){ke=null;break}var R=s.sibling;if(R!==null){R.return=s.return,ke=R;break}ke=s.return}}var H7=Math.ceil,fd=H.ReactCurrentDispatcher,t0=H.ReactCurrentOwner,Er=H.ReactCurrentBatchConfig,st=0,sn=null,qt=null,pn=0,rr=0,ta=$i(0),Kt=0,Hu=null,Lo=0,hd=0,n0=0,zu=null,Vn=null,r0=0,na=1/0,wi=null,pd=!1,i0=null,Xi=null,md=!1,Ki=null,gd=0,ju=0,o0=null,Ed=-1,yd=0;function In(){return(st&6)!==0?Bt():Ed!==-1?Ed:Ed=Bt()}function Qi(i){return(i.mode&1)===0?1:(st&2)!==0&&pn!==0?pn&-pn:x7.transition!==null?(yd===0&&(yd=vS()),yd):(i=dt,i!==0||(i=window.event,i=i===void 0?16:DS(i.type)),i)}function Dr(i,s,l,h){if(50<ju)throw ju=0,o0=null,Error(n(185));fu(i,l,h),((st&2)===0||i!==sn)&&(i===sn&&((st&2)===0&&(hd|=l),Kt===4&&Ji(i,pn)),qn(i,h),l===1&&st===0&&(s.mode&1)===0&&(na=Bt()+500,Yc&&qi()))}function qn(i,s){var l=i.callbackNode;xB(i,s);var h=Cc(i,i===sn?pn:0);if(h===0)l!==null&&xS(l),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(l!=null&&xS(l),s===1)i.tag===0?S7(Dw.bind(null,i)):Tx(Dw.bind(null,i)),y7(function(){(st&6)===0&&qi()}),l=null;else{switch(CS(h)){case 1:l=Bp;break;case 4:l=wS;break;case 16:l=xc;break;case 536870912:l=AS;break;default:l=xc}l=$w(l,Lw.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function Lw(i,s){if(Ed=-1,yd=0,(st&6)!==0)throw Error(n(327));var l=i.callbackNode;if(ra()&&i.callbackNode!==l)return null;var h=Cc(i,i===sn?pn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=bd(i,h);else{s=h;var E=st;st|=2;var b=Fw();(sn!==i||pn!==s)&&(wi=null,na=Bt()+500,Mo(i,s));do try{$7();break}catch(R){Mw(i,R)}while(!0);xm(),fd.current=b,st=E,qt!==null?s=0:(sn=null,pn=0,s=Kt)}if(s!==0){if(s===2&&(E=Up(i),E!==0&&(h=E,s=s0(i,E))),s===1)throw l=Hu,Mo(i,0),Ji(i,h),qn(i,Bt()),l;if(s===6)Ji(i,h);else{if(E=i.current.alternate,(h&30)===0&&!z7(E)&&(s=bd(i,h),s===2&&(b=Up(i),b!==0&&(h=b,s=s0(i,b))),s===1))throw l=Hu,Mo(i,0),Ji(i,h),qn(i,Bt()),l;switch(i.finishedWork=E,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:Fo(i,Vn,wi);break;case 3:if(Ji(i,h),(h&130023424)===h&&(s=r0+500-Bt(),10<s)){if(Cc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){In(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=fm(Fo.bind(null,i,Vn,wi),s);break}Fo(i,Vn,wi);break;case 4:if(Ji(i,h),(h&4194240)===h)break;for(s=i.eventTimes,E=-1;0<h;){var S=31-Pr(h);b=1<<S,S=s[S],S>E&&(E=S),h&=~b}if(h=E,h=Bt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*H7(h/1960))-h,10<h){i.timeoutHandle=fm(Fo.bind(null,i,Vn,wi),h);break}Fo(i,Vn,wi);break;case 5:Fo(i,Vn,wi);break;default:throw Error(n(329))}}}return qn(i,Bt()),i.callbackNode===l?Lw.bind(null,i):null}function s0(i,s){var l=zu;return i.current.memoizedState.isDehydrated&&(Mo(i,s).flags|=256),i=bd(i,s),i!==2&&(s=Vn,Vn=l,s!==null&&a0(s)),i}function a0(i){Vn===null?Vn=i:Vn.push.apply(Vn,i)}function z7(i){for(var s=i;;){if(s.flags&16384){var l=s.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(!Nr(b(),E))return!1}catch(S){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Ji(i,s){for(s&=~n0,s&=~hd,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-Pr(s),h=1<<l;i[l]=-1,s&=~h}}function Dw(i){if((st&6)!==0)throw Error(n(327));ra();var s=Cc(i,0);if((s&1)===0)return qn(i,Bt()),null;var l=bd(i,s);if(i.tag!==0&&l===2){var h=Up(i);h!==0&&(s=h,l=s0(i,h))}if(l===1)throw l=Hu,Mo(i,0),Ji(i,s),qn(i,Bt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Fo(i,Vn,wi),qn(i,Bt()),null}function u0(i,s){var l=st;st|=1;try{return i(s)}finally{st=l,st===0&&(na=Bt()+500,Yc&&qi())}}function Do(i){Ki!==null&&Ki.tag===0&&(st&6)===0&&ra();var s=st;st|=1;var l=Er.transition,h=dt;try{if(Er.transition=null,dt=1,i)return i()}finally{dt=h,Er.transition=l,st=s,(st&6)===0&&qi()}}function l0(){rr=ta.current,xt(ta)}function Mo(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,E7(l)),qt!==null)for(l=qt.return;l!==null;){var h=l;switch(ym(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Vc();break;case 3:Js(),xt(zn),xt(xn),Om();break;case 5:Pm(h);break;case 4:Js();break;case 13:xt(Ot);break;case 19:xt(Ot);break;case 10:wm(h.type._context);break;case 22:case 23:l0()}l=l.return}if(sn=i,qt=i=Zi(i.current,null),pn=rr=s,Kt=0,Hu=null,n0=hd=Lo=0,Vn=zu=null,Oo!==null){for(s=0;s<Oo.length;s++)if(l=Oo[s],h=l.interleaved,h!==null){l.interleaved=null;var E=h.next,b=l.pending;if(b!==null){var S=b.next;b.next=E,h.next=S}l.pending=h}Oo=null}return i}function Mw(i,s){do{var l=qt;try{if(xm(),nd.current=sd,rd){for(var h=It.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}rd=!1}if(Ro=0,on=Xt=It=null,Lu=!1,Du=0,t0.current=null,l===null||l.return===null){Kt=1,Hu=s,qt=null;break}e:{var b=i,S=l.return,R=l,U=s;if(s=pn,R.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var Z=U,le=R,he=le.tag;if((le.mode&1)===0&&(he===0||he===11||he===15)){var ae=le.alternate;ae?(le.updateQueue=ae.updateQueue,le.memoizedState=ae.memoizedState,le.lanes=ae.lanes):(le.updateQueue=null,le.memoizedState=null)}var ve=aw(S);if(ve!==null){ve.flags&=-257,uw(ve,S,R,b,s),ve.mode&1&&sw(b,Z,s),s=ve,U=Z;var Pe=s.updateQueue;if(Pe===null){var Ie=new Set;Ie.add(U),s.updateQueue=Ie}else Pe.add(U);break e}else{if((s&1)===0){sw(b,Z,s),c0();break e}U=Error(n(426))}}else if(kt&&R.mode&1){var Ut=aw(S);if(Ut!==null){(Ut.flags&65536)===0&&(Ut.flags|=256),uw(Ut,S,R,b,s),_m(Zs(U,R));break e}}b=U=Zs(U,R),Kt!==4&&(Kt=2),zu===null?zu=[b]:zu.push(b),b=S;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var G=iw(b,U,s);Ox(b,G);break e;case 1:R=U;var j=b.type,K=b.stateNode;if((b.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&(Xi===null||!Xi.has(K)))){b.flags|=65536,s&=-s,b.lanes|=s;var _e=ow(b,R,s);Ox(b,_e);break e}}b=b.return}while(b!==null)}Uw(l)}catch(Le){s=Le,qt===l&&l!==null&&(qt=l=l.return);continue}break}while(!0)}function Fw(){var i=fd.current;return fd.current=sd,i===null?sd:i}function c0(){(Kt===0||Kt===3||Kt===2)&&(Kt=4),sn===null||(Lo&268435455)===0&&(hd&268435455)===0||Ji(sn,pn)}function bd(i,s){var l=st;st|=2;var h=Fw();(sn!==i||pn!==s)&&(wi=null,Mo(i,s));do try{j7();break}catch(E){Mw(i,E)}while(!0);if(xm(),st=l,fd.current=h,qt!==null)throw Error(n(261));return sn=null,pn=0,Kt}function j7(){for(;qt!==null;)Bw(qt)}function $7(){for(;qt!==null&&!pB();)Bw(qt)}function Bw(i){var s=jw(i.alternate,i,rr);i.memoizedProps=i.pendingProps,s===null?Uw(i):qt=s,t0.current=null}function Uw(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=D7(l,s,rr),l!==null){qt=l;return}}else{if(l=M7(l,s),l!==null){l.flags&=32767,qt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Kt=6,qt=null;return}}if(s=s.sibling,s!==null){qt=s;return}qt=s=i}while(s!==null);Kt===0&&(Kt=5)}function Fo(i,s,l){var h=dt,E=Er.transition;try{Er.transition=null,dt=1,V7(i,s,l,h)}finally{Er.transition=E,dt=h}return null}function V7(i,s,l,h){do ra();while(Ki!==null);if((st&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(wB(i,b),i===sn&&(qt=sn=null,pn=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||md||(md=!0,$w(xc,function(){return ra(),null})),b=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||b){b=Er.transition,Er.transition=null;var S=dt;dt=1;var R=st;st|=4,t0.current=null,B7(i,l),Pw(l,i),c7(cm),Nc=!!lm,cm=lm=null,i.current=l,U7(l),mB(),st=R,dt=S,Er.transition=b}else i.current=l;if(md&&(md=!1,Ki=i,gd=E),b=i.pendingLanes,b===0&&(Xi=null),yB(l.stateNode),qn(i,Bt()),s!==null)for(h=i.onRecoverableError,l=0;l<s.length;l++)E=s[l],h(E.value,{componentStack:E.stack,digest:E.digest});if(pd)throw pd=!1,i=i0,i0=null,i;return(gd&1)!==0&&i.tag!==0&&ra(),b=i.pendingLanes,(b&1)!==0?i===o0?ju++:(ju=0,o0=i):ju=0,qi(),null}function ra(){if(Ki!==null){var i=CS(gd),s=Er.transition,l=dt;try{if(Er.transition=null,dt=16>i?16:i,Ki===null)var h=!1;else{if(i=Ki,Ki=null,gd=0,(st&6)!==0)throw Error(n(331));var E=st;for(st|=4,ke=i.current;ke!==null;){var b=ke,S=b.child;if((ke.flags&16)!==0){var R=b.deletions;if(R!==null){for(var U=0;U<R.length;U++){var Z=R[U];for(ke=Z;ke!==null;){var le=ke;switch(le.tag){case 0:case 11:case 15:Uu(8,le,b)}var he=le.child;if(he!==null)he.return=le,ke=he;else for(;ke!==null;){le=ke;var ae=le.sibling,ve=le.return;if(ww(le),le===Z){ke=null;break}if(ae!==null){ae.return=ve,ke=ae;break}ke=ve}}}var Pe=b.alternate;if(Pe!==null){var Ie=Pe.child;if(Ie!==null){Pe.child=null;do{var Ut=Ie.sibling;Ie.sibling=null,Ie=Ut}while(Ie!==null)}}ke=b}}if((b.subtreeFlags&2064)!==0&&S!==null)S.return=b,ke=S;else e:for(;ke!==null;){if(b=ke,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Uu(9,b,b.return)}var G=b.sibling;if(G!==null){G.return=b.return,ke=G;break e}ke=b.return}}var j=i.current;for(ke=j;ke!==null;){S=ke;var K=S.child;if((S.subtreeFlags&2064)!==0&&K!==null)K.return=S,ke=K;else e:for(S=j;ke!==null;){if(R=ke,(R.flags&2048)!==0)try{switch(R.tag){case 0:case 11:case 15:dd(9,R)}}catch(Le){Lt(R,R.return,Le)}if(R===S){ke=null;break e}var _e=R.sibling;if(_e!==null){_e.return=R.return,ke=_e;break e}ke=R.return}}if(st=E,qi(),Zr&&typeof Zr.onPostCommitFiberRoot=="function")try{Zr.onPostCommitFiberRoot(wc,i)}catch(Le){}h=!0}return h}finally{dt=l,Er.transition=s}}return!1}function Hw(i,s,l){s=Zs(l,s),s=iw(i,s,1),i=Wi(i,s,1),s=In(),i!==null&&(fu(i,1,s),qn(i,s))}function Lt(i,s,l){if(i.tag===3)Hw(i,i,l);else for(;s!==null;){if(s.tag===3){Hw(s,i,l);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Xi===null||!Xi.has(h))){i=Zs(l,i),i=ow(s,i,1),s=Wi(s,i,1),i=In(),s!==null&&(fu(s,1,i),qn(s,i));break}}s=s.return}}function q7(i,s,l){var h=i.pingCache;h!==null&&h.delete(s),s=In(),i.pingedLanes|=i.suspendedLanes&l,sn===i&&(pn&l)===l&&(Kt===4||Kt===3&&(pn&130023424)===pn&&500>Bt()-r0?Mo(i,0):n0|=l),qn(i,s)}function zw(i,s){s===0&&((i.mode&1)===0?s=1:(s=vc,vc<<=1,(vc&130023424)===0&&(vc=4194304)));var l=In();i=_i(i,s),i!==null&&(fu(i,s,l),qn(i,l))}function Y7(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),zw(i,l)}function W7(i,s){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(s),zw(i,l)}var jw;jw=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||zn.current)$n=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return $n=!1,L7(i,s,l);$n=(i.flags&131072)!==0}else $n=!1,kt&&(s.flags&1048576)!==0&&_x(s,Gc,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;ld(i,s),i=s.pendingProps;var E=qs(s,xn.current);Qs(s,l),E=Lm(null,s,h,i,E,l);var b=Dm();return s.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,jn(h)?(b=!0,qc(s)):b=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Cm(s),E.updater=ad,s.stateNode=E,E._reactInternals=s,zm(s,h,i,l),s=qm(null,s,h,!0,b,l)):(s.tag=0,kt&&b&&Em(s),On(null,s,E,l),s=s.child),s;case 16:h=s.elementType;e:{switch(ld(i,s),i=s.pendingProps,E=h._init,h=E(h._payload),s.type=h,E=s.tag=X7(h),i=Ir(h,i),E){case 0:s=Vm(null,s,h,i,l);break e;case 1:s=pw(null,s,h,i,l);break e;case 11:s=lw(null,s,h,i,l);break e;case 14:s=cw(null,s,h,Ir(h.type,i),l);break e}throw Error(n(306,h,""))}return s;case 0:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ir(h,E),Vm(i,s,h,E,l);case 1:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ir(h,E),pw(i,s,h,E,l);case 3:e:{if(mw(s),i===null)throw Error(n(387));h=s.pendingProps,b=s.memoizedState,E=b.element,Nx(i,s),ed(s,h,null,l);var S=s.memoizedState;if(h=S.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){E=Zs(Error(n(423)),s),s=gw(i,s,h,l,E);break e}else if(h!==E){E=Zs(Error(n(424)),s),s=gw(i,s,h,l,E);break e}else for(nr=ji(s.stateNode.containerInfo.firstChild),tr=s,kt=!0,Or=null,l=kx(s,null,h,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Gs(),h===E){s=xi(i,s,l);break e}On(i,s,h,l)}s=s.child}return s;case 5:return Rx(s),i===null&&Tm(s),h=s.type,E=s.pendingProps,b=i!==null?i.memoizedProps:null,S=E.children,dm(h,E)?S=null:b!==null&&dm(h,b)&&(s.flags|=32),hw(i,s),On(i,s,S,l),s.child;case 6:return i===null&&Tm(s),null;case 13:return Ew(i,s,l);case 4:return km(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=Xs(s,null,h,l):On(i,s,h,l),s.child;case 11:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ir(h,E),lw(i,s,h,E,l);case 7:return On(i,s,s.pendingProps,l),s.child;case 8:return On(i,s,s.pendingProps.children,l),s.child;case 12:return On(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(h=s.type._context,E=s.pendingProps,b=s.memoizedProps,S=E.value,bt(Qc,h._currentValue),h._currentValue=S,b!==null)if(Nr(b.value,S)){if(b.children===E.children&&!zn.current){s=xi(i,s,l);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var R=b.dependencies;if(R!==null){S=b.child;for(var U=R.firstContext;U!==null;){if(U.context===h){if(b.tag===1){U=Si(-1,l&-l),U.tag=2;var Z=b.updateQueue;if(Z!==null){Z=Z.shared;var le=Z.pending;le===null?U.next=U:(U.next=le.next,le.next=U),Z.pending=U}}b.lanes|=l,U=b.alternate,U!==null&&(U.lanes|=l),Am(b.return,l,s),R.lanes|=l;break}U=U.next}}else if(b.tag===10)S=b.type===s.type?null:b.child;else if(b.tag===18){if(S=b.return,S===null)throw Error(n(341));S.lanes|=l,R=S.alternate,R!==null&&(R.lanes|=l),Am(S,l,s),S=b.sibling}else S=b.child;if(S!==null)S.return=b;else for(S=b;S!==null;){if(S===s){S=null;break}if(b=S.sibling,b!==null){b.return=S.return,S=b;break}S=S.return}b=S}On(i,s,E.children,l),s=s.child}return s;case 9:return E=s.type,h=s.pendingProps.children,Qs(s,l),E=mr(E),h=h(E),s.flags|=1,On(i,s,h,l),s.child;case 14:return h=s.type,E=Ir(h,s.pendingProps),E=Ir(h.type,E),cw(i,s,h,E,l);case 15:return dw(i,s,s.type,s.pendingProps,l);case 17:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ir(h,E),ld(i,s),s.tag=1,jn(h)?(i=!0,qc(s)):i=!1,Qs(s,l),nw(s,h,E),zm(s,h,E,l),qm(null,s,h,!0,i,l);case 19:return bw(i,s,l);case 22:return fw(i,s,l)}throw Error(n(156,s.tag))};function $w(i,s){return SS(i,s)}function G7(i,s,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=s,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 yr(i,s,l,h){return new G7(i,s,l,h)}function d0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function X7(i){if(typeof i=="function")return d0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===ce)return 11;if(i===Ee)return 14}return 2}function Zi(i,s){var l=i.alternate;return l===null?(l=yr(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function Td(i,s,l,h,E,b){var S=2;if(h=i,typeof i=="function")d0(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case q:return Bo(l.children,E,b,s);case re:S=8,E|=8;break;case me:return i=yr(12,l,s,E|2),i.elementType=me,i.lanes=b,i;case de:return i=yr(13,l,s,E),i.elementType=de,i.lanes=b,i;case ne:return i=yr(19,l,s,E),i.elementType=ne,i.lanes=b,i;case oe:return _d(l,E,b,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case V:S=10;break e;case se:S=9;break e;case ce:S=11;break e;case Ee:S=14;break e;case Oe:S=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=yr(S,l,s,E),s.elementType=i,s.type=h,s.lanes=b,s}function Bo(i,s,l,h){return i=yr(7,i,h,s),i.lanes=l,i}function _d(i,s,l,h){return i=yr(22,i,h,s),i.elementType=oe,i.lanes=l,i.stateNode={isHidden:!1},i}function f0(i,s,l){return i=yr(6,i,null,s),i.lanes=l,i}function h0(i,s,l){return s=yr(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function K7(i,s,l,h,E){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hp(0),this.expirationTimes=Hp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function p0(i,s,l,h,E,b,S,R,U){return i=new K7(i,s,l,R,U),s===1?(s=1,b===!0&&(s|=8)):s=0,b=yr(3,null,null,s),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cm(b),i}function Q7(i,s,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:h==null?null:""+h,children:i,containerInfo:s,implementation:l}}function Vw(i){if(!i)return Vi;i=i._reactInternals;e:{if(vo(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(jn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(jn(l))return yx(i,l,s)}return s}function qw(i,s,l,h,E,b,S,R,U){return i=p0(l,h,!0,i,E,b,S,R,U),i.context=Vw(null),l=i.current,h=In(),E=Qi(l),b=Si(h,E),b.callback=s!=null?s:null,Wi(l,b,E),i.current.lanes=E,fu(i,E,h),qn(i,h),i}function Sd(i,s,l,h){var E=s.current,b=In(),S=Qi(E);return l=Vw(l),s.context===null?s.context=l:s.pendingContext=l,s=Si(b,S),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=Wi(E,s,S),i!==null&&(Dr(i,E,S,b),Zc(i,E,S)),S}function xd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function Yw(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function m0(i,s){Yw(i,s),(i=i.alternate)&&Yw(i,s)}function J7(){return null}var Ww=typeof reportError=="function"?reportError:function(i){console.error(i)};function g0(i){this._internalRoot=i}wd.prototype.render=g0.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Sd(i,s,null,null)},wd.prototype.unmount=g0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Do(function(){Sd(null,i,null,null)}),s[Ei]=null}};function wd(i){this._internalRoot=i}wd.prototype.unstable_scheduleHydration=function(i){if(i){var s=NS();i={blockedOn:null,target:i,priority:s};for(var l=0;l<Ui.length&&s!==0&&s<Ui[l].priority;l++);Ui.splice(l,0,i),l===0&&RS(i)}};function E0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Ad(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Gw(){}function Z7(i,s,l,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var Z=xd(S);b.call(Z)}}var S=qw(s,h,i,0,null,!1,!1,"",Gw);return i._reactRootContainer=S,i[Ei]=S.current,vu(i.nodeType===8?i.parentNode:i),Do(),S}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var R=h;h=function(){var Z=xd(U);R.call(Z)}}var U=p0(i,0,!1,null,null,!1,!1,"",Gw);return i._reactRootContainer=U,i[Ei]=U.current,vu(i.nodeType===8?i.parentNode:i),Do(function(){Sd(s,U,l,h)}),U}function vd(i,s,l,h,E){var b=l._reactRootContainer;if(b){var S=b;if(typeof E=="function"){var R=E;E=function(){var U=xd(S);R.call(U)}}Sd(s,S,i,E)}else S=Z7(l,s,i,E,h);return xd(S)}kS=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=du(s.pendingLanes);l!==0&&(zp(s,l|1),qn(s,Bt()),(st&6)===0&&(na=Bt()+500,qi()))}break;case 13:Do(function(){var h=_i(i,1);if(h!==null){var E=In();Dr(h,i,1,E)}}),m0(i,1)}},jp=function(i){if(i.tag===13){var s=_i(i,134217728);if(s!==null){var l=In();Dr(s,i,134217728,l)}m0(i,134217728)}},PS=function(i){if(i.tag===13){var s=Qi(i),l=_i(i,s);if(l!==null){var h=In();Dr(l,i,s,h)}m0(i,s)}},NS=function(){return dt},OS=function(i,s){var l=dt;try{return dt=i,s()}finally{dt=l}},Lp=function(i,s,l){switch(s){case"input":if(Nt(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var h=l[s];if(h!==i&&h.form===i.form){var E=$c(h);if(!E)throw Error(n(90));ln(h),Nt(h,E)}}}break;case"textarea":ot(i,l);break;case"select":s=l.value,s!=null&&Ae(i,!!l.multiple,s,!1)}},mS=u0,gS=Do;var eU={usingClientEntryPoint:!1,Events:[Pu,$s,$c,hS,pS,u0]},$u={findFiberByHostInstance:Co,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},tU={bundleType:$u.bundleType,version:$u.version,rendererPackageName:$u.rendererPackageName,rendererConfig:$u.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=TS(i),i===null?null:i.stateNode},findFiberByHostInstance:$u.findFiberByHostInstance||J7,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 Cd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Cd.isDisabled&&Cd.supportsFiber)try{wc=Cd.inject(tU),Zr=Cd}catch(i){}}return Dn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eU,Dn.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!E0(s))throw Error(n(200));return Q7(i,s,null,l)},Dn.createRoot=function(i,s){if(!E0(i))throw Error(n(299));var l=!1,h="",E=Ww;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=p0(i,1,!1,null,null,l,!1,h,E),i[Ei]=s.current,vu(i.nodeType===8?i.parentNode:i),new g0(s)},Dn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=TS(s),i=i===null?null:i.stateNode,i},Dn.flushSync=function(i){return Do(i)},Dn.hydrate=function(i,s,l){if(!Ad(s))throw Error(n(200));return vd(null,i,s,!0,l)},Dn.hydrateRoot=function(i,s,l){if(!E0(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,b="",S=Ww;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(b=l.identifierPrefix),l.onRecoverableError!==void 0&&(S=l.onRecoverableError)),s=qw(s,null,i,1,l!=null?l:null,E,!1,b,S),i[Ei]=s.current,vu(i),h)for(i=0;i<h.length;i++)l=h[i],E=l._getVersion,E=E(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,E]:s.mutableSourceEagerHydrationData.push(l,E);return new wd(s)},Dn.render=function(i,s,l){if(!Ad(s))throw Error(n(200));return vd(null,i,s,!1,l)},Dn.unmountComponentAtNode=function(i){if(!Ad(i))throw Error(n(40));return i._reactRootContainer?(Do(function(){vd(null,null,i,!1,function(){i._reactRootContainer=null,i[Ei]=null})}),!0):!1},Dn.unstable_batchedUpdates=u0,Dn.unstable_renderSubtreeIntoContainer=function(i,s,l,h){if(!Ad(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return vd(i,s,l,!1,h)},Dn.version="18.3.1-next-f1338f8080-20240426",Dn}var N1;function O1(){if(N1)return Nf.exports;N1=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(),Nf.exports=Bk(),Nf.exports}var Jo=O1();function I1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=I1(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="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=I1(e))&&(r&&(r+=" "),r+=t);return r}var R1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},L1=to.createContext&&to.createContext(R1),Uk=["attr","size","title"];function Hk(e,t){if(e==null)return{};var n=zk(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zk(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 bl(){return bl=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},bl.apply(this,arguments)}function D1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Tl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?D1(Object(n),!0).forEach(function(r){jk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jk(e,t,n){return t=$k(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $k(e){var t=Vk(e,"string");return typeof t=="symbol"?t:t+""}function Vk(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 M1(e){return e&&e.map((t,n)=>to.createElement(t.tag,Tl({key:n},t.attr),M1(t.child)))}function At(e){return t=>to.createElement(qk,bl({attr:Tl({},e.attr)},t),M1(e.child))}function qk(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=Hk(e,Uk),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),to.createElement("svg",bl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Tl(Tl({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&to.createElement("title",null,a),e.children)};return L1!==void 0?to.createElement(L1.Consumer,null,n=>t(n)):t(R1)}function Yk(e){return At({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 ci=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:x.jsx("button",{className:W(e,`${z}-icon-button`),type:r,"aria-label":o,title:a,onClick:c,disabled:u,children:t?x.jsx("img",{className:W(`${z}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),Wk="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",Gk=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=rt(),o=r==="messaging",a=o?"Open Commerce Client":"Open Copilot",u=o?x.jsx(Yk,{className:W(t,`${z}-minimized-icon`)}):x.jsx("img",{src:(n==null?void 0:n.logoUrl)||Wk,alt:"Copilot",className:W(t,`${z}-minimized-icon-img`)});return x.jsx(ci,{className:W(t,`${z}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},Xk=()=>{const{globalClassName:e,themeVariables:t}=rt(),n=()=>{gl(!1),ui(!0)};return Jo.createPortal(x.jsx("div",{className:W(e,`${z}-minimized-container`),style:t,children:x.jsx(Gk,{onClick:n})}),document.body)};function F1(e){return At({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 B1(e){return At({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 Zo(e){return At({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function Kk(e){return At({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 U1(e){return At({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 Qk(e){return At({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 Jk(e){return At({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 Zk(e){return At({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 eP(e){return At({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 tP(e){return At({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 nP=e=>({[`${Wn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Wn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${Wn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${Wn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${Wn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${Wn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"}),H1=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>x.jsx("button",{"aria-label":t,title:t,className:W(e,`${z}-close-button`),disabled:r,onClick:n,children:x.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:x.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),_l=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>x.jsx("button",{className:W(`${z}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),rP=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?x.jsx("img",{className:W(`${z}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):x.jsx(Zo,{size:"16px"})},iP=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return x.jsx(ci,{className:W(e,n,`cim-${r}-component`,`${z}-search-button-icon`),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:x.jsx(Zo,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return x.jsxs(_l,{className:W(e,n,`cim-${r}-component`,`${z}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&x.jsx(rP,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function oP(e){return At({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 sP=()=>{const{messages:e}=ar(),{handleCancel:t}=Ur();return{cancelRequest:B.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],o=r.eventSourceId||r.id;t(o)},[t,e])}},aP=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=rt(),{cancelRequest:r}=sP();return n!=null&&n.enableCancelSearch?x.jsx(ci,{className:W(t,`${z}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:x.jsx(oP,{}),disabled:!e,onClick:r}):null};function DU(){}function MU(){}function z1(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(o,r).trim();(u||!a)&&t.push(u),o=r+1,r=n.indexOf(",",o)}return t}function j1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const uP=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lP=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cP={};function $1(e,t){return(cP.jsx?lP:uP).test(e)}const dP=/[ \t\n\f\r]/g;function fP(e){return typeof e=="object"?e.type==="text"?V1(e.value):!1:V1(e)}function V1(e){return e.replace(dP,"")===""}let wa=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};wa.prototype.normal={},wa.prototype.property={},wa.prototype.space=void 0;function q1(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new wa(n,r,t)}function Aa(e){return e.toLowerCase()}let Mn=class{constructor(t,n){this.attribute=n,this.property=t}};Mn.prototype.attribute="",Mn.prototype.booleanish=!1,Mn.prototype.boolean=!1,Mn.prototype.commaOrSpaceSeparated=!1,Mn.prototype.commaSeparated=!1,Mn.prototype.defined=!1,Mn.prototype.mustUseProperty=!1,Mn.prototype.number=!1,Mn.prototype.overloadedBoolean=!1,Mn.prototype.property="",Mn.prototype.spaceSeparated=!1,Mn.prototype.space=void 0;let hP=0;const Ke=lo(),jt=lo(),Rf=lo(),ye=lo(),Et=lo(),es=lo(),Gn=lo();function lo(){return oa(2,++hP)}const Lf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ke,booleanish:jt,commaOrSpaceSeparated:Gn,commaSeparated:es,number:ye,overloadedBoolean:Rf,spaceSeparated:Et},Symbol.toStringTag,{value:"Module"})),Df=Object.keys(Lf);let Mf=class extends Mn{constructor(t,n,r,o){let a=-1;if(super(t,n),Y1(this,"space",o),typeof r=="number")for(;++a<Df.length;){const u=Df[a];Y1(this,Df[a],(r&Lf[u])===Lf[u])}}};Mf.prototype.defined=!0;function Y1(e,t,n){n&&(e[t]=n)}function ts(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Mf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Aa(r)]=r,n[Aa(a.attribute)]=r}return new wa(t,n,e.space)}const W1=ts({properties:{ariaActiveDescendant:null,ariaAtomic:jt,ariaAutoComplete:null,ariaBusy:jt,ariaChecked:jt,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:Et,ariaCurrent:null,ariaDescribedBy:Et,ariaDetails:null,ariaDisabled:jt,ariaDropEffect:Et,ariaErrorMessage:null,ariaExpanded:jt,ariaFlowTo:Et,ariaGrabbed:jt,ariaHasPopup:null,ariaHidden:jt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Et,ariaLevel:ye,ariaLive:null,ariaModal:jt,ariaMultiLine:jt,ariaMultiSelectable:jt,ariaOrientation:null,ariaOwns:Et,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:jt,ariaReadOnly:jt,ariaRelevant:null,ariaRequired:jt,ariaRoleDescription:Et,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:jt,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function G1(e,t){return t in e?e[t]:t}function X1(e,t){return G1(e,t.toLowerCase())}const pP=ts({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:es,acceptCharset:Et,accessKey:Et,action:null,allow:null,allowFullScreen:Ke,allowPaymentRequest:Ke,allowUserMedia:Ke,alt:null,as:null,async:Ke,autoCapitalize:null,autoComplete:Et,autoFocus:Ke,autoPlay:Ke,blocking:Et,capture:null,charSet:null,checked:Ke,cite:null,className:Et,cols:ye,colSpan:null,content:null,contentEditable:jt,controls:Ke,controlsList:Et,coords:ye|es,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ke,defer:Ke,dir:null,dirName:null,disabled:Ke,download:Rf,draggable:jt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ke,formTarget:null,headers:Et,height:ye,hidden:Rf,high:ye,href:null,hrefLang:null,htmlFor:Et,httpEquiv:Et,id:null,imageSizes:null,imageSrcSet:null,inert:Ke,inputMode:null,integrity:null,is:null,isMap:Ke,itemId:null,itemProp:Et,itemRef:Et,itemScope:Ke,itemType:Et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ke,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:Ke,muted:Ke,name:null,nonce:null,noModule:Ke,noValidate:Ke,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:Ke,optimum:ye,pattern:null,ping:Et,placeholder:null,playsInline:Ke,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ke,referrerPolicy:null,rel:Et,required:Ke,reversed:Ke,rows:ye,rowSpan:ye,sandbox:Et,scope:null,scoped:Ke,seamless:Ke,selected:Ke,shadowRootClonable:Ke,shadowRootDelegatesFocus:Ke,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:jt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:Ke,useMap:null,value:jt,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Et,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ke,declare:Ke,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:Ke,noHref:Ke,noShade:Ke,noWrap:Ke,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:jt,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ke,disableRemotePlayback:Ke,prefix:null,property:null,results:ye,security:null,unselectable:null},space:"html",transform:X1}),mP=ts({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Gn,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:Et,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:Ke,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,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:es,g2:es,glyphName:es,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:Gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ye,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:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Gn,rev:Gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Gn,requiredFeatures:Gn,requiredFonts:Gn,requiredFormats:Gn,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:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:Gn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Gn,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Gn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:G1}),K1=ts({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Q1=ts({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:X1}),J1=ts({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),gP={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"},EP=/[A-Z]/g,Z1=/-[a-z]/g,yP=/^data[-\w.:]+$/i;function Ff(e,t){const n=Aa(t);let r=t,o=Mn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&yP.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Z1,TP);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Z1.test(a)){let u=a.replace(EP,bP);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Mf}return new o(r,t)}function bP(e){return"-"+e.toLowerCase()}function TP(e){return e.charAt(1).toUpperCase()}const Sl=q1([W1,pP,K1,Q1,J1],"html"),ns=q1([W1,mP,K1,Q1,J1],"svg");function eE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function tE(e){return e.join(" ").trim()}var rs={},Bf,nE;function _P(){if(nE)return Bf;nE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
18
|
-
`,f="/",p="*",m="",T="comment",y="declaration";Bf=function(w,C){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];C=C||{};var A=1,P=1;function v(de){var ne=de.match(t);ne&&(A+=ne.length);var Ee=de.lastIndexOf(d);P=~Ee?de.length-Ee:P+de.length}function H(){var de={line:A,column:P};return function(ne){return ne.position=new Y(de),re(),ne}}function Y(de){this.start=de,this.end={line:A,column:P},this.source=C.source}Y.prototype.content=w;function D(de){var ne=new Error(C.source+":"+A+":"+P+": "+de);if(ne.reason=de,ne.filename=C.source,ne.line=A,ne.column=P,ne.source=w,!C.silent)throw ne}function q(de){var ne=de.exec(w);if(ne){var Ee=ne[0];return v(Ee),w=w.slice(Ee.length),ne}}function re(){q(n)}function me(de){var ne;for(de=de||[];ne=V();)ne!==!1&&de.push(ne);return de}function V(){var de=H();if(!(f!=w.charAt(0)||p!=w.charAt(1))){for(var ne=2;m!=w.charAt(ne)&&(p!=w.charAt(ne)||f!=w.charAt(ne+1));)++ne;if(ne+=2,m===w.charAt(ne-1))return D("End of comment missing");var Ee=w.slice(2,ne-2);return P+=2,v(Ee),w=w.slice(ne),P+=2,de({type:T,comment:Ee})}}function se(){var de=H(),ne=q(r);if(ne){if(V(),!q(o))return D("property missing ':'");var Ee=q(a),Oe=de({type:y,property:_(ne[0].replace(e,m)),value:Ee?_(Ee[0].replace(e,m)):m});return q(u),Oe}}function ce(){var de=[];me(de);for(var ne;ne=se();)ne!==!1&&(de.push(ne),me(de));return de}return re(),ce()};function _(w){return w?w.replace(c,m):m}return Bf}var rE;function SP(){if(rE)return rs;rE=1;var e=rs&&rs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=n;var t=e(_P());function n(r,o){var a=null;if(!r||typeof r!="string")return a;var u=(0,t.default)(r),c=typeof o=="function";return u.forEach(function(d){if(d.type==="declaration"){var f=d.property,p=d.value;c?o(f,p,d):p&&(a=a||{},a[f]=p)}}),a}return rs}var va={},iE;function xP(){if(iE)return va;iE=1,Object.defineProperty(va,"__esModule",{value:!0}),va.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(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(o,c):f=f.replace(r,c),f.replace(t,u))};return va.camelCase=d,va}var Ca,oE;function wP(){if(oE)return Ca;oE=1;var e=Ca&&Ca.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(SP()),n=xP();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,Ca=r,Ca}var AP=wP();const vP=Ze(AP),xl=sE("end"),Hr=sE("start");function sE(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 aE(e){const t=Hr(e),n=xl(e);if(t&&n)return{start:t,end:n}}function ka(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?uE(e.position):"start"in e||"end"in e?uE(e):"line"in e||"column"in e?Uf(e):""}function Uf(e){return lE(e&&e.line)+":"+lE(e&&e.column)}function uE(e){return Uf(e&&e.start)+"-"+Uf(e&&e.end)}function lE(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 o="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=F({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=ka(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}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 Hf={}.hasOwnProperty,CP=new Map,kP=/[A-Z]/g,PP=new Set(["table","tbody","thead","tfoot","tr"]),NP=new Set(["td","th"]),cE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function OP(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=UP(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=BP(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ns:Sl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=dE(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function dE(e,t,n){if(t.type==="element")return IP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return RP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return DP(e,t,n);if(t.type==="mdxjsEsm")return LP(e,t);if(t.type==="root")return MP(e,t,n);if(t.type==="text")return FP(e,t)}function IP(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=ns,e.schema=o),e.ancestors.push(t);const a=hE(e,t.tagName,!1),u=HP(e,t);let c=jf(e,t);return PP.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!fP(d):!0})),fE(e,u,a,t),zf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function RP(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)}Pa(e,t.position)}function LP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Pa(e,t.position)}function DP(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=ns,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:hE(e,t.name,!0),u=zP(e,t),c=jf(e,t);return fE(e,u,a,t),zf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function MP(e,t,n){const r={};return zf(r,jf(e,t)),e.create(t,e.Fragment,r,n)}function FP(e,t){return t.value}function fE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function zf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function BP(e,t,n){return r;function r(o,a,u,c){const f=Array.isArray(u.children)?n:t;return c?f(a,u,c):f(a,u)}}function UP(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=Hr(r);return t(o,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function HP(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Hf.call(t.properties,o)){const a=jP(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&NP.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 zP(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 Pa(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Pa(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function jf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:CP;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=o.get(d)||0;u=d+"-"+f,o.set(d,f+1)}}const c=dE(e,a,u);c!==void 0&&n.push(c)}return n}function jP(e,t,n){const r=Ff(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?j1(n):tE(n)),r.property==="style"){let o=typeof n=="object"?n:$P(e,String(n));return e.stylePropertyNameCase==="css"&&(o=VP(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?gP[r.property]||r.property:r.attribute,n]}}function $P(e,t){try{return vP(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new bn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=cE+"#cannot-parse-style-attribute",o}}function hE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const c=$1(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=$1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Hf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Pa(e)}function Pa(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=cE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function VP(e){const t={};let n;for(n in e)Hf.call(e,n)&&(t[qP(n)]=e[n]);return t}function qP(e){let t=e.replace(kP,YP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function YP(e){return"-"+e.toLowerCase()}const $f={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"]},WP={};function Vf(e,t){const n=WP,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return pE(e,r,o)}function pE(e,t,n){if(GP(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 mE(e.children,t,n)}return Array.isArray(e)?mE(e,t,n):""}function mE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=pE(e[o],t,n);return r.join("")}function GP(e){return!!(e&&typeof e=="object")}const gE=document.createElement("i");function qf(e){const t="&"+e+";";gE.innerHTML=t;const n=gE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Xn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function ur(e,t){return e.length>0?(Xn(e,e.length,0,t),e):t}const EE={}.hasOwnProperty;function yE(e){const t={};let n=-1;for(;++n<e.length;)XP(t,e[n]);return t}function XP(e,t){let n;for(n in t){const o=(EE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){EE.call(o,u)||(o[u]=[]);const c=a[u];KP(o[u],Array.isArray(c)?c:c?[c]:[])}}}function KP(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Xn(e,0,0,r)}function bE(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 xr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kn=ki(/[A-Za-z]/),Tn=ki(/[\dA-Za-z]/),QP=ki(/[#-'*+\--9=?A-Z^-~]/);function wl(e){return e!==null&&(e<32||e===127)}const Yf=ki(/\d/),JP=ki(/[\dA-Fa-f]/),ZP=ki(/[!-/:-@[-`{-~]/);function He(e){return e!==null&&e<-2}function ht(e){return e!==null&&(e<0||e===32)}function tt(e){return e===-2||e===-1||e===32}const Al=ki(new RegExp("\\p{P}|\\p{S}","u")),co=ki(/\s/);function ki(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function is(e){const t=[];let n=-1,r=0,o=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)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function it(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return tt(d)?(e.enter(n),c(d)):t(d)}function c(d){return tt(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const eN={tokenize:tN};function tN(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),it(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return He(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const nN={tokenize:rN},TE={tokenize:iN};function rN(e){const t=this,n=[];let r=0,o,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,o&&P();const H=t.events.length;let Y=H,D;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){D=t.events[Y][1].end;break}A(r);let q=H;for(;q<t.events.length;)t.events[q][1].end=F({},D),q++;return Xn(t.events,Y+1,0,t.events.slice(H)),t.events.length=q,f(v)}return c(v)}function f(v){if(r===n.length){if(!o)return T(v);if(o.currentConstruct&&o.currentConstruct.concrete)return _(v);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(TE,p,m)(v)}function p(v){return o&&P(),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(TE,y,_)(v)}function y(v){return r++,n.push([t.currentConstruct,t.containerState]),T(v)}function _(v){if(v===null){o&&P(),A(0),e.consume(v);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),w(v)}function w(v){if(v===null){C(e.exit("chunkFlow"),!0),A(0),e.consume(v);return}return He(v)?(e.consume(v),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(v),w)}function C(v,H){const Y=t.sliceStream(v);if(H&&Y.push(null),v.previous=a,a&&(a.next=v),a=v,o.defineSkip(v.start),o.write(Y),t.parser.lazy[v.start.line]){let D=o.events.length;for(;D--;)if(o.events[D][1].start.offset<u&&(!o.events[D][1].end||o.events[D][1].end.offset>u))return;const q=t.events.length;let re=q,me,V;for(;re--;)if(t.events[re][0]==="exit"&&t.events[re][1].type==="chunkFlow"){if(me){V=t.events[re][1].end;break}me=!0}for(A(r),D=q;D<t.events.length;)t.events[D][1].end=F({},V),D++;Xn(t.events,re+1,0,t.events.slice(q)),t.events.length=D}}function A(v){let H=n.length;for(;H-- >v;){const Y=n[H];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=v}function P(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function iN(e,t,n){return it(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function os(e){if(e===null||ht(e)||co(e))return 1;if(Al(e))return 2}function vl(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Wf={name:"attention",resolveAll:oN,tokenize:sN};function oN(e,t){let n=-1,r,o,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=F({},e[r][1].end),T=F({},e[n][1].start);_E(m,-d),_E(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:F({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:F({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:F({},e[r][1].end),end:F({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:F({},u.start),end:F({},c.end)},e[r][1].end=F({},u.start),e[n][1].start=F({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=ur(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=ur(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=ur(f,vl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=ur(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=ur(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Xn(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 sN(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=os(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=os(d),m=!p||p===2&&o||n.includes(d),T=!o||o===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(o||!T)),f._close=!!(a===42?T:T&&(p||!m)),t(d)}}function _E(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const aN={name:"autolink",tokenize:uN};function uN(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return 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||wl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):QP(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 Na={partial:!0,tokenize:lN};function lN(e,t,n){return r;function r(a){return tt(a)?it(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||He(a)?t(a):n(a)}}const SE={continuation:{tokenize:dN},exit:fN,name:"blockQuote",tokenize:cN};function cN(e,t,n){const r=this;return o;function o(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return tt(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function dN(e,t,n){const r=this;return o;function o(u){return tt(u)?it(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(SE,t,n)(u)}}function fN(e){e.exit("blockQuote")}const xE={name:"characterEscape",tokenize:hN};function hN(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return ZP(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const wE={name:"characterReference",tokenize:pN};function pN(e,t,n){const r=this;let o=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=JP,p):(e.enter("characterReferenceValue"),a=7,u=Yf,p(m))}function p(m){if(m===59&&o){const T=e.exit("characterReferenceValue");return u===Tn&&!qf(r.sliceSerialize(T))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&o++<a?(e.consume(m),p):n(m)}}const AE={partial:!0,tokenize:gN},vE={concrete:!0,name:"codeFenced",tokenize:mN};function mN(e,t,n){const r=this,o={partial:!0,tokenize:Y};let a=0,u=0,c;return d;function d(D){return f(D)}function f(D){const q=r.events[r.events.length-1];return a=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,c=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(D)}function p(D){return D===c?(u++,e.consume(D),p):u<3?n(D):(e.exit("codeFencedFenceSequence"),tt(D)?it(e,m,"whitespace")(D):m(D))}function m(D){return D===null||He(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(AE,w,H)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(D))}function T(D){return D===null||He(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(D)):tt(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),it(e,y,"whitespace")(D)):D===96&&D===c?n(D):(e.consume(D),T)}function y(D){return D===null||He(D)?m(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(D))}function _(D){return D===null||He(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(D)):D===96&&D===c?n(D):(e.consume(D),_)}function w(D){return e.attempt(o,H,C)(D)}function C(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),A}function A(D){return a>0&&tt(D)?it(e,P,"linePrefix",a+1)(D):P(D)}function P(D){return D===null||He(D)?e.check(AE,w,H)(D):(e.enter("codeFlowValue"),v(D))}function v(D){return D===null||He(D)?(e.exit("codeFlowValue"),P(D)):(e.consume(D),v)}function H(D){return e.exit("codeFenced"),t(D)}function Y(D,q,re){let me=0;return V;function V(Ee){return D.enter("lineEnding"),D.consume(Ee),D.exit("lineEnding"),se}function se(Ee){return D.enter("codeFencedFence"),tt(Ee)?it(D,ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Ee):ce(Ee)}function ce(Ee){return Ee===c?(D.enter("codeFencedFenceSequence"),de(Ee)):re(Ee)}function de(Ee){return Ee===c?(me++,D.consume(Ee),de):me>=u?(D.exit("codeFencedFenceSequence"),tt(Ee)?it(D,ne,"whitespace")(Ee):ne(Ee)):re(Ee)}function ne(Ee){return Ee===null||He(Ee)?(D.exit("codeFencedFence"),q(Ee)):re(Ee)}}}function gN(e,t,n){const r=this;return o;function o(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Gf={name:"codeIndented",tokenize:yN},EN={partial:!0,tokenize:bN};function yN(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),it(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):He(f)?e.attempt(EN,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||He(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function bN(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):He(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):it(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):He(u)?o(u):n(u)}}const TN={name:"codeText",previous:SN,resolve:_N,tokenize:xN};function _N(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function SN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function xN(e,t,n){let r=0,o,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"),o=0,p(m)):He(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||He(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class wN{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Oa(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),Oa(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Oa(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);Oa(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Oa(this.left,n.reverse())}}}function Oa(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 CE(e){const t={};let n=-1,r,o,a,u,c,d,f;const p=new wN(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,AN(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=F({},p.get(o)[1].start),c=p.slice(o,n),c.unshift(r),p.splice(o,n-o+1,c))}}return Xn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function AN(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],f={};let p,m,T=-1,y=n,_=0,w=0;const C=[w];for(;y;){for(;e.get(++o)[1]!==y;);a.push(o),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]),P=a.pop();d.push([P,P+A.length-1]),e.splice(P,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 vN={resolve:kN,tokenize:PN},CN={partial:!0,tokenize:NN};function kN(e){return CE(e),e}function PN(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):He(c)?e.check(CN,u,a)(c):(e.consume(c),o)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function NN(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),it(e,a,"linePrefix")}function a(u){if(u===null||He(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 kE(e,t,n,r,o,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(o),e.enter(a),e.consume(A),e.exit(a),T):A===null||A===32||A===41||wl(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(o),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||He(A)?n(A):(e.consume(A),A===92?_:y)}function _(A){return A===60||A===62||A===92?(e.consume(A),y):y(A)}function w(A){return!p&&(A===null||A===41||ht(A))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(A)):p<f&&A===40?(e.consume(A),p++,w):A===41?(e.consume(A),p--,w):A===null||A===32||A===40||wl(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 PE(e,t,n,r,o,a){const u=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(o),e.consume(y),e.exit(o),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):He(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||He(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!tt(y)),y===92?T:m)}function T(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function NE(e,t,n,r,o,a){let u;return c;function c(T){return T===34||T===39||T===40?(e.enter(r),e.enter(o),e.consume(T),e.exit(o),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):(e.enter(a),f(T))}function f(T){return T===u?(e.exit(a),d(u)):T===null?n(T):He(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),it(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||He(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 Ia(e,t){let n;return r;function r(o){return He(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):tt(o)?it(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const ON={name:"definition",tokenize:RN},IN={partial:!0,tokenize:LN};function RN(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return PE.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return o=xr(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)?Ia(e,f)(y):f(y)}function f(y){return kE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(IN,m,m)(y)}function m(y){return tt(y)?it(e,T,"whitespace")(y):T(y)}function T(y){return y===null||He(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function LN(e,t,n){return r;function r(c){return ht(c)?Ia(e,o)(c):n(c)}function o(c){return NE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return tt(c)?it(e,u,"whitespace")(c):u(c)}function u(c){return c===null||He(c)?t(c):n(c)}}const DN={name:"hardBreakEscape",tokenize:MN};function MN(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return He(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const FN={name:"headingAtx",resolve:BN,tokenize:UN};function BN(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Xn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function UN(e,t,n){let r=0;return o;function o(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||ht(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||He(p)?(e.exit("atxHeading"),t(p)):tt(p)?it(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 HN=["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"],OE=["pre","script","style","textarea"],zN={concrete:!0,name:"htmlFlow",resolveTo:VN,tokenize:qN},jN={partial:!0,tokenize:WN},$N={partial:!0,tokenize:YN};function VN(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 qN(e,t,n){const r=this;let o,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),o=3,r.interrupt?t:k):kn(O)?(e.consume(O),u=String.fromCharCode(O),C):n(O)}function T(O){return O===45?(e.consume(O),o=2,y):O===91?(e.consume(O),o=5,c=0,_):kn(O)?(e.consume(O),o=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 we="CDATA[";return O===we.charCodeAt(c++)?(e.consume(O),c===we.length?r.interrupt?t:ce:_):n(O)}function w(O){return kn(O)?(e.consume(O),u=String.fromCharCode(O),C):n(O)}function C(O){if(O===null||O===47||O===62||ht(O)){const we=O===47,Ue=u.toLowerCase();return!we&&!a&&OE.includes(Ue)?(o=1,r.interrupt?t(O):ce(O)):HN.includes(u.toLowerCase())?(o=6,we?(e.consume(O),A):r.interrupt?t(O):ce(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?P(O):v(O))}return O===45||Tn(O)?(e.consume(O),u+=String.fromCharCode(O),C):n(O)}function A(O){return O===62?(e.consume(O),r.interrupt?t:ce):n(O)}function P(O){return tt(O)?(e.consume(O),P):V(O)}function v(O){return O===47?(e.consume(O),V):O===58||O===95||kn(O)?(e.consume(O),H):tt(O)?(e.consume(O),v):V(O)}function H(O){return O===45||O===46||O===58||O===95||Tn(O)?(e.consume(O),H):Y(O)}function Y(O){return O===61?(e.consume(O),D):tt(O)?(e.consume(O),Y):v(O)}function D(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,q):tt(O)?(e.consume(O),D):re(O)}function q(O){return O===d?(e.consume(O),d=null,me):O===null||He(O)?n(O):(e.consume(O),q)}function re(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||ht(O)?Y(O):(e.consume(O),re)}function me(O){return O===47||O===62||tt(O)?v(O):n(O)}function V(O){return O===62?(e.consume(O),se):n(O)}function se(O){return O===null||He(O)?ce(O):tt(O)?(e.consume(O),se):n(O)}function ce(O){return O===45&&o===2?(e.consume(O),Oe):O===60&&o===1?(e.consume(O),oe):O===62&&o===4?(e.consume(O),L):O===63&&o===3?(e.consume(O),k):O===93&&o===5?(e.consume(O),ie):He(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(jN,ee,de)(O)):O===null||He(O)?(e.exit("htmlFlowData"),de(O)):(e.consume(O),ce)}function de(O){return e.check($N,ne,ee)(O)}function ne(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),Ee}function Ee(O){return O===null||He(O)?de(O):(e.enter("htmlFlowData"),ce(O))}function Oe(O){return O===45?(e.consume(O),k):ce(O)}function oe(O){return O===47?(e.consume(O),u="",Q):ce(O)}function Q(O){if(O===62){const we=u.toLowerCase();return OE.includes(we)?(e.consume(O),L):ce(O)}return kn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),Q):ce(O)}function ie(O){return O===93?(e.consume(O),k):ce(O)}function k(O){return O===62?(e.consume(O),L):O===45&&o===2?(e.consume(O),k):ce(O)}function L(O){return O===null||He(O)?(e.exit("htmlFlowData"),ee(O)):(e.consume(O),L)}function ee(O){return e.exit("htmlFlow"),t(O)}}function YN(e,t,n){const r=this;return o;function o(u){return He(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 WN(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Na,t,n)}}const GN={name:"htmlText",tokenize:XN};function XN(e,t,n){const r=this;let o,a,u;return c;function c(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),Y):k===63?(e.consume(k),v):kn(k)?(e.consume(k),re):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,_):kn(k)?(e.consume(k),P):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):He(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?Oe(k):k===45?T(k):m(k)}function _(k){const L="CDATA[";return k===L.charCodeAt(a++)?(e.consume(k),a===L.length?w:_):n(k)}function w(k){return k===null?n(k):k===93?(e.consume(k),C):He(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?Oe(k):k===93?(e.consume(k),A):w(k)}function P(k){return k===null||k===62?Oe(k):He(k)?(u=P,oe(k)):(e.consume(k),P)}function v(k){return k===null?n(k):k===63?(e.consume(k),H):He(k)?(u=v,oe(k)):(e.consume(k),v)}function H(k){return k===62?Oe(k):v(k)}function Y(k){return kn(k)?(e.consume(k),D):n(k)}function D(k){return k===45||Tn(k)?(e.consume(k),D):q(k)}function q(k){return He(k)?(u=q,oe(k)):tt(k)?(e.consume(k),q):Oe(k)}function re(k){return k===45||Tn(k)?(e.consume(k),re):k===47||k===62||ht(k)?me(k):n(k)}function me(k){return k===47?(e.consume(k),Oe):k===58||k===95||kn(k)?(e.consume(k),V):He(k)?(u=me,oe(k)):tt(k)?(e.consume(k),me):Oe(k)}function V(k){return k===45||k===46||k===58||k===95||Tn(k)?(e.consume(k),V):se(k)}function se(k){return k===61?(e.consume(k),ce):He(k)?(u=se,oe(k)):tt(k)?(e.consume(k),se):me(k)}function ce(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),o=k,de):He(k)?(u=ce,oe(k)):tt(k)?(e.consume(k),ce):(e.consume(k),ne)}function de(k){return k===o?(e.consume(k),o=void 0,Ee):k===null?n(k):He(k)?(u=de,oe(k)):(e.consume(k),de)}function ne(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||ht(k)?me(k):(e.consume(k),ne)}function Ee(k){return k===47||k===62||ht(k)?me(k):n(k)}function Oe(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 tt(k)?it(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 Xf={name:"labelEnd",resolveAll:ZN,resolveTo:eO,tokenize:tO},KN={tokenize:nO},QN={tokenize:rO},JN={tokenize:iO};function ZN(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Xn(e,0,e.length,n),e}function eO(e,t){let n=e.length,r=0,o,a,u,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:F({},e[a][1].start),end:F({},e[e.length-1][1].end)},f={type:"label",start:F({},e[a][1].start),end:F({},e[u][1].end)},p={type:"labelText",start:F({},e[a+r+2][1].end),end:F({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=ur(c,e.slice(a+1,a+r+3)),c=ur(c,[["enter",p,t]]),c=ur(c,vl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=ur(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=ur(c,e.slice(u+1)),c=ur(c,[["exit",d,t]]),Xn(e,a,e.length,c),e}function tO(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(T){return a?a._inactive?m(T):(u=r.parser.defined.includes(xr(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(KN,p,u?p:m)(T):T===91?e.attempt(QN,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(JN,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function nO(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return ht(m)?Ia(e,a)(m):a(m)}function a(m){return m===41?p(m):kE(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return ht(m)?Ia(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?NE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return ht(m)?Ia(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 rO(e,t,n){const r=this;return o;function o(c){return PE.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(xr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function iO(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const oO={name:"labelStartImage",resolveAll:Xf.resolveAll,tokenize:sO};function sO(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const aO={name:"labelStartLink",resolveAll:Xf.resolveAll,tokenize:uO};function uO(e,t,n){const r=this;return o;function o(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Kf={name:"lineEnding",tokenize:lO};function lO(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),it(e,t,"linePrefix")}}const Cl={name:"thematicBreak",tokenize:cO};function cO(e,t,n){let r=0,o;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return o=f,c(f)}function c(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||He(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),tt(f)?it(e,c,"whitespace")(f):c(f))}}const Fn={continuation:{tokenize:pO},exit:gO,name:"list",tokenize:hO},dO={partial:!0,tokenize:EO},fO={partial:!0,tokenize:mO};function hO(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return c;function c(y){const _=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Yf(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Cl,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 Yf(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(Na,r.interrupt?n:p,e.attempt(dO,T,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function m(y){return tt(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 pO(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Na,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,it(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!tt(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(fO,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,it(e,e.attempt(Fn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function mO(e,t,n){const r=this;return it(e,o,"listItemIndent",r.containerState.size+1);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function gO(e){e.exit(this.containerState.type)}function EO(e,t,n){const r=this;return it(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const u=r.events[r.events.length-1];return!tt(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const IE={name:"setextUnderline",resolveTo:yO,tokenize:bO};function yO(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:F({},e[r][1].start),end:F({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=F({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function bO(e,t,n){const r=this;let o;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"),o=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===o?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),tt(f)?it(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||He(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const TO={tokenize:_O};function _O(e){const t=this,n=e.attempt(Na,r,e.attempt(this.parser.constructs.flowInitial,o,it(e,e.attempt(this.parser.constructs.flow,o,e.attempt(vN,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const SO={resolveAll:LE()},xO=RE("string"),wO=RE("text");function RE(e){return{resolveAll:LE(e==="text"?AO:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,c);return u;function u(p){return 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=o[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 LE(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function AO(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,u=-1,c=0,d;for(;a--;){const f=o[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:F({},r.end)};r.end=F({},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:ON},disable:{null:[]},document:{42:Fn,43:Fn,45:Fn,48:Fn,49:Fn,50:Fn,51:Fn,52:Fn,53:Fn,54:Fn,55:Fn,56:Fn,57:Fn,62:SE},flow:{35:FN,42:Cl,45:[IE,Cl],60:zN,61:IE,95:Cl,96:vE,126:vE},flowInitial:{[-2]:Gf,[-1]:Gf,32:Gf},insideSpan:{null:[Wf,SO]},string:{38:wE,92:xE},text:{[-5]:Kf,[-4]:Kf,[-3]:Kf,33:oO,38:wE,42:Wf,60:[aN,GN],91:aO,92:[DN,xE],93:Xf,95:Wf,96:TN}},Symbol.toStringTag,{value:"Module"}));function CO(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let u=[],c=[];const d={attempt:q(Y),check:q(D),consume:P,enter:v,exit:H,interrupt:q(D,{interrupt:!0})},f={code:null,containerState:{},defineSkip:w,events:[],now:_,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(se){return u=ur(u,se),C(),u[u.length-1]!==null?[]:(re(t,0),f.events=vl(a,f.events,f),f.events)}function T(se,ce){return PO(y(se),ce)}function y(se){return kO(u,se)}function _(){const{_bufferIndex:se,_index:ce,line:de,column:ne,offset:Ee}=r;return{_bufferIndex:se,_index:ce,line:de,column:ne,offset:Ee}}function w(se){o[se.line]=se.column,V()}function C(){let se;for(;r._index<u.length;){const ce=u[r._index];if(typeof ce=="string")for(se=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===se&&r._bufferIndex<ce.length;)A(ce.charCodeAt(r._bufferIndex));else A(ce)}}function A(se){p=p(se)}function P(se){He(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,ce){const de=ce||{};return de.type=se,de.start=_(),f.events.push(["enter",de,f]),c.push(de),de}function H(se){const ce=c.pop();return ce.end=_(),f.events.push(["exit",ce,f]),ce}function Y(se,ce){re(se,ce.from)}function D(se,ce){ce.restore()}function q(se,ce){return de;function de(ne,Ee,Oe){let oe,Q,ie,k;return Array.isArray(ne)?ee(ne):"tokenize"in ne?ee([ne]):L(ne);function L(Te){return Be;function Be(Ve){const Ge=Ve!==null&&Te[Ve],_t=Ve!==null&&Te.null,Pn=[...Array.isArray(Ge)?Ge:Ge?[Ge]:[],...Array.isArray(_t)?_t:_t?[_t]:[]];return ee(Pn)(Ve)}}function ee(Te){return oe=Te,Q=0,Te.length===0?Oe:O(Te[Q])}function O(Te){return Be;function Be(Ve){return k=me(),ie=Te,Te.partial||(f.currentConstruct=Te),Te.name&&f.parser.constructs.disable.null.includes(Te.name)?Ue():Te.tokenize.call(ce?Object.assign(Object.create(f),ce):f,d,we,Ue)(Ve)}}function we(Te){return se(ie,k),Ee}function Ue(Te){return k.restore(),++Q<oe.length?O(oe[Q]):Oe}}}function re(se,ce){se.resolveAll&&!a.includes(se)&&a.push(se),se.resolve&&Xn(f.events,ce,f.events.length-ce,se.resolve(f.events.slice(ce),f)),se.resolveTo&&(f.events=se.resolveTo(f.events,f))}function me(){const se=_(),ce=f.previous,de=f.currentConstruct,ne=f.events.length,Ee=Array.from(c);return{from:ne,restore:Oe};function Oe(){r=se,f.previous=ce,f.currentConstruct=de,f.events.length=ne,c=Ee,V()}}function V(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function kO(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function PO(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
|
|
17
|
+
`+b.stack}return{value:i,source:s,stack:E,digest:null}}function jm(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function $m(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var O7=typeof WeakMap=="function"?WeakMap:Map;function iw(i,s,l){l=Si(-1,l),l.tag=3,l.payload={element:null};var h=s.value;return l.callback=function(){pd||(pd=!0,i0=h),$m(i,s)},l}function ow(i,s,l){l=Si(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=s.value;l.payload=function(){return h(E)},l.callback=function(){$m(i,s)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(l.callback=function(){$m(i,s),typeof h!="function"&&(Xi===null?Xi=new Set([this]):Xi.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})}),l}function sw(i,s,l){var h=i.pingCache;if(h===null){h=i.pingCache=new O7;var E=new Set;h.set(s,E)}else E=h.get(s),E===void 0&&(E=new Set,h.set(s,E));E.has(l)||(E.add(l),i=q7.bind(null,i,s,l),s.then(i,i))}function aw(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function uw(i,s,l,h,E){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=Si(-1,1),s.tag=2,Wi(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var I7=H.ReactCurrentOwner,$n=!1;function On(i,s,l,h){s.child=i===null?kx(s,null,l,h):Xs(s,i.child,l,h)}function lw(i,s,l,h,E){l=l.render;var b=s.ref;return Qs(s,E),h=Lm(i,s,l,h,b,E),l=Dm(),i!==null&&!$n?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,xi(i,s,E)):(kt&&l&&Em(s),s.flags|=1,On(i,s,h,E),s.child)}function cw(i,s,l,h,E){if(i===null){var b=l.type;return typeof b=="function"&&!d0(b)&&b.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=b,dw(i,s,b,h,E)):(i=Td(l.type,null,h,s,s.mode,E),i.ref=s.ref,i.return=s,s.child=i)}if(b=i.child,(i.lanes&E)===0){var S=b.memoizedProps;if(l=l.compare,l=l!==null?l:xu,l(S,h)&&i.ref===s.ref)return xi(i,s,E)}return s.flags|=1,i=Zi(b,h),i.ref=s.ref,i.return=s,s.child=i}function dw(i,s,l,h,E){if(i!==null){var b=i.memoizedProps;if(xu(b,h)&&i.ref===s.ref)if($n=!1,s.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&($n=!0);else return s.lanes=i.lanes,xi(i,s,E)}return Vm(i,s,l,h,E)}function fw(i,s,l){var h=s.pendingProps,E=h.children,b=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(ta,rr),rr|=l;else{if((l&1073741824)===0)return i=b!==null?b.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,bt(ta,rr),rr|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:l,bt(ta,rr),rr|=h}else b!==null?(h=b.baseLanes|l,s.memoizedState=null):h=l,bt(ta,rr),rr|=h;return On(i,s,E,l),s.child}function hw(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function Vm(i,s,l,h,E){var b=jn(l)?ko:xn.current;return b=qs(s,b),Qs(s,E),l=Lm(i,s,l,h,b,E),h=Dm(),i!==null&&!$n?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,xi(i,s,E)):(kt&&h&&Em(s),s.flags|=1,On(i,s,l,E),s.child)}function pw(i,s,l,h,E){if(jn(l)){var b=!0;qc(s)}else b=!1;if(Qs(s,E),s.stateNode===null)ld(i,s),nw(s,l,h),zm(s,l,h,E),h=!0;else if(i===null){var S=s.stateNode,R=s.memoizedProps;S.props=R;var U=S.context,Z=l.contextType;typeof Z=="object"&&Z!==null?Z=mr(Z):(Z=jn(l)?ko:xn.current,Z=qs(s,Z));var le=l.getDerivedStateFromProps,he=typeof le=="function"||typeof S.getSnapshotBeforeUpdate=="function";he||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(R!==h||U!==Z)&&rw(s,S,h,Z),Yi=!1;var ae=s.memoizedState;S.state=ae,ed(s,h,S,E),U=s.memoizedState,R!==h||ae!==U||zn.current||Yi?(typeof le=="function"&&(Hm(s,l,le,h),U=s.memoizedState),(R=Yi||tw(s,l,R,h,ae,U,Z))?(he||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(s.flags|=4194308)):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=U),S.props=h,S.state=U,S.context=Z,h=R):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{S=s.stateNode,Nx(i,s),R=s.memoizedProps,Z=s.type===s.elementType?R:Ir(s.type,R),S.props=Z,he=s.pendingProps,ae=S.context,U=l.contextType,typeof U=="object"&&U!==null?U=mr(U):(U=jn(l)?ko:xn.current,U=qs(s,U));var ve=l.getDerivedStateFromProps;(le=typeof ve=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(R!==he||ae!==U)&&rw(s,S,h,U),Yi=!1,ae=s.memoizedState,S.state=ae,ed(s,h,S,E);var Ne=s.memoizedState;R!==he||ae!==Ne||zn.current||Yi?(typeof ve=="function"&&(Hm(s,l,ve,h),Ne=s.memoizedState),(Z=Yi||tw(s,l,Z,h,ae,Ne,U)||!1)?(le||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(h,Ne,U),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(h,Ne,U)),typeof S.componentDidUpdate=="function"&&(s.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof S.componentDidUpdate!="function"||R===i.memoizedProps&&ae===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&ae===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=Ne),S.props=h,S.state=Ne,S.context=U,h=Z):(typeof S.componentDidUpdate!="function"||R===i.memoizedProps&&ae===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&ae===i.memoizedState||(s.flags|=1024),h=!1)}return qm(i,s,l,h,b,E)}function qm(i,s,l,h,E,b){hw(i,s);var S=(s.flags&128)!==0;if(!h&&!S)return E&&bx(s,l,!1),xi(i,s,b);h=s.stateNode,I7.current=s;var R=S&&typeof l.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&S?(s.child=Xs(s,i.child,null,b),s.child=Xs(s,null,R,b)):On(i,s,R,b),s.memoizedState=h.state,E&&bx(s,l,!0),s.child}function mw(i){var s=i.stateNode;s.pendingContext?Ex(i,s.pendingContext,s.pendingContext!==s.context):s.context&&Ex(i,s.context,!1),km(i,s.containerInfo)}function gw(i,s,l,h,E){return Gs(),_m(E),s.flags|=256,On(i,s,l,h),s.child}var Ym={dehydrated:null,treeContext:null,retryLane:0};function Wm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Ew(i,s,l){var h=s.pendingProps,E=Ot.current,b=!1,S=(s.flags&128)!==0,R;if((R=S)||(R=i!==null&&i.memoizedState===null?!1:(E&2)!==0),R?(b=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),bt(Ot,E&1),i===null)return Tm(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(S=h.children,i=h.fallback,b?(h=s.mode,b=s.child,S={mode:"hidden",children:S},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=S):b=_d(S,h,0,null),i=Bo(i,h,l,null),b.return=s,i.return=s,b.sibling=i,s.child=b,s.child.memoizedState=Wm(l),s.memoizedState=Ym,i):Gm(s,S));if(E=i.memoizedState,E!==null&&(R=E.dehydrated,R!==null))return R7(i,s,S,h,R,E,l);if(b){b=h.fallback,S=s.mode,E=i.child,R=E.sibling;var U={mode:"hidden",children:h.children};return(S&1)===0&&s.child!==E?(h=s.child,h.childLanes=0,h.pendingProps=U,s.deletions=null):(h=Zi(E,U),h.subtreeFlags=E.subtreeFlags&14680064),R!==null?b=Zi(R,b):(b=Bo(b,S,l,null),b.flags|=2),b.return=s,h.return=s,h.sibling=b,s.child=h,h=b,b=s.child,S=i.child.memoizedState,S=S===null?Wm(l):{baseLanes:S.baseLanes|l,cachePool:null,transitions:S.transitions},b.memoizedState=S,b.childLanes=i.childLanes&~l,s.memoizedState=Ym,h}return b=i.child,i=b.sibling,h=Zi(b,{mode:"visible",children:h.children}),(s.mode&1)===0&&(h.lanes=l),h.return=s,h.sibling=null,i!==null&&(l=s.deletions,l===null?(s.deletions=[i],s.flags|=16):l.push(i)),s.child=h,s.memoizedState=null,h}function Gm(i,s){return s=_d({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function ud(i,s,l,h){return h!==null&&_m(h),Xs(s,i.child,null,l),i=Gm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function R7(i,s,l,h,E,b,S){if(l)return s.flags&256?(s.flags&=-257,h=jm(Error(n(422))),ud(i,s,S,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(b=h.fallback,E=s.mode,h=_d({mode:"visible",children:h.children},E,0,null),b=Bo(b,E,S,null),b.flags|=2,h.return=s,b.return=s,h.sibling=b,s.child=h,(s.mode&1)!==0&&Xs(s,i.child,null,S),s.child.memoizedState=Wm(S),s.memoizedState=Ym,b);if((s.mode&1)===0)return ud(i,s,S,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var R=h.dgst;return h=R,b=Error(n(419)),h=jm(b,h,void 0),ud(i,s,S,h)}if(R=(S&i.childLanes)!==0,$n||R){if(h=sn,h!==null){switch(S&-S){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|S))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,_i(i,E),Dr(h,i,E,-1))}return c0(),h=jm(Error(n(421))),ud(i,s,S,h)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=Y7.bind(null,i),E._reactRetry=s,null):(i=b.treeContext,nr=ji(E.nextSibling),tr=s,kt=!0,Or=null,i!==null&&(hr[pr++]=bi,hr[pr++]=Ti,hr[pr++]=Po,bi=i.id,Ti=i.overflow,Po=s),s=Gm(s,h.children),s.flags|=4096,s)}function yw(i,s,l){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),Am(i.return,s,l)}function Xm(i,s,l,h,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:E}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=h,b.tail=l,b.tailMode=E)}function bw(i,s,l){var h=s.pendingProps,E=h.revealOrder,b=h.tail;if(On(i,s,h.children,l),h=Ot.current,(h&2)!==0)h=h&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&yw(i,l,s);else if(i.tag===19)yw(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(bt(Ot,h),(s.mode&1)===0)s.memoizedState=null;else switch(E){case"forwards":for(l=s.child,E=null;l!==null;)i=l.alternate,i!==null&&td(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=s.child,s.child=null):(E=l.sibling,l.sibling=null),Xm(s,!1,E,l,b);break;case"backwards":for(l=null,E=s.child,s.child=null;E!==null;){if(i=E.alternate,i!==null&&td(i)===null){s.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Xm(s,!0,l,null,b);break;case"together":Xm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function ld(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function xi(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),Lo|=s.lanes,(l&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=Zi(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=Zi(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function L7(i,s,l){switch(s.tag){case 3:mw(s),Gs();break;case 5:Rx(s);break;case 1:jn(s.type)&&qc(s);break;case 4:km(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,E=s.memoizedProps.value;bt(Qc,h._currentValue),h._currentValue=E;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(bt(Ot,Ot.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?Ew(i,s,l):(bt(Ot,Ot.current&1),i=xi(i,s,l),i!==null?i.sibling:null);bt(Ot,Ot.current&1);break;case 19:if(h=(l&s.childLanes)!==0,(i.flags&128)!==0){if(h)return bw(i,s,l);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),bt(Ot,Ot.current),h)break;return null;case 22:case 23:return s.lanes=0,fw(i,s,l)}return xi(i,s,l)}var Tw,Km,_w,Sw;Tw=function(i,s){for(var l=s.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Km=function(){},_w=function(i,s,l,h){var E=i.memoizedProps;if(E!==h){i=s.stateNode,Io(ti.current);var b=null;switch(l){case"input":E=fr(i,E),h=fr(i,h),b=[];break;case"select":E=k({},E,{value:void 0}),h=k({},h,{value:void 0}),b=[];break;case"textarea":E=Oe(i,E),h=Oe(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=jc)}fn(l,h);var S;l=null;for(Z in E)if(!h.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var R=E[Z];for(S in R)R.hasOwnProperty(S)&&(l||(l={}),l[S]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(o.hasOwnProperty(Z)?b||(b=[]):(b=b||[]).push(Z,null));for(Z in h){var U=h[Z];if(R=E!=null?E[Z]:void 0,h.hasOwnProperty(Z)&&U!==R&&(U!=null||R!=null))if(Z==="style")if(R){for(S in R)!R.hasOwnProperty(S)||U&&U.hasOwnProperty(S)||(l||(l={}),l[S]="");for(S in U)U.hasOwnProperty(S)&&R[S]!==U[S]&&(l||(l={}),l[S]=U[S])}else l||(b||(b=[]),b.push(Z,l)),l=U;else Z==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,R=R?R.__html:void 0,U!=null&&R!==U&&(b=b||[]).push(Z,U)):Z==="children"?typeof U!="string"&&typeof U!="number"||(b=b||[]).push(Z,""+U):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(o.hasOwnProperty(Z)?(U!=null&&Z==="onScroll"&&St("scroll",i),b||R===U||(b=[])):(b=b||[]).push(Z,U))}l&&(b=b||[]).push("style",l);var Z=b;(s.updateQueue=Z)&&(s.flags|=4)}},Sw=function(i,s,l,h){l!==h&&(s.flags|=4)};function Bu(i,s){if(!kt)switch(i.tailMode){case"hidden":s=i.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function An(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(s)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,s}function D7(i,s,l){var h=s.pendingProps;switch(ym(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return An(s),null;case 1:return jn(s.type)&&Vc(),An(s),null;case 3:return h=s.stateNode,Js(),xt(zn),xt(xn),Om(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Xc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Or!==null&&(a0(Or),Or=null))),Km(i,s),An(s),null;case 5:Pm(s);var E=Io(Ru.current);if(l=s.type,i!==null&&s.stateNode!=null)_w(i,s,l,h,E),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!h){if(s.stateNode===null)throw Error(n(166));return An(s),null}if(i=Io(ti.current),Xc(s)){h=s.stateNode,l=s.type;var b=s.memoizedProps;switch(h[ei]=s,h[ku]=b,i=(s.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<Au.length;E++)St(Au[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":rn(h,b),St("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},St("invalid",h);break;case"textarea":Me(h,b),St("invalid",h)}fn(l,b),E=null;for(var S in b)if(b.hasOwnProperty(S)){var R=b[S];S==="children"?typeof R=="string"?h.textContent!==R&&(b.suppressHydrationWarning!==!0&&zc(h.textContent,R,i),E=["children",R]):typeof R=="number"&&h.textContent!==""+R&&(b.suppressHydrationWarning!==!0&&zc(h.textContent,R,i),E=["children",""+R]):o.hasOwnProperty(S)&&R!=null&&S==="onScroll"&&St("scroll",h)}switch(l){case"input":Pn(h),Nn(h,b,!0);break;case"textarea":Pn(h),pt(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=jc)}h=E,s.updateQueue=h,h!==null&&(s.flags|=4)}else{S=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=S.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=S.createElement(l,{is:h.is}):(i=S.createElement(l),l==="select"&&(S=i,h.multiple?S.multiple=!0:h.size&&(S.size=h.size))):i=S.createElementNS(i,l),i[ei]=s,i[ku]=h,Tw(i,s,!1,!1),s.stateNode=i;e:{switch(S=Jr(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<Au.length;E++)St(Au[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":rn(i,h),E=fr(i,h),St("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),St("invalid",i);break;case"textarea":Me(i,h),E=Oe(i,h),St("invalid",i);break;default:E=h}fn(l,E),R=E;for(b in R)if(R.hasOwnProperty(b)){var U=R[b];b==="style"?dn(i,U):b==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&Ye(i,U)):b==="children"?typeof U=="string"?(l!=="textarea"||U!=="")&&Re(i,U):typeof U=="number"&&Re(i,""+U):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(o.hasOwnProperty(b)?U!=null&&b==="onScroll"&&St("scroll",i):U!=null&&v(i,b,U,S))}switch(l){case"input":Pn(i),Nn(i,h,!1);break;case"textarea":Pn(i),pt(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Ve(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?Ae(i,!!h.multiple,b,!1):h.defaultValue!=null&&Ae(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=jc)}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&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return An(s),null;case 6:if(i&&s.stateNode!=null)Sw(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(l=Io(Ru.current),Io(ti.current),Xc(s)){if(h=s.stateNode,l=s.memoizedProps,h[ei]=s,(b=h.nodeValue!==l)&&(i=tr,i!==null))switch(i.tag){case 3:zc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&zc(h.nodeValue,l,(i.mode&1)!==0)}b&&(s.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[ei]=s,s.stateNode=h}return An(s),null;case 13:if(xt(Ot),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(kt&&nr!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Ax(),Gs(),s.flags|=98560,b=!1;else if(b=Xc(s),h!==null&&h.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[ei]=s}else Gs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;An(s),b=!1}else Or!==null&&(a0(Or),Or=null),b=!0;if(!b)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=l,s):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(Ot.current&1)!==0?Kt===0&&(Kt=3):c0())),s.updateQueue!==null&&(s.flags|=4),An(s),null);case 4:return Js(),Km(i,s),i===null&&vu(s.stateNode.containerInfo),An(s),null;case 10:return wm(s.type._context),An(s),null;case 17:return jn(s.type)&&Vc(),An(s),null;case 19:if(xt(Ot),b=s.memoizedState,b===null)return An(s),null;if(h=(s.flags&128)!==0,S=b.rendering,S===null)if(h)Bu(b,!1);else{if(Kt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(S=td(i),S!==null){for(s.flags|=128,Bu(b,!1),h=S.updateQueue,h!==null&&(s.updateQueue=h,s.flags|=4),s.subtreeFlags=0,h=l,l=s.child;l!==null;)b=l,i=h,b.flags&=14680066,S=b.alternate,S===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=S.childLanes,b.lanes=S.lanes,b.child=S.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=S.memoizedProps,b.memoizedState=S.memoizedState,b.updateQueue=S.updateQueue,b.type=S.type,i=S.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return bt(Ot,Ot.current&1|2),s.child}i=i.sibling}b.tail!==null&&Bt()>na&&(s.flags|=128,h=!0,Bu(b,!1),s.lanes=4194304)}else{if(!h)if(i=td(S),i!==null){if(s.flags|=128,h=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),Bu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!S.alternate&&!kt)return An(s),null}else 2*Bt()-b.renderingStartTime>na&&l!==1073741824&&(s.flags|=128,h=!0,Bu(b,!1),s.lanes=4194304);b.isBackwards?(S.sibling=s.child,s.child=S):(l=b.last,l!==null?l.sibling=S:s.child=S,b.last=S)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=Bt(),s.sibling=null,l=Ot.current,bt(Ot,h?l&1|2:l&1),s):(An(s),null);case 22:case 23:return l0(),h=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(rr&1073741824)!==0&&(An(s),s.subtreeFlags&6&&(s.flags|=8192)):An(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function M7(i,s){switch(ym(s),s.tag){case 1:return jn(s.type)&&Vc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Js(),xt(zn),xt(xn),Om(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Pm(s),null;case 13:if(xt(Ot),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Gs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return xt(Ot),null;case 4:return Js(),null;case 10:return wm(s.type._context),null;case 22:case 23:return l0(),null;case 24:return null;default:return null}}var cd=!1,vn=!1,F7=typeof WeakSet=="function"?WeakSet:Set,ke=null;function ea(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){Lt(i,s,h)}else l.current=null}function Qm(i,s,l){try{l()}catch(h){Lt(i,s,h)}}var xw=!1;function B7(i,s){if(lm=Nc,i=tx(),tm(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(_e){l=null;break e}var S=0,R=-1,U=-1,Z=0,le=0,he=i,ae=null;t:for(;;){for(var ve;he!==l||E!==0&&he.nodeType!==3||(R=S+E),he!==b||h!==0&&he.nodeType!==3||(U=S+h),he.nodeType===3&&(S+=he.nodeValue.length),(ve=he.firstChild)!==null;)ae=he,he=ve;for(;;){if(he===i)break t;if(ae===l&&++Z===E&&(R=S),ae===b&&++le===h&&(U=S),(ve=he.nextSibling)!==null)break;he=ae,ae=he.parentNode}he=ve}l=R===-1||U===-1?null:{start:R,end:U}}else l=null}l=l||{start:0,end:0}}else l=null;for(cm={focusedElem:i,selectionRange:l},Nc=!1,ke=s;ke!==null;)if(s=ke,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,ke=i;else for(;ke!==null;){s=ke;try{var Ne=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ne!==null){var Ie=Ne.memoizedProps,Ut=Ne.memoizedState,G=s.stateNode,j=G.getSnapshotBeforeUpdate(s.elementType===s.type?Ie:Ir(s.type,Ie),Ut);G.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var Q=s.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(_e){Lt(s,s.return,_e)}if(i=s.sibling,i!==null){i.return=s.return,ke=i;break}ke=s.return}return Ne=xw,xw=!1,Ne}function Uu(i,s,l){var h=s.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&&Qm(s,l,b)}E=E.next}while(E!==h)}}function dd(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&i)===i){var h=l.create;l.destroy=h()}l=l.next}while(l!==s)}}function Jm(i){var s=i.ref;if(s!==null){var l=i.stateNode;i.tag,i=l,typeof s=="function"?s(i):s.current=i}}function ww(i){var s=i.alternate;s!==null&&(i.alternate=null,ww(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[ei],delete s[ku],delete s[pm],delete s[T7],delete s[_7])),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 Aw(i){return i.tag===5||i.tag===3||i.tag===4}function vw(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Aw(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 Zm(i,s,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(i,s):l.insertBefore(i,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(i,l)):(s=l,s.appendChild(i)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=jc));else if(h!==4&&(i=i.child,i!==null))for(Zm(i,s,l),i=i.sibling;i!==null;)Zm(i,s,l),i=i.sibling}function e0(i,s,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(e0(i,s,l),i=i.sibling;i!==null;)e0(i,s,l),i=i.sibling}var hn=null,Rr=!1;function Gi(i,s,l){for(l=l.child;l!==null;)Cw(i,s,l),l=l.sibling}function Cw(i,s,l){if(Zr&&typeof Zr.onCommitFiberUnmount=="function")try{Zr.onCommitFiberUnmount(wc,l)}catch(R){}switch(l.tag){case 5:vn||ea(l,s);case 6:var h=hn,E=Rr;hn=null,Gi(i,s,l),hn=h,Rr=E,hn!==null&&(Rr?(i=hn,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):hn.removeChild(l.stateNode));break;case 18:hn!==null&&(Rr?(i=hn,l=l.stateNode,i.nodeType===8?hm(i.parentNode,l):i.nodeType===1&&hm(i,l),Eu(i)):hm(hn,l.stateNode));break;case 4:h=hn,E=Rr,hn=l.stateNode.containerInfo,Rr=!0,Gi(i,s,l),hn=h,Rr=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,S=b.destroy;b=b.tag,S!==void 0&&((b&2)!==0||(b&4)!==0)&&Qm(l,s,S),E=E.next}while(E!==h)}Gi(i,s,l);break;case 1:if(!vn&&(ea(l,s),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(R){Lt(l,s,R)}Gi(i,s,l);break;case 21:Gi(i,s,l);break;case 22:l.mode&1?(vn=(h=vn)||l.memoizedState!==null,Gi(i,s,l),vn=h):Gi(i,s,l);break;default:Gi(i,s,l)}}function kw(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new F7),s.forEach(function(h){var E=W7.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function Lr(i,s){var l=s.deletions;if(l!==null)for(var h=0;h<l.length;h++){var E=l[h];try{var b=i,S=s,R=S;e:for(;R!==null;){switch(R.tag){case 5:hn=R.stateNode,Rr=!1;break e;case 3:hn=R.stateNode.containerInfo,Rr=!0;break e;case 4:hn=R.stateNode.containerInfo,Rr=!0;break e}R=R.return}if(hn===null)throw Error(n(160));Cw(b,S,E),hn=null,Rr=!1;var U=E.alternate;U!==null&&(U.return=null),E.return=null}catch(Z){Lt(E,s,Z)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Pw(s,i),s=s.sibling}function Pw(i,s){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Lr(s,i),ri(i),h&4){try{Uu(3,i,i.return),dd(3,i)}catch(Ie){Lt(i,i.return,Ie)}try{Uu(5,i,i.return)}catch(Ie){Lt(i,i.return,Ie)}}break;case 1:Lr(s,i),ri(i),h&512&&l!==null&&ea(l,l.return);break;case 5:if(Lr(s,i),ri(i),h&512&&l!==null&&ea(l,l.return),i.flags&32){var E=i.stateNode;try{Re(E,"")}catch(Ie){Lt(i,i.return,Ie)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,S=l!==null?l.memoizedProps:b,R=i.type,U=i.updateQueue;if(i.updateQueue=null,U!==null)try{R==="input"&&b.type==="radio"&&b.name!=null&&qe(E,b),Jr(R,S);var Z=Jr(R,b);for(S=0;S<U.length;S+=2){var le=U[S],he=U[S+1];le==="style"?dn(E,he):le==="dangerouslySetInnerHTML"?Ye(E,he):le==="children"?Re(E,he):v(E,le,he,Z)}switch(R){case"input":Nt(E,b);break;case"textarea":ot(E,b);break;case"select":var ae=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var ve=b.value;ve!=null?Ae(E,!!b.multiple,ve,!1):ae!==!!b.multiple&&(b.defaultValue!=null?Ae(E,!!b.multiple,b.defaultValue,!0):Ae(E,!!b.multiple,b.multiple?[]:"",!1))}E[ku]=b}catch(Ie){Lt(i,i.return,Ie)}}break;case 6:if(Lr(s,i),ri(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Ie){Lt(i,i.return,Ie)}}break;case 3:if(Lr(s,i),ri(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{Eu(s.containerInfo)}catch(Ie){Lt(i,i.return,Ie)}break;case 4:Lr(s,i),ri(i);break;case 13:Lr(s,i),ri(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(r0=Bt())),h&4&&kw(i);break;case 22:if(le=l!==null&&l.memoizedState!==null,i.mode&1?(vn=(Z=vn)||le,Lr(s,i),vn=Z):Lr(s,i),ri(i),h&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!le&&(i.mode&1)!==0)for(ke=i,le=i.child;le!==null;){for(he=ke=le;ke!==null;){switch(ae=ke,ve=ae.child,ae.tag){case 0:case 11:case 14:case 15:Uu(4,ae,ae.return);break;case 1:ea(ae,ae.return);var Ne=ae.stateNode;if(typeof Ne.componentWillUnmount=="function"){h=ae,l=ae.return;try{s=h,Ne.props=s.memoizedProps,Ne.state=s.memoizedState,Ne.componentWillUnmount()}catch(Ie){Lt(h,l,Ie)}}break;case 5:ea(ae,ae.return);break;case 22:if(ae.memoizedState!==null){Iw(he);continue}}ve!==null?(ve.return=ae,ke=ve):Iw(he)}le=le.sibling}e:for(le=null,he=i;;){if(he.tag===5){if(le===null){le=he;try{E=he.stateNode,Z?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(R=he.stateNode,U=he.memoizedProps.style,S=U!=null&&U.hasOwnProperty("display")?U.display:null,R.style.display=Vt("display",S))}catch(Ie){Lt(i,i.return,Ie)}}}else if(he.tag===6){if(le===null)try{he.stateNode.nodeValue=Z?"":he.memoizedProps}catch(Ie){Lt(i,i.return,Ie)}}else if((he.tag!==22&&he.tag!==23||he.memoizedState===null||he===i)&&he.child!==null){he.child.return=he,he=he.child;continue}if(he===i)break e;for(;he.sibling===null;){if(he.return===null||he.return===i)break e;le===he&&(le=null),he=he.return}le===he&&(le=null),he.sibling.return=he.return,he=he.sibling}}break;case 19:Lr(s,i),ri(i),h&4&&kw(i);break;case 21:break;default:Lr(s,i),ri(i)}}function ri(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(Aw(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=vw(i);e0(i,b,E);break;case 3:case 4:var S=h.stateNode.containerInfo,R=vw(i);Zm(i,R,S);break;default:throw Error(n(161))}}catch(U){Lt(i,i.return,U)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function U7(i,s,l){ke=i,Nw(i)}function Nw(i,s,l){for(var h=(i.mode&1)!==0;ke!==null;){var E=ke,b=E.child;if(E.tag===22&&h){var S=E.memoizedState!==null||cd;if(!S){var R=E.alternate,U=R!==null&&R.memoizedState!==null||vn;R=cd;var Z=vn;if(cd=S,(vn=U)&&!Z)for(ke=E;ke!==null;)S=ke,U=S.child,S.tag===22&&S.memoizedState!==null?Rw(E):U!==null?(U.return=S,ke=U):Rw(E);for(;b!==null;)ke=b,Nw(b),b=b.sibling;ke=E,cd=R,vn=Z}Ow(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,ke=b):Ow(i)}}function Ow(i){for(;ke!==null;){var s=ke;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:vn||dd(5,s);break;case 1:var h=s.stateNode;if(s.flags&4&&!vn)if(l===null)h.componentDidMount();else{var E=s.elementType===s.type?l.memoizedProps:Ir(s.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&Ix(s,b,h);break;case 3:var S=s.updateQueue;if(S!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}Ix(s,S,l)}break;case 5:var R=s.stateNode;if(l===null&&s.flags&4){l=R;var U=s.memoizedProps;switch(s.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(s.memoizedState===null){var Z=s.alternate;if(Z!==null){var le=Z.memoizedState;if(le!==null){var he=le.dehydrated;he!==null&&Eu(he)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}vn||s.flags&512&&Jm(s)}catch(ae){Lt(s,s.return,ae)}}if(s===i){ke=null;break}if(l=s.sibling,l!==null){l.return=s.return,ke=l;break}ke=s.return}}function Iw(i){for(;ke!==null;){var s=ke;if(s===i){ke=null;break}var l=s.sibling;if(l!==null){l.return=s.return,ke=l;break}ke=s.return}}function Rw(i){for(;ke!==null;){var s=ke;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{dd(4,s)}catch(U){Lt(s,l,U)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var E=s.return;try{h.componentDidMount()}catch(U){Lt(s,E,U)}}var b=s.return;try{Jm(s)}catch(U){Lt(s,b,U)}break;case 5:var S=s.return;try{Jm(s)}catch(U){Lt(s,S,U)}}}catch(U){Lt(s,s.return,U)}if(s===i){ke=null;break}var R=s.sibling;if(R!==null){R.return=s.return,ke=R;break}ke=s.return}}var H7=Math.ceil,fd=H.ReactCurrentDispatcher,t0=H.ReactCurrentOwner,Er=H.ReactCurrentBatchConfig,st=0,sn=null,qt=null,pn=0,rr=0,ta=$i(0),Kt=0,Hu=null,Lo=0,hd=0,n0=0,zu=null,Vn=null,r0=0,na=1/0,wi=null,pd=!1,i0=null,Xi=null,md=!1,Ki=null,gd=0,ju=0,o0=null,Ed=-1,yd=0;function In(){return(st&6)!==0?Bt():Ed!==-1?Ed:Ed=Bt()}function Qi(i){return(i.mode&1)===0?1:(st&2)!==0&&pn!==0?pn&-pn:x7.transition!==null?(yd===0&&(yd=vS()),yd):(i=dt,i!==0||(i=window.event,i=i===void 0?16:DS(i.type)),i)}function Dr(i,s,l,h){if(50<ju)throw ju=0,o0=null,Error(n(185));fu(i,l,h),((st&2)===0||i!==sn)&&(i===sn&&((st&2)===0&&(hd|=l),Kt===4&&Ji(i,pn)),qn(i,h),l===1&&st===0&&(s.mode&1)===0&&(na=Bt()+500,Yc&&qi()))}function qn(i,s){var l=i.callbackNode;xB(i,s);var h=Cc(i,i===sn?pn:0);if(h===0)l!==null&&xS(l),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(l!=null&&xS(l),s===1)i.tag===0?S7(Dw.bind(null,i)):Tx(Dw.bind(null,i)),y7(function(){(st&6)===0&&qi()}),l=null;else{switch(CS(h)){case 1:l=Bp;break;case 4:l=wS;break;case 16:l=xc;break;case 536870912:l=AS;break;default:l=xc}l=$w(l,Lw.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function Lw(i,s){if(Ed=-1,yd=0,(st&6)!==0)throw Error(n(327));var l=i.callbackNode;if(ra()&&i.callbackNode!==l)return null;var h=Cc(i,i===sn?pn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=bd(i,h);else{s=h;var E=st;st|=2;var b=Fw();(sn!==i||pn!==s)&&(wi=null,na=Bt()+500,Mo(i,s));do try{$7();break}catch(R){Mw(i,R)}while(!0);xm(),fd.current=b,st=E,qt!==null?s=0:(sn=null,pn=0,s=Kt)}if(s!==0){if(s===2&&(E=Up(i),E!==0&&(h=E,s=s0(i,E))),s===1)throw l=Hu,Mo(i,0),Ji(i,h),qn(i,Bt()),l;if(s===6)Ji(i,h);else{if(E=i.current.alternate,(h&30)===0&&!z7(E)&&(s=bd(i,h),s===2&&(b=Up(i),b!==0&&(h=b,s=s0(i,b))),s===1))throw l=Hu,Mo(i,0),Ji(i,h),qn(i,Bt()),l;switch(i.finishedWork=E,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:Fo(i,Vn,wi);break;case 3:if(Ji(i,h),(h&130023424)===h&&(s=r0+500-Bt(),10<s)){if(Cc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){In(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=fm(Fo.bind(null,i,Vn,wi),s);break}Fo(i,Vn,wi);break;case 4:if(Ji(i,h),(h&4194240)===h)break;for(s=i.eventTimes,E=-1;0<h;){var S=31-Pr(h);b=1<<S,S=s[S],S>E&&(E=S),h&=~b}if(h=E,h=Bt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*H7(h/1960))-h,10<h){i.timeoutHandle=fm(Fo.bind(null,i,Vn,wi),h);break}Fo(i,Vn,wi);break;case 5:Fo(i,Vn,wi);break;default:throw Error(n(329))}}}return qn(i,Bt()),i.callbackNode===l?Lw.bind(null,i):null}function s0(i,s){var l=zu;return i.current.memoizedState.isDehydrated&&(Mo(i,s).flags|=256),i=bd(i,s),i!==2&&(s=Vn,Vn=l,s!==null&&a0(s)),i}function a0(i){Vn===null?Vn=i:Vn.push.apply(Vn,i)}function z7(i){for(var s=i;;){if(s.flags&16384){var l=s.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(!Nr(b(),E))return!1}catch(S){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Ji(i,s){for(s&=~n0,s&=~hd,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-Pr(s),h=1<<l;i[l]=-1,s&=~h}}function Dw(i){if((st&6)!==0)throw Error(n(327));ra();var s=Cc(i,0);if((s&1)===0)return qn(i,Bt()),null;var l=bd(i,s);if(i.tag!==0&&l===2){var h=Up(i);h!==0&&(s=h,l=s0(i,h))}if(l===1)throw l=Hu,Mo(i,0),Ji(i,s),qn(i,Bt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Fo(i,Vn,wi),qn(i,Bt()),null}function u0(i,s){var l=st;st|=1;try{return i(s)}finally{st=l,st===0&&(na=Bt()+500,Yc&&qi())}}function Do(i){Ki!==null&&Ki.tag===0&&(st&6)===0&&ra();var s=st;st|=1;var l=Er.transition,h=dt;try{if(Er.transition=null,dt=1,i)return i()}finally{dt=h,Er.transition=l,st=s,(st&6)===0&&qi()}}function l0(){rr=ta.current,xt(ta)}function Mo(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,E7(l)),qt!==null)for(l=qt.return;l!==null;){var h=l;switch(ym(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Vc();break;case 3:Js(),xt(zn),xt(xn),Om();break;case 5:Pm(h);break;case 4:Js();break;case 13:xt(Ot);break;case 19:xt(Ot);break;case 10:wm(h.type._context);break;case 22:case 23:l0()}l=l.return}if(sn=i,qt=i=Zi(i.current,null),pn=rr=s,Kt=0,Hu=null,n0=hd=Lo=0,Vn=zu=null,Oo!==null){for(s=0;s<Oo.length;s++)if(l=Oo[s],h=l.interleaved,h!==null){l.interleaved=null;var E=h.next,b=l.pending;if(b!==null){var S=b.next;b.next=E,h.next=S}l.pending=h}Oo=null}return i}function Mw(i,s){do{var l=qt;try{if(xm(),nd.current=sd,rd){for(var h=It.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}rd=!1}if(Ro=0,on=Xt=It=null,Lu=!1,Du=0,t0.current=null,l===null||l.return===null){Kt=1,Hu=s,qt=null;break}e:{var b=i,S=l.return,R=l,U=s;if(s=pn,R.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var Z=U,le=R,he=le.tag;if((le.mode&1)===0&&(he===0||he===11||he===15)){var ae=le.alternate;ae?(le.updateQueue=ae.updateQueue,le.memoizedState=ae.memoizedState,le.lanes=ae.lanes):(le.updateQueue=null,le.memoizedState=null)}var ve=aw(S);if(ve!==null){ve.flags&=-257,uw(ve,S,R,b,s),ve.mode&1&&sw(b,Z,s),s=ve,U=Z;var Ne=s.updateQueue;if(Ne===null){var Ie=new Set;Ie.add(U),s.updateQueue=Ie}else Ne.add(U);break e}else{if((s&1)===0){sw(b,Z,s),c0();break e}U=Error(n(426))}}else if(kt&&R.mode&1){var Ut=aw(S);if(Ut!==null){(Ut.flags&65536)===0&&(Ut.flags|=256),uw(Ut,S,R,b,s),_m(Zs(U,R));break e}}b=U=Zs(U,R),Kt!==4&&(Kt=2),zu===null?zu=[b]:zu.push(b),b=S;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var G=iw(b,U,s);Ox(b,G);break e;case 1:R=U;var j=b.type,Q=b.stateNode;if((b.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(Xi===null||!Xi.has(Q)))){b.flags|=65536,s&=-s,b.lanes|=s;var _e=ow(b,R,s);Ox(b,_e);break e}}b=b.return}while(b!==null)}Uw(l)}catch(Le){s=Le,qt===l&&l!==null&&(qt=l=l.return);continue}break}while(!0)}function Fw(){var i=fd.current;return fd.current=sd,i===null?sd:i}function c0(){(Kt===0||Kt===3||Kt===2)&&(Kt=4),sn===null||(Lo&268435455)===0&&(hd&268435455)===0||Ji(sn,pn)}function bd(i,s){var l=st;st|=2;var h=Fw();(sn!==i||pn!==s)&&(wi=null,Mo(i,s));do try{j7();break}catch(E){Mw(i,E)}while(!0);if(xm(),st=l,fd.current=h,qt!==null)throw Error(n(261));return sn=null,pn=0,Kt}function j7(){for(;qt!==null;)Bw(qt)}function $7(){for(;qt!==null&&!pB();)Bw(qt)}function Bw(i){var s=jw(i.alternate,i,rr);i.memoizedProps=i.pendingProps,s===null?Uw(i):qt=s,t0.current=null}function Uw(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=D7(l,s,rr),l!==null){qt=l;return}}else{if(l=M7(l,s),l!==null){l.flags&=32767,qt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Kt=6,qt=null;return}}if(s=s.sibling,s!==null){qt=s;return}qt=s=i}while(s!==null);Kt===0&&(Kt=5)}function Fo(i,s,l){var h=dt,E=Er.transition;try{Er.transition=null,dt=1,V7(i,s,l,h)}finally{Er.transition=E,dt=h}return null}function V7(i,s,l,h){do ra();while(Ki!==null);if((st&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(wB(i,b),i===sn&&(qt=sn=null,pn=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||md||(md=!0,$w(xc,function(){return ra(),null})),b=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||b){b=Er.transition,Er.transition=null;var S=dt;dt=1;var R=st;st|=4,t0.current=null,B7(i,l),Pw(l,i),c7(cm),Nc=!!lm,cm=lm=null,i.current=l,U7(l),mB(),st=R,dt=S,Er.transition=b}else i.current=l;if(md&&(md=!1,Ki=i,gd=E),b=i.pendingLanes,b===0&&(Xi=null),yB(l.stateNode),qn(i,Bt()),s!==null)for(h=i.onRecoverableError,l=0;l<s.length;l++)E=s[l],h(E.value,{componentStack:E.stack,digest:E.digest});if(pd)throw pd=!1,i=i0,i0=null,i;return(gd&1)!==0&&i.tag!==0&&ra(),b=i.pendingLanes,(b&1)!==0?i===o0?ju++:(ju=0,o0=i):ju=0,qi(),null}function ra(){if(Ki!==null){var i=CS(gd),s=Er.transition,l=dt;try{if(Er.transition=null,dt=16>i?16:i,Ki===null)var h=!1;else{if(i=Ki,Ki=null,gd=0,(st&6)!==0)throw Error(n(331));var E=st;for(st|=4,ke=i.current;ke!==null;){var b=ke,S=b.child;if((ke.flags&16)!==0){var R=b.deletions;if(R!==null){for(var U=0;U<R.length;U++){var Z=R[U];for(ke=Z;ke!==null;){var le=ke;switch(le.tag){case 0:case 11:case 15:Uu(8,le,b)}var he=le.child;if(he!==null)he.return=le,ke=he;else for(;ke!==null;){le=ke;var ae=le.sibling,ve=le.return;if(ww(le),le===Z){ke=null;break}if(ae!==null){ae.return=ve,ke=ae;break}ke=ve}}}var Ne=b.alternate;if(Ne!==null){var Ie=Ne.child;if(Ie!==null){Ne.child=null;do{var Ut=Ie.sibling;Ie.sibling=null,Ie=Ut}while(Ie!==null)}}ke=b}}if((b.subtreeFlags&2064)!==0&&S!==null)S.return=b,ke=S;else e:for(;ke!==null;){if(b=ke,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Uu(9,b,b.return)}var G=b.sibling;if(G!==null){G.return=b.return,ke=G;break e}ke=b.return}}var j=i.current;for(ke=j;ke!==null;){S=ke;var Q=S.child;if((S.subtreeFlags&2064)!==0&&Q!==null)Q.return=S,ke=Q;else e:for(S=j;ke!==null;){if(R=ke,(R.flags&2048)!==0)try{switch(R.tag){case 0:case 11:case 15:dd(9,R)}}catch(Le){Lt(R,R.return,Le)}if(R===S){ke=null;break e}var _e=R.sibling;if(_e!==null){_e.return=R.return,ke=_e;break e}ke=R.return}}if(st=E,qi(),Zr&&typeof Zr.onPostCommitFiberRoot=="function")try{Zr.onPostCommitFiberRoot(wc,i)}catch(Le){}h=!0}return h}finally{dt=l,Er.transition=s}}return!1}function Hw(i,s,l){s=Zs(l,s),s=iw(i,s,1),i=Wi(i,s,1),s=In(),i!==null&&(fu(i,1,s),qn(i,s))}function Lt(i,s,l){if(i.tag===3)Hw(i,i,l);else for(;s!==null;){if(s.tag===3){Hw(s,i,l);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Xi===null||!Xi.has(h))){i=Zs(l,i),i=ow(s,i,1),s=Wi(s,i,1),i=In(),s!==null&&(fu(s,1,i),qn(s,i));break}}s=s.return}}function q7(i,s,l){var h=i.pingCache;h!==null&&h.delete(s),s=In(),i.pingedLanes|=i.suspendedLanes&l,sn===i&&(pn&l)===l&&(Kt===4||Kt===3&&(pn&130023424)===pn&&500>Bt()-r0?Mo(i,0):n0|=l),qn(i,s)}function zw(i,s){s===0&&((i.mode&1)===0?s=1:(s=vc,vc<<=1,(vc&130023424)===0&&(vc=4194304)));var l=In();i=_i(i,s),i!==null&&(fu(i,s,l),qn(i,l))}function Y7(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),zw(i,l)}function W7(i,s){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(s),zw(i,l)}var jw;jw=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||zn.current)$n=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return $n=!1,L7(i,s,l);$n=(i.flags&131072)!==0}else $n=!1,kt&&(s.flags&1048576)!==0&&_x(s,Gc,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;ld(i,s),i=s.pendingProps;var E=qs(s,xn.current);Qs(s,l),E=Lm(null,s,h,i,E,l);var b=Dm();return s.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,jn(h)?(b=!0,qc(s)):b=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Cm(s),E.updater=ad,s.stateNode=E,E._reactInternals=s,zm(s,h,i,l),s=qm(null,s,h,!0,b,l)):(s.tag=0,kt&&b&&Em(s),On(null,s,E,l),s=s.child),s;case 16:h=s.elementType;e:{switch(ld(i,s),i=s.pendingProps,E=h._init,h=E(h._payload),s.type=h,E=s.tag=X7(h),i=Ir(h,i),E){case 0:s=Vm(null,s,h,i,l);break e;case 1:s=pw(null,s,h,i,l);break e;case 11:s=lw(null,s,h,i,l);break e;case 14:s=cw(null,s,h,Ir(h.type,i),l);break e}throw Error(n(306,h,""))}return s;case 0:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ir(h,E),Vm(i,s,h,E,l);case 1:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ir(h,E),pw(i,s,h,E,l);case 3:e:{if(mw(s),i===null)throw Error(n(387));h=s.pendingProps,b=s.memoizedState,E=b.element,Nx(i,s),ed(s,h,null,l);var S=s.memoizedState;if(h=S.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){E=Zs(Error(n(423)),s),s=gw(i,s,h,l,E);break e}else if(h!==E){E=Zs(Error(n(424)),s),s=gw(i,s,h,l,E);break e}else for(nr=ji(s.stateNode.containerInfo.firstChild),tr=s,kt=!0,Or=null,l=kx(s,null,h,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Gs(),h===E){s=xi(i,s,l);break e}On(i,s,h,l)}s=s.child}return s;case 5:return Rx(s),i===null&&Tm(s),h=s.type,E=s.pendingProps,b=i!==null?i.memoizedProps:null,S=E.children,dm(h,E)?S=null:b!==null&&dm(h,b)&&(s.flags|=32),hw(i,s),On(i,s,S,l),s.child;case 6:return i===null&&Tm(s),null;case 13:return Ew(i,s,l);case 4:return km(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=Xs(s,null,h,l):On(i,s,h,l),s.child;case 11:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ir(h,E),lw(i,s,h,E,l);case 7:return On(i,s,s.pendingProps,l),s.child;case 8:return On(i,s,s.pendingProps.children,l),s.child;case 12:return On(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(h=s.type._context,E=s.pendingProps,b=s.memoizedProps,S=E.value,bt(Qc,h._currentValue),h._currentValue=S,b!==null)if(Nr(b.value,S)){if(b.children===E.children&&!zn.current){s=xi(i,s,l);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var R=b.dependencies;if(R!==null){S=b.child;for(var U=R.firstContext;U!==null;){if(U.context===h){if(b.tag===1){U=Si(-1,l&-l),U.tag=2;var Z=b.updateQueue;if(Z!==null){Z=Z.shared;var le=Z.pending;le===null?U.next=U:(U.next=le.next,le.next=U),Z.pending=U}}b.lanes|=l,U=b.alternate,U!==null&&(U.lanes|=l),Am(b.return,l,s),R.lanes|=l;break}U=U.next}}else if(b.tag===10)S=b.type===s.type?null:b.child;else if(b.tag===18){if(S=b.return,S===null)throw Error(n(341));S.lanes|=l,R=S.alternate,R!==null&&(R.lanes|=l),Am(S,l,s),S=b.sibling}else S=b.child;if(S!==null)S.return=b;else for(S=b;S!==null;){if(S===s){S=null;break}if(b=S.sibling,b!==null){b.return=S.return,S=b;break}S=S.return}b=S}On(i,s,E.children,l),s=s.child}return s;case 9:return E=s.type,h=s.pendingProps.children,Qs(s,l),E=mr(E),h=h(E),s.flags|=1,On(i,s,h,l),s.child;case 14:return h=s.type,E=Ir(h,s.pendingProps),E=Ir(h.type,E),cw(i,s,h,E,l);case 15:return dw(i,s,s.type,s.pendingProps,l);case 17:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ir(h,E),ld(i,s),s.tag=1,jn(h)?(i=!0,qc(s)):i=!1,Qs(s,l),nw(s,h,E),zm(s,h,E,l),qm(null,s,h,!0,i,l);case 19:return bw(i,s,l);case 22:return fw(i,s,l)}throw Error(n(156,s.tag))};function $w(i,s){return SS(i,s)}function G7(i,s,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=s,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 yr(i,s,l,h){return new G7(i,s,l,h)}function d0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function X7(i){if(typeof i=="function")return d0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===ce)return 11;if(i===Te)return 14}return 2}function Zi(i,s){var l=i.alternate;return l===null?(l=yr(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function Td(i,s,l,h,E,b){var S=2;if(h=i,typeof i=="function")d0(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case q:return Bo(l.children,E,b,s);case re:S=8,E|=8;break;case me:return i=yr(12,l,s,E|2),i.elementType=me,i.lanes=b,i;case de:return i=yr(13,l,s,E),i.elementType=de,i.lanes=b,i;case ne:return i=yr(19,l,s,E),i.elementType=ne,i.lanes=b,i;case se:return _d(l,E,b,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case V:S=10;break e;case oe:S=9;break e;case ce:S=11;break e;case Te:S=14;break e;case Pe:S=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=yr(S,l,s,E),s.elementType=i,s.type=h,s.lanes=b,s}function Bo(i,s,l,h){return i=yr(7,i,h,s),i.lanes=l,i}function _d(i,s,l,h){return i=yr(22,i,h,s),i.elementType=se,i.lanes=l,i.stateNode={isHidden:!1},i}function f0(i,s,l){return i=yr(6,i,null,s),i.lanes=l,i}function h0(i,s,l){return s=yr(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function K7(i,s,l,h,E){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hp(0),this.expirationTimes=Hp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function p0(i,s,l,h,E,b,S,R,U){return i=new K7(i,s,l,R,U),s===1?(s=1,b===!0&&(s|=8)):s=0,b=yr(3,null,null,s),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cm(b),i}function Q7(i,s,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:h==null?null:""+h,children:i,containerInfo:s,implementation:l}}function Vw(i){if(!i)return Vi;i=i._reactInternals;e:{if(vo(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(jn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(jn(l))return yx(i,l,s)}return s}function qw(i,s,l,h,E,b,S,R,U){return i=p0(l,h,!0,i,E,b,S,R,U),i.context=Vw(null),l=i.current,h=In(),E=Qi(l),b=Si(h,E),b.callback=s!=null?s:null,Wi(l,b,E),i.current.lanes=E,fu(i,E,h),qn(i,h),i}function Sd(i,s,l,h){var E=s.current,b=In(),S=Qi(E);return l=Vw(l),s.context===null?s.context=l:s.pendingContext=l,s=Si(b,S),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=Wi(E,s,S),i!==null&&(Dr(i,E,S,b),Zc(i,E,S)),S}function xd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function Yw(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function m0(i,s){Yw(i,s),(i=i.alternate)&&Yw(i,s)}function J7(){return null}var Ww=typeof reportError=="function"?reportError:function(i){console.error(i)};function g0(i){this._internalRoot=i}wd.prototype.render=g0.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Sd(i,s,null,null)},wd.prototype.unmount=g0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Do(function(){Sd(null,i,null,null)}),s[Ei]=null}};function wd(i){this._internalRoot=i}wd.prototype.unstable_scheduleHydration=function(i){if(i){var s=NS();i={blockedOn:null,target:i,priority:s};for(var l=0;l<Ui.length&&s!==0&&s<Ui[l].priority;l++);Ui.splice(l,0,i),l===0&&RS(i)}};function E0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Ad(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Gw(){}function Z7(i,s,l,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var Z=xd(S);b.call(Z)}}var S=qw(s,h,i,0,null,!1,!1,"",Gw);return i._reactRootContainer=S,i[Ei]=S.current,vu(i.nodeType===8?i.parentNode:i),Do(),S}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var R=h;h=function(){var Z=xd(U);R.call(Z)}}var U=p0(i,0,!1,null,null,!1,!1,"",Gw);return i._reactRootContainer=U,i[Ei]=U.current,vu(i.nodeType===8?i.parentNode:i),Do(function(){Sd(s,U,l,h)}),U}function vd(i,s,l,h,E){var b=l._reactRootContainer;if(b){var S=b;if(typeof E=="function"){var R=E;E=function(){var U=xd(S);R.call(U)}}Sd(s,S,i,E)}else S=Z7(l,s,i,E,h);return xd(S)}kS=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=du(s.pendingLanes);l!==0&&(zp(s,l|1),qn(s,Bt()),(st&6)===0&&(na=Bt()+500,qi()))}break;case 13:Do(function(){var h=_i(i,1);if(h!==null){var E=In();Dr(h,i,1,E)}}),m0(i,1)}},jp=function(i){if(i.tag===13){var s=_i(i,134217728);if(s!==null){var l=In();Dr(s,i,134217728,l)}m0(i,134217728)}},PS=function(i){if(i.tag===13){var s=Qi(i),l=_i(i,s);if(l!==null){var h=In();Dr(l,i,s,h)}m0(i,s)}},NS=function(){return dt},OS=function(i,s){var l=dt;try{return dt=i,s()}finally{dt=l}},Lp=function(i,s,l){switch(s){case"input":if(Nt(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var h=l[s];if(h!==i&&h.form===i.form){var E=$c(h);if(!E)throw Error(n(90));ln(h),Nt(h,E)}}}break;case"textarea":ot(i,l);break;case"select":s=l.value,s!=null&&Ae(i,!!l.multiple,s,!1)}},mS=u0,gS=Do;var eU={usingClientEntryPoint:!1,Events:[Pu,$s,$c,hS,pS,u0]},$u={findFiberByHostInstance:Co,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},tU={bundleType:$u.bundleType,version:$u.version,rendererPackageName:$u.rendererPackageName,rendererConfig:$u.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=TS(i),i===null?null:i.stateNode},findFiberByHostInstance:$u.findFiberByHostInstance||J7,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 Cd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Cd.isDisabled&&Cd.supportsFiber)try{wc=Cd.inject(tU),Zr=Cd}catch(i){}}return Dn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eU,Dn.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!E0(s))throw Error(n(200));return Q7(i,s,null,l)},Dn.createRoot=function(i,s){if(!E0(i))throw Error(n(299));var l=!1,h="",E=Ww;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=p0(i,1,!1,null,null,l,!1,h,E),i[Ei]=s.current,vu(i.nodeType===8?i.parentNode:i),new g0(s)},Dn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=TS(s),i=i===null?null:i.stateNode,i},Dn.flushSync=function(i){return Do(i)},Dn.hydrate=function(i,s,l){if(!Ad(s))throw Error(n(200));return vd(null,i,s,!0,l)},Dn.hydrateRoot=function(i,s,l){if(!E0(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,b="",S=Ww;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(b=l.identifierPrefix),l.onRecoverableError!==void 0&&(S=l.onRecoverableError)),s=qw(s,null,i,1,l!=null?l:null,E,!1,b,S),i[Ei]=s.current,vu(i),h)for(i=0;i<h.length;i++)l=h[i],E=l._getVersion,E=E(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,E]:s.mutableSourceEagerHydrationData.push(l,E);return new wd(s)},Dn.render=function(i,s,l){if(!Ad(s))throw Error(n(200));return vd(null,i,s,!1,l)},Dn.unmountComponentAtNode=function(i){if(!Ad(i))throw Error(n(40));return i._reactRootContainer?(Do(function(){vd(null,null,i,!1,function(){i._reactRootContainer=null,i[Ei]=null})}),!0):!1},Dn.unstable_batchedUpdates=u0,Dn.unstable_renderSubtreeIntoContainer=function(i,s,l,h){if(!Ad(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return vd(i,s,l,!1,h)},Dn.version="18.3.1-next-f1338f8080-20240426",Dn}var N1;function O1(){if(N1)return Nf.exports;N1=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(),Nf.exports=Bk(),Nf.exports}var Jo=O1();function I1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=I1(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="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=I1(e))&&(r&&(r+=" "),r+=t);return r}var R1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},L1=to.createContext&&to.createContext(R1),Uk=["attr","size","title"];function Hk(e,t){if(e==null)return{};var n=zk(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zk(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 bl(){return bl=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},bl.apply(this,arguments)}function D1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Tl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?D1(Object(n),!0).forEach(function(r){jk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jk(e,t,n){return t=$k(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $k(e){var t=Vk(e,"string");return typeof t=="symbol"?t:t+""}function Vk(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 M1(e){return e&&e.map((t,n)=>to.createElement(t.tag,Tl({key:n},t.attr),M1(t.child)))}function At(e){return t=>to.createElement(qk,bl({attr:Tl({},e.attr)},t),M1(e.child))}function qk(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=Hk(e,Uk),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),to.createElement("svg",bl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Tl(Tl({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&to.createElement("title",null,a),e.children)};return L1!==void 0?to.createElement(L1.Consumer,null,n=>t(n)):t(R1)}function Yk(e){return At({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 ci=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:x.jsx("button",{className:W(e,`${z}-icon-button`),type:r,"aria-label":o,title:a,onClick:c,disabled:u,children:t?x.jsx("img",{className:W(`${z}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),Wk="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",Gk=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=rt(),o=r==="messaging",a=o?"Open Commerce Client":"Open Copilot",u=o?x.jsx(Yk,{className:W(t,`${z}-minimized-icon`)}):x.jsx("img",{src:(n==null?void 0:n.logoUrl)||Wk,alt:"Copilot",className:W(t,`${z}-minimized-icon-img`)});return x.jsx(ci,{className:W(t,`${z}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},Xk=()=>{const{globalClassName:e,themeVariables:t}=rt(),n=()=>{gl(!1),ui(!0)};return Jo.createPortal(x.jsx("div",{className:W(e,`${z}-minimized-container`),style:t,children:x.jsx(Gk,{onClick:n})}),document.body)};function F1(e){return At({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 B1(e){return At({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 Zo(e){return At({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function Kk(e){return At({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 U1(e){return At({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 Qk(e){return At({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 Jk(e){return At({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 Zk(e){return At({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 eP(e){return At({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 tP(e){return At({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 nP=e=>({[`${Wn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Wn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${Wn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${Wn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${Wn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${Wn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"}),H1=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>x.jsx("button",{"aria-label":t,title:t,className:W(e,`${z}-close-button`),disabled:r,onClick:n,children:x.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:x.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),_l=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>x.jsx("button",{className:W(`${z}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),rP=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?x.jsx("img",{className:W(`${z}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):x.jsx(Zo,{size:"16px"})},iP=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return x.jsx(ci,{className:W(e,n,`cim-${r}-component`,`${z}-search-button-icon`),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:x.jsx(Zo,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return x.jsxs(_l,{className:W(e,n,`cim-${r}-component`,`${z}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&x.jsx(rP,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function oP(e){return At({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 sP=()=>{const{messages:e}=ar(),{handleCancel:t}=Ur();return{cancelRequest:B.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],o=r.eventSourceId||r.id;t(o)},[t,e])}},aP=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=rt(),{cancelRequest:r}=sP();return n!=null&&n.enableCancelSearch?x.jsx(ci,{className:W(t,`${z}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:x.jsx(oP,{}),disabled:!e,onClick:r}):null};function DU(){}function MU(){}function z1(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(o,r).trim();(u||!a)&&t.push(u),o=r+1,r=n.indexOf(",",o)}return t}function j1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const uP=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lP=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cP={};function $1(e,t){return(cP.jsx?lP:uP).test(e)}const dP=/[ \t\n\f\r]/g;function fP(e){return typeof e=="object"?e.type==="text"?V1(e.value):!1:V1(e)}function V1(e){return e.replace(dP,"")===""}let wa=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};wa.prototype.normal={},wa.prototype.property={},wa.prototype.space=void 0;function q1(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new wa(n,r,t)}function Aa(e){return e.toLowerCase()}let Mn=class{constructor(t,n){this.attribute=n,this.property=t}};Mn.prototype.attribute="",Mn.prototype.booleanish=!1,Mn.prototype.boolean=!1,Mn.prototype.commaOrSpaceSeparated=!1,Mn.prototype.commaSeparated=!1,Mn.prototype.defined=!1,Mn.prototype.mustUseProperty=!1,Mn.prototype.number=!1,Mn.prototype.overloadedBoolean=!1,Mn.prototype.property="",Mn.prototype.spaceSeparated=!1,Mn.prototype.space=void 0;let hP=0;const Ke=lo(),jt=lo(),Rf=lo(),ye=lo(),Et=lo(),es=lo(),Gn=lo();function lo(){return oa(2,++hP)}const Lf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ke,booleanish:jt,commaOrSpaceSeparated:Gn,commaSeparated:es,number:ye,overloadedBoolean:Rf,spaceSeparated:Et},Symbol.toStringTag,{value:"Module"})),Df=Object.keys(Lf);let Mf=class extends Mn{constructor(t,n,r,o){let a=-1;if(super(t,n),Y1(this,"space",o),typeof r=="number")for(;++a<Df.length;){const u=Df[a];Y1(this,Df[a],(r&Lf[u])===Lf[u])}}};Mf.prototype.defined=!0;function Y1(e,t,n){n&&(e[t]=n)}function ts(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Mf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Aa(r)]=r,n[Aa(a.attribute)]=r}return new wa(t,n,e.space)}const W1=ts({properties:{ariaActiveDescendant:null,ariaAtomic:jt,ariaAutoComplete:null,ariaBusy:jt,ariaChecked:jt,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:Et,ariaCurrent:null,ariaDescribedBy:Et,ariaDetails:null,ariaDisabled:jt,ariaDropEffect:Et,ariaErrorMessage:null,ariaExpanded:jt,ariaFlowTo:Et,ariaGrabbed:jt,ariaHasPopup:null,ariaHidden:jt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Et,ariaLevel:ye,ariaLive:null,ariaModal:jt,ariaMultiLine:jt,ariaMultiSelectable:jt,ariaOrientation:null,ariaOwns:Et,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:jt,ariaReadOnly:jt,ariaRelevant:null,ariaRequired:jt,ariaRoleDescription:Et,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:jt,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function G1(e,t){return t in e?e[t]:t}function X1(e,t){return G1(e,t.toLowerCase())}const pP=ts({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:es,acceptCharset:Et,accessKey:Et,action:null,allow:null,allowFullScreen:Ke,allowPaymentRequest:Ke,allowUserMedia:Ke,alt:null,as:null,async:Ke,autoCapitalize:null,autoComplete:Et,autoFocus:Ke,autoPlay:Ke,blocking:Et,capture:null,charSet:null,checked:Ke,cite:null,className:Et,cols:ye,colSpan:null,content:null,contentEditable:jt,controls:Ke,controlsList:Et,coords:ye|es,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ke,defer:Ke,dir:null,dirName:null,disabled:Ke,download:Rf,draggable:jt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ke,formTarget:null,headers:Et,height:ye,hidden:Rf,high:ye,href:null,hrefLang:null,htmlFor:Et,httpEquiv:Et,id:null,imageSizes:null,imageSrcSet:null,inert:Ke,inputMode:null,integrity:null,is:null,isMap:Ke,itemId:null,itemProp:Et,itemRef:Et,itemScope:Ke,itemType:Et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ke,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:Ke,muted:Ke,name:null,nonce:null,noModule:Ke,noValidate:Ke,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:Ke,optimum:ye,pattern:null,ping:Et,placeholder:null,playsInline:Ke,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ke,referrerPolicy:null,rel:Et,required:Ke,reversed:Ke,rows:ye,rowSpan:ye,sandbox:Et,scope:null,scoped:Ke,seamless:Ke,selected:Ke,shadowRootClonable:Ke,shadowRootDelegatesFocus:Ke,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:jt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:Ke,useMap:null,value:jt,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Et,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ke,declare:Ke,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:Ke,noHref:Ke,noShade:Ke,noWrap:Ke,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:jt,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ke,disableRemotePlayback:Ke,prefix:null,property:null,results:ye,security:null,unselectable:null},space:"html",transform:X1}),mP=ts({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Gn,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:Et,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:Ke,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,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:es,g2:es,glyphName:es,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:Gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ye,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:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Gn,rev:Gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Gn,requiredFeatures:Gn,requiredFonts:Gn,requiredFormats:Gn,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:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:Gn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Gn,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Gn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:G1}),K1=ts({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Q1=ts({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:X1}),J1=ts({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),gP={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"},EP=/[A-Z]/g,Z1=/-[a-z]/g,yP=/^data[-\w.:]+$/i;function Ff(e,t){const n=Aa(t);let r=t,o=Mn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&yP.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Z1,TP);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Z1.test(a)){let u=a.replace(EP,bP);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Mf}return new o(r,t)}function bP(e){return"-"+e.toLowerCase()}function TP(e){return e.charAt(1).toUpperCase()}const Sl=q1([W1,pP,K1,Q1,J1],"html"),ns=q1([W1,mP,K1,Q1,J1],"svg");function eE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function tE(e){return e.join(" ").trim()}var rs={},Bf,nE;function _P(){if(nE)return Bf;nE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
18
|
+
`,f="/",p="*",m="",T="comment",y="declaration";Bf=function(w,C){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];C=C||{};var A=1,P=1;function v(de){var ne=de.match(t);ne&&(A+=ne.length);var Te=de.lastIndexOf(d);P=~Te?de.length-Te:P+de.length}function H(){var de={line:A,column:P};return function(ne){return ne.position=new Y(de),re(),ne}}function Y(de){this.start=de,this.end={line:A,column:P},this.source=C.source}Y.prototype.content=w;function D(de){var ne=new Error(C.source+":"+A+":"+P+": "+de);if(ne.reason=de,ne.filename=C.source,ne.line=A,ne.column=P,ne.source=w,!C.silent)throw ne}function q(de){var ne=de.exec(w);if(ne){var Te=ne[0];return v(Te),w=w.slice(Te.length),ne}}function re(){q(n)}function me(de){var ne;for(de=de||[];ne=V();)ne!==!1&&de.push(ne);return de}function V(){var de=H();if(!(f!=w.charAt(0)||p!=w.charAt(1))){for(var ne=2;m!=w.charAt(ne)&&(p!=w.charAt(ne)||f!=w.charAt(ne+1));)++ne;if(ne+=2,m===w.charAt(ne-1))return D("End of comment missing");var Te=w.slice(2,ne-2);return P+=2,v(Te),w=w.slice(ne),P+=2,de({type:T,comment:Te})}}function oe(){var de=H(),ne=q(r);if(ne){if(V(),!q(o))return D("property missing ':'");var Te=q(a),Pe=de({type:y,property:_(ne[0].replace(e,m)),value:Te?_(Te[0].replace(e,m)):m});return q(u),Pe}}function ce(){var de=[];me(de);for(var ne;ne=oe();)ne!==!1&&(de.push(ne),me(de));return de}return re(),ce()};function _(w){return w?w.replace(c,m):m}return Bf}var rE;function SP(){if(rE)return rs;rE=1;var e=rs&&rs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=n;var t=e(_P());function n(r,o){var a=null;if(!r||typeof r!="string")return a;var u=(0,t.default)(r),c=typeof o=="function";return u.forEach(function(d){if(d.type==="declaration"){var f=d.property,p=d.value;c?o(f,p,d):p&&(a=a||{},a[f]=p)}}),a}return rs}var va={},iE;function xP(){if(iE)return va;iE=1,Object.defineProperty(va,"__esModule",{value:!0}),va.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(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(o,c):f=f.replace(r,c),f.replace(t,u))};return va.camelCase=d,va}var Ca,oE;function wP(){if(oE)return Ca;oE=1;var e=Ca&&Ca.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(SP()),n=xP();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,Ca=r,Ca}var AP=wP();const vP=Ze(AP),xl=sE("end"),Hr=sE("start");function sE(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 aE(e){const t=Hr(e),n=xl(e);if(t&&n)return{start:t,end:n}}function ka(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?uE(e.position):"start"in e||"end"in e?uE(e):"line"in e||"column"in e?Uf(e):""}function Uf(e){return lE(e&&e.line)+":"+lE(e&&e.column)}function uE(e){return Uf(e&&e.start)+"-"+Uf(e&&e.end)}function lE(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 o="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=F({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=ka(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}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 Hf={}.hasOwnProperty,CP=new Map,kP=/[A-Z]/g,PP=new Set(["table","tbody","thead","tfoot","tr"]),NP=new Set(["td","th"]),cE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function OP(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=UP(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=BP(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ns:Sl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=dE(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function dE(e,t,n){if(t.type==="element")return IP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return RP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return DP(e,t,n);if(t.type==="mdxjsEsm")return LP(e,t);if(t.type==="root")return MP(e,t,n);if(t.type==="text")return FP(e,t)}function IP(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=ns,e.schema=o),e.ancestors.push(t);const a=hE(e,t.tagName,!1),u=HP(e,t);let c=jf(e,t);return PP.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!fP(d):!0})),fE(e,u,a,t),zf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function RP(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)}Pa(e,t.position)}function LP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Pa(e,t.position)}function DP(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=ns,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:hE(e,t.name,!0),u=zP(e,t),c=jf(e,t);return fE(e,u,a,t),zf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function MP(e,t,n){const r={};return zf(r,jf(e,t)),e.create(t,e.Fragment,r,n)}function FP(e,t){return t.value}function fE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function zf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function BP(e,t,n){return r;function r(o,a,u,c){const f=Array.isArray(u.children)?n:t;return c?f(a,u,c):f(a,u)}}function UP(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=Hr(r);return t(o,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function HP(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Hf.call(t.properties,o)){const a=jP(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&NP.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 zP(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 Pa(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Pa(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function jf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:CP;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=o.get(d)||0;u=d+"-"+f,o.set(d,f+1)}}const c=dE(e,a,u);c!==void 0&&n.push(c)}return n}function jP(e,t,n){const r=Ff(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?j1(n):tE(n)),r.property==="style"){let o=typeof n=="object"?n:$P(e,String(n));return e.stylePropertyNameCase==="css"&&(o=VP(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?gP[r.property]||r.property:r.attribute,n]}}function $P(e,t){try{return vP(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new bn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=cE+"#cannot-parse-style-attribute",o}}function hE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const c=$1(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=$1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Hf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Pa(e)}function Pa(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=cE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function VP(e){const t={};let n;for(n in e)Hf.call(e,n)&&(t[qP(n)]=e[n]);return t}function qP(e){let t=e.replace(kP,YP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function YP(e){return"-"+e.toLowerCase()}const $f={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"]},WP={};function Vf(e,t){const n=WP,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return pE(e,r,o)}function pE(e,t,n){if(GP(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 mE(e.children,t,n)}return Array.isArray(e)?mE(e,t,n):""}function mE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=pE(e[o],t,n);return r.join("")}function GP(e){return!!(e&&typeof e=="object")}const gE=document.createElement("i");function qf(e){const t="&"+e+";";gE.innerHTML=t;const n=gE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Xn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function ur(e,t){return e.length>0?(Xn(e,e.length,0,t),e):t}const EE={}.hasOwnProperty;function yE(e){const t={};let n=-1;for(;++n<e.length;)XP(t,e[n]);return t}function XP(e,t){let n;for(n in t){const o=(EE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){EE.call(o,u)||(o[u]=[]);const c=a[u];KP(o[u],Array.isArray(c)?c:c?[c]:[])}}}function KP(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Xn(e,0,0,r)}function bE(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 xr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kn=ki(/[A-Za-z]/),Tn=ki(/[\dA-Za-z]/),QP=ki(/[#-'*+\--9=?A-Z^-~]/);function wl(e){return e!==null&&(e<32||e===127)}const Yf=ki(/\d/),JP=ki(/[\dA-Fa-f]/),ZP=ki(/[!-/:-@[-`{-~]/);function Ue(e){return e!==null&&e<-2}function ht(e){return e!==null&&(e<0||e===32)}function tt(e){return e===-2||e===-1||e===32}const Al=ki(new RegExp("\\p{P}|\\p{S}","u")),co=ki(/\s/);function ki(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function is(e){const t=[];let n=-1,r=0,o=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)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function it(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return tt(d)?(e.enter(n),c(d)):t(d)}function c(d){return tt(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const eN={tokenize:tN};function tN(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),it(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Ue(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const nN={tokenize:rN},TE={tokenize:iN};function rN(e){const t=this,n=[];let r=0,o,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,o&&P();const H=t.events.length;let Y=H,D;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){D=t.events[Y][1].end;break}A(r);let q=H;for(;q<t.events.length;)t.events[q][1].end=F({},D),q++;return Xn(t.events,Y+1,0,t.events.slice(H)),t.events.length=q,f(v)}return c(v)}function f(v){if(r===n.length){if(!o)return T(v);if(o.currentConstruct&&o.currentConstruct.concrete)return _(v);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(TE,p,m)(v)}function p(v){return o&&P(),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(TE,y,_)(v)}function y(v){return r++,n.push([t.currentConstruct,t.containerState]),T(v)}function _(v){if(v===null){o&&P(),A(0),e.consume(v);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,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 Y=t.sliceStream(v);if(H&&Y.push(null),v.previous=a,a&&(a.next=v),a=v,o.defineSkip(v.start),o.write(Y),t.parser.lazy[v.start.line]){let D=o.events.length;for(;D--;)if(o.events[D][1].start.offset<u&&(!o.events[D][1].end||o.events[D][1].end.offset>u))return;const q=t.events.length;let re=q,me,V;for(;re--;)if(t.events[re][0]==="exit"&&t.events[re][1].type==="chunkFlow"){if(me){V=t.events[re][1].end;break}me=!0}for(A(r),D=q;D<t.events.length;)t.events[D][1].end=F({},V),D++;Xn(t.events,re+1,0,t.events.slice(q)),t.events.length=D}}function A(v){let H=n.length;for(;H-- >v;){const Y=n[H];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=v}function P(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function iN(e,t,n){return it(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function os(e){if(e===null||ht(e)||co(e))return 1;if(Al(e))return 2}function vl(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Wf={name:"attention",resolveAll:oN,tokenize:sN};function oN(e,t){let n=-1,r,o,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=F({},e[r][1].end),T=F({},e[n][1].start);_E(m,-d),_E(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:F({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:F({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:F({},e[r][1].end),end:F({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:F({},u.start),end:F({},c.end)},e[r][1].end=F({},u.start),e[n][1].start=F({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=ur(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=ur(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=ur(f,vl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=ur(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=ur(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Xn(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 sN(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=os(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=os(d),m=!p||p===2&&o||n.includes(d),T=!o||o===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(o||!T)),f._close=!!(a===42?T:T&&(p||!m)),t(d)}}function _E(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const aN={name:"autolink",tokenize:uN};function uN(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return 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||wl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):QP(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 Na={partial:!0,tokenize:lN};function lN(e,t,n){return r;function r(a){return tt(a)?it(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Ue(a)?t(a):n(a)}}const SE={continuation:{tokenize:dN},exit:fN,name:"blockQuote",tokenize:cN};function cN(e,t,n){const r=this;return o;function o(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return tt(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function dN(e,t,n){const r=this;return o;function o(u){return tt(u)?it(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(SE,t,n)(u)}}function fN(e){e.exit("blockQuote")}const xE={name:"characterEscape",tokenize:hN};function hN(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return ZP(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const wE={name:"characterReference",tokenize:pN};function pN(e,t,n){const r=this;let o=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=JP,p):(e.enter("characterReferenceValue"),a=7,u=Yf,p(m))}function p(m){if(m===59&&o){const T=e.exit("characterReferenceValue");return u===Tn&&!qf(r.sliceSerialize(T))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&o++<a?(e.consume(m),p):n(m)}}const AE={partial:!0,tokenize:gN},vE={concrete:!0,name:"codeFenced",tokenize:mN};function mN(e,t,n){const r=this,o={partial:!0,tokenize:Y};let a=0,u=0,c;return d;function d(D){return f(D)}function f(D){const q=r.events[r.events.length-1];return a=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,c=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(D)}function p(D){return D===c?(u++,e.consume(D),p):u<3?n(D):(e.exit("codeFencedFenceSequence"),tt(D)?it(e,m,"whitespace")(D):m(D))}function m(D){return D===null||Ue(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(AE,w,H)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(D))}function T(D){return D===null||Ue(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(D)):tt(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),it(e,y,"whitespace")(D)):D===96&&D===c?n(D):(e.consume(D),T)}function y(D){return D===null||Ue(D)?m(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(D))}function _(D){return D===null||Ue(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(D)):D===96&&D===c?n(D):(e.consume(D),_)}function w(D){return e.attempt(o,H,C)(D)}function C(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),A}function A(D){return a>0&&tt(D)?it(e,P,"linePrefix",a+1)(D):P(D)}function P(D){return D===null||Ue(D)?e.check(AE,w,H)(D):(e.enter("codeFlowValue"),v(D))}function v(D){return D===null||Ue(D)?(e.exit("codeFlowValue"),P(D)):(e.consume(D),v)}function H(D){return e.exit("codeFenced"),t(D)}function Y(D,q,re){let me=0;return V;function V(Te){return D.enter("lineEnding"),D.consume(Te),D.exit("lineEnding"),oe}function oe(Te){return D.enter("codeFencedFence"),tt(Te)?it(D,ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Te):ce(Te)}function ce(Te){return Te===c?(D.enter("codeFencedFenceSequence"),de(Te)):re(Te)}function de(Te){return Te===c?(me++,D.consume(Te),de):me>=u?(D.exit("codeFencedFenceSequence"),tt(Te)?it(D,ne,"whitespace")(Te):ne(Te)):re(Te)}function ne(Te){return Te===null||Ue(Te)?(D.exit("codeFencedFence"),q(Te)):re(Te)}}}function gN(e,t,n){const r=this;return o;function o(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Gf={name:"codeIndented",tokenize:yN},EN={partial:!0,tokenize:bN};function yN(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),it(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(EN,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 bN(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):Ue(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):it(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)?o(u):n(u)}}const TN={name:"codeText",previous:SN,resolve:_N,tokenize:xN};function _N(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function SN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function xN(e,t,n){let r=0,o,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"),o=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),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class wN{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Oa(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),Oa(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Oa(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);Oa(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Oa(this.left,n.reverse())}}}function Oa(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 CE(e){const t={};let n=-1,r,o,a,u,c,d,f;const p=new wN(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,AN(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=F({},p.get(o)[1].start),c=p.slice(o,n),c.unshift(r),p.splice(o,n-o+1,c))}}return Xn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function AN(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],f={};let p,m,T=-1,y=n,_=0,w=0;const C=[w];for(;y;){for(;e.get(++o)[1]!==y;);a.push(o),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]),P=a.pop();d.push([P,P+A.length-1]),e.splice(P,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 vN={resolve:kN,tokenize:PN},CN={partial:!0,tokenize:NN};function kN(e){return CE(e),e}function PN(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):Ue(c)?e.check(CN,u,a)(c):(e.consume(c),o)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function NN(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),it(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 kE(e,t,n,r,o,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(o),e.enter(a),e.consume(A),e.exit(a),T):A===null||A===32||A===41||wl(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(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(A))}function y(A){return A===62?(e.exit("chunkString"),e.exit(c),T(A)):A===null||A===60||Ue(A)?n(A):(e.consume(A),A===92?_:y)}function _(A){return A===60||A===62||A===92?(e.consume(A),y):y(A)}function w(A){return!p&&(A===null||A===41||ht(A))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(A)):p<f&&A===40?(e.consume(A),p++,w):A===41?(e.consume(A),p--,w):A===null||A===32||A===40||wl(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 PE(e,t,n,r,o,a){const u=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(o),e.consume(y),e.exit(o),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):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=!tt(y)),y===92?T:m)}function T(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function NE(e,t,n,r,o,a){let u;return c;function c(T){return T===34||T===39||T===40?(e.enter(r),e.enter(o),e.consume(T),e.exit(o),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):(e.enter(a),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"),it(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 Ia(e,t){let n;return r;function r(o){return Ue(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):tt(o)?it(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const ON={name:"definition",tokenize:RN},IN={partial:!0,tokenize:LN};function RN(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return PE.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return o=xr(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)?Ia(e,f)(y):f(y)}function f(y){return kE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(IN,m,m)(y)}function m(y){return tt(y)?it(e,T,"whitespace")(y):T(y)}function T(y){return y===null||Ue(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function LN(e,t,n){return r;function r(c){return ht(c)?Ia(e,o)(c):n(c)}function o(c){return NE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return tt(c)?it(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Ue(c)?t(c):n(c)}}const DN={name:"hardBreakEscape",tokenize:MN};function MN(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Ue(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const FN={name:"headingAtx",resolve:BN,tokenize:UN};function BN(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Xn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function UN(e,t,n){let r=0;return o;function o(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||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)):tt(p)?it(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 HN=["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"],OE=["pre","script","style","textarea"],zN={concrete:!0,name:"htmlFlow",resolveTo:VN,tokenize:qN},jN={partial:!0,tokenize:WN},$N={partial:!0,tokenize:YN};function VN(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 qN(e,t,n){const r=this;let o,a,u,c,d;return f;function f(I){return p(I)}function p(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),m}function m(I){return I===33?(e.consume(I),T):I===47?(e.consume(I),a=!0,w):I===63?(e.consume(I),o=3,r.interrupt?t:k):kn(I)?(e.consume(I),u=String.fromCharCode(I),C):n(I)}function T(I){return I===45?(e.consume(I),o=2,y):I===91?(e.consume(I),o=5,c=0,_):kn(I)?(e.consume(I),o=4,r.interrupt?t:k):n(I)}function y(I){return I===45?(e.consume(I),r.interrupt?t:k):n(I)}function _(I){const Se="CDATA[";return I===Se.charCodeAt(c++)?(e.consume(I),c===Se.length?r.interrupt?t:ce:_):n(I)}function w(I){return kn(I)?(e.consume(I),u=String.fromCharCode(I),C):n(I)}function C(I){if(I===null||I===47||I===62||ht(I)){const Se=I===47,je=u.toLowerCase();return!Se&&!a&&OE.includes(je)?(o=1,r.interrupt?t(I):ce(I)):HN.includes(u.toLowerCase())?(o=6,Se?(e.consume(I),A):r.interrupt?t(I):ce(I)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):a?P(I):v(I))}return I===45||Tn(I)?(e.consume(I),u+=String.fromCharCode(I),C):n(I)}function A(I){return I===62?(e.consume(I),r.interrupt?t:ce):n(I)}function P(I){return tt(I)?(e.consume(I),P):V(I)}function v(I){return I===47?(e.consume(I),V):I===58||I===95||kn(I)?(e.consume(I),H):tt(I)?(e.consume(I),v):V(I)}function H(I){return I===45||I===46||I===58||I===95||Tn(I)?(e.consume(I),H):Y(I)}function Y(I){return I===61?(e.consume(I),D):tt(I)?(e.consume(I),Y):v(I)}function D(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),d=I,q):tt(I)?(e.consume(I),D):re(I)}function q(I){return I===d?(e.consume(I),d=null,me):I===null||Ue(I)?n(I):(e.consume(I),q)}function re(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||ht(I)?Y(I):(e.consume(I),re)}function me(I){return I===47||I===62||tt(I)?v(I):n(I)}function V(I){return I===62?(e.consume(I),oe):n(I)}function oe(I){return I===null||Ue(I)?ce(I):tt(I)?(e.consume(I),oe):n(I)}function ce(I){return I===45&&o===2?(e.consume(I),Pe):I===60&&o===1?(e.consume(I),se):I===62&&o===4?(e.consume(I),L):I===63&&o===3?(e.consume(I),k):I===93&&o===5?(e.consume(I),ie):Ue(I)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(jN,ee,de)(I)):I===null||Ue(I)?(e.exit("htmlFlowData"),de(I)):(e.consume(I),ce)}function de(I){return e.check($N,ne,ee)(I)}function ne(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),Te}function Te(I){return I===null||Ue(I)?de(I):(e.enter("htmlFlowData"),ce(I))}function Pe(I){return I===45?(e.consume(I),k):ce(I)}function se(I){return I===47?(e.consume(I),u="",K):ce(I)}function K(I){if(I===62){const Se=u.toLowerCase();return OE.includes(Se)?(e.consume(I),L):ce(I)}return kn(I)&&u.length<8?(e.consume(I),u+=String.fromCharCode(I),K):ce(I)}function ie(I){return I===93?(e.consume(I),k):ce(I)}function k(I){return I===62?(e.consume(I),L):I===45&&o===2?(e.consume(I),k):ce(I)}function L(I){return I===null||Ue(I)?(e.exit("htmlFlowData"),ee(I)):(e.consume(I),L)}function ee(I){return e.exit("htmlFlow"),t(I)}}function YN(e,t,n){const r=this;return o;function o(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 WN(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Na,t,n)}}const GN={name:"htmlText",tokenize:XN};function XN(e,t,n){const r=this;let o,a,u;return c;function c(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),Y):k===63?(e.consume(k),v):kn(k)?(e.consume(k),re):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,_):kn(k)?(e.consume(k),P):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?Pe(k):k===45?T(k):m(k)}function _(k){const L="CDATA[";return k===L.charCodeAt(a++)?(e.consume(k),a===L.length?w:_):n(k)}function w(k){return k===null?n(k):k===93?(e.consume(k),C):Ue(k)?(u=w,se(k)):(e.consume(k),w)}function C(k){return k===93?(e.consume(k),A):w(k)}function A(k){return k===62?Pe(k):k===93?(e.consume(k),A):w(k)}function P(k){return k===null||k===62?Pe(k):Ue(k)?(u=P,se(k)):(e.consume(k),P)}function v(k){return k===null?n(k):k===63?(e.consume(k),H):Ue(k)?(u=v,se(k)):(e.consume(k),v)}function H(k){return k===62?Pe(k):v(k)}function Y(k){return kn(k)?(e.consume(k),D):n(k)}function D(k){return k===45||Tn(k)?(e.consume(k),D):q(k)}function q(k){return Ue(k)?(u=q,se(k)):tt(k)?(e.consume(k),q):Pe(k)}function re(k){return k===45||Tn(k)?(e.consume(k),re):k===47||k===62||ht(k)?me(k):n(k)}function me(k){return k===47?(e.consume(k),Pe):k===58||k===95||kn(k)?(e.consume(k),V):Ue(k)?(u=me,se(k)):tt(k)?(e.consume(k),me):Pe(k)}function V(k){return k===45||k===46||k===58||k===95||Tn(k)?(e.consume(k),V):oe(k)}function oe(k){return k===61?(e.consume(k),ce):Ue(k)?(u=oe,se(k)):tt(k)?(e.consume(k),oe):me(k)}function ce(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),o=k,de):Ue(k)?(u=ce,se(k)):tt(k)?(e.consume(k),ce):(e.consume(k),ne)}function de(k){return k===o?(e.consume(k),o=void 0,Te):k===null?n(k):Ue(k)?(u=de,se(k)):(e.consume(k),de)}function ne(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||ht(k)?me(k):(e.consume(k),ne)}function Te(k){return k===47||k===62||ht(k)?me(k):n(k)}function Pe(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"),K}function K(k){return tt(k)?it(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 Xf={name:"labelEnd",resolveAll:ZN,resolveTo:eO,tokenize:tO},KN={tokenize:nO},QN={tokenize:rO},JN={tokenize:iO};function ZN(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Xn(e,0,e.length,n),e}function eO(e,t){let n=e.length,r=0,o,a,u,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:F({},e[a][1].start),end:F({},e[e.length-1][1].end)},f={type:"label",start:F({},e[a][1].start),end:F({},e[u][1].end)},p={type:"labelText",start:F({},e[a+r+2][1].end),end:F({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=ur(c,e.slice(a+1,a+r+3)),c=ur(c,[["enter",p,t]]),c=ur(c,vl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=ur(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=ur(c,e.slice(u+1)),c=ur(c,[["exit",d,t]]),Xn(e,a,e.length,c),e}function tO(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(T){return a?a._inactive?m(T):(u=r.parser.defined.includes(xr(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(KN,p,u?p:m)(T):T===91?e.attempt(QN,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(JN,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function nO(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return ht(m)?Ia(e,a)(m):a(m)}function a(m){return m===41?p(m):kE(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return ht(m)?Ia(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?NE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return ht(m)?Ia(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 rO(e,t,n){const r=this;return o;function o(c){return PE.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(xr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function iO(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const oO={name:"labelStartImage",resolveAll:Xf.resolveAll,tokenize:sO};function sO(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const aO={name:"labelStartLink",resolveAll:Xf.resolveAll,tokenize:uO};function uO(e,t,n){const r=this;return o;function o(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Kf={name:"lineEnding",tokenize:lO};function lO(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),it(e,t,"linePrefix")}}const Cl={name:"thematicBreak",tokenize:cO};function cO(e,t,n){let r=0,o;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return o=f,c(f)}function c(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||Ue(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),tt(f)?it(e,c,"whitespace")(f):c(f))}}const Fn={continuation:{tokenize:pO},exit:gO,name:"list",tokenize:hO},dO={partial:!0,tokenize:EO},fO={partial:!0,tokenize:mO};function hO(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return c;function c(y){const _=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Yf(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Cl,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 Yf(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(Na,r.interrupt?n:p,e.attempt(dO,T,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function m(y){return tt(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 pO(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Na,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,it(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!tt(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(fO,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,it(e,e.attempt(Fn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function mO(e,t,n){const r=this;return it(e,o,"listItemIndent",r.containerState.size+1);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function gO(e){e.exit(this.containerState.type)}function EO(e,t,n){const r=this;return it(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const u=r.events[r.events.length-1];return!tt(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const IE={name:"setextUnderline",resolveTo:yO,tokenize:bO};function yO(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:F({},e[r][1].start),end:F({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=F({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function bO(e,t,n){const r=this;let o;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"),o=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===o?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),tt(f)?it(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Ue(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const TO={tokenize:_O};function _O(e){const t=this,n=e.attempt(Na,r,e.attempt(this.parser.constructs.flowInitial,o,it(e,e.attempt(this.parser.constructs.flow,o,e.attempt(vN,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const SO={resolveAll:LE()},xO=RE("string"),wO=RE("text");function RE(e){return{resolveAll:LE(e==="text"?AO:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,c);return u;function u(p){return 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=o[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 LE(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function AO(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,u=-1,c=0,d;for(;a--;){const f=o[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:F({},r.end)};r.end=F({},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:ON},disable:{null:[]},document:{42:Fn,43:Fn,45:Fn,48:Fn,49:Fn,50:Fn,51:Fn,52:Fn,53:Fn,54:Fn,55:Fn,56:Fn,57:Fn,62:SE},flow:{35:FN,42:Cl,45:[IE,Cl],60:zN,61:IE,95:Cl,96:vE,126:vE},flowInitial:{[-2]:Gf,[-1]:Gf,32:Gf},insideSpan:{null:[Wf,SO]},string:{38:wE,92:xE},text:{[-5]:Kf,[-4]:Kf,[-3]:Kf,33:oO,38:wE,42:Wf,60:[aN,GN],91:aO,92:[DN,xE],93:Xf,95:Wf,96:TN}},Symbol.toStringTag,{value:"Module"}));function CO(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let u=[],c=[];const d={attempt:q(Y),check:q(D),consume:P,enter:v,exit:H,interrupt:q(D,{interrupt:!0})},f={code:null,containerState:{},defineSkip:w,events:[],now:_,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(oe){return u=ur(u,oe),C(),u[u.length-1]!==null?[]:(re(t,0),f.events=vl(a,f.events,f),f.events)}function T(oe,ce){return PO(y(oe),ce)}function y(oe){return kO(u,oe)}function _(){const{_bufferIndex:oe,_index:ce,line:de,column:ne,offset:Te}=r;return{_bufferIndex:oe,_index:ce,line:de,column:ne,offset:Te}}function w(oe){o[oe.line]=oe.column,V()}function C(){let oe;for(;r._index<u.length;){const ce=u[r._index];if(typeof ce=="string")for(oe=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===oe&&r._bufferIndex<ce.length;)A(ce.charCodeAt(r._bufferIndex));else A(ce)}}function A(oe){p=p(oe)}function P(oe){Ue(oe)?(r.line++,r.column=1,r.offset+=oe===-3?2:1,V()):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,ce){const de=ce||{};return de.type=oe,de.start=_(),f.events.push(["enter",de,f]),c.push(de),de}function H(oe){const ce=c.pop();return ce.end=_(),f.events.push(["exit",ce,f]),ce}function Y(oe,ce){re(oe,ce.from)}function D(oe,ce){ce.restore()}function q(oe,ce){return de;function de(ne,Te,Pe){let se,K,ie,k;return Array.isArray(ne)?ee(ne):"tokenize"in ne?ee([ne]):L(ne);function L(Ee){return Be;function Be(Ve){const Ge=Ve!==null&&Ee[Ve],_t=Ve!==null&&Ee.null,Pn=[...Array.isArray(Ge)?Ge:Ge?[Ge]:[],...Array.isArray(_t)?_t:_t?[_t]:[]];return ee(Pn)(Ve)}}function ee(Ee){return se=Ee,K=0,Ee.length===0?Pe:I(Ee[K])}function I(Ee){return Be;function Be(Ve){return k=me(),ie=Ee,Ee.partial||(f.currentConstruct=Ee),Ee.name&&f.parser.constructs.disable.null.includes(Ee.name)?je():Ee.tokenize.call(ce?Object.assign(Object.create(f),ce):f,d,Se,je)(Ve)}}function Se(Ee){return oe(ie,k),Te}function je(Ee){return k.restore(),++K<se.length?I(se[K]):Pe}}}function re(oe,ce){oe.resolveAll&&!a.includes(oe)&&a.push(oe),oe.resolve&&Xn(f.events,ce,f.events.length-ce,oe.resolve(f.events.slice(ce),f)),oe.resolveTo&&(f.events=oe.resolveTo(f.events,f))}function me(){const oe=_(),ce=f.previous,de=f.currentConstruct,ne=f.events.length,Te=Array.from(c);return{from:ne,restore:Pe};function Pe(){r=oe,f.previous=ce,f.currentConstruct=de,f.events.length=ne,c=Te,V()}}function V(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function kO(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function PO(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
|
|
19
19
|
`;break}case-3:{u=`\r
|
|
20
|
-
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function NO(e){const r={constructs:yE([vO,...(e||{}).extensions||[]]),content:o(eN),defined:[],document:o(nN),flow:o(TO),lazy:{},string:o(xO),text:o(wO)};return r;function o(a){return u;function u(c){return CO(r,a,c)}}}function OO(e){for(;!CE(e););return e}const DE=/[\0\t\n\r]/g;function IO(){let e=1,t="",n=!0,r;return o;function o(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(DE.lastIndex=m,f=DE.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 RO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function LO(e){return e.replace(RO,DO)}function DO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return bE(n.slice(a?2:1),a?16:10)}return qf(n)||e}const ME={}.hasOwnProperty;function MO(e,t,n){return typeof t!="string"&&(n=t,t=void 0),FO(n)(OO(NO(n).document().write(IO()(e,t,!0))))}function FO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(cn),autolinkProtocol:me,autolinkEmail:me,atxHeading:a(rn),blockQuote:a(_t),characterEscape:me,characterReference:me,codeFenced:a(Pn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Pn,u),codeText:a(ln,u),codeTextData:me,data:me,codeFlowValue:me,definition:a(kr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(fr),hardBreakEscape:a(qe),hardBreakTrailing:a(qe),htmlFlow:a(Nt,u),htmlFlowData:me,htmlText:a(Nt,u),htmlTextData:me,image:a(Nn),label:u,link:a(cn),listItem:a(Ae),listItemValue:T,listOrdered:a(Hn,m),listUnordered:a(Hn),paragraph:a(Ne),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(rn),strong:a(Me),thematicBreak:a(pt)},exit:{atxHeading:d(),atxHeadingSequence:Y,autolink:d(),autolinkEmail:Ge,autolinkProtocol:Ve,blockQuote:d(),characterEscapeValue:V,characterReferenceMarkerHexadecimal:Ue,characterReferenceMarkerNumeric:Ue,characterReferenceValue:Te,characterReference:Be,codeFenced:d(C),codeFencedFence:w,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:V,codeIndented:d(A),codeText:d(Ee),codeTextData:V,data:V,definition:d(),definitionDestinationString:H,definitionLabelString:P,definitionTitleString:v,emphasis:d(),hardBreakEscape:d(ce),hardBreakTrailing:d(ce),htmlFlow:d(de),htmlFlowData:V,htmlText:d(ne),htmlTextData:V,image:d(oe),label:ie,labelText:Q,lineEnding:se,link:d(Oe),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:we,resourceDestinationString:k,resourceTitleString:L,resource:ee,setextHeading:d(re),setextHeadingLineSequence:q,setextHeadingText:D,strong:d(),thematicBreak:d()}};FE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let ge={type:"root",children:[]};const Ce={stack:[ge],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},Ye=[];let Re=-1;for(;++Re<J.length;)if(J[Re][1].type==="listOrdered"||J[Re][1].type==="listUnordered")if(J[Re][0]==="enter")Ye.push(Re);else{const ct=Ye.pop();Re=o(J,ct,Re)}for(Re=-1;++Re<J.length;){const ct=t[J[Re][0]];ME.call(ct,J[Re][1].type)&&ct[J[Re][1].type].call(Object.assign({sliceSerialize:J[Re][2].sliceSerialize},Ce),J[Re][1])}if(Ce.tokenStack.length>0){const ct=Ce.tokenStack[Ce.tokenStack.length-1];(ct[1]||BE).call(Ce,void 0,ct[0])}for(ge.position={start:Pi(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:Pi(J.length>0?J[J.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 o(J,ge,Ce){let Ye=ge-1,Re=-1,ct=!1,Gt,Vt,dn,Qr;for(;++Ye<=Ce;){const fn=J[Ye];switch(fn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{fn[0]==="enter"?Re++:Re--,Qr=void 0;break}case"lineEndingBlank":{fn[0]==="enter"&&(Gt&&!Qr&&!Re&&!dn&&(dn=Ye),Qr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qr=void 0}if(!Re&&fn[0]==="enter"&&fn[1].type==="listItemPrefix"||Re===-1&&fn[0]==="exit"&&(fn[1].type==="listUnordered"||fn[1].type==="listOrdered")){if(Gt){let Jr=Ye;for(Vt=void 0;Jr--;){const Zn=J[Jr];if(Zn[1].type==="lineEnding"||Zn[1].type==="lineEndingBlank"){if(Zn[0]==="exit")continue;Vt&&(J[Vt][1].type="lineEndingBlank",ct=!0),Zn[1].type="lineEnding",Vt=Jr}else if(!(Zn[1].type==="linePrefix"||Zn[1].type==="blockQuotePrefix"||Zn[1].type==="blockQuotePrefixWhitespace"||Zn[1].type==="blockQuoteMarker"||Zn[1].type==="listItemIndent"))break}dn&&(!Vt||dn<Vt)&&(Gt._spread=!0),Gt.end=Object.assign({},Vt?J[Vt][1].start:fn[1].end),J.splice(Vt||Ye,0,["exit",Gt,fn[2]]),Ye++,Ce++}if(fn[1].type==="listItemPrefix"){const Jr={type:"listItem",_spread:!1,start:Object.assign({},fn[1].start),end:void 0};Gt=Jr,J.splice(Ye,0,["enter",Jr,fn[2]]),Ye++,Ce++,dn=void 0,Qr=!0}}}return J[ge][1]._spread=ct,Ce}function a(J,ge){return Ce;function Ce(Ye){c.call(this,J(Ye),Ye),ge&&ge.call(this,Ye)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(J,ge,Ce){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ge,Ce||void 0]),J.position={start:Pi(ge.start),end:void 0}}function d(J){return ge;function ge(Ce){J&&J.call(this,Ce),f.call(this,Ce)}}function f(J,ge){const Ce=this.stack.pop(),Ye=this.tokenStack.pop();if(Ye)Ye[0].type!==J.type&&(ge?ge.call(this,J,Ye[0]):(Ye[1]||BE).call(this,J,Ye[0]));else throw new Error("Cannot close `"+J.type+"` ("+ka({start:J.start,end:J.end})+"): it’s not open");Ce.position.end=Pi(J.end)}function p(){return Vf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(J){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=J}function _(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=J}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J.replace(/(\r?\n|\r)$/g,"")}function P(J){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=xr(this.sliceSerialize(J)).toLowerCase()}function v(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.title=J}function H(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.url=J}function Y(J){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Ce=this.sliceSerialize(J).length;ge.depth=Ce}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function q(J){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function re(){this.data.setextHeadingSlurpLineEnding=void 0}function me(J){const Ce=this.stack[this.stack.length-1].children;let Ye=Ce[Ce.length-1];(!Ye||Ye.type!=="text")&&(Ye=ot(),Ye.position={start:Pi(J.start),end:void 0},Ce.push(Ye)),this.stack.push(Ye)}function V(J){const ge=this.stack.pop();ge.value+=this.sliceSerialize(J),ge.position.end=Pi(J.end)}function se(J){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=ge.children[ge.children.length-1];Ce.position.end=Pi(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(me.call(this,J),V.call(this,J))}function ce(){this.data.atHardBreak=!0}function de(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function ne(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function Ee(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function Oe(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ge,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function oe(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ge,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function Q(J){const ge=this.sliceSerialize(J),Ce=this.stack[this.stack.length-2];Ce.label=LO(ge),Ce.identifier=xr(ge).toLowerCase()}function ie(){const J=this.stack[this.stack.length-1],ge=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Ye=J.children;Ce.children=Ye}else Ce.alt=ge}function k(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.url=J}function L(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.title=J}function ee(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function we(J){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=xr(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function Ue(J){this.data.characterReferenceType=J.type}function Te(J){const ge=this.sliceSerialize(J),Ce=this.data.characterReferenceType;let Ye;Ce?(Ye=bE(ge,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ye=qf(ge);const Re=this.stack[this.stack.length-1];Re.value+=Ye}function Be(J){const ge=this.stack.pop();ge.position.end=Pi(J.end)}function Ve(J){V.call(this,J);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(J)}function Ge(J){V.call(this,J);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(J)}function _t(){return{type:"blockquote",children:[]}}function Pn(){return{type:"code",lang:null,meta:null,value:""}}function ln(){return{type:"inlineCode",value:""}}function kr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function fr(){return{type:"emphasis",children:[]}}function rn(){return{type:"heading",depth:0,children:[]}}function qe(){return{type:"break"}}function Nt(){return{type:"html",value:""}}function Nn(){return{type:"image",title:null,url:"",alt:null}}function cn(){return{type:"link",title:null,url:"",children:[]}}function Hn(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function Ae(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Ne(){return{type:"paragraph",children:[]}}function Me(){return{type:"strong",children:[]}}function ot(){return{type:"text",value:""}}function pt(){return{type:"thematicBreak"}}}function Pi(e){return{line:e.line,column:e.column,offset:e.offset}}function FE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?FE(e,r):BO(e,r)}}function BO(e,t){let n;for(n in t)if(ME.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 BE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ka({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ka({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ka({start:t.start,end:t.end})+") is still open")}function UO(e){const t=this;t.parser=n;function n(r){return MO(r,pe(F(F({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function HO(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 zO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
20
|
+
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function NO(e){const r={constructs:yE([vO,...(e||{}).extensions||[]]),content:o(eN),defined:[],document:o(nN),flow:o(TO),lazy:{},string:o(xO),text:o(wO)};return r;function o(a){return u;function u(c){return CO(r,a,c)}}}function OO(e){for(;!CE(e););return e}const DE=/[\0\t\n\r]/g;function IO(){let e=1,t="",n=!0,r;return o;function o(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(DE.lastIndex=m,f=DE.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 RO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function LO(e){return e.replace(RO,DO)}function DO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return bE(n.slice(a?2:1),a?16:10)}return qf(n)||e}const ME={}.hasOwnProperty;function MO(e,t,n){return typeof t!="string"&&(n=t,t=void 0),FO(n)(OO(NO(n).document().write(IO()(e,t,!0))))}function FO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(cn),autolinkProtocol:me,autolinkEmail:me,atxHeading:a(rn),blockQuote:a(_t),characterEscape:me,characterReference:me,codeFenced:a(Pn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Pn,u),codeText:a(ln,u),codeTextData:me,data:me,codeFlowValue:me,definition:a(kr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(fr),hardBreakEscape:a(qe),hardBreakTrailing:a(qe),htmlFlow:a(Nt,u),htmlFlowData:me,htmlText:a(Nt,u),htmlTextData:me,image:a(Nn),label:u,link:a(cn),listItem:a(Ae),listItemValue:T,listOrdered:a(Hn,m),listUnordered:a(Hn),paragraph:a(Oe),reference:I,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(rn),strong:a(Me),thematicBreak:a(pt)},exit:{atxHeading:d(),atxHeadingSequence:Y,autolink:d(),autolinkEmail:Ge,autolinkProtocol:Ve,blockQuote:d(),characterEscapeValue:V,characterReferenceMarkerHexadecimal:je,characterReferenceMarkerNumeric:je,characterReferenceValue:Ee,characterReference:Be,codeFenced:d(C),codeFencedFence:w,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:V,codeIndented:d(A),codeText:d(Te),codeTextData:V,data:V,definition:d(),definitionDestinationString:H,definitionLabelString:P,definitionTitleString:v,emphasis:d(),hardBreakEscape:d(ce),hardBreakTrailing:d(ce),htmlFlow:d(de),htmlFlowData:V,htmlText:d(ne),htmlTextData:V,image:d(se),label:ie,labelText:K,lineEnding:oe,link:d(Pe),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Se,resourceDestinationString:k,resourceTitleString:L,resource:ee,setextHeading:d(re),setextHeadingLineSequence:q,setextHeadingText:D,strong:d(),thematicBreak:d()}};FE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let ge={type:"root",children:[]};const Ce={stack:[ge],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},Ye=[];let Re=-1;for(;++Re<J.length;)if(J[Re][1].type==="listOrdered"||J[Re][1].type==="listUnordered")if(J[Re][0]==="enter")Ye.push(Re);else{const ct=Ye.pop();Re=o(J,ct,Re)}for(Re=-1;++Re<J.length;){const ct=t[J[Re][0]];ME.call(ct,J[Re][1].type)&&ct[J[Re][1].type].call(Object.assign({sliceSerialize:J[Re][2].sliceSerialize},Ce),J[Re][1])}if(Ce.tokenStack.length>0){const ct=Ce.tokenStack[Ce.tokenStack.length-1];(ct[1]||BE).call(Ce,void 0,ct[0])}for(ge.position={start:Pi(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:Pi(J.length>0?J[J.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 o(J,ge,Ce){let Ye=ge-1,Re=-1,ct=!1,Gt,Vt,dn,Qr;for(;++Ye<=Ce;){const fn=J[Ye];switch(fn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{fn[0]==="enter"?Re++:Re--,Qr=void 0;break}case"lineEndingBlank":{fn[0]==="enter"&&(Gt&&!Qr&&!Re&&!dn&&(dn=Ye),Qr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qr=void 0}if(!Re&&fn[0]==="enter"&&fn[1].type==="listItemPrefix"||Re===-1&&fn[0]==="exit"&&(fn[1].type==="listUnordered"||fn[1].type==="listOrdered")){if(Gt){let Jr=Ye;for(Vt=void 0;Jr--;){const Zn=J[Jr];if(Zn[1].type==="lineEnding"||Zn[1].type==="lineEndingBlank"){if(Zn[0]==="exit")continue;Vt&&(J[Vt][1].type="lineEndingBlank",ct=!0),Zn[1].type="lineEnding",Vt=Jr}else if(!(Zn[1].type==="linePrefix"||Zn[1].type==="blockQuotePrefix"||Zn[1].type==="blockQuotePrefixWhitespace"||Zn[1].type==="blockQuoteMarker"||Zn[1].type==="listItemIndent"))break}dn&&(!Vt||dn<Vt)&&(Gt._spread=!0),Gt.end=Object.assign({},Vt?J[Vt][1].start:fn[1].end),J.splice(Vt||Ye,0,["exit",Gt,fn[2]]),Ye++,Ce++}if(fn[1].type==="listItemPrefix"){const Jr={type:"listItem",_spread:!1,start:Object.assign({},fn[1].start),end:void 0};Gt=Jr,J.splice(Ye,0,["enter",Jr,fn[2]]),Ye++,Ce++,dn=void 0,Qr=!0}}}return J[ge][1]._spread=ct,Ce}function a(J,ge){return Ce;function Ce(Ye){c.call(this,J(Ye),Ye),ge&&ge.call(this,Ye)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(J,ge,Ce){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ge,Ce||void 0]),J.position={start:Pi(ge.start),end:void 0}}function d(J){return ge;function ge(Ce){J&&J.call(this,Ce),f.call(this,Ce)}}function f(J,ge){const Ce=this.stack.pop(),Ye=this.tokenStack.pop();if(Ye)Ye[0].type!==J.type&&(ge?ge.call(this,J,Ye[0]):(Ye[1]||BE).call(this,J,Ye[0]));else throw new Error("Cannot close `"+J.type+"` ("+ka({start:J.start,end:J.end})+"): it’s not open");Ce.position.end=Pi(J.end)}function p(){return Vf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(J){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=J}function _(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=J}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J.replace(/(\r?\n|\r)$/g,"")}function P(J){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=xr(this.sliceSerialize(J)).toLowerCase()}function v(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.title=J}function H(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.url=J}function Y(J){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Ce=this.sliceSerialize(J).length;ge.depth=Ce}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function q(J){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function re(){this.data.setextHeadingSlurpLineEnding=void 0}function me(J){const Ce=this.stack[this.stack.length-1].children;let Ye=Ce[Ce.length-1];(!Ye||Ye.type!=="text")&&(Ye=ot(),Ye.position={start:Pi(J.start),end:void 0},Ce.push(Ye)),this.stack.push(Ye)}function V(J){const ge=this.stack.pop();ge.value+=this.sliceSerialize(J),ge.position.end=Pi(J.end)}function oe(J){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=ge.children[ge.children.length-1];Ce.position.end=Pi(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(me.call(this,J),V.call(this,J))}function ce(){this.data.atHardBreak=!0}function de(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function ne(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function Te(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function Pe(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ge,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function se(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ge,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function K(J){const ge=this.sliceSerialize(J),Ce=this.stack[this.stack.length-2];Ce.label=LO(ge),Ce.identifier=xr(ge).toLowerCase()}function ie(){const J=this.stack[this.stack.length-1],ge=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Ye=J.children;Ce.children=Ye}else Ce.alt=ge}function k(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.url=J}function L(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.title=J}function ee(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function Se(J){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=xr(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function je(J){this.data.characterReferenceType=J.type}function Ee(J){const ge=this.sliceSerialize(J),Ce=this.data.characterReferenceType;let Ye;Ce?(Ye=bE(ge,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ye=qf(ge);const Re=this.stack[this.stack.length-1];Re.value+=Ye}function Be(J){const ge=this.stack.pop();ge.position.end=Pi(J.end)}function Ve(J){V.call(this,J);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(J)}function Ge(J){V.call(this,J);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(J)}function _t(){return{type:"blockquote",children:[]}}function Pn(){return{type:"code",lang:null,meta:null,value:""}}function ln(){return{type:"inlineCode",value:""}}function kr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function fr(){return{type:"emphasis",children:[]}}function rn(){return{type:"heading",depth:0,children:[]}}function qe(){return{type:"break"}}function Nt(){return{type:"html",value:""}}function Nn(){return{type:"image",title:null,url:"",alt:null}}function cn(){return{type:"link",title:null,url:"",children:[]}}function Hn(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function Ae(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Oe(){return{type:"paragraph",children:[]}}function Me(){return{type:"strong",children:[]}}function ot(){return{type:"text",value:""}}function pt(){return{type:"thematicBreak"}}}function Pi(e){return{line:e.line,column:e.column,offset:e.offset}}function FE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?FE(e,r):BO(e,r)}}function BO(e,t){let n;for(n in t)if(ME.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 BE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ka({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ka({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ka({start:t.start,end:t.end})+") is still open")}function UO(e){const t=this;t.parser=n;function n(r){return MO(r,pe(F(F({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function HO(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 zO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
21
21
|
`}]}function jO(e,t){const n=t.value?t.value+`
|
|
22
22
|
`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function $O(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=is(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function YO(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function WO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function UE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=r:o.push({type:"text",value:r}),o}function GO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return UE(e,t);const o={src:is(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function XO(e,t){const n={src:is(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 KO(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 QO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return UE(e,t);const o={href:is(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function JO(e,t){const n={href:is(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 ZO(e,t,n){const r=e.all(t),o=n?eI(n):HE(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];(o||c!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
|
|
23
23
|
`}),p.type==="element"&&p.tagName==="p"&&!o?u.push(...p.children):u.push(p)}const d=r[r.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
|
|
@@ -28,7 +28,7 @@ Error generating stack: `+b.message+`
|
|
|
28
28
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
29
29
|
`}),n}function JE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ZE(e,t){const n=kI(e,t),r=n.one(e,void 0),o=yI(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
|
|
30
30
|
`},o),a}function RI(e,t){return e&&"run"in e?function(n,r){return Je(this,null,function*(){const o=ZE(n,F({file:r},t));yield e.run(o,r)})}:function(n,r){return ZE(n,F({file:r},e||t))}}function ey(e){if(e)throw e}var rh,ty;function LI(){if(ty)return rh;ty=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=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 rh=function d(){var f,p,m,T,y,_,w=arguments[0],C=1,A=arguments.length,P=!1;for(typeof w=="boolean"&&(P=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&&(P&&T&&(a(T)||(y=o(T)))?(y?(y=!1,_=m&&o(m)?m:[]):_=m&&a(m)?m:{},u(w,{name:p,newValue:d(P,_,T)})):typeof T!="undefined"&&u(w,{name:p,newValue:T}));return w},rh}var DI=LI();const ih=Ze(DI);function oh(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 MI(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...o);function c(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<o.length;)(f[m]===null||f[m]===void 0)&&(f[m]=o[m]);o=f,p?FI(p,c)(...f):u(null,...f)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function FI(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(o);try{d=e.apply(this,u)}catch(f){const p=f;if(c&&n)throw p;return o(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(u,...c){n||(n=!0,t(u,...c))}function a(u){o(null,u)}}const zr={basename:BI,dirname:UI,extname:HI,join:zI,sep:"/"};function BI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Da(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function UI(e){if(Da(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 HI(e){Da(e);let t=e.length,n=-1,r=0,o=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function zI(...e){let t=-1,n;for(;++t<e.length;)Da(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":jI(n)}function jI(e){Da(e);const t=e.codePointAt(0)===47;let n=$I(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function $I(e,t){let n="",r=0,o=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(o===u-1||a===1))if(o!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),o=u,a=0;continue}}else if(n.length>0){n="",r=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),r=u-o-1;o=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function Da(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const VI={cwd:qI};function qI(){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 YI(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 WI(e)}function WI(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const ah=["history","path","basename","stem","extname","dirname"];class ny{constructor(t){let n;t?sh(t)?n={path:t}:typeof t=="string"||GI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":VI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ah.length;){const a=ah[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)ah.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?zr.basename(this.path):void 0}set basename(t){lh(t,"basename"),uh(t,"basename"),this.path=zr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?zr.dirname(this.path):void 0}set dirname(t){ry(this.basename,"dirname"),this.path=zr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?zr.extname(this.path):void 0}set extname(t){if(uh(t,"extname"),ry(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=zr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){sh(t)&&(t=YI(t)),lh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?zr.basename(this.path,this.extname):void 0}set stem(t){lh(t,"stem"),uh(t,"stem"),this.path=zr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new bn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function uh(e,t){if(e&&e.includes(zr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+zr.sep+"`")}function lh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ry(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function GI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const XI=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),KI={}.hasOwnProperty;class ch extends XI{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=MI()}copy(){const t=new ch;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ih(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(hh("data",this.frozen),this.namespace[t]=n,this):KI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(hh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Dl(t),r=this.parser||this.Parser;return dh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),dh("process",this.parser||this.Parser),fh("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=Dl(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);ZI(_)?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(),dh("processSync",this.parser||this.Parser),fh("processSync",this.compiler||this.Compiler),this.process(t,o),oy("processSync","process",n),r;function o(a,u){n=!0,ey(a),r=u}}run(t,n,r){iy(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=Dl(n);o.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,o;return this.run(t,n,a),oy("runSync","run",r),o;function a(u,c){ey(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=Dl(n),o=this.compiler||this.Compiler;return fh("stringify",o),iy(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(hh("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&&(o.settings=ih(!0,o.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];oh(w)&&oh(y)&&(y=ih(!0,w,y)),r[T]=[f,y,..._]}}}}const QI=new ch().freeze();function dh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function fh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function hh(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 iy(e){if(!oh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function oy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Dl(e){return JI(e)?e:new ny(e)}function JI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ZI(e){return typeof e=="string"||e3(e)}function e3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const t3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",sy=[],ay={allowDangerousHtml:!0},n3=/^(https?|ircs?|mailto|xmpp)$/i,r3=[{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 uy(e){const t=i3(e),n=o3(e);return s3(t.runSync(t.parse(n),n),e)}function i3(e){const t=e.rehypePlugins||sy,n=e.remarkPlugins||sy,r=e.remarkRehypeOptions?F(F({},e.remarkRehypeOptions),ay):ay;return QI().use(UO).use(n).use(RI,r).use(t)}function o3(e){const t=e.children||"",n=new ny;return typeof t=="string"&&(n.value=t),n}function s3(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||a3;for(const p of r3)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+t3+p.id,void 0);return Ll(e,f),OP(e,{Fragment:x.Fragment,components:o,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.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 $f)if(Object.hasOwn($f,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],w=$f[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 a3(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||n3.test(e.slice(0,t))?e:""}const ly=/[#.]/g;function u3(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){ly.lastIndex=o;const c=ly.exec(n),d=n.slice(o,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,o+=d.length),c&&(a=c[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function cy(e,t,n){const r=n?f3(n):void 0;function o(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const f=u;c.unshift(f)}else{d=u3(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,l3(u))c.unshift(u);else for(const[m,T]of Object.entries(u))c3(e,d.properties,m,T)}for(const f of c)ph(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function l3(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const a=o;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function c3(e,t,n,r){const o=Ff(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?o.spaceSeparated?a=eE(r):o.commaSeparated?a=z1(r):o.commaOrSpaceSeparated?a=eE(z1(r).join(" ")):a=dy(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?d3(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(dy(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function ph(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)ph(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?ph(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function dy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Aa(n)===Aa(t)))return!0}return n}function d3(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function f3(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const h3=["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"],p3=cy(Sl,"div"),m3=cy(ns,"g",h3);function g3(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=fy(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function o(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],d=fy(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 fy(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 ho={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/"},hy={}.hasOwnProperty,E3=Object.prototype;function y3(e,t){const n=t||{};return mh({file:n.file||void 0,location:!1,schema:n.space==="svg"?ns:Sl,verbose:n.verbose||!1},e)}function mh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Ml(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:py(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=g3(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"},Ml(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Ml(e,r,n),n}default:return n=b3(e,t),n}}function py(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=mh(e,t[n]);r.push(o)}return r}function b3(e,t){const n=e.schema;e.schema=t.namespaceURI===ho.svg?ns:Sl;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;hy.call(E3,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?m3:p3)(t.tagName,o,py(e,t.childNodes));if(Ml(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&as(d.startTag),p=d&&d.endTag&&as(d.endTag),m=mh(e,c.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Ml(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=T3(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function T3(e,t,n){const r=as(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)hy.call(n.attrs,u)&&(a[Ff(e.schema,u).property]=as(n.attrs[u]));n.startTag;const c=as(n.startTag),d=n.endTag?as(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function as(e){const t=my({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=my({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function my(e){return e.line&&e.column?e:void 0}class Ma{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ma.prototype.property={},Ma.prototype.normal={},Ma.prototype.space=null;function gy(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Ma(n,r,t)}function gh(e){return e.toLowerCase()}class lr{constructor(t,n){this.property=t,this.attribute=n}}lr.prototype.space=null,lr.prototype.boolean=!1,lr.prototype.booleanish=!1,lr.prototype.overloadedBoolean=!1,lr.prototype.number=!1,lr.prototype.commaSeparated=!1,lr.prototype.spaceSeparated=!1,lr.prototype.commaOrSpaceSeparated=!1,lr.prototype.mustUseProperty=!1,lr.prototype.defined=!1;let _3=0;const Xe=po(),$t=po(),Ey=po(),be=po(),yt=po(),us=po(),Kn=po();function po(){return oa(2,++_3)}const Eh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Xe,booleanish:$t,commaOrSpaceSeparated:Kn,commaSeparated:us,number:be,overloadedBoolean:Ey,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),yh=Object.keys(Eh);class bh extends lr{constructor(t,n,r,o){let a=-1;if(super(t,n),yy(this,"space",o),typeof r=="number")for(;++a<yh.length;){const u=yh[a];yy(this,yh[a],(r&Eh[u])===Eh[u])}}}bh.prototype.defined=!0;function yy(e,t,n){n&&(e[t]=n)}const S3={}.hasOwnProperty;function ls(e){const t={},n={};let r;for(r in e.properties)if(S3.call(e.properties,r)){const o=e.properties[r],a=new bh(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[gh(r)]=r,n[gh(a.attribute)]=r}return new Ma(t,n,e.space)}const by=ls({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Ty=ls({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function _y(e,t){return t in e?e[t]:t}function Sy(e,t){return _y(e,t.toLowerCase())}const xy=ls({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Sy,properties:{xmlns:null,xmlnsXLink:null}}),wy=ls({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:$t,ariaAutoComplete:null,ariaBusy:$t,ariaChecked:$t,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:$t,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:$t,ariaFlowTo:yt,ariaGrabbed:$t,ariaHasPopup:null,ariaHidden:$t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:be,ariaLive:null,ariaModal:$t,ariaMultiLine:$t,ariaMultiSelectable:$t,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:$t,ariaReadOnly:$t,ariaRelevant:null,ariaRequired:$t,ariaRoleDescription:yt,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:$t,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null}}),x3=ls({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Sy,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:us,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:Xe,allowPaymentRequest:Xe,allowUserMedia:Xe,alt:null,as:null,async:Xe,autoCapitalize:null,autoComplete:yt,autoFocus:Xe,autoPlay:Xe,blocking:yt,capture:null,charSet:null,checked:Xe,cite:null,className:yt,cols:be,colSpan:null,content:null,contentEditable:$t,controls:Xe,controlsList:yt,coords:be|us,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Xe,defer:Xe,dir:null,dirName:null,disabled:Xe,download:Ey,draggable:$t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Xe,formTarget:null,headers:yt,height:be,hidden:Xe,high:be,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:Xe,inputMode:null,integrity:null,is:null,isMap:Xe,itemId:null,itemProp:yt,itemRef:yt,itemScope:Xe,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Xe,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:Xe,muted:Xe,name:null,nonce:null,noModule:Xe,noValidate:Xe,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:Xe,optimum:be,pattern:null,ping:yt,placeholder:null,playsInline:Xe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Xe,referrerPolicy:null,rel:yt,required:Xe,reversed:Xe,rows:be,rowSpan:be,sandbox:yt,scope:null,scoped:Xe,seamless:Xe,selected:Xe,shadowRootClonable:Xe,shadowRootDelegatesFocus:Xe,shadowRootMode:null,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:$t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:Xe,useMap:null,value:$t,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Xe,declare:Xe,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:Xe,noHref:Xe,noShade:Xe,noWrap:Xe,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:$t,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Xe,disableRemotePlayback:Xe,prefix:null,property:null,results:be,security:null,unselectable:null}}),w3=ls({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:_y,properties:{about:Kn,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:yt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:Xe,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:us,g2:us,glyphName:us,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:Kn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:be,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Kn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Kn,rev:Kn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Kn,requiredFeatures:Kn,requiredFonts:Kn,requiredFormats:Kn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:Kn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Kn,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Kn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),A3=/^data[-\w.:]+$/i,Ay=/-[a-z]/g,v3=/[A-Z]/g;function C3(e,t){const n=gh(t);let r=t,o=lr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&A3.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ay,P3);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ay.test(a)){let u=a.replace(v3,k3);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=bh}return new o(r,t)}function k3(e){return"-"+e.toLowerCase()}function P3(e){return e.charAt(1).toUpperCase()}const N3=gy([Ty,by,xy,wy,x3],"html"),vy=gy([Ty,by,xy,wy,w3],"svg"),Cy={}.hasOwnProperty;function ky(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&Cy.call(o,e)){const d=String(o[e]);u=Cy.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const O3={},I3={}.hasOwnProperty,Py=ky("type",{handlers:{root:L3,element:U3,text:F3,comment:B3,doctype:M3}});function R3(e,t){const r=(t||O3).space;return Py(e,r==="svg"?vy:N3)}function L3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Th(e.children,n,t),cs(e,n),n}function D3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Th(e.children,n,t),cs(e,n),n}function M3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return cs(e,t),t}function F3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return cs(e,t),t}function B3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return cs(e,t),t}function U3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=vy);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&I3.call(e.properties,a)){const d=H3(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:ho[u],childNodes:[],parentNode:null};return c.childNodes=Th(e.children,c,r),cs(e,c),e.tagName==="template"&&e.content&&(c.content=D3(e.content,r)),c}function H3(e,t,n){const r=C3(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?j1(n):tE(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=ho[r.space]}return o}function Th(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=Py(e[r],n);a.parentNode=t,o.push(a)}return o}function cs(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 z3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],j3=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]),vt="�";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 Bn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ny(e){return e>=55296&&e<=57343}function $3(e){return e>=56320&&e<=57343}function V3(e,t){return(e-55296)*1024+9216+t}function Oy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Iy(e){return e>=64976&&e<=65007||j3.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 q3=65536;class Y3{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=q3,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:o,offset:a}=this,u=o+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if($3(n))return this.pos++,this._addGap(),V3(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,Ny(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){Oy(t)?this._err(te.controlCharacterInInputStream):Iy(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Qe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Qe||(Qe={}));function Ry(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 W3=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),G3=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 X3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=G3.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 K3=32;var Ni;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ni||(Ni={}));function _h(e){return e>=Zt.ZERO&&e<=Zt.NINE}function Q3(e){return e>=Zt.UPPER_A&&e<=Zt.UPPER_F||e>=Zt.LOWER_A&&e<=Zt.LOWER_F}function J3(e){return e>=Zt.UPPER_A&&e<=Zt.UPPER_Z||e>=Zt.LOWER_A&&e<=Zt.LOWER_Z||_h(e)}function Z3(e){return e===Zt.EQUALS||J3(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 di;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(di||(di={}));class eR{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=di.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)|K3)===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,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(_h(o)||Q3(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(_h(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Zt.SEMI)this.consumed+=1;else if(this.decodeMode===di.Strict)return 0;return this.emitCodePoint(X3(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 o=r[this.treeIndex],a=(o&Ni.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=tR(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===di.Attribute&&(a===0||Z3(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Ni.VALUE_LENGTH)>>14,a!==0){if(u===Zt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==di.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&Ni.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Ni.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case en.NamedEntity:return this.result!==0&&(this.decodeMode!==di.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 tR(e,t,n,r){const o=(t&Ni.BRANCH_LENGTH)>>7,a=t&Ni.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,c=u+o-1;for(;u<=c;){const d=u+c>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)c=d-1;else return e[d+o]}return-1}var ue;(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/"})(ue||(ue={}));var mo;(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"})(mo||(mo={}));var cr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(cr||(cr={}));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 nR=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 ds(e){var t;return(t=nR.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const fe=g,rR={[ue.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]),[ue.MATHML]:new Set([fe.MI,fe.MO,fe.MN,fe.MS,fe.MTEXT,fe.ANNOTATION_XML]),[ue.SVG]:new Set([fe.TITLE,fe.FOREIGN_OBJECT,fe.DESC]),[ue.XLINK]:new Set,[ue.XML]:new Set,[ue.XMLNS]:new Set},Sh=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 Ft={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function iR(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function Fa(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function oR(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function Oi(e){return oR(e)||Fa(e)}function Ly(e){return Oi(e)||iR(e)}function Fl(e){return e+32}function Dy(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function My(e){return Dy(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function sR(e){return e===N.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:Ny(e)?te.surrogateCharacterReference:Iy(e)?te.noncharacterCharacterReference:Oy(e)||e===N.CARRIAGE_RETURN?te.controlCharacterReference:null}class aR{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 Y3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new eR(W3,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=sR(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Qe.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Qe.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Qe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Qe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Ry(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=ds(t.tagName),t.type===Qe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Qe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Qe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Qe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Qe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=Dy(t)?Qe.WHITESPACE_CHARACTER:t===N.NULL?Qe.NULL_CHARACTER:Qe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Qe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?di.Attribute:di.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(vt);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(vt);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(vt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Oi(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(Oi(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+=vt;break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Fa(t)?Fl(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){Oi(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){Oi(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){Oi(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(vt);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(vt);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(vt);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:Oi(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){Oi(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(Bn.SCRIPT,!1)&&My(this.preprocessor.peek(Bn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Bn.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(vt);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(vt);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(vt);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(Bn.SCRIPT,!1)&&My(this.preprocessor.peek(Bn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Bn.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+=vt;break}default:this.currentAttr.name+=String.fromCodePoint(Fa(t)?Fl(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=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+=vt;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+=vt;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+=vt;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+=vt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Bn.DASH_DASH,!0)?(this._createCommentToken(Bn.DASH_DASH.length+1),this.state=I.COMMENT_START):this._consumeSequenceIfMatch(Bn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Bn.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch(Bn.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(Bn.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+=vt;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(Fa(t))this._createDoctypeToken(String.fromCharCode(Fl(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(vt),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+=vt;break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Fa(t)?Fl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=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(Bn.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Bn.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+=vt;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+=vt;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+=vt;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+=vt;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()&&Ly(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ly(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Fy=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),By=new Set([...Fy,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Bl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),uR=new Set([...Bl,g.OL,g.UL]),lR=new Set([...Bl,g.BUTTON]),Uy=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Hy=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),cR=new Set([g.TR,g.TEMPLATE,g.HTML]),dR=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),fR=new Set([g.TABLE,g.TEMPLATE,g.HTML]),hR=new Set([g.TD,g.TH]);class pR{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)===ue.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==ue.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(Sh,ue.HTML)}popUntilTableCellPopped(){this.popUntilPopped(hR,ue.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(fR,ue.HTML)}clearBackToTableBodyContext(){this.clearBackTo(dR,ue.HTML)}clearBackToTableRowContext(){this.clearBackTo(cR,ue.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 o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ue.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case ue.SVG:{if(Hy.has(o))return!1;break}case ue.MATHML:{if(Uy.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Bl)}hasInListItemScope(t){return this.hasInDynamicScope(t,uR)}hasInButtonScope(t){return this.hasInDynamicScope(t,lR)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ue.HTML:{if(Sh.has(n))return!0;if(Bl.has(n))return!1;break}case ue.SVG:{if(Hy.has(n))return!1;break}case ue.MATHML:{if(Uy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ue.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])===ue.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])===ue.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Fy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&By.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&By.has(this.currentTagId);)this.pop()}}const xh=3;var jr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(jr||(jr={}));const zy={type:jr.Marker};class mR{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===jr.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===o&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<xh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<xh)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=xh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(zy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:jr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:jr.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(zy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===jr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===jr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===jr.Element&&n.element===t)}}const Ii={createDocument(){return{nodeName:"#document",mode:cr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ii.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(Ii.isTextNode(n)){n.value+=t;return}}Ii.appendChild(e,Ii.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ii.isTextNode(r)?r.value+=t:Ii.insertBefore(e,Ii.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=F(F({},e.sourceCodeLocation),t)}},jy="html",gR="about:legacy-compat",ER="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",$y=["+//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//"],yR=[...$y,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],bR=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Vy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],TR=[...Vy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function qy(e,t){return t.some(n=>e.startsWith(n))}function _R(e){return e.name===jy&&e.publicId===null&&(e.systemId===null||e.systemId===gR)}function SR(e){if(e.name!==jy)return cr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===ER)return cr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),bR.has(n))return cr.QUIRKS;let r=t===null?yR:$y;if(qy(n,r))return cr.QUIRKS;if(r=t===null?Vy:TR,qy(n,r))return cr.LIMITED_QUIRKS}return cr.NO_QUIRKS}const Yy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},xR="definitionurl",wR="definitionURL",AR=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])),vR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ue.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ue.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ue.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ue.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ue.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ue.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ue.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ue.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ue.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ue.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ue.XMLNS}]]),CR=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),kR=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 PR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===mo.COLOR||r===mo.SIZE||r===mo.FACE)||kR.has(t)}function Wy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===xR){e.attrs[t].name=wR;break}}function Gy(e){for(let t=0;t<e.attrs.length;t++){const n=AR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function wh(e){for(let t=0;t<e.attrs.length;t++){const n=vR.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 NR(e){const t=CR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ds(e.tagName))}function OR(e,t){return t===ue.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function IR(e,t,n){if(t===ue.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===mo.ENCODING){const o=n[r].value.toLowerCase();return o===Yy.TEXT_HTML||o===Yy.APPLICATION_XML}}return t===ue.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function RR(e,t,n,r){return(!r||r===ue.HTML)&&IR(e,t,n)||(!r||r===ue.MATHML)&&OR(e,t)}const LR="hidden",DR=8,MR=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 FR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Xy=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Ky={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ii,onParseError:null};class Qy{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=F(F({},Ky),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 aR(this.options,this),this.activeFormattingElements=new mR(this.treeAdapter),this.fragmentContextID=r?ds(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new pR(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=F(F({},Ky),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,ue.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ue.HTML,[]),a=new this(r,o,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 o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:FR,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===ue.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ue.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=Ft.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)!==ue.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Ft.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Ft.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Ft.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Ft.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&pe(F({},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,ue.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ue.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,ue.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 o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol: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,o=this.treeAdapter.getTagName(t),a=n.type===Qe.END_TAG&&o===n.tagName?{endTag:F({},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)===ue.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ue.HTML)}_processToken(t){switch(t.type){case Qe.CHARACTER:{this.onCharacter(t);break}case Qe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Qe.COMMENT:{this.onComment(t);break}case Qe.DOCTYPE:{this.onDoctype(t);break}case Qe.START_TAG:{this._processStartTag(t);break}case Qe.END_TAG:{this.onEndTag(t);break}case Qe.EOF:{this.onEof(t);break}case Qe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return RR(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===jr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=M.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(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 Xy.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)===ue.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 rR[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){h6(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{Ua(this,t);break}case M.BEFORE_HEAD:{Ha(this,t);break}case M.IN_HEAD:{za(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ja(this,t);break}case M.AFTER_HEAD:{$a(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{Zy(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:{kh(this,t);break}case M.IN_TABLE_TEXT:{ab(this,t);break}case M.IN_COLUMN_GROUP:{zl(this,t);break}case M.AFTER_BODY:{Vl(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){f6(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{Ua(this,t);break}case M.BEFORE_HEAD:{Ha(this,t);break}case M.IN_HEAD:{za(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ja(this,t);break}case M.AFTER_HEAD:{$a(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{kh(this,t);break}case M.IN_COLUMN_GROUP:{zl(this,t);break}case M.AFTER_BODY:{Vl(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){vh(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:{vh(this,t);break}case M.IN_TABLE_TEXT:{Ya(this,t);break}case M.AFTER_BODY:{VR(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{qR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{YR(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:{Ya(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)?p6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{WR(this,t);break}case M.BEFORE_HEAD:{XR(this,t);break}case M.IN_HEAD:{wr(this,t);break}case M.IN_HEAD_NO_SCRIPT:{JR(this,t);break}case M.AFTER_HEAD:{eL(this,t);break}case M.IN_BODY:{_n(this,t);break}case M.IN_TABLE:{fs(this,t);break}case M.IN_TABLE_TEXT:{Ya(this,t);break}case M.IN_CAPTION:{KL(this,t);break}case M.IN_COLUMN_GROUP:{Ph(this,t);break}case M.IN_TABLE_BODY:{jl(this,t);break}case M.IN_ROW:{$l(this,t);break}case M.IN_CELL:{ZL(this,t);break}case M.IN_SELECT:{cb(this,t);break}case M.IN_SELECT_IN_TABLE:{t6(this,t);break}case M.IN_TEMPLATE:{r6(this,t);break}case M.AFTER_BODY:{o6(this,t);break}case M.IN_FRAMESET:{s6(this,t);break}case M.AFTER_FRAMESET:{u6(this,t);break}case M.AFTER_AFTER_BODY:{c6(this,t);break}case M.AFTER_AFTER_FRAMESET:{d6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?m6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{GR(this,t);break}case M.BEFORE_HEAD:{KR(this,t);break}case M.IN_HEAD:{QR(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ZR(this,t);break}case M.AFTER_HEAD:{tL(this,t);break}case M.IN_BODY:{Hl(this,t);break}case M.TEXT:{HL(this,t);break}case M.IN_TABLE:{Va(this,t);break}case M.IN_TABLE_TEXT:{Ya(this,t);break}case M.IN_CAPTION:{QL(this,t);break}case M.IN_COLUMN_GROUP:{JL(this,t);break}case M.IN_TABLE_BODY:{Nh(this,t);break}case M.IN_ROW:{lb(this,t);break}case M.IN_CELL:{e6(this,t);break}case M.IN_SELECT:{db(this,t);break}case M.IN_SELECT_IN_TABLE:{n6(this,t);break}case M.IN_TEMPLATE:{i6(this,t);break}case M.AFTER_BODY:{hb(this,t);break}case M.IN_FRAMESET:{a6(this,t);break}case M.AFTER_FRAMESET:{l6(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{Ua(this,t);break}case M.BEFORE_HEAD:{Ha(this,t);break}case M.IN_HEAD:{za(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ja(this,t);break}case M.AFTER_HEAD:{$a(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:{ob(this,t);break}case M.TEXT:{zL(this,t);break}case M.IN_TABLE_TEXT:{Ya(this,t);break}case M.IN_TEMPLATE:{fb(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:{Ch(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:{Jy(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{kh(this,t);break}case M.IN_TABLE_TEXT:{sb(this,t);break}}}}function BR(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):ib(e,t),n}function UR(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function HR(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=MR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=zR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function zR(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),o=ds(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===g.TEMPLATE&&a===ue.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function $R(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function Ah(e,t){for(let n=0;n<DR;n++){const r=BR(e,t);if(!r)break;const o=UR(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=HR(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&jR(e,u,a),$R(e,o,r)}}function vh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function VR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function qR(e,t){e._appendCommentNode(t,e.document)}function Ch(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function YR(e,t){e._setDocumentType(t);const n=t.forceQuirks?cr.QUIRKS:SR(t);_R(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Ba(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,cr.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function WR(e,t){t.tagID===g.HTML?(e._insertElement(t,ue.HTML),e.insertionMode=M.BEFORE_HEAD):Ua(e,t)}function GR(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Ua(e,t)}function Ua(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function XR(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.HEAD:{e._insertElement(t,ue.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:Ha(e,t)}}function KR(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Ha(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function Ha(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function wr(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,ue.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Ft.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ft.RAWTEXT):(e._insertElement(t,ue.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Ft.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Ft.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:za(e,t)}}function QR(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:{za(e,t);break}case g.TEMPLATE:{go(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function go(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 za(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function JR(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:{wr(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:ja(e,t)}}function ZR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case g.BR:{ja(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function ja(e,t){const n=t.type===Qe.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function eL(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.BODY:{e._insertElement(t,ue.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,ue.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),wr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:$a(e,t)}}function tL(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{$a(e,t);break}case g.TEMPLATE:{go(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function $a(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=M.IN_BODY,Ul(e,t)}function Ul(e,t){switch(t.type){case Qe.CHARACTER:{Zy(e,t);break}case Qe.WHITESPACE_CHARACTER:{Jy(e,t);break}case Qe.COMMENT:{vh(e,t);break}case Qe.START_TAG:{_n(e,t);break}case Qe.END_TAG:{Hl(e,t);break}case Qe.EOF:{ob(e,t);break}}}function Jy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Zy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function nL(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function rL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function iL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_FRAMESET)}function oL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML)}function sL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Sh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ue.HTML)}function aL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function uL(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),n||(e.formElement=e.openElements.current))}function lL(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===g.LI&&o===g.LI||(n===g.DD||n===g.DT)&&(o===g.DD||o===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==g.ADDRESS&&o!==g.DIV&&o!==g.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML)}function cL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),e.tokenizer.state=Ft.PLAINTEXT}function dL(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.framesetOk=!1}function fL(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Ah(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function hL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function pL(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Ah(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ue.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function gL(e,t){e.treeAdapter.getDocumentMode(e.document)!==cr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function eb(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ue.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function tb(e){const t=Ry(e,mo.TYPE);return t!=null&&t.toLowerCase()===LR}function EL(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ue.HTML),tb(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function yL(e,t){e._appendElement(t,ue.HTML),t.ackSelfClosing=!0}function bL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,ue.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function TL(e,t){t.tagName=X.IMG,t.tagID=g.IMG,eb(e,t)}function _L(e,t){e._insertElement(t,ue.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ft.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function SL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ft.RAWTEXT)}function xL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ft.RAWTEXT)}function nb(e,t){e._switchToTextParsing(t,Ft.RAWTEXT)}function wL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.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 AL(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML)}function vL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ue.HTML)}function CL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,ue.HTML)}function kL(e,t){e._reconstructActiveFormattingElements(),Wy(t),wh(t),t.selfClosing?e._appendElement(t,ue.MATHML):e._insertElement(t,ue.MATHML),t.ackSelfClosing=!0}function PL(e,t){e._reconstructActiveFormattingElements(),Gy(t),wh(t),t.selfClosing?e._appendElement(t,ue.SVG):e._insertElement(t,ue.SVG),t.ackSelfClosing=!0}function rb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.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:{hL(e,t);break}case g.A:{fL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{sL(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:{oL(e,t);break}case g.LI:case g.DD:case g.DT:{lL(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{eb(e,t);break}case g.HR:{bL(e,t);break}case g.RB:case g.RTC:{vL(e,t);break}case g.RT:case g.RP:{CL(e,t);break}case g.PRE:case g.LISTING:{aL(e,t);break}case g.XMP:{SL(e,t);break}case g.SVG:{PL(e,t);break}case g.HTML:{nL(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:{wr(e,t);break}case g.BODY:{rL(e,t);break}case g.FORM:{uL(e,t);break}case g.NOBR:{pL(e,t);break}case g.MATH:{kL(e,t);break}case g.TABLE:{gL(e,t);break}case g.INPUT:{EL(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{yL(e,t);break}case g.IMAGE:{TL(e,t);break}case g.BUTTON:{dL(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{mL(e,t);break}case g.IFRAME:{xL(e,t);break}case g.SELECT:{wL(e,t);break}case g.OPTION:case g.OPTGROUP:{AL(e,t);break}case g.NOEMBED:case g.NOFRAMES:{nb(e,t);break}case g.FRAMESET:{iL(e,t);break}case g.TEXTAREA:{_L(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?nb(e,t):rb(e,t);break}case g.PLAINTEXT:{cL(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:rb(e,t)}}function NL(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 OL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,hb(e,t))}function IL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function RL(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 LL(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function DL(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function ML(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function FL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function BL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function UL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function ib(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function Hl(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:{Ah(e,t);break}case g.P:{LL(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:{IL(e,t);break}case g.LI:{DL(e);break}case g.DD:case g.DT:{ML(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{FL(e);break}case g.BR:{UL(e);break}case g.BODY:{NL(e,t);break}case g.HTML:{OL(e,t);break}case g.FORM:{RL(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{BL(e,t);break}case g.TEMPLATE:{go(e,t);break}default:ib(e,t)}}function ob(e,t){e.tmplInsertionModeStack.length>0?fb(e,t):Ch(e,t)}function HL(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 zL(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function kh(e,t){if(e.openElements.currentTagId!==void 0&&Xy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case Qe.CHARACTER:{ab(e,t);break}case Qe.WHITESPACE_CHARACTER:{sb(e,t);break}}else qa(e,t)}function jL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_CAPTION}function $L(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function VL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,Ph(e,t)}function qL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_TABLE_BODY}function YL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=M.IN_TABLE_BODY,jl(e,t)}function WL(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function GL(e,t){tb(t)?e._appendElement(t,ue.HTML):qa(e,t),t.ackSelfClosing=!0}function XL(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ue.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function fs(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{YL(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{wr(e,t);break}case g.COL:{VL(e,t);break}case g.FORM:{XL(e,t);break}case g.TABLE:{WL(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{qL(e,t);break}case g.INPUT:{GL(e,t);break}case g.CAPTION:{jL(e,t);break}case g.COLGROUP:{$L(e,t);break}default:qa(e,t)}}function Va(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{go(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:qa(e,t)}}function qa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ul(e,t),e.fosterParentingEnabled=n}function sb(e,t){e.pendingCharacterTokens.push(t)}function ab(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ya(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)qa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const ub=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function KL(e,t){const n=t.tagID;ub.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,fs(e,t)):_n(e,t)}function QL(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&&Va(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:Hl(e,t)}}function Ph(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.COL:{e._appendElement(t,ue.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{wr(e,t);break}default:zl(e,t)}}function JL(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:{go(e,t);break}case g.COL:break;default:zl(e,t)}}function zl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function jl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ue.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,$l(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,fs(e,t));break}default:fs(e,t)}}function Nh(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,Va(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:Va(e,t)}}function $l(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ue.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,jl(e,t));break}default:fs(e,t)}}function lb(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,Nh(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,Nh(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:Va(e,t)}}function ZL(e,t){const n=t.tagID;ub.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),$l(e,t)):_n(e,t)}function e6(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(),lb(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Hl(e,t)}}function cb(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,ue.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ue.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ue.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:{wr(e,t);break}}}function db(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:{go(e,t);break}}}function t6(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):cb(e,t)}function n6(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)):db(e,t)}function r6(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:{wr(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,fs(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,Ph(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,jl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,$l(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,_n(e,t)}}function i6(e,t){t.tagID===g.TEMPLATE&&go(e,t)}function fb(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ch(e,t)}function o6(e,t){t.tagID===g.HTML?_n(e,t):Vl(e,t)}function hb(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 Vl(e,t)}function Vl(e,t){e.insertionMode=M.IN_BODY,Ul(e,t)}function s6(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.FRAMESET:{e._insertElement(t,ue.HTML);break}case g.FRAME:{e._appendElement(t,ue.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{wr(e,t);break}}}function a6(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 u6(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.NOFRAMES:{wr(e,t);break}}}function l6(e,t){t.tagID===g.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function c6(e,t){t.tagID===g.HTML?_n(e,t):ql(e,t)}function ql(e,t){e.insertionMode=M.IN_BODY,Ul(e,t)}function d6(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.NOFRAMES:{wr(e,t);break}}}function f6(e,t){t.chars=vt,e._insertCharacters(t)}function h6(e,t){e._insertCharacters(t),e.framesetOk=!1}function pb(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ue.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function p6(e,t){if(PR(t))pb(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ue.MATHML?Wy(t):r===ue.SVG&&(NR(t),Gy(t)),wh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function m6(e,t){if(t.tagID===g.P||t.tagID===g.BR){pb(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)===ue.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,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 g6=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,E6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),mb={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function gb(e,t){const n=C6(e),r=ky("type",{handlers:{root:y6,element:b6,text:T6,comment:yb,doctype:_6,raw:x6},unknown:w6}),o={parser:n?new Qy(mb):Qy.getFragmentParser(void 0,mb),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),hs(o,Hr());const a=n?o.parser.document:o.parser.getFragment(),u=y3(a,{file:o.options.file});return o.stitches&&Ll(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 y6(e,t){Eb(e.children,t)}function b6(e,t){A6(e,t),Eb(e.children,t),v6(e,t)}function T6(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Qe.CHARACTER,chars:e.value,location:Wa(e)};hs(t,Hr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function _6(e,t){const n={type:Qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Wa(e)};hs(t,Hr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function S6(e,t){t.stitches=!0;const n=k6(e);if("children"in e&&"children"in n){const r=gb({type:"root",children:e.children},t.options);n.children=r.children}yb({type:"comment",value:{stitch:n}},t)}function yb(e,t){const n=e.value,r={type:Qe.COMMENT,data:n,location:Wa(e)};hs(t,Hr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function x6(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,bb(t,Hr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(g6,"<$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 w6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))S6(n,t);else{let r="";throw E6.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function hs(e,t){bb(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=Ft.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 bb(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 A6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ft.PLAINTEXT)return;hs(t,Hr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:ho.html;o===ho.html&&n==="svg"&&(o=ho.svg);const a=R3(pe(F({},e),{children:[]}),{space:o===ho.svg?"svg":"html"}),u={type:Qe.START_TAG,tagName:n,tagID:ds(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Wa(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function v6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&z3.includes(n)||t.parser.tokenizer.state===Ft.PLAINTEXT)return;hs(t,xl(e));const r={type:Qe.END_TAG,tagName:n,tagID:ds(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Wa(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ft.RCDATA||t.parser.tokenizer.state===Ft.RAWTEXT||t.parser.tokenizer.state===Ft.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ft.DATA)}function C6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Wa(e){const t=Hr(e)||{line:void 0,column:void 0,offset:void 0},n=xl(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 k6(e){return"children"in e?fo(pe(F({},e),{children:[]})):fo(e)}function Tb(e){return function(t,n){return gb(t,pe(F({},e),{file:n}))}}const Eo=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],_b={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Eo,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Eo],h2:[["className","sr-only"]],img:[...Eo,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Eo,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Eo],table:[...Eo],ul:[...Eo,["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"]},Ri={}.hasOwnProperty;function P6(e,t){let n={type:"root",children:[]};const r={schema:t?F(F({},_b),t):_b,stack:[]},o=Sb(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function Sb(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return N6(e,n);case"doctype":return O6(e,n);case"element":return I6(e,n);case"root":return R6(e,n);case"text":return L6(e,n)}}}function N6(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return Ga(a,t),a}}function O6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ga(n,t),n}}function I6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=xb(e,t.children),o=D6(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&&Ri.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return Ga(u,t),u}function R6(e,t){const r={type:"root",children:xb(e,t.children)};return Ga(r,t),r}function L6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ga(r,t),r}function xb(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=Sb(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function D6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Ri.call(r,n)?r[n]:void 0,u=r&&Ri.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(Ri.call(c,f)){const p=c[f];let m=wb(e,vb(a,f),f,p);m==null&&(m=wb(e,vb(u,f),f,p)),m!=null&&(d[f]=m)}if(o&&Ri.call(o,n)){const p=o[n];for(f in p)Ri.call(p,f)&&!Ri.call(d,f)&&(d[f]=p[f])}return d}function wb(e,t,n,r){return t?Array.isArray(r)?M6(e,t,n,r):Ab(e,t,n,r):void 0}function M6(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Ab(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Ab(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&F6(e,n,r)){if(typeof t=="object"&&t.length>1){let o=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){o=!0;break}}else if(u===r){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function F6(e,t,n){const r=e.schema.protocols&&Ri.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),c=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&o.slice(0,p.length)===p)return!0}return!1}function Ga(e,t){const n=aE(t);t.data&&(e.data=fo(t.data)),n&&(e.position=n)}function vb(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],a=typeof o=="string"?o:o[0];if(a===t)return o;a==="data*"&&(n=o)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function B6(e){return function(t){return P6(t,e)}}const Cb=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return x.jsx("a",pe(F(F({className:W(e,`${z}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},U6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=rt();return!e&&!t?null:x.jsx("div",{className:W(n,`${z}-disclaimer`),children:t?x.jsx(uy,{rehypePlugins:[Tb,B6],components:{ul:({children:r})=>x.jsx("ul",{className:W(n,`${z}-ul`),children:r}),ol:({children:r})=>x.jsx("ol",{className:W(n,`${z}-ol`),children:r}),li:({children:r})=>x.jsx("li",{className:W(n,`${z}-li`),children:r}),a:({href:r,title:o,children:a})=>x.jsx(Cb,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>x.jsx("img",{className:W(n,`${z}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>x.jsx("p",{className:W(n,`${z}-disclaimer-text`),children:r}),span:({children:r})=>x.jsx("span",{className:W(n,`${z}-disclaimer-text-span`),children:r})},children:t}):x.jsx("p",{className:W(n,`${z}-disclaimer-text`),children:e})})},Oh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=ar(),{setImageFile:u}=Qo(),{logger:c,globalClassName:d,searchConfig:f,features:p}=rt(),m=B.useRef(null),T=B.useRef(null),y=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",w=!!o||!1,C=w?"connected":"disconnected",A=t||!w,P=()=>a?new Promise((D,q)=>{const re=new FileReader;re.readAsDataURL(a),re.onload=()=>D(re.result),re.onerror=me=>q(me)}):Promise.resolve(""),v=D=>Je(null,null,function*(){var me;if(A)return;const q=10*1024*1024,re=(me=D.target.files)==null?void 0:me[0];if(re){if(re.size>q){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(re)}}),H=()=>{u(null),T.current&&(T.current.value="")},Y=D=>Je(null,null,function*(){var me;D.preventDefault();const q=(((me=m.current)==null?void 0:me.value)||"").trim();let re="";try{re=yield P()}catch(V){c==null||c.error("Error converting file to base64:",V),alert("There was an error processing the file. Please try again.");return}q&&(H(),m.current.value="",r(q,re))});return x.jsxs("div",{className:W(d,e,`cim-${n}-component`,a&&"with-attachments",`${z}-search-bar-wrapper`),children:[a&&x.jsxs("div",{className:W(d,`cim-${n}-component`,`${z}-image-file-preview`),children:[x.jsx("img",{className:W(d,`cim-${n}-component`,`${z}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),x.jsx("span",{className:W(d,`cim-${n}-component`,`${z}-image-file-name`),title:_,children:_}),x.jsx(H1,{className:W(`cim-${n}-component`,"clear-attachment"),label:"Remove image",onClick:H})]}),x.jsxs("form",{className:W(d,e,`cim-${n}-component`,`${z}-search-bar`),name:`${z}-search-form`,onSubmit:Y,children:[x.jsx("span",{role:"status",className:W(`${z}-connection-status-icon`,C)}),y&&x.jsxs("div",{role:"button",className:W(d,e,`cim-${n}-component`,A&&"disabled",`${z}-image-upload-button`),"aria-disabled":A,tabIndex:0,children:[x.jsx("label",{className:W(d,e,`cim-${n}-component`,A&&"disabled",`${z}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:x.jsx(tP,{})}),x.jsx("input",{className:W(d,e,`cim-${n}-component`,`${z}-file-input`),type:"file",ref:T,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${z}-file-input`,disabled:A,onInput:v})]}),x.jsx("input",{className:W(d,e,`cim-${n}-component`,`${z}-search-input`),type:"text",ref:m,placeholder:f==null?void 0:f.placeholder,name:`${z}-user-input`}),x.jsx(aP,{isLoading:A}),x.jsx(iP,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:A})]}),x.jsx(U6,{})]})};function H6(e){return At({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 z6(e){return At({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 kb=B.createContext({isOpen:!1}),Ih=B.createContext(null),Pb=B.createContext(null),ps=()=>{var n,r;const e=B.useContext(Ih),t=B.useContext(Pb);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Nb=({onClearChat:e,componentType:t})=>{const n=ps(),r=()=>{e(),n()};return x.jsxs("button",{className:W(`${z}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[x.jsx(z6,{}),"Clear chat"]})};function j6(e){return e==null?[]:Array.isArray(e)?e:[e]}var $6=(e,...t)=>e.concat(t),V6=(e,...t)=>e.filter(n=>!t.includes(n)),q6=e=>Array.from(new Set(e));function Ob(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?o?c:0:a>=u?o?0:t>u?u:t:a}function Y6(e,t,n={}){const{step:r=1,loop:o=!0}=n;return Ob(e,t,{step:-r,loop:o})}var W6=e=>Array.isArray(e),Ib=e=>e!=null&&typeof e=="object",G6=e=>Ib(e)&&!W6(e),Yl=e=>typeof e=="string",ms=e=>typeof e=="function",X6=e=>e==null,K6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Q6=e=>Object.prototype.toString.call(e),Rb=Function.prototype.toString,J6=Rb.call(Object),Z6=e=>{if(!Ib(e)||Q6(e)!="[object Object]"||n4(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=K6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Rb.call(n)==J6},e4=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,t4=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,n4=e=>e4(e)||t4(e),r4=e=>e(),i4=()=>{},Rh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function o4(e,t=0){let n=0,r=null;return((...o)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...o),n=a):r||(r=setTimeout(()=>{e(...o),n=Date.now(),r=null},t-u))})}var{min:s4,max:a4}=Math,u4=e=>Number.isNaN(e),l4=e=>u4(e)?0:e,Lb=(e,t,n)=>s4(a4(l4(e),t),n);function Lh(e){if(!Z6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=Lh(o))}return n}function Dh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function c4(e,t){if(e==null)throw new Error(t())}function d4(e,t,n){let r=[];for(const o of t)e[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var f4=Object.defineProperty,h4=(e,t,n)=>t in e?f4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mh=(e,t,n)=>h4(e,typeof t!="symbol"?t+"":t,n),Db=()=>{},Wl=e=>typeof e=="object"&&e!==null,gs=e=>e?"":void 0,Mb=e=>e?"true":void 0,p4=1,m4=9,g4=11,tn=e=>Wl(e)&&e.nodeType===p4&&typeof e.nodeName=="string",Gl=e=>Wl(e)&&e.nodeType===m4,E4=e=>Wl(e)&&e===e.window,Fb=e=>tn(e)?e.localName||"":"#document";function y4(e){return["html","body","#document"].includes(Fb(e))}var b4=e=>Wl(e)&&e.nodeType!==void 0,yo=e=>b4(e)&&e.nodeType===g4&&"host"in e,T4=e=>tn(e)&&e.localName==="input",_4=e=>tn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Xa(e){if(!e)return!1;const t=e.getRootNode();return bs(t)===e}var S4=/(textarea|select)/;function x4(e){if(e==null||!tn(e))return!1;try{return T4(e)&&e.selectionStart!=null||S4.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Es(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&&yo(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function $r(e){var t;return Gl(e)?e:E4(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function w4(e){return $r(e).documentElement}function ys(e){var t,n,r;return yo(e)?ys(e.host):Gl(e)?(t=e.defaultView)!=null?t:window:tn(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function bs(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 A4(e){if(Fb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yo(e)&&e.host||w4(e);return yo(t)?t.host:t}function Fh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Gl(t)||yo(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Bh=new WeakMap;function Ts(e){return Bh.has(e)||Bh.set(e,ys(e).getComputedStyle(e)),Bh.get(e)}var Uh=new Set(["menu","listbox","dialog","grid","tree","region"]),v4=e=>Uh.has(e),Bb=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Ub(e,t){const n=new Set,r=Fh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Bb(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&&v4(m)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function Hb(e,t){const n=Fh(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Bb(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&&Uh.has(m)&&!T&&(t(p),o(p))}}}};o(e)}function C4(e){const t=new Set;return Hb(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function k4(e){const t=e.getAttribute("role");return!!(t&&Uh.has(t))}function P4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function N4(e){var t;return P4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function O4(e){if(!e.id)return!1;const t=Fh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&k4(e))}var Hh=()=>typeof document!="undefined";function I4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var zh=e=>Hh()&&e.test(I4()),R4=e=>Hh()&&e.test(navigator.vendor),zb=()=>Hh()&&!!navigator.maxTouchPoints,L4=()=>zh(/^iPhone/i),D4=()=>zh(/^iPad/i)||jh()&&navigator.maxTouchPoints>1,Xl=()=>L4()||D4(),M4=()=>jh()||Xl(),jh=()=>zh(/^Mac/i),F4=()=>M4()&&R4(/apple/i);function B4(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function Ar(e){var n;const t=B4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var jb=e=>e.button===0,U4=e=>e.button===2||jh()&&e.ctrlKey&&e.button===0,H4=e=>"touches"in e&&e.touches.length>0,z4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},$b={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function j4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=z4[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in $b&&(o=$b[o]),o}function Vb(e,t="client"){const n=H4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var nn=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},qb=e=>tn(e)&&e.tagName==="IFRAME",$4=/^(audio|video|details)$/;function Yb(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var V4=e=>!Number.isNaN(Yb(e)),q4=e=>Yb(e)<0;function Y4(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 Wb(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<o.length;){const d=o[c++];if(!d||a.has(d))continue;a.add(d);const f=Y4(d,t);if(f){const p=Array.from(f.querySelectorAll(Kl)).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+_)})}o.push(...p)}}return r}var Kl="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",Gb=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Kl));(n==!0||n=="if-empty"&&o.length===0)&&tn(e)&&Vr(e)&&o.unshift(e);const u=[];for(const c of o)if(Vr(c)){if(qb(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...Gb(d,{getShadowRoot:r}));continue}u.push(c)}return r?Wb(u,r,Vr):u};function Vr(e){return!tn(e)||e.closest("[inert]")?!1:e.matches(Kl)&&_4(e)}function _s(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Kl));n&&bo(e)&&o.unshift(e);const a=[];for(const u of o)if(bo(u)){if(qb(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(..._s(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Wb(a,r,bo);return!u.length&&n?o:u}return!a.length&&n?o:a}function bo(e){return tn(e)&&e.tabIndex>0?!0:Vr(e)&&!q4(e)}function W4(e,t={}){const n=_s(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function G4(e,t={}){const{current:n,getShadowRoot:r}=t,o=_s(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:bs(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Ka(e){return e.tabIndex<0&&($4.test(e.localName)||x4(e))&&!V4(e)?0:e.tabIndex}function Xb(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=_s(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var X4=class e2{constructor(){Mh(this,"id",null),Mh(this,"fn_cleanup"),Mh(this,"cleanup",()=>{this.cancel()})}static create(){return new e2}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 Yt(e){const t=X4.create();return t.request(e),t.cleanup}function Kb(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function $h(e){const t=A4(e);return y4(t)?$r(t).body:tn(t)&&J4(t)?t:$h(t)}var K4=/auto|scroll|overlay|hidden|clip/,Q4=new Set(["inline","contents"]);function J4(e){const t=ys(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return K4.test(n+o+r)&&!Q4.has(a)}var Ss="default",Vh="",Ql=new WeakMap;function Z4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Xl()?(Ss==="default"&&(Vh=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Ss="disabled"):t&&(Ql.set(t,t.style.userSelect),t.style.userSelect="none"),()=>eD({target:t,doc:r})}function eD(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Xl()){if(Ss!=="disabled")return;Ss="restoring",setTimeout(()=>{Kb(()=>{Ss==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=Vh||""),Vh="",Ss="default")})},300)}else if(t&&Ql.has(t)){const a=Ql.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Ql.delete(t)}}function tD(e={}){const u=e,{defer:t,target:n}=u,r=mn(u,["defer","target"]),o=t?Yt:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(Z4(pe(F({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function nD(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=Vb(c),f=Math.sqrt(oa(d.x,2)+oa(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=Vb(c);r({point:d,event:c})},u=[nn(e,"pointermove",o,!1),nn(e,"pointerup",a,!1),nn(e,"pointercancel",a,!1),nn(e,"contextmenu",a,!1),tD({doc:e})];return()=>{u.forEach(c=>c())}}function rD(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,T]=W4(e,{includeContainer:!0,getShadowRoot:a}),y=G4(c,{current:n,getShadowRoot:a}),_=!m&&!T;f.shiftKey&&Xa(y)?(o==null||o(),p=T):f.shiftKey&&(Xa(m)||_)?p=n:!f.shiftKey&&Xa(n)?(o==null||o(),p=m):!f.shiftKey&&(Xa(T)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return nn(u,"keydown",d,!0)}function iD(e,t){const c=t,{defer:n,triggerElement:r}=c,o=mn(c,["defer","triggerElement"]),a=n?Yt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(rD(d,F({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function oD(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Jl(e,t){if(!e)return Db;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function sD(e,t,n){if(!e)return Db;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 aD(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 uD(e,t){const{timeout:n,rootNode:r}=t,o=ys(r),a=$r(r),u=new o.AbortController;return aD(new Promise(c=>{const d=e();if(d){c(d);return}const f=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var lD=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),cD=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Qb=e=>{const t={};let n;for(;n=cD.exec(e);)t[n[1]]=n[2];return t},dD=(e,t)=>{if(Yl(e)){if(Yl(t))return`${e};${t}`;e=Qb(e)}else Yl(t)&&(t=Qb(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Wt(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=Rh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=lD(t[o],n[o]);continue}if(o==="style"){t[o]=dD(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function WU(e){return e}var xs=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(xs||{}),qh="__init__";function fD(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>$r(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>bs(t()),a=u=>t().getElementById(u);return pe(F({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:Xa,getById:a})}function hD(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var ws=()=>e=>Array.from(new Set(e)),Jb=typeof globalThis.document!="undefined"?B.useLayoutEffect:B.useEffect;function Zl(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=B.useState(t),[o,a]=B.useState(r),u=e().value!==void 0,c=B.useRef(o);c.current=u?e().value:o;const d=B.useRef(c.current);Jb(()=>{d.current=c.current},[o,e().value]);const f=y=>{var C,A;const _=d.current,w=ms(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:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Jo.flushSync:r4)(()=>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)}}}Zl.cleanup=e=>{B.useEffect(()=>e,[])},Zl.ref=e=>{const t=B.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function pD(e){const t=B.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var mD=(e,t)=>{const n=B.useRef(!1),r=B.useRef(!1);B.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),B.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function ec(e,t={}){var se,ce,de,ne,Ee,Oe;const n=B.useMemo(()=>{const{id:oe,ids:Q,getRootNode:ie}=t;return fD({id:oe,ids:Q,getRootNode:ie})},[t]),r=(...oe)=>{e.debug&&console.log(...oe)},o=(ce=(se=e.props)==null?void 0:se.call(e,{props:Lh(t),scope:n}))!=null?ce:t,a=gD(o),u=(de=e.context)==null?void 0:de.call(e,{prop:a,bindable:Zl,scope:n,flush:eT,getContext(){return d},getComputed(){return Y},getRefs(){return w},getEvent(){return y()}}),c=Zb(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=B.useRef(new Map),p=B.useRef(null),m=B.useRef(null),T=B.useRef({type:""}),y=()=>pe(F({},T.current),{current(){return T.current},previous(){return m.current}}),_=()=>pe(F({},D),{matches(...oe){return oe.includes(D.ref.current)},hasTag(oe){var Q,ie;return!!((ie=(Q=e.states[D.ref.current])==null?void 0:Q.tags)!=null&&ie.includes(oe))}}),w=pD((Ee=(ne=e.refs)==null?void 0:ne.call(e,{prop:a,context:d}))!=null?Ee:{}),C=()=>({state:_(),context:d,event:y(),prop:a,send:V,action:A,guard:P,track:mD,refs:w,computed:Y,flush:eT,scope:n,choose:H}),A=oe=>{const Q=ms(oe)?oe(C()):oe;if(!Q)return;const ie=Q.map(k=>{var ee,O;const L=(O=(ee=e.implementations)==null?void 0:ee.actions)==null?void 0:O[k];return L||Dh(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),L});for(const k of ie)k==null||k(C())},P=oe=>{var Q,ie;return ms(oe)?oe(C()):(ie=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:ie[oe](C())},v=oe=>{const Q=ms(oe)?oe(C()):oe;if(!Q)return;const ie=Q.map(L=>{var O,we;const ee=(we=(O=e.implementations)==null?void 0:O.effects)==null?void 0:we[L];return ee||Dh(`[zag-js] No implementation found for effect "${JSON.stringify(L)}"`),ee}),k=[];for(const L of ie){const ee=L==null?void 0:L(C());ee&&k.push(ee)}return()=>k.forEach(L=>L==null?void 0:L())},H=oe=>j6(oe).find(Q=>{let ie=!Q.guard;return Yl(Q.guard)?ie=!!P(Q.guard):ms(Q.guard)&&(ie=Q.guard(C())),ie}),Y=oe=>{c4(e.computed,()=>"[zag-js] No computed object found on machine");const Q=e.computed[oe];return Q({context:d,event:y(),prop:a,refs:w,scope:n,computed:Y})},D=Zl(()=>({defaultValue:e.initialState({prop:a}),onChange(oe,Q){var k,L,ee,O;if(Q){const we=f.current.get(Q);we==null||we(),f.current.delete(Q)}Q&&A((k=e.states[Q])==null?void 0:k.exit),A((L=p.current)==null?void 0:L.actions);const ie=v((ee=e.states[oe])==null?void 0:ee.effects);if(ie&&f.current.set(oe,ie),Q===qh){A(e.entry);const we=v(e.effects);we&&f.current.set(qh,we)}A((O=e.states[oe])==null?void 0:O.entry)}})),q=B.useRef(void 0),re=B.useRef(xs.NotStarted);Jb(()=>{queueMicrotask(()=>{var L;const ie=re.current===xs.Started;re.current=xs.Started,r(ie?"rehydrating...":"initializing...");const k=(L=q.current)!=null?L:D.initial;D.invoke(k,ie?D.get():qh)});const oe=f.current,Q=D.ref.current;return()=>{r("unmounting..."),q.current=Q,re.current=xs.Stopped,oe.forEach(ie=>ie==null?void 0:ie()),f.current=new Map,p.current=null,queueMicrotask(()=>{A(e.exit)})}},[]);const me=()=>"ref"in D?D.ref.current:D.get(),V=oe=>{queueMicrotask(()=>{var O,we,Ue,Te,Be;if(re.current!==xs.Started)return;m.current=T.current,T.current=oe;let Q=me();const ie=(Ue=(O=e.states[Q].on)==null?void 0:O[oe.type])!=null?Ue:(we=e.on)==null?void 0:we[oe.type],k=H(ie);if(!k)return;p.current=k;const L=(Te=k.target)!=null?Te:Q;r("transition",oe.type,k.target||Q,`(${k.actions})`);const ee=L!==Q;ee?Jo.flushSync(()=>D.set(L)):k.reenter&&!ee?D.invoke(Q,Q):A((Be=k.actions)!=null?Be:[])})};return(Oe=e.watch)==null||Oe.call(e,C()),{state:_(),send:V,context:d,prop:a,scope:n,refs:w,computed:Y,event:y(),getStatus:()=>re.current}}function Zb(e){const t=B.useRef(e);return t.current=e,t}function gD(e){const t=Zb(e);return function(r){return t.current[r]}}function eT(e){queueMicrotask(()=>{Jo.flushSync(()=>e())})}var Yh=hD(e=>e);function tc(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const o=r(t);typeof o=="function"&&n.push(o)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function ED(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Wh=e=>{const t=B.memo(B.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=mn(f,["asChild","children"]);if(!o)return B.createElement(e,pe(F({},u),{ref:r}),a);if(!B.isValidElement(a))return null;const c=B.Children.only(a),d=ED(c);return B.cloneElement(c,pe(F({},Wt(u,c.props)),{ref:r?tc(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Sn=(()=>{const e=new Map;return new Proxy(Wh,{apply(t,n,r){return Wh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Wh(r)),e.get(r)}})})();function yD(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function To(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=B.createContext(u);c.displayName=t;function d(){var p;const f=B.useContext(c);if(!f&&n){const m=new Error(a!=null?a:yD(r,o));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[c.Provider,d,c]}const[bD,Gh]=To({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[tT,Qa]=To({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),nT=B.forwardRef((e,t)=>{const n=Gh(),r=Qa(),o=Wt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Sn.div,pe(F({},o),{ref:tc(r.ref,t)}))});nT.displayName="PopoverContent";const rT=B.forwardRef((e,t)=>{const n=Gh(),r=Qa(),o=Wt(n.getPositionerProps(),e);return r.unmounted?null:x.jsx(Sn.div,pe(F({},o),{ref:t}))});rT.displayName="PopoverPositioner";const Ja=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},F({},e)]),iT=e=>Ja()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function TD(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var _D={props({props:e}){return pe(F({},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",Ts(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!o&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});Yt(()=>{var c,d;const u=nc(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})=>{Yt(()=>{e.set("prevAnimationName",nc(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var p,m,T;((T=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?T:d.target)===o&&e.set("prevAnimationName",nc(t.get("styles")))},u=d=>{const f=nc(t.get("styles"));Ar(d)===o&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const c=Jl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),Kb(()=>c())}}}}};function nc(e){return(e==null?void 0:e.animationName)||"none"}ws()(["onExitComplete","present","immediate"]);function SD(e,t={}){const{sync:n=!1}=t,r=xD(e);return B.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function xD(e){const t=B.useRef(e);return t.current=e,t}const Xh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=mn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=B.useRef(!1),c=pe(F({},a),{present:r,onExitComplete:SD(e.onExitComplete)}),d=ec(_D,c),f=TD(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var _o=(e,t=[])=>({parts:(...n)=>{if(wD(t))return _o(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>_o(e,[...t,...n]),omit:(...n)=>_o(e,t.filter(r=>!n.includes(r))),rename:n=>_o(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${As(e)}"][data-part="${As(r)}"]`,`& [data-scope="${As(e)}"][data-part="${As(r)}"]`].join(", "),attrs:{"data-scope":As(e),"data-part":As(r)}}}),{})}),As=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),wD=e=>e.length===0;const AD=["top","right","bottom","left"],Li=Math.min,Qn=Math.max,rc=Math.round,ic=Math.floor,qr=e=>({x:e,y:e}),vD={left:"right",right:"left",bottom:"top",top:"bottom"},CD={start:"end",end:"start"};function Kh(e,t,n){return Qn(e,Li(t,n))}function fi(e,t){return typeof e=="function"?e(t):e}function hi(e){return e.split("-")[0]}function vs(e){return e.split("-")[1]}function Qh(e){return e==="x"?"y":"x"}function Jh(e){return e==="y"?"height":"width"}const kD=new Set(["top","bottom"]);function Yr(e){return kD.has(hi(e))?"y":"x"}function Zh(e){return Qh(Yr(e))}function PD(e,t,n){n===void 0&&(n=!1);const r=vs(e),o=Zh(e),a=Jh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=oc(u)),[u,oc(u)]}function ND(e){const t=oc(e);return[ep(e),t,ep(t)]}function ep(e){return e.replace(/start|end/g,t=>CD[t])}const oT=["left","right"],sT=["right","left"],OD=["top","bottom"],ID=["bottom","top"];function RD(e,t,n){switch(e){case"top":case"bottom":return n?t?sT:oT:t?oT:sT;case"left":case"right":return t?OD:ID;default:return[]}}function LD(e,t,n,r){const o=vs(e);let a=RD(hi(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(ep)))),a}function oc(e){return e.replace(/left|right|bottom|top/g,t=>vD[t])}function DD(e){return F({top:0,right:0,bottom:0,left:0},e)}function aT(e){return typeof e!="number"?DD(e):{top:e,right:e,bottom:e,left:e}}function sc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function uT(e,t,n){let{reference:r,floating:o}=e;const a=Yr(t),u=Zh(t),c=Jh(u),d=hi(t),f=a==="y",p=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,T=r[c]/2-o[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-o.width,y:m};break;default:y={x:r.x,y:r.y}}switch(vs(t)){case"start":y[u]-=T*(n&&f?-1:1);break;case"end":y[u]+=T*(n&&f?-1:1);break}return y}const MD=(e,t,n)=>Je(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,c=a.filter(Boolean),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:m}=uT(f,r,d),T=r,y={},_=0;for(let w=0;w<c.length;w++){const{name:C,fn:A}=c[w],{x:P,y:v,data:H,reset:Y}=yield A({x:p,y:m,initialPlacement:r,placement:T,strategy:o,middlewareData:y,rects:f,platform:u,elements:{reference:e,floating:t}});p=P!=null?P:p,m=v!=null?v:m,y=pe(F({},y),{[C]:F(F({},y[C]),H)}),Y&&_<=50&&(_++,typeof Y=="object"&&(Y.placement&&(T=Y.placement),Y.rects&&(f=Y.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):Y.rects),{x:p,y:m}=uT(f,T,d)),w=-1)}return{x:p,y:m,placement:T,strategy:o,middlewareData:y}});function Za(e,t){return Je(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:T=!1,padding:y=0}=fi(t,e),_=aT(y),C=c[T?m==="floating"?"reference":"floating":m],A=sc(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})),P=m==="floating"?{x:r,y:o,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}:{x:1,y:1},Y=sc(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:P,offsetParent:v,strategy:d}):P);return{top:(A.top-Y.top+_.top)/H.y,bottom:(Y.bottom-A.bottom+_.bottom)/H.y,left:(A.left-Y.left+_.left)/H.x,right:(Y.right-A.right+_.right)/H.x}})}const FD=e=>({name:"arrow",options:e,fn(n){return Je(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=fi(e,n)||{};if(p==null)return{};const T=aT(m),y={x:r,y:o},_=Zh(a),w=Jh(_),C=yield c.getDimensions(p),A=_==="y",P=A?"top":"left",v=A?"bottom":"right",H=A?"clientHeight":"clientWidth",Y=u.reference[w]+u.reference[_]-y[_]-u.floating[w],D=y[_]-u.reference[_],q=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let re=q?q[H]:0;(!re||!(yield c.isElement==null?void 0:c.isElement(q)))&&(re=d.floating[H]||u.floating[w]);const me=Y/2-D/2,V=re/2-C[w]/2-1,se=Li(T[P],V),ce=Li(T[v],V),de=se,ne=re-C[w]-ce,Ee=re/2-C[w]/2+me,Oe=Kh(de,Ee,ne),oe=!f.arrow&&vs(a)!=null&&Ee!==Oe&&u.reference[w]/2-(Ee<de?se:ce)-C[w]/2<0,Q=oe?Ee<de?Ee-de:Ee-ne:0;return{[_]:y[_]+Q,data:F({[_]:Oe,centerOffset:Ee-Oe-Q},oe&&{alignmentOffset:Q}),reset:oe}})}}),BD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Je(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,Ee=fi(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0}=Ee,A=mn(Ee,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const P=hi(a),v=Yr(d),H=hi(d)===d,Y=yield f.isRTL==null?void 0:f.isRTL(p.floating),D=y||(H||!C?[oc(d)]:ND(d)),q=w!=="none";!y&&q&&D.push(...LD(d,C,w,Y));const re=[d,...D],me=yield Za(n,A),V=[];let se=((o=u.flip)==null?void 0:o.overflows)||[];if(m&&V.push(me[P]),T){const Oe=PD(a,c,Y);V.push(me[Oe[0]],me[Oe[1]])}if(se=[...se,{placement:a,overflows:V}],!V.every(Oe=>Oe<=0)){var ce,de;const Oe=(((ce=u.flip)==null?void 0:ce.index)||0)+1,oe=re[Oe];if(oe&&(!(T==="alignment"?v!==Yr(oe):!1)||se.every(k=>Yr(k.placement)===v?k.overflows[0]>0:!0)))return{data:{index:Oe,overflows:se},reset:{placement:oe}};let Q=(de=se.filter(ie=>ie.overflows[0]<=0).sort((ie,k)=>ie.overflows[1]-k.overflows[1])[0])==null?void 0:de.placement;if(!Q)switch(_){case"bestFit":{var ne;const ie=(ne=se.filter(k=>{if(q){const L=Yr(k.placement);return L===v||L==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(L=>L>0).reduce((L,ee)=>L+ee,0)]).sort((k,L)=>k[1]-L[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 lT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function cT(e){return AD.some(t=>e[t]>=0)}const UD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Je(this,null,function*(){const{rects:r}=n,u=fi(e,n),{strategy:o="referenceHidden"}=u,a=mn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield Za(n,pe(F({},a),{elementContext:"reference"})),d=lT(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:cT(d)}}}case"escaped":{const c=yield Za(n,pe(F({},a),{altBoundary:!0})),d=lT(c,r.floating);return{data:{escapedOffsets:d,escaped:cT(d)}}}default:return{}}})}}},dT=new Set(["left","top"]);function HD(e,t){return Je(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=hi(n),c=vs(n),d=Yr(n)==="y",f=dT.has(u)?-1:1,p=a&&d?-1:1,m=fi(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 zD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Je(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield HD(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:pe(F({},f),{placement:c})}})}}},jD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Je(this,null,function*(){const{x:r,y:o,placement:a}=n,A=fi(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:P=>{let{x:v,y:H}=P;return{x:v,y:H}}}}=A,f=mn(A,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},m=yield Za(n,f),T=Yr(hi(a)),y=Qh(T);let _=p[y],w=p[T];if(u){const P=y==="y"?"top":"left",v=y==="y"?"bottom":"right",H=_+m[P],Y=_-m[v];_=Kh(H,_,Y)}if(c){const P=T==="y"?"top":"left",v=T==="y"?"bottom":"right",H=w+m[P],Y=w-m[v];w=Kh(H,w,Y)}const C=d.fn(pe(F({},n),{[y]:_,[T]:w}));return pe(F({},C),{data:{x:C.x-r,y:C.y-o,enabled:{[y]:u,[T]:c}}})})}}},$D=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=fi(e,t),p={x:n,y:r},m=Yr(o),T=Qh(m);let y=p[T],_=p[m];const w=fi(c,t),C=typeof w=="number"?{mainAxis:w,crossAxis:0}:F({mainAxis:0,crossAxis:0},w);if(d){const v=T==="y"?"height":"width",H=a.reference[T]-a.floating[v]+C.mainAxis,Y=a.reference[T]+a.reference[v]-C.mainAxis;y<H?y=H:y>Y&&(y=Y)}if(f){var A,P;const v=T==="y"?"width":"height",H=dT.has(hi(o)),Y=a.reference[m]-a.floating[v]+(H&&((A=u.offset)==null?void 0:A[m])||0)+(H?0:C.crossAxis),D=a.reference[m]+a.reference[v]+(H?0:((P=u.offset)==null?void 0:P[m])||0)-(H?C.crossAxis:0);_<Y?_=Y:_>D&&(_=D)}return{[T]:y,[m]:_}}}},VD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Je(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,se=fi(e,n),{apply:f=()=>{}}=se,p=mn(se,["apply"]),m=yield Za(n,p),T=hi(a),y=vs(a),_=Yr(a)==="y",{width:w,height:C}=u.floating;let A,P;T==="top"||T==="bottom"?(A=T,P=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(P=T,A=y==="end"?"top":"bottom");const v=C-m.top-m.bottom,H=w-m.left-m.right,Y=Li(C-m[A],v),D=Li(w-m[P],H),q=!n.middlewareData.shift;let re=Y,me=D;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(me=H),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(re=v),q&&!y){const ce=Qn(m.left,0),de=Qn(m.right,0),ne=Qn(m.top,0),Ee=Qn(m.bottom,0);_?me=w-2*(ce!==0||de!==0?ce+de:Qn(m.left,m.right)):re=C-2*(ne!==0||Ee!==0?ne+Ee:Qn(m.top,m.bottom))}yield f(pe(F({},n),{availableWidth:me,availableHeight:re}));const V=yield c.getDimensions(d.floating);return w!==V.width||C!==V.height?{reset:{rects:!0}}:{}})}}};function ac(){return typeof window!="undefined"}function Cs(e){return fT(e)?(e.nodeName||"").toLowerCase():"#document"}function Jn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wr(e){var t;return(t=(fT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fT(e){return ac()?e instanceof Node||e instanceof Jn(e).Node:!1}function vr(e){return ac()?e instanceof Element||e instanceof Jn(e).Element:!1}function Gr(e){return ac()?e instanceof HTMLElement||e instanceof Jn(e).HTMLElement:!1}function hT(e){return!ac()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Jn(e).ShadowRoot}const qD=new Set(["inline","contents"]);function eu(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Cr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!qD.has(o)}const YD=new Set(["table","td","th"]);function WD(e){return YD.has(Cs(e))}const GD=[":popover-open",":modal"];function uc(e){return GD.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const XD=["transform","translate","scale","rotate","perspective"],KD=["transform","translate","scale","rotate","perspective","filter"],QD=["paint","layout","strict","content"];function tp(e){const t=np(),n=vr(e)?Cr(e):e;return XD.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||KD.some(r=>(n.willChange||"").includes(r))||QD.some(r=>(n.contain||"").includes(r))}function JD(e){let t=Di(e);for(;Gr(t)&&!ks(t);){if(tp(t))return t;if(uc(t))return null;t=Di(t)}return null}function np(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ZD=new Set(["html","body","#document"]);function ks(e){return ZD.has(Cs(e))}function Cr(e){return Jn(e).getComputedStyle(e)}function lc(e){return vr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Di(e){if(Cs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hT(e)&&e.host||Wr(e);return hT(t)?t.host:t}function pT(e){const t=Di(e);return ks(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gr(t)&&eu(t)?t:pT(t)}function tu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=pT(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Jn(o);if(a){const c=rp(u);return t.concat(u,u.visualViewport||[],eu(o)?o:[],c&&n?tu(c):[])}return t.concat(o,tu(o,[],n))}function rp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mT(e){const t=Cr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Gr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=rc(n)!==a||rc(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function ip(e){return vr(e)?e:e.contextElement}function Ps(e){const t=ip(e);if(!Gr(t))return qr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=mT(t);let u=(a?rc(n.width):n.width)/r,c=(a?rc(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const e5=qr(0);function gT(e){const t=Jn(e);return!np()||!t.visualViewport?e5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function t5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jn(e)?!1:t}function So(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=ip(e);let u=qr(1);t&&(r?vr(r)&&(u=Ps(r)):u=Ps(e));const c=t5(a,n,r)?gT(a):qr(0);let d=(o.left+c.x)/u.x,f=(o.top+c.y)/u.y,p=o.width/u.x,m=o.height/u.y;if(a){const T=Jn(a),y=r&&vr(r)?Jn(r):r;let _=T,w=rp(_);for(;w&&r&&y!==_;){const C=Ps(w),A=w.getBoundingClientRect(),P=Cr(w),v=A.left+(w.clientLeft+parseFloat(P.paddingLeft))*C.x,H=A.top+(w.clientTop+parseFloat(P.paddingTop))*C.y;d*=C.x,f*=C.y,p*=C.x,m*=C.y,d+=v,f+=H,_=Jn(w),w=rp(_)}}return sc({width:p,height:m,x:d,y:f})}function cc(e,t){const n=lc(e).scrollLeft;return t?t.left+n:So(Wr(e)).left+n}function ET(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-cc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function n5(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Wr(r),c=t?uc(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=qr(1);const p=qr(0),m=Gr(r);if((m||!m&&!a)&&((Cs(r)!=="body"||eu(u))&&(d=lc(r)),Gr(r))){const y=So(r);f=Ps(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?ET(u,d):qr(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 r5(e){return Array.from(e.getClientRects())}function i5(e){const t=Wr(e),n=lc(e),r=e.ownerDocument.body,o=Qn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Qn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+cc(e);const c=-n.scrollTop;return Cr(r).direction==="rtl"&&(u+=Qn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const yT=25;function o5(e,t){const n=Jn(e),r=Wr(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(o){a=o.width,u=o.height;const p=np();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const f=cc(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);_<=yT&&(a-=_)}else f<=yT&&(a+=f);return{width:a,height:u,x:c,y:d}}const s5=new Set(["absolute","fixed"]);function a5(e,t){const n=So(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Gr(e)?Ps(e):qr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=o*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function bT(e,t,n){let r;if(t==="viewport")r=o5(e,n);else if(t==="document")r=i5(Wr(e));else if(vr(t))r=a5(t,n);else{const o=gT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sc(r)}function TT(e,t){const n=Di(e);return n===t||!vr(n)||ks(n)?!1:Cr(n).position==="fixed"||TT(n,t)}function u5(e,t){const n=t.get(e);if(n)return n;let r=tu(e,[],!1).filter(c=>vr(c)&&Cs(c)!=="body"),o=null;const a=Cr(e).position==="fixed";let u=a?Di(e):e;for(;vr(u)&&!ks(u);){const c=Cr(u),d=tp(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&s5.has(o.position)||eu(u)&&!d&&TT(e,u))?r=r.filter(p=>p!==u):o=c,u=Di(u)}return t.set(e,r),r}function l5(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?uc(t)?[]:u5(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const m=bT(t,p,o);return f.top=Qn(m.top,f.top),f.right=Li(m.right,f.right),f.bottom=Li(m.bottom,f.bottom),f.left=Qn(m.left,f.left),f},bT(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function c5(e){const{width:t,height:n}=mT(e);return{width:t,height:n}}function d5(e,t,n){const r=Gr(t),o=Wr(t),a=n==="fixed",u=So(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=qr(0);function f(){d.x=cc(o)}if(r||!r&&!a)if((Cs(t)!=="body"||eu(o))&&(c=lc(t)),r){const y=So(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else o&&f();a&&!r&&o&&f();const p=o&&!r&&!a?ET(o,c):qr(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 op(e){return Cr(e).position==="static"}function _T(e,t){if(!Gr(e)||Cr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Wr(e)===n&&(n=n.ownerDocument.body),n}function ST(e,t){const n=Jn(e);if(uc(e))return n;if(!Gr(e)){let o=Di(e);for(;o&&!ks(o);){if(vr(o)&&!op(o))return o;o=Di(o)}return n}let r=_T(e,t);for(;r&&WD(r)&&op(r);)r=_T(r,t);return r&&ks(r)&&op(r)&&!tp(r)?n:r||JD(e)||n}const f5=function(e){return Je(this,null,function*(){const t=this.getOffsetParent||ST,n=this.getDimensions,r=yield n(e.floating);return{reference:d5(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function h5(e){return Cr(e).direction==="rtl"}const p5={convertOffsetParentRelativeRectToViewportRelativeRect:n5,getDocumentElement:Wr,getClippingRect:l5,getOffsetParent:ST,getElementRects:f5,getClientRects:r5,getDimensions:c5,getScale:Ps,isElement:vr,isRTL:h5};function xT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function m5(e,t){let n=null,r;const o=Wr(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 _=ic(m),w=ic(o.clientWidth-(p+T)),C=ic(o.clientHeight-(m+y)),A=ic(p),v={rootMargin:-_+"px "+-w+"px "+-C+"px "+-A+"px",threshold:Qn(0,Li(1,d))||1};let H=!0;function Y(D){const q=D[0].intersectionRatio;if(q!==d){if(!H)return u();q?u(!1,q):r=setTimeout(()=>{u(!1,1e-7)},1e3)}q===1&&!xT(f,e.getBoundingClientRect())&&u(),H=!1}try{n=new IntersectionObserver(Y,pe(F({},v),{root:o.ownerDocument}))}catch(D){n=new IntersectionObserver(Y,v)}n.observe(e)}return u(!0),a}function g5(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=ip(e),p=o||a?[...f?tu(f):[],...tu(t)]:[];p.forEach(A=>{o&&A.addEventListener("scroll",n,{passive:!0}),a&&A.addEventListener("resize",n)});const m=f&&c?m5(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(A=>{let[P]=A;P&&P.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?So(e):null;d&&C();function C(){const A=So(e);w&&!xT(w,A)&&n(),w=A,_=requestAnimationFrame(C)}return n(),()=>{var A;p.forEach(P=>{o&&P.removeEventListener("scroll",n),a&&P.removeEventListener("resize",n)}),m==null||m(),(A=y)==null||A.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const E5=zD,y5=jD,b5=BD,T5=VD,_5=UD,S5=FD,x5=$D,w5=(e,t,n)=>{const r=new Map,o=F({platform:p5},n),a=pe(F({},o.platform),{_c:r});return MD(e,t,pe(F({},o),{platform:a}))};function wT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return pe(F({},o),{toJSON:()=>o})}function A5(e){if(!e)return wT();const{x:t,y:n,width:r,height:o}=e;return wT(t,n,r,o)}function v5(e,t){return{contextElement:tn(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?A5(r):n.getBoundingClientRect()}}}var nu=e=>({variable:e,reference:`var(${e})`}),pi={arrowSize:nu("--arrow-size"),arrowSizeHalf:nu("--arrow-size-half"),arrowBg:nu("--arrow-background"),transformOrigin:nu("--transform-origin"),arrowOffset:nu("--arrow-offset")},C5=e=>e==="top"||e==="bottom"?"y":"x";function k5(e,t){return{name:"transformOrigin",fn(n){var me,V,se,ce,de;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=C5(d),p=((me=o.arrow)==null?void 0:me.x)||0,m=((V=o.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=o.shift)==null?void 0:se.y)||0),A=u.reference.height/2,P=y/2,v=(de=(ce=e.offset)==null?void 0:ce.mainAxis)!=null?de:e.gutter,H=typeof v=="number"?v+P:v!=null?v:P,Y=C>H,D={top:`${_}px calc(100% + ${H}px)`,bottom:`${_}px ${-H}px`,left:`calc(100% + ${H}px) ${w}px`,right:`${-H}px ${w}px`}[d],q=`${_}px ${u.reference.y+A-c}px`,re=!!e.overlap&&f==="y"&&Y;return r.floating.style.setProperty(pi.transformOrigin.variable,re?q:D),{data:{transformOrigin:re?q:D}}}}}var P5={name:"rects",fn({rects:e}){return{data:e}}},N5=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${pi.arrowOffset.reference})`}),{}}}};function O5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var I5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function AT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function sp(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function R5(e,t,n){const r=e||t.createElement("div");return S5({element:r,padding:n.arrowPadding})}function L5(e,t){var n;if(!X6((n=t.offset)!=null?n:t.gutter))return E5(({placement:r})=>{var p,m,T,y;const o=((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+o:a!=null?a:o,{hasAlign:c}=O5(r),d=c?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Lh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function D5(e){if(!e.flip)return;const t=sp(e.boundary);return b5(pe(F({},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=sp(e.boundary);return y5(pe(F({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:x5()}))}function F5(e){return T5({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function B5(e){var t;if(e.hideWhenDetached)return _5({strategy:"referenceHidden",boundary:(t=sp(e.boundary))!=null?t:"clippingAncestors"})}function U5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function H5(e,t,n={}){const r=v5(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},I5,n),a=t.querySelector("[data-part=arrow]"),u=[L5(a,o),D5(o),M5(o),R5(a,t.ownerDocument,o),N5(a),k5({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),F5(o),B5(o),P5],{placement:c,strategy:d,onComplete:f,onPositioned:p}=o,m=()=>Je(null,null,function*(){var H;if(!r||!t)return;const w=yield w5(r,t,{placement:c,middleware:u,strategy:d});f==null||f(w),p==null||p({placed:!0});const C=ys(t),A=AT(C,w.x),P=AT(C,w.y);t.style.setProperty("--x",`${A}px`),t.style.setProperty("--y",`${P}px`),o.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 Y=Ts(v);t.style.setProperty("--z-index",Y.zIndex)}}),T=()=>Je(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=U5(o.listeners),_=o.listeners?g5(r,t,T,y):i4;return T(),()=>{_==null||_(),p==null||p({placed:!1})}}function vT(e,t,n={}){const c=n,{defer:r}=c,o=mn(c,["defer"]),a=r?Yt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(H5(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var z5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function j5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:pi.arrowSize.reference,height:pi.arrowSize.reference,[pi.arrowSizeHalf.variable]:`calc(${pi.arrowSize.reference} / 2)`,[pi.arrowOffset.variable]:`calc(${pi.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?z5[t.split("-")[0]]:void 0,background:pi.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var Ns=new WeakMap,dc=new WeakMap,fc={},ap=0,CT=e=>e&&(e.host||CT(e.parentNode)),$5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=CT(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),V5=new Set(["script","output","status","next-route-announcer"]),q5=e=>V5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),Y5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=$5(n,Array.isArray(e)?e:[e]);fc[r]||(fc[r]=new WeakMap);const c=fc[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)&&Hb(y,_=>{m(_)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))T(_);else try{if(q5(_))return;const C=_.getAttribute(o)==="true",A=(Ns.get(_)||0)+1,P=(c.get(_)||0)+1;Ns.set(_,A),c.set(_,P),d.push(_),A===1&&C&&dc.set(_,!0),P===1&&_.setAttribute(r,""),C||_.setAttribute(o,"true")}catch(w){console.error("[zag-js > ariaHidden] cannot operate on ",_,w)}})};return T(n),f.clear(),ap++,()=>{d.forEach(y=>{const _=Ns.get(y)-1,w=c.get(y)-1;Ns.set(y,_),c.set(y,w),_||(dc.has(y)||y.removeAttribute(o),dc.delete(y)),w||y.removeAttribute(r)}),ap--,ap||(Ns=new WeakMap,Ns=new WeakMap,dc=new WeakMap,fc={})}},W5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,G5=(e,t=W5(e),n="data-aria-hidden",r=!0)=>{if(t)return Y5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},X5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function kT(e,t={}){const{defer:n=!0}=t,r=n?X5:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(G5(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function K5(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const a=e.frames[o];a&&n(a)}},addEventListener(n,r,o){return t.each(a=>{try{a.document.addEventListener(n,r,o)}catch(u){}}),()=>{try{t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener(n,r,o){t.each(a=>{try{a.document.removeEventListener(n,r,o)}catch(u){}})}};return t}function Q5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}}}var PT="pointerdown.outside",NT="focus.outside";function J5(e){for(const t of e)if(tn(t)&&Vr(t))return!0;return!1}var OT=e=>"clientY"in e;function Z5(e,t){if(!OT(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 eM(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function IT(e,t){if(!t||!OT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return eM(u,c)?r||a:!1}function tM(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=$r(e),f=ys(e),p=K5(f),m=Q5(f);function T(v,H){if(!tn(H)||!H.isConnected||Es(e,H)||Z5(e,v)||c&&Ub(e,H))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const q=$h(Y);if(IT(v,q))return!1}const D=$h(e);return IT(v,D)?!1:!(n!=null&&n(H))}const y=new Set,_=yo(e==null?void 0:e.getRootNode());function w(v){function H(Y){var me,V;const D=u&&!zb()?Yt:se=>se(),q=Y!=null?Y:v,re=(V=(me=q==null?void 0:q.composedPath)==null?void 0:me.call(q))!=null?V:[q==null?void 0:q.target];D(()=>{const se=_?re[0]:Ar(v);if(!(!e||!T(v,se))){if(o||a){const ce=Rh(o,a);e.addEventListener(PT,ce,{once:!0})}RT(e,PT,{bubbles:!1,cancelable:!0,detail:{originalEvent:q,contextmenu:U4(q),focusable:J5(re),target:se}})}})}v.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(nn(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(nn(d,"pointerdown",w,!0)),C.add(m.addEventListener("pointerdown",w,!0)),C.add(p.addEventListener("pointerdown",w,!0))},0);function P(v){(u?Yt:Y=>Y())(()=>{var q,re;const Y=(re=(q=v==null?void 0:v.composedPath)==null?void 0:q.call(v))!=null?re:[v==null?void 0:v.target],D=_?Y[0]:Ar(v);if(!(!e||!T(v,D))){if(r||a){const me=Rh(r,a);e.addEventListener(NT,me,{once:!0})}RT(e,NT,{bubbles:!1,cancelable:!0,detail:{originalEvent:v,contextmenu:!1,focusable:Vr(D),target:D}})}})}return zb()||(C.add(nn(d,"focusin",P,!0)),C.add(m.addEventListener("focusin",P,!0)),C.add(p.addEventListener("focusin",P,!0))),()=>{clearTimeout(A),y.forEach(v=>v()),C.forEach(v=>v())}}function nM(e,t){const{defer:n}=t,r=n?Yt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(tM(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function RT(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function rM(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return nn($r(e),"keydown",n,{capture:!0})}var LT="layer:request-dismiss",dr={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=>Es(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Es(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=>dr.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];oM(e,LT,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),iM(e,LT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function iM(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function oM(e,t,n){e.addEventListener(t,n,{once:!0})}var DT;function MT(){dr.layers.forEach(({node:e})=>{e.style.pointerEvents=dr.isBelowPointerBlockingLayer(e)?"none":"auto"})}function sM(e){e.style.pointerEvents=""}function aM(e,t){const n=$r(e),r=[];return dr.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(DT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=uD(()=>{const c=o();return tn(c)?c:null},{timeout:1e3});a.then(c=>r.push(Jl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{dr.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=DT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function uM(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Dh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};dr.add(f),MT();function p(w){var A,P;const C=Ar(w.detail.originalEvent);dr.isBelowPointerBlockingLayer(e)||dr.isInBranch(C)||((A=t.onPointerDownOutside)==null||A.call(t,w),(P=t.onInteractOutside)==null||P.call(t,w),!w.defaultPrevented&&(c&&console.log("onPointerDownOutside:",w.detail.originalEvent),r==null||r()))}function m(w){var A,P;const C=Ar(w.detail.originalEvent);dr.isInBranch(C)||((A=t.onFocusOutside)==null||A.call(t,w),(P=t.onInteractOutside)==null||P.call(t,w),!w.defaultPrevented&&(c&&console.log("onFocusOutside:",w.detail.originalEvent),r==null||r()))}function T(w){var C;dr.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],P=(v=t.persistentElements)==null?void 0:v.map(H=>H()).filter(tn);return P&&A.push(...P),A.some(H=>Es(H,w))||dr.isInNestedLayer(e,w)}const _=[a?aM(e,t.persistentElements):void 0,rM(e,T),nM(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{dr.remove(e),MT(),sM(e),_.forEach(w=>w==null?void 0:w())}}function FT(e,t){const{defer:n}=t,r=n?Yt:a=>a(),o=[];return o.push(r(()=>{const a=ms(e)?e():e;o.push(uM(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var lM=Object.defineProperty,cM=(e,t,n)=>t in e?lM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ct=(e,t,n)=>cM(e,typeof t!="symbol"?t+"":t,n),BT={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()}},dM=[],fM=class{constructor(e,t){Ct(this,"trapStack"),Ct(this,"config"),Ct(this,"doc"),Ct(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ct(this,"portalContainers",new Set),Ct(this,"listenerCleanups",[]),Ct(this,"handleFocus",r=>{const o=Ar(r),a=this.findContainerIndex(o,r)>=0;if(a||Gl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Ka(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=>Ka(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}),Ct(this,"handlePointerDown",r=>{const o=Ar(r);if(!(this.findContainerIndex(o,r)>=0)){if(iu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}iu(this.config.allowOutsideClick,r)||r.preventDefault()}}),Ct(this,"handleClick",r=>{const o=Ar(r);this.findContainerIndex(o,r)>=0||iu(this.config.clickOutsideDeactivates,r)||iu(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Ct(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;ru(r)&&r.preventDefault(),this.tryFocus(a)}}),Ct(this,"handleEscapeKey",r=>{hM(r)&&iu(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Ct(this,"_mutationObserver"),Ct(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return N4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?O4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ct(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),Ct(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Vr(r)){const o=bs(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),Ct(this,"tryFocus",r=>{if(r!==!1&&r!==bs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,pM(r)&&r.select()}}),Ct(this,"deactivate",r=>{if(!this.state.active)return this;const o=F({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(),BT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{UT(()=>{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}),Ct(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),Ct(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),Ct(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ct(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),Ct(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),Ct(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),Ct(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Ar(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),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||Vr(u)&&!bo(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=Ka(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else ru(o)||(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||Vr(u)&&!bo(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=Ka(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else ru(o)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||dM;const n=F({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return ru(r)&&!r.shiftKey},isKeyBackward(r){return ru(r)&&r.shiftKey}},t);this.doc=n.document||$r(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{C4(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?Ub(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=_s(e,{getShadowRoot:this.config.getShadowRoot}),n=Gb(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let f=0;f<t.length;f++)if(Ka(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(bo(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(bo(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return BT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?UT(()=>{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=bs(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},ru=e=>e.key==="Tab",iu=(e,...t)=>typeof e=="function"?e(...t):e,hM=e=>!e.isComposing&&e.key==="Escape",UT=e=>setTimeout(e,0),pM=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function HT(e,t={}){let n;const r=Yt(()=>{const o=typeof e=="function"?e():e;if(o){n=new fM(o,pe(F({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:$r(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var up="data-scroll-lock";function mM(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function zT(e){const t=Ts(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function jT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(up))return;const u=zT(r)||zT(o),c=n.innerWidth-r.clientWidth;o.setAttribute(up,"");const d=()=>sD(r,"--scrollbar-width",`${c}px`),f=mM(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Jl(o,_)},m=()=>{var Y,D;const{scrollX:_,scrollY:w,visualViewport:C}=n,A=(Y=C==null?void 0:C.offsetLeft)!=null?Y:0,P=(D=C==null?void 0:C.offsetTop)!=null?D:0,v={position:"fixed",overflow:"hidden",top:`${-(w-Math.floor(P))}px`,left:`${-(_-Math.floor(A))}px`,right:"0"};!u&&c>0&&(v[f]=`${c}px`);const H=Jl(o,v);return()=>{H==null||H(),n.scrollTo({left:_,top:w,behavior:"instant"})}},T=[d(),Xl()?m():p()];return()=>{T.forEach(_=>_==null?void 0:_()),o.removeAttribute(up)}}var gM=_o("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Xr=gM.build(),$T=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},VT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},lp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},qT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},EM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},cp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},dp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},yM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},YT=e=>e.getById($T(e)),Os=e=>e.getById(VT(e)),Is=e=>e.getById(lp(e)),WT=e=>e.getById(qT(e)),bM=e=>e.getById(cp(e)),TM=e=>e.getById(dp(e));function _M(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=j5(pe(F({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&o({type:y?"OPEN":"CLOSE"})},reposition(y={}){o({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(pe(F({id:EM(c)},Xr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(pe(F({},Xr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(pe(F({},Xr.anchor.attrs),{dir:u("dir"),id:$T(c)}))},getTriggerProps(){return t.button(pe(F({},Xr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:VT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":lp(c),onPointerDown(y){jb(y)&&F4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(pe(F({},Xr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(pe(F({id:qT(c)},Xr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(pe(F({},Xr.content.attrs),{dir:u("dir"),id:lp(c),tabIndex:-1,role:"dialog","aria-modal":Mb(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":gs(d),"aria-labelledby":m.title?cp(c):void 0,"aria-describedby":m.description?dp(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(pe(F({},Xr.title.attrs),{id:cp(c),dir:u("dir")}))},getDescriptionProps(){return t.element(pe(F({},Xr.description.attrs),{id:dp(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(pe(F({},Xr.closeTrigger.attrs),{dir:u("dir"),id:yM(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var SM={props({props:e}){return pe(F({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:F({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=YT(n))!=null?a:Os(n);return vT(r,()=>WT(n),pe(F({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Is(n);let o=!0;return FT(r,{type:"popover",pointerBlocking:t("modal"),exclude:Os(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(o=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:iD(()=>Is(t),{triggerElement:Os(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?kT(()=>[Is(t),Os(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return jT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?HT(()=>Is(t),{initialFocus:()=>Xb({root:Is(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=YT(n))!=null?u:Os(n);vT(o,()=>WT(n),pe(F(F({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Yt(()=>{Object.assign(e.get("renderedElements"),{title:!!bM(t),description:!!TM(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Yt(()=>{const n=Xb({root:Is(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||Yt(()=>{const a=Os(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})}}}};ws()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[XU,hc]=To({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[KU,fp]=To({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),xM=e=>{const t=B.useId(),{getRootNode:n}=hc(),{dir:r}=fp(),o=F({id:t,dir:r,getRootNode:n},e),a=ec(SM,o);return _M(a,Yh)},wM=e=>{const[t,u]=iT(e),c=u,{children:n}=c,r=mn(c,["children"]),o=xM(r),a=Xh(Wt({present:o.open},t));return x.jsx(bD,{value:o,children:x.jsx(tT,{value:a,children:n})})},GT=B.forwardRef((e,t)=>{const n=Gh(),r=Qa(),o=Wt(pe(F({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return x.jsx(Sn.button,pe(F({},o),{ref:t}))});GT.displayName="PopoverTrigger";function AM(e){return At({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 vM(e){return At({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 CM(e){return At({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 kM(e){return At({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 PM(e){return At({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 NM(e){return At({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 hp(e){return At({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 XT(e){return At({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 OM=({className:e,componentType:t,children:n})=>{const[r,o]=B.useState(!1),{globalClassName:a}=rt(),u=f=>{o(f.open)},c=B.useCallback(()=>{o(!1)},[]),d=B.useMemo(()=>({closeMenu:c}),[c]);return x.jsxs(wM,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[x.jsx(GT,{"aria-label":`Overflow menu for ${t}`,className:W(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,a,e,`cim-${t}-component`),children:x.jsx(XT,{})}),x.jsx(rT,{children:x.jsx(nT,{className:W(`${z}-overflow-menu-list`,a,`cim-${t}-component`),children:x.jsx(Pb.Provider,{value:d,children:n})})})]})};function KT(e){return At({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 QT(e){return At({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[IM,xo]=To({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),JT=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getControlProps(),e);return x.jsx(Sn.div,pe(F(F({},r),e),{ref:t}))});JT.displayName="CarouselControl";const ZT=B.forwardRef((e,t)=>{const[n,r]=Ja()(e,["readOnly","index"]),o=xo(),a=Wt(o.getIndicatorProps(n),r);return x.jsx(Sn.button,pe(F({},a),{ref:t}))});ZT.displayName="CarouselIndicator";const e_=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getIndicatorGroupProps(),e);return x.jsx(Sn.div,pe(F({},r),{ref:t}))});e_.displayName="CarouselIndicatorGroup";const t_=B.forwardRef((e,t)=>{const[n,r]=Ja()(e,["index","snapAlign"]),o=xo(),a=Wt(o.getItemProps(n),r);return x.jsx(Sn.div,pe(F({},a),{ref:t}))});t_.displayName="CarouselItem";const n_=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getItemGroupProps(),e);return x.jsx(Sn.div,pe(F({},r),{ref:t}))});n_.displayName="CarouselItemGroup";const r_=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getNextTriggerProps(),e);return x.jsx(Sn.button,pe(F({},r),{ref:t}))});r_.displayName="CarouselNextTrigger";const i_=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getPrevTriggerProps(),e);return x.jsx(Sn.button,pe(F({},r),{ref:t}))});i_.displayName="CarouselPrevTrigger";function RM(e){const t=Ts(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(T,y){let _=parseFloat(T);return/%/.test(T)&&(_/=100,_*=y),Number.isNaN(_)?0:_}let d=c(r,n.width),f=c(o,n.height),p=c(a,n.width),m=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function LM(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 o_(e){let t=[];for(const n of e.children)t=t.concat(n,o_(n));return t}function s_(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?o_(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 o){const m=p.getBoundingClientRect();if(!LM(n,m,u))continue;const T=Ts(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 a_(e){const t=e.getBoundingClientRect(),n=RM(e),r=s_(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:u_([...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(l_(0,o.x))),y:u_([...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(l_(0,o.y)))}}function DM(e,t,n){const r=s_(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var u_=e=>[...new Set(e)],l_=(e,t)=>n=>Math.max(e,Math.min(t,n)),MM=_o("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),mi=MM.build(),FM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},BM=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},pc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},UM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},HM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},zM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},c_=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},Un=e=>e.getById(pc(e)),d_=e=>oD(Un(e),"[data-part=item]"),jM=(e,t)=>e.getById(c_(e,t)),f_=e=>{const t=Un(e);if(!t)return;const n=_s(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function $M(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=o("canScrollNext"),m=o("canScrollPrev"),T=o("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(P,v){a({type:"INDEX.SET",index:P,instant:v})},scrollTo(P,v){a({type:"PAGE.SET",index:P,instant:v})},scrollNext(P){a({type:"PAGE.NEXT",instant:P})},scrollPrev(P){a({type:"PAGE.PREV",instant:P})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(P){return Array.from(r.get("slidesInView")).includes(P)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(pe(F({},mi.root.attrs),{id:FM(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(pe(F({},mi.itemGroup.attrs),{id:pc(u),"data-orientation":c("orientation"),"data-dragging":gs(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(P){Es(P.currentTarget,Ar(P))&&a({type:"VIEWPORT.FOCUS"})},onBlur(P){Es(P.currentTarget,P.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(P){if(P.defaultPrevented||!c("allowMouseDrag")||!jb(P))return;const v=Ar(P);Vr(v)&&v!==P.currentTarget||(P.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:o4(P=>{const v=c("orientation")==="horizontal"?"deltaX":"deltaY";P[v]<0&&!o("canScrollPrev")||P[v]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",c("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:C,[T?"paddingInline":"paddingBlock"]:C,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(P){const v=r.get("slidesInView").includes(P.index);return t.element(pe(F({},mi.item.attrs),{id:BM(u,P.index),dir:c("dir"),role:"group","data-index":P.index,"data-inview":gs(v),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":A.item(P.index,c("slideCount")),"aria-hidden":Mb(!v),style:{scrollSnapAlign:(()=>{var re;const H=(re=P.snapAlign)!=null?re:"start",Y=c("slidesPerMove"),D=Y==="auto"?Math.floor(c("slidesPerPage")):Y;return(P.index+D)%D===0?H:void 0})()}}))},getControlProps(){return t.element(pe(F({},mi.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(pe(F({},mi.prevTrigger.attrs),{id:HM(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":A.prevTrigger,"data-orientation":c("orientation"),"aria-controls":pc(u),onClick(P){P.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(pe(F({},mi.nextTrigger.attrs),{dir:c("dir"),id:UM(u),type:"button","aria-label":A.nextTrigger,"data-orientation":c("orientation"),"aria-controls":pc(u),disabled:!p,onClick(P){P.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(pe(F({},mi.indicatorGroup.attrs),{dir:c("dir"),id:zM(u),"data-orientation":c("orientation"),onKeyDown(P){if(P.defaultPrevented)return;const v="indicator",H={ArrowDown(q){T||(a({type:"PAGE.NEXT",src:v}),q.preventDefault())},ArrowUp(q){T||(a({type:"PAGE.PREV",src:v}),q.preventDefault())},ArrowRight(q){T&&(a({type:"PAGE.NEXT",src:v}),q.preventDefault())},ArrowLeft(q){T&&(a({type:"PAGE.PREV",src:v}),q.preventDefault())},Home(q){a({type:"PAGE.SET",index:0,src:v}),q.preventDefault()},End(q){a({type:"PAGE.SET",index:y.length-1,src:v}),q.preventDefault()}},Y=j4(P,{dir:c("dir"),orientation:c("orientation")}),D=H[Y];D==null||D(P)}}))},getIndicatorProps(P){return t.button(pe(F({},mi.indicator.attrs),{dir:c("dir"),id:c_(u,P.index),type:"button","data-orientation":c("orientation"),"data-index":P.index,"data-readonly":gs(P.readOnly),"data-current":gs(P.index===_),"aria-label":A.indicator(P.index),onClick(v){v.defaultPrevented||P.readOnly||a({type:"PAGE.SET",index:P.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(pe(F({},mi.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":gs(d),"aria-label":d?A.autoplayStop:A.autoplayStart,onClick(P){P.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var VM={props({props:e}){return d4(e,["slideCount"],"carousel"),pe(F({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:F({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:qM(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 G6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(Un(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=Un(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),f_(e)});return f_(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!Un(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Yt(()=>{o(),Yt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return d_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Un(e),o=e.getWin(),a=new o.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?$6(d,m):V6(d,m)},n.get("slidesInView"));n.set("slidesInView",q6(c))},{root:r,threshold:t("inViewThreshold")});return d_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Un(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 nD(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:o}){var f;const a=t.instant?"instant":"smooth",u=Lb((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=Un(n);if(!c)return;const d=r("isHorizontal")?"left":"top";o(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=Un(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=Ob(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=Y6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=Un(r);if(!o)return;const a=DM(o,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=Lb(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Un(n);if(!r)return;const o=a_(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=Un(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=Un(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Un(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=a_(r),c=u.x.reduce((f,p)=>Math.abs(p-o)<Math.abs(f-o)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);Yt(()=>{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=jM(n,e.get("page"));r&&Yt(()=>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 qM(e,t,n){if(e==null||n<=0)return[];const r=[],o=t==="auto"?Math.floor(n):t;if(o<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=o)r.push(a);return r}ws()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),ws()(["index","readOnly"]),ws()(["index","snapAlign"]);const YM=e=>{const t=B.useId(),{getRootNode:n}=hc(),{dir:r}=fp(),o=F({id:t,dir:r,getRootNode:n},e),a=ec(VM,o);return $M(a,Yh)},h_=B.forwardRef((e,t)=>{const[n,r]=Ja()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=YM(n),a=Wt(o.getRootProps(),r);return x.jsx(IM,{value:o,children:x.jsx(Sn.div,pe(F({},a),{ref:t}))})});h_.displayName="CarouselRoot";const WM=180,GM=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},XM=({globalClassName:e,className:t,itemMinWidth:n=WM,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p),T=m.length,y=B.useRef(null),[_,w]=B.useState(0),{width:C}=$C();B.useLayoutEffect(()=>{y.current&&w(y.current.getBoundingClientRect().width)},[C,T]);const A=GM(r),P=n+A,v=_>0?(_+A)/P:1,H=Math.max(1,Math.floor(v));if(T===0)return null;const Y=T>H,D=Math.ceil(T/H),q=Y?Math.max(1,v):H;return x.jsxs(h_,{ref:y,className:W(e,t,`${z}-carousel`),slidesPerPage:q,slidesPerMove:H,spacing:r,loop:o,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[x.jsx(n_,{className:W(e,`${z}-carousel__item-group`,{"carousel-row-container":!Y}),children:m.map((re,me)=>x.jsx(t_,{index:me,className:W(e,`${z}-carousel__item`),children:re},me))}),c&&Y&&x.jsxs(JT,{className:W(e,`${z}-carousel__control`),children:[x.jsx(i_,{className:W(e,`${z}-carousel__prev-trigger`),"aria-label":"Previous slide",children:x.jsx(CM,{size:"16px"})}),x.jsx(r_,{className:W(e,`${z}-carousel__next-trigger`),"aria-label":"Next slide",children:x.jsx(kM,{size:"16px"})})]}),u&&Y&&x.jsx(e_,{className:W(e,`${z}-carousel__indicator-group`),children:Array.from({length:D},(re,me)=>x.jsx(ZT,{index:me,className:W(e,`${z}-carousel__indicator`),"aria-label":`Go to slide group ${me+1}`},me))})]})},[KM,QM]=To({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),JM=e=>Ja()(e,["lazyMount","unmountOnExit"]),[ZM,ou]=To({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),p_=B.forwardRef((e,t)=>{const n=ou(),r=QM(),o=Xh(pe(F({},r),{present:n.open})),a=Wt(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:x.jsx(Sn.div,pe(F({},a),{ref:tc(o.ref,t)}))});p_.displayName="DialogBackdrop";const pp=B.forwardRef((e,t)=>{const n=ou(),r=Qa(),o=Wt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Sn.div,pe(F({},o),{ref:tc(r.ref,t)}))});pp.displayName="DialogContent";const mp=B.forwardRef((e,t)=>{const n=ou(),r=Wt(n.getDescriptionProps(),e);return x.jsx(Sn.div,pe(F({},r),{ref:t}))});mp.displayName="DialogDescription";const gp=B.forwardRef((e,t)=>{const n=ou(),r=Wt(n.getPositionerProps(),e);return Qa().unmounted?null:x.jsx(Sn.div,pe(F({},r),{ref:t}))});gp.displayName="DialogPositioner";var e8=_o("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),wo=e8.build(),m_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},g_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},E_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},yp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},bp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},y_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},mc=e=>e.getById(Ep(e)),t8=e=>e.getById(m_(e)),n8=e=>e.getById(g_(e)),r8=e=>e.getById(E_(e)),i8=e=>e.getById(yp(e)),o8=e=>e.getById(bp(e)),s8=e=>e.getById(y_(e));function a8(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(pe(F({},wo.trigger.attrs),{dir:a("dir"),id:E_(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Ep(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(pe(F({},wo.backdrop.attrs),{dir:a("dir"),hidden:!d,id:g_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(pe(F({},wo.positioner.attrs),{dir:a("dir"),id:m_(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(pe(F({},wo.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Ep(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:yp(u),"aria-describedby":f.description?bp(u):void 0}))},getTitleProps(){return t.element(pe(F({},wo.title.attrs),{dir:a("dir"),id:yp(u)}))},getDescriptionProps(){return t.element(pe(F({},wo.description.attrs),{dir:a("dir"),id:bp(u)}))},getCloseTriggerProps(){return t.button(pe(F({},wo.closeTrigger.attrs),{dir:a("dir"),id:y_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var u8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>s8(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return F({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return FT(()=>mc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[r8(e)],onInteractOutside(o){var a;(a=n("onInteractOutside"))==null||a(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var a;(a=n("onEscapeKeyDown"))==null||a(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return jT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?HT(()=>mc(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,a;return(a=(o=t("finalFocusEl"))==null?void 0:o())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?kT(()=>[mc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Yt(()=>{e.set("rendered",{title:!!i8(t),description:!!o8(t)})})},syncZIndex({scope:e}){Yt(()=>{const t=mc(e);if(!t)return;const n=Ts(t);[t8(e),n8(e)].forEach(o=>{o==null||o.style.setProperty("--z-index",n.zIndex),o==null||o.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};ws()(["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 l8=e=>{const t=B.useId(),{getRootNode:n}=hc(),{dir:r}=fp(),o=F({id:t,getRootNode:n,dir:r},e),a=ec(u8,o);return a8(a,Yh)},b_=e=>{const[t,c]=iT(e),d=c,{children:n}=d,r=mn(d,["children"]),[o]=JM(t),a=l8(r),u=Xh(Wt({present:a.open},t));return x.jsx(ZM,{value:a,children:x.jsx(KM,{value:o,children:x.jsx(tT,{value:u,children:n})})})},T_=B.forwardRef((e,t)=>{const n=ou(),r=Wt(n.getTitleProps(),e);return x.jsx(Sn.h2,pe(F({},r),{ref:t}))});T_.displayName="DialogTitle";const c8=({children:e})=>{const[t,n]=B.useState(!1),r=B.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=B.useMemo(()=>({isOpen:t}),[t]);return x.jsx(Ih.Provider,{value:r,children:x.jsx(kb.Provider,{value:o,children:e})})},__=()=>B.useContext(kb),S_=()=>{const e=B.useContext(Ih);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},d8=`${z}-overflow-menu-button-trigger`,f8=({componentType:e,children:t})=>{const{isOpen:n}=__(),{closeMenu:r}=S_(),{globalClassName:o}=rt(),a=B.useRef(null);return B.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const f=d.target;f instanceof Element&&f.closest(`.${d8}`)||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?x.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:W(`${z}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},h8=({componentType:e,className:t})=>{const{toggleMenu:n}=S_(),{isOpen:r}=__(),{globalClassName:o}=rt();return x.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:W(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:x.jsx(XT,{})})},Tp=()=>{const{status:e,entryType:t}=sr(),{messages:n}=ar(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},p8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=rt(),{previousComponentType:r}=sr(),o=ps(),a=()=>{El(r||"dialog"),o()};return t?x.jsx(ci,{className:W(n,`${z}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:x.jsx(KT,{})}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(KT,{}),"Show ",r||"dialog"]})},m8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=rt(),{isModalFullscreen:r}=sr(),o=ps(),a=()=>{vf(!r),o()},u=r?Zk:eP,c="Toggle Fullscreen";return t?x.jsx(ci,{ariaLabel:c,title:c,className:W(n,`${z}-modal-fullscreen-button`,`cim-${e}-component`),icon:x.jsx(u,{}),onClick:a}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(u,{}),c]})},g8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=rt(),{dialogPosition:r}=sr(),o=ps(),a=r==="bottom-left",u=()=>{Cf(a?"bottom-right":"bottom-left"),o()},c=a?vM:AM,d=a?"Move right":"Move left";return t?x.jsx(ci,{className:W(n,`${z}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:x.jsx(c,{})}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[x.jsx(c,{}),d]})},x_=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:o,globalClassName:a,mode:u,enableDownloadTranscript:c}=rt(),{mode:d}=sr(),f=u==="messaging"&&c&&!!r,p=d==="standalone",m=e==="modal",T=m?p8:w_,y=m?m8:g8,_=B.useMemo(()=>o?nP(o):{},[o]);return x.jsx(c8,{children:x.jsxs("div",{className:W(a,`${z}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[x.jsxs("div",{className:W(a,`${z}-${e}-header`,{standalone:p,embedded:!p}),style:_,children:[(o==null?void 0:o.logoUrl)&&x.jsx("img",{alt:"",role:"img",className:W(a,`${z}-${e}-logo`,{standalone:p,embedded:!p}),src:o.logoUrl}),x.jsx(T_,{className:W(a,`${z}-${e}-title`,{standalone:p,embedded:!p}),children:o==null?void 0:o.headerText}),x.jsxs("div",{className:W(a,`${z}-${e}-controls`),children:[x.jsx(T,{componentType:e,isIcon:!0}),x.jsx(h8,{componentType:e}),x.jsx(H1,{className:W(a,`cim-${e}-component`),onClick:n})]})]}),x.jsxs(f8,{componentType:e,children:[x.jsx(y,{componentType:e}),x.jsx(T8,{componentType:e}),x.jsx(Nb,{componentType:e,onClearChat:t}),f&&x.jsx(E8,{componentType:e,onDownloadTranscript:r})]})]})})},E8=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=rt(),r=ps(),[o,a]=B.useState(!1),u=()=>Je(null,null,function*(){if(!o){a(!0);try{yield e(),r()}catch(c){n==null||n.error("Error downloading transcript:",c)}finally{a(!1)}}});return x.jsxs("button",{className:W(`${z}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:o,children:[x.jsx(H6,{}),"Download transcript"]})},y8={sparkle:hp,plus:PM,"paper-plane":NM},_p=({icon:e,className:t})=>{const n=y8[e];return n?x.jsx(n,{className:t,"aria-hidden":"true"}):null},b8=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=rt(),c=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=o?"standalone":"embedded",p=_=>()=>{a(_)},m={"has-icon":!!c,"icon-right":!!c&&d==="right"},T=_=>x.jsxs(x.Fragment,{children:[c&&x.jsx(_p,{icon:c,className:`${z}-suggestion-button-icon`}),x.jsx("span",{children:_})]});return x.jsx("div",{className:W(t,`${z}-suggestion-container ${f}`,e),children:n.map(_=>o?x.jsx(_l,{disabled:r,className:W(t,`${z}-suggestion-button standalone`,m),onClick:p(_),children:T(_)},_):x.jsx("button",{disabled:r,className:W(t,`${z}-suggestion-button embedded`,m),onClick:p(_),children:T(_)},_))})},T8=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=rt();if(!r)return null;const o=()=>{ui(!1),gl(!0)};return t?x.jsx(ci,{className:W(n,`${z}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:x.jsx(B1,{})}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[x.jsx(B1,{}),"Minimize"]})},w_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=rt(),r=ps(),o=()=>{El("modal"),r()};return t?x.jsx(ci,{className:W(n,`${z}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:x.jsx(QT,{})}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[x.jsx(QT,{}),"Show modal"]})},_8=({isWidgetStandalone:e})=>{var _,w;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:o}=rt(),{askCimPrompts:a,messages:u}=ar(),{isLoading:c,handleSuggestion:d}=Ur(),f=o==null?void 0:o.icon,p=(_=o==null?void 0:o.iconPosition)!=null?_:"left",m=B.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 u.some(P=>P.name==="conversation_reset")&&r||C},[u,n,r]),T=((w=a.message)==null?void 0:w.suggestions)||[],y=(C,A)=>()=>{d(C,A)};return x.jsxs("div",{className:W(t,`${z}-ask-cim-entry-message`,`${z}-message-group`,e?"standalone":"embedded"),children:[x.jsx("p",{className:W(t,`${z}-ask-cim-entry-text`),children:m}),!!(T!=null&&T.length)&&x.jsx("div",{className:W(t,`${z}-ask-cim-suggestions-container`,`${z}-suggestion-container`,e?"standalone":"embedded"),children:T.map(C=>{var A;return x.jsxs(_l,{disabled:c,className:W(t,`${z}-ask-cim-suggestion-button`,`${z}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!f,"icon-right":!!f&&p==="right"}),onClick:y(C,((A=a.message)==null?void 0:A.eventSourceId)||""),children:[f&&x.jsx(_p,{icon:f,className:`${z}-suggestion-button-icon`}),x.jsx("span",{children:C.displayText})]},C.displayText)})})]})},S8=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o}=rt();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 x.jsxs("div",{className:W(r,`${z}-product-tile`,{embedded:!e,standalone:e}),children:[m?x.jsx("a",{href:`${m}`,target:o?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${a}`,children:x.jsx("img",{className:W(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):x.jsx("img",{className:W(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),x.jsxs("div",{className:W(r,`${z}-product-tile-details`,{embedded:!e,standalone:e}),children:[x.jsxs("div",{className:W(r,`${z}-product-tile-content`),children:[u&&x.jsx("p",{className:`${z}-product-tile-brand`,children:u}),m?x.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:W(r,`${z}-product-tile-pdp`),href:`${m}`,target:o?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",x.jsx("span",{className:W(r,`${z}-product-tile-pdp-arrow`),children:"→"})]}):x.jsx("p",{className:W(r,`${z}-product-tile-name`),title:a,children:a})]}),x.jsx("div",{className:W(r,`${z}-product-tile-footer`),children:x.jsx("p",{className:W(r,`${z}-product-tile-price`),children:c})})]})]})},x8=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=rt(),o=t;return n?x.jsxs("div",{className:W(r,`${z}-display-products`),children:[x.jsx("p",{children:o.message}),o.products&&o.products.length>0&&x.jsx(XM,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:o.products.map(a=>{const u=n.getPid(a);return x.jsx(S8,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},w8=({globalClassName:e,message:t,isWidgetStandalone:n})=>x.jsx("div",{className:W(e,`${z}-error-message`,{standalone:n,embedded:!n}),children:x.jsxs("p",{className:W(e,`${z}-error-message-text`,{standalone:n,embedded:!n}),children:[x.jsx(Kk,{})," ",t.message||"An error occurred while processing your request."]})}),A8=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var _;const{isLoading:a}=Ur(),{messages:u}=ar(),c=u.find(w=>w.id===n.eventSourceId),d=!!c,f=((_=c==null?void 0:c.name)==null?void 0:_.replace("_suggestions",""))||"",p=d?vA(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=w=>{const C=n.suggestions.find(A=>A.displayText===w);C&&o(C,n.eventSourceId||n.id)};return x.jsxs("div",{className:W(e,`${z}-follow-up`),children:[x.jsx("p",{className:W(e,`${z}-text`),children:n.message}),x.jsx(b8,{suggestions:n.suggestions.map(w=>w.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function A_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function v8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function C8(e,t,n){const o=Il((n||{}).ignore||[]),a=k8(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(o(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,P=[];T.lastIndex=0;let v=T.exec(f.value);for(;v;){const H=v.index,Y={index:v.index,input:v.input,stack:[...p,f]};let D=y(...v,Y);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?T.lastIndex=H+1:(_!==H&&P.push({type:"text",value:f.value.slice(_,H)}),Array.isArray(D)?P.push(...D):D&&P.push(D),_=H+v[0].length,A=!0),!T.global)break;v=T.exec(f.value)}return A?(_<f.value.length&&P.push({type:"text",value:f.value.slice(_)}),m.children.splice(C,1,...P)):P=[f],C+P.length}}function k8(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([P8(o[0]),N8(o[1])])}return t}function P8(e){return typeof e=="string"?new RegExp(v8(e),"g"):e}function N8(e){return typeof e=="function"?e:function(){return e}}const Sp="phrasing",xp=["autolink","link","image","label"];function O8(){return{transforms:[B8],enter:{literalAutolink:R8,literalAutolinkEmail:wp,literalAutolinkHttp:wp,literalAutolinkWww:wp},exit:{literalAutolink:F8,literalAutolinkEmail:M8,literalAutolinkHttp:L8,literalAutolinkWww:D8}}}function I8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Sp,notInConstruct:xp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Sp,notInConstruct:xp},{character:":",before:"[ps]",after:"\\/",inConstruct:Sp,notInConstruct:xp}]}}function R8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function wp(e){this.config.enter.autolinkProtocol.call(this,e)}function L8(e){this.config.exit.autolinkProtocol.call(this,e)}function D8(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 M8(e){this.config.exit.autolinkEmail.call(this,e)}function F8(e){this.exit(e)}function B8(e){C8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,U8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),H8]],{ignore:["link","linkReference"]})}function U8(e,t,n,r,o){let a="";if(!v_(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!z8(n)))return!1;const u=j8(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 H8(e,t,n,r){return!v_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function z8(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 j8(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=A_(e,"(");let a=A_(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function v_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||co(n)||Al(n))&&(!t||n!==47)}C_.peek=Q8;function $8(){this.buffer()}function V8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function q8(){this.buffer()}function Y8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function W8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=xr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function G8(e){this.exit(e)}function X8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=xr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function K8(e){this.exit(e)}function Q8(){return"["}function C_(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function J8(){return{enter:{gfmFootnoteCallString:$8,gfmFootnoteCall:V8,gfmFootnoteDefinitionLabelString:q8,gfmFootnoteDefinition:Y8},exit:{gfmFootnoteCallString:W8,gfmFootnoteCall:G8,gfmFootnoteDefinitionLabelString:X8,gfmFootnoteDefinition:K8}}}function Z8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:C_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,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?`
|
|
31
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const ho={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/"},hy={}.hasOwnProperty,E3=Object.prototype;function y3(e,t){const n=t||{};return mh({file:n.file||void 0,location:!1,schema:n.space==="svg"?ns:Sl,verbose:n.verbose||!1},e)}function mh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Ml(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:py(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=g3(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"},Ml(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Ml(e,r,n),n}default:return n=b3(e,t),n}}function py(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=mh(e,t[n]);r.push(o)}return r}function b3(e,t){const n=e.schema;e.schema=t.namespaceURI===ho.svg?ns:Sl;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;hy.call(E3,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?m3:p3)(t.tagName,o,py(e,t.childNodes));if(Ml(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&as(d.startTag),p=d&&d.endTag&&as(d.endTag),m=mh(e,c.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Ml(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=T3(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function T3(e,t,n){const r=as(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)hy.call(n.attrs,u)&&(a[Ff(e.schema,u).property]=as(n.attrs[u]));n.startTag;const c=as(n.startTag),d=n.endTag?as(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function as(e){const t=my({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=my({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function my(e){return e.line&&e.column?e:void 0}class Ma{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ma.prototype.property={},Ma.prototype.normal={},Ma.prototype.space=null;function gy(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Ma(n,r,t)}function gh(e){return e.toLowerCase()}class lr{constructor(t,n){this.property=t,this.attribute=n}}lr.prototype.space=null,lr.prototype.boolean=!1,lr.prototype.booleanish=!1,lr.prototype.overloadedBoolean=!1,lr.prototype.number=!1,lr.prototype.commaSeparated=!1,lr.prototype.spaceSeparated=!1,lr.prototype.commaOrSpaceSeparated=!1,lr.prototype.mustUseProperty=!1,lr.prototype.defined=!1;let _3=0;const Xe=po(),$t=po(),Ey=po(),be=po(),yt=po(),us=po(),Kn=po();function po(){return oa(2,++_3)}const Eh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Xe,booleanish:$t,commaOrSpaceSeparated:Kn,commaSeparated:us,number:be,overloadedBoolean:Ey,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),yh=Object.keys(Eh);class bh extends lr{constructor(t,n,r,o){let a=-1;if(super(t,n),yy(this,"space",o),typeof r=="number")for(;++a<yh.length;){const u=yh[a];yy(this,yh[a],(r&Eh[u])===Eh[u])}}}bh.prototype.defined=!0;function yy(e,t,n){n&&(e[t]=n)}const S3={}.hasOwnProperty;function ls(e){const t={},n={};let r;for(r in e.properties)if(S3.call(e.properties,r)){const o=e.properties[r],a=new bh(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[gh(r)]=r,n[gh(a.attribute)]=r}return new Ma(t,n,e.space)}const by=ls({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Ty=ls({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function _y(e,t){return t in e?e[t]:t}function Sy(e,t){return _y(e,t.toLowerCase())}const xy=ls({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Sy,properties:{xmlns:null,xmlnsXLink:null}}),wy=ls({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:$t,ariaAutoComplete:null,ariaBusy:$t,ariaChecked:$t,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:$t,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:$t,ariaFlowTo:yt,ariaGrabbed:$t,ariaHasPopup:null,ariaHidden:$t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:be,ariaLive:null,ariaModal:$t,ariaMultiLine:$t,ariaMultiSelectable:$t,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:$t,ariaReadOnly:$t,ariaRelevant:null,ariaRequired:$t,ariaRoleDescription:yt,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:$t,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null}}),x3=ls({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Sy,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:us,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:Xe,allowPaymentRequest:Xe,allowUserMedia:Xe,alt:null,as:null,async:Xe,autoCapitalize:null,autoComplete:yt,autoFocus:Xe,autoPlay:Xe,blocking:yt,capture:null,charSet:null,checked:Xe,cite:null,className:yt,cols:be,colSpan:null,content:null,contentEditable:$t,controls:Xe,controlsList:yt,coords:be|us,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Xe,defer:Xe,dir:null,dirName:null,disabled:Xe,download:Ey,draggable:$t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Xe,formTarget:null,headers:yt,height:be,hidden:Xe,high:be,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:Xe,inputMode:null,integrity:null,is:null,isMap:Xe,itemId:null,itemProp:yt,itemRef:yt,itemScope:Xe,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Xe,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:Xe,muted:Xe,name:null,nonce:null,noModule:Xe,noValidate:Xe,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:Xe,optimum:be,pattern:null,ping:yt,placeholder:null,playsInline:Xe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Xe,referrerPolicy:null,rel:yt,required:Xe,reversed:Xe,rows:be,rowSpan:be,sandbox:yt,scope:null,scoped:Xe,seamless:Xe,selected:Xe,shadowRootClonable:Xe,shadowRootDelegatesFocus:Xe,shadowRootMode:null,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:$t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:Xe,useMap:null,value:$t,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Xe,declare:Xe,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:Xe,noHref:Xe,noShade:Xe,noWrap:Xe,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:$t,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Xe,disableRemotePlayback:Xe,prefix:null,property:null,results:be,security:null,unselectable:null}}),w3=ls({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:_y,properties:{about:Kn,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:yt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:Xe,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:us,g2:us,glyphName:us,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:Kn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:be,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Kn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Kn,rev:Kn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Kn,requiredFeatures:Kn,requiredFonts:Kn,requiredFormats:Kn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:Kn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Kn,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Kn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),A3=/^data[-\w.:]+$/i,Ay=/-[a-z]/g,v3=/[A-Z]/g;function C3(e,t){const n=gh(t);let r=t,o=lr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&A3.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ay,P3);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ay.test(a)){let u=a.replace(v3,k3);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=bh}return new o(r,t)}function k3(e){return"-"+e.toLowerCase()}function P3(e){return e.charAt(1).toUpperCase()}const N3=gy([Ty,by,xy,wy,x3],"html"),vy=gy([Ty,by,xy,wy,w3],"svg"),Cy={}.hasOwnProperty;function ky(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&Cy.call(o,e)){const d=String(o[e]);u=Cy.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const O3={},I3={}.hasOwnProperty,Py=ky("type",{handlers:{root:L3,element:U3,text:F3,comment:B3,doctype:M3}});function R3(e,t){const r=(t||O3).space;return Py(e,r==="svg"?vy:N3)}function L3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Th(e.children,n,t),cs(e,n),n}function D3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Th(e.children,n,t),cs(e,n),n}function M3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return cs(e,t),t}function F3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return cs(e,t),t}function B3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return cs(e,t),t}function U3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=vy);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&I3.call(e.properties,a)){const d=H3(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:ho[u],childNodes:[],parentNode:null};return c.childNodes=Th(e.children,c,r),cs(e,c),e.tagName==="template"&&e.content&&(c.content=D3(e.content,r)),c}function H3(e,t,n){const r=C3(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?j1(n):tE(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=ho[r.space]}return o}function Th(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=Py(e[r],n);a.parentNode=t,o.push(a)}return o}function cs(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 z3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],j3=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]),vt="�";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 Bn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ny(e){return e>=55296&&e<=57343}function $3(e){return e>=56320&&e<=57343}function V3(e,t){return(e-55296)*1024+9216+t}function Oy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Iy(e){return e>=64976&&e<=65007||j3.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 q3=65536;class Y3{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=q3,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:o,offset:a}=this,u=o+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if($3(n))return this.pos++,this._addGap(),V3(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,Ny(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){Oy(t)?this._err(te.controlCharacterInInputStream):Iy(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Qe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Qe||(Qe={}));function Ry(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 W3=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),G3=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 X3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=G3.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 K3=32;var Ni;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ni||(Ni={}));function _h(e){return e>=Zt.ZERO&&e<=Zt.NINE}function Q3(e){return e>=Zt.UPPER_A&&e<=Zt.UPPER_F||e>=Zt.LOWER_A&&e<=Zt.LOWER_F}function J3(e){return e>=Zt.UPPER_A&&e<=Zt.UPPER_Z||e>=Zt.LOWER_A&&e<=Zt.LOWER_Z||_h(e)}function Z3(e){return e===Zt.EQUALS||J3(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 di;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(di||(di={}));class eR{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=di.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)|K3)===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,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(_h(o)||Q3(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(_h(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Zt.SEMI)this.consumed+=1;else if(this.decodeMode===di.Strict)return 0;return this.emitCodePoint(X3(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 o=r[this.treeIndex],a=(o&Ni.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=tR(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===di.Attribute&&(a===0||Z3(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Ni.VALUE_LENGTH)>>14,a!==0){if(u===Zt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==di.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&Ni.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Ni.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case en.NamedEntity:return this.result!==0&&(this.decodeMode!==di.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 tR(e,t,n,r){const o=(t&Ni.BRANCH_LENGTH)>>7,a=t&Ni.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,c=u+o-1;for(;u<=c;){const d=u+c>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)c=d-1;else return e[d+o]}return-1}var ue;(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/"})(ue||(ue={}));var mo;(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"})(mo||(mo={}));var cr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(cr||(cr={}));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 nR=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 ds(e){var t;return(t=nR.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const fe=g,rR={[ue.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]),[ue.MATHML]:new Set([fe.MI,fe.MO,fe.MN,fe.MS,fe.MTEXT,fe.ANNOTATION_XML]),[ue.SVG]:new Set([fe.TITLE,fe.FOREIGN_OBJECT,fe.DESC]),[ue.XLINK]:new Set,[ue.XML]:new Set,[ue.XMLNS]:new Set},Sh=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 O;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(O||(O={}));const Ft={DATA:O.DATA,RCDATA:O.RCDATA,RAWTEXT:O.RAWTEXT,SCRIPT_DATA:O.SCRIPT_DATA,PLAINTEXT:O.PLAINTEXT,CDATA_SECTION:O.CDATA_SECTION};function iR(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function Fa(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function oR(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function Oi(e){return oR(e)||Fa(e)}function Ly(e){return Oi(e)||iR(e)}function Fl(e){return e+32}function Dy(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function My(e){return Dy(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function sR(e){return e===N.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:Ny(e)?te.surrogateCharacterReference:Iy(e)?te.noncharacterCharacterReference:Oy(e)||e===N.CARRIAGE_RETURN?te.controlCharacterReference:null}class aR{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=O.DATA,this.returnState=O.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Y3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new eR(W3,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=sR(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Qe.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Qe.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Qe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Qe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Ry(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=ds(t.tagName),t.type===Qe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Qe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Qe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Qe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Qe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=Dy(t)?Qe.WHITESPACE_CHARACTER:t===N.NULL?Qe.NULL_CHARACTER:Qe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Qe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=O.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?di.Attribute:di.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===O.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case O.DATA:{this._stateData(t);break}case O.RCDATA:{this._stateRcdata(t);break}case O.RAWTEXT:{this._stateRawtext(t);break}case O.SCRIPT_DATA:{this._stateScriptData(t);break}case O.PLAINTEXT:{this._statePlaintext(t);break}case O.TAG_OPEN:{this._stateTagOpen(t);break}case O.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case O.TAG_NAME:{this._stateTagName(t);break}case O.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case O.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case O.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case O.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case O.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case O.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case O.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case O.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case O.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case O.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case O.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case O.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case O.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case O.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case O.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case O.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case O.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case O.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case O.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case O.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case O.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case O.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case O.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case O.BOGUS_COMMENT:{this._stateBogusComment(t);break}case O.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case O.COMMENT_START:{this._stateCommentStart(t);break}case O.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case O.COMMENT:{this._stateComment(t);break}case O.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case O.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case O.COMMENT_END:{this._stateCommentEnd(t);break}case O.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case O.DOCTYPE:{this._stateDoctype(t);break}case O.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case O.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case O.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case O.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case O.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case O.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case O.CDATA_SECTION:{this._stateCdataSection(t);break}case O.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case O.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case O.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case O.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=O.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=O.RCDATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case N.LESS_THAN_SIGN:{this.state=O.RAWTEXT_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Oi(t))this._createStartTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case N.EXCLAMATION_MARK:{this.state=O.MARKUP_DECLARATION_OPEN;break}case N.SOLIDUS:{this.state=O.END_TAG_OPEN;break}case N.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=O.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=O.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Oi(t))this._createEndTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case N.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=O.DATA;break}case N.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=O.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=vt;break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Fa(t)?Fl(t):t)}}_stateRcdataLessThanSign(t){t===N.SOLIDUS?this.state=O.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Oi(t)?(this.state=O.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=O.BEFORE_ATTRIBUTE_NAME,!1;case N.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=O.SELF_CLOSING_START_TAG,!1;case N.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=O.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===N.SOLIDUS?this.state=O.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Oi(t)?(this.state=O.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case N.SOLIDUS:{this.state=O.SCRIPT_DATA_END_TAG_OPEN;break}case N.EXCLAMATION_MARK:{this.state=O.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=O.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Oi(t)?(this.state=O.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===N.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===N.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);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=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(vt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(vt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===N.SOLIDUS?this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Oi(t)?(this._emitChars("<"),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Oi(t)?(this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Bn.SCRIPT,!1)&&My(this.preprocessor.peek(Bn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Bn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(vt);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=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(vt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.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=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(vt);break}case N.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===N.SOLIDUS?(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Bn.SCRIPT,!1)&&My(this.preprocessor.peek(Bn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Bn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case 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=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=O.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case 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=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._leaveAttrName(),this.state=O.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+=vt;break}default:this.currentAttr.name+=String.fromCodePoint(Fa(t)?Fl(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case N.EQUALS_SIGN:{this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=O.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=O.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this.state=O.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=O.DATA,this.emitCurrentTagToken();break}default:this.state=O.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case N.QUOTATION_MARK:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=vt;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=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=vt;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=O.BEFORE_ATTRIBUTE_NAME;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=vt;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=O.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this._leaveAttrValue(),this.state=O.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case N.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=O.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case N.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.data+=vt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Bn.DASH_DASH,!0)?(this._createCommentToken(Bn.DASH_DASH.length+1),this.state=O.COMMENT_START):this._consumeSequenceIfMatch(Bn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Bn.DOCTYPE.length+1),this.state=O.DOCTYPE):this._consumeSequenceIfMatch(Bn.CDATA_START,!0)?this.inForeignNode?this.state=O.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(Bn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=O.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case N.HYPHEN_MINUS:{this.state=O.COMMENT_START_DASH;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=O.COMMENT_END_DASH;break}case N.LESS_THAN_SIGN:{n.data+="<",this.state=O.COMMENT_LESS_THAN_SIGN;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.data+=vt;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=O.COMMENT_LESS_THAN_SIGN_BANG;break}case N.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===N.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=O.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===N.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=O.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==N.GREATER_THAN_SIGN&&t!==N.EOF&&this._err(te.nestedComment),this.state=O.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case N.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case N.EXCLAMATION_MARK:{this.state=O.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=O.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{n.data+="--!",this.state=O.COMMENT_END_DASH;break}case N.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=O.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=O.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=O.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=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Fa(t))this._createDoctypeToken(String.fromCharCode(Fl(t))),this.state=O.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(vt),this.state=O.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=O.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=O.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=O.AFTER_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.name+=vt;break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Fa(t)?Fl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Bn.PUBLIC,!1)?this.state=O.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Bn.SYSTEM,!1)?this.state=O.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.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=O.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=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.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=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=vt;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.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=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=vt;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.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=O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case N.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case N.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.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=O.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=O.DATA;break}case N.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=O.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=O.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=O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.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=O.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=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.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=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=vt;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.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=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=vt;break}case N.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.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=O.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=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.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=O.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=O.CDATA_SECTION_END:(this._emitChars("]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case N.GREATER_THAN_SIGN:{this.state=O.DATA;break}case N.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(N.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ly(this.preprocessor.peek(1))?O.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ly(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Fy=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),By=new Set([...Fy,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Bl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),uR=new Set([...Bl,g.OL,g.UL]),lR=new Set([...Bl,g.BUTTON]),Uy=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Hy=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),cR=new Set([g.TR,g.TEMPLATE,g.HTML]),dR=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),fR=new Set([g.TABLE,g.TEMPLATE,g.HTML]),hR=new Set([g.TD,g.TH]);class pR{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)===ue.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==ue.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(Sh,ue.HTML)}popUntilTableCellPopped(){this.popUntilPopped(hR,ue.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(fR,ue.HTML)}clearBackToTableBodyContext(){this.clearBackTo(dR,ue.HTML)}clearBackToTableRowContext(){this.clearBackTo(cR,ue.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 o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ue.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case ue.SVG:{if(Hy.has(o))return!1;break}case ue.MATHML:{if(Uy.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Bl)}hasInListItemScope(t){return this.hasInDynamicScope(t,uR)}hasInButtonScope(t){return this.hasInDynamicScope(t,lR)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ue.HTML:{if(Sh.has(n))return!0;if(Bl.has(n))return!1;break}case ue.SVG:{if(Hy.has(n))return!1;break}case ue.MATHML:{if(Uy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ue.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])===ue.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])===ue.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Fy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&By.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&By.has(this.currentTagId);)this.pop()}}const xh=3;var jr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(jr||(jr={}));const zy={type:jr.Marker};class mR{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===jr.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===o&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<xh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<xh)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=xh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(zy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:jr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:jr.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(zy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===jr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===jr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===jr.Element&&n.element===t)}}const Ii={createDocument(){return{nodeName:"#document",mode:cr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ii.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(Ii.isTextNode(n)){n.value+=t;return}}Ii.appendChild(e,Ii.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ii.isTextNode(r)?r.value+=t:Ii.insertBefore(e,Ii.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=F(F({},e.sourceCodeLocation),t)}},jy="html",gR="about:legacy-compat",ER="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",$y=["+//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//"],yR=[...$y,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],bR=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Vy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],TR=[...Vy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function qy(e,t){return t.some(n=>e.startsWith(n))}function _R(e){return e.name===jy&&e.publicId===null&&(e.systemId===null||e.systemId===gR)}function SR(e){if(e.name!==jy)return cr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===ER)return cr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),bR.has(n))return cr.QUIRKS;let r=t===null?yR:$y;if(qy(n,r))return cr.QUIRKS;if(r=t===null?Vy:TR,qy(n,r))return cr.LIMITED_QUIRKS}return cr.NO_QUIRKS}const Yy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},xR="definitionurl",wR="definitionURL",AR=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])),vR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ue.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ue.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ue.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ue.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ue.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ue.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ue.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ue.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ue.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ue.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ue.XMLNS}]]),CR=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),kR=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 PR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===mo.COLOR||r===mo.SIZE||r===mo.FACE)||kR.has(t)}function Wy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===xR){e.attrs[t].name=wR;break}}function Gy(e){for(let t=0;t<e.attrs.length;t++){const n=AR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function wh(e){for(let t=0;t<e.attrs.length;t++){const n=vR.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 NR(e){const t=CR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ds(e.tagName))}function OR(e,t){return t===ue.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function IR(e,t,n){if(t===ue.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===mo.ENCODING){const o=n[r].value.toLowerCase();return o===Yy.TEXT_HTML||o===Yy.APPLICATION_XML}}return t===ue.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function RR(e,t,n,r){return(!r||r===ue.HTML)&&IR(e,t,n)||(!r||r===ue.MATHML)&&OR(e,t)}const LR="hidden",DR=8,MR=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 FR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Xy=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Ky={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ii,onParseError:null};class Qy{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=F(F({},Ky),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 aR(this.options,this),this.activeFormattingElements=new mR(this.treeAdapter),this.fragmentContextID=r?ds(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new pR(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=F(F({},Ky),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,ue.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ue.HTML,[]),a=new this(r,o,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 o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:FR,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===ue.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ue.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=Ft.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)!==ue.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Ft.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Ft.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Ft.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Ft.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&pe(F({},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,ue.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ue.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,ue.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 o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol: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,o=this.treeAdapter.getTagName(t),a=n.type===Qe.END_TAG&&o===n.tagName?{endTag:F({},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)===ue.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ue.HTML)}_processToken(t){switch(t.type){case Qe.CHARACTER:{this.onCharacter(t);break}case Qe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Qe.COMMENT:{this.onComment(t);break}case Qe.DOCTYPE:{this.onDoctype(t);break}case Qe.START_TAG:{this._processStartTag(t);break}case Qe.END_TAG:{this.onEndTag(t);break}case Qe.EOF:{this.onEof(t);break}case Qe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return RR(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===jr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=M.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(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 Xy.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)===ue.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 rR[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){h6(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{Ua(this,t);break}case M.BEFORE_HEAD:{Ha(this,t);break}case M.IN_HEAD:{za(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ja(this,t);break}case M.AFTER_HEAD:{$a(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{Zy(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:{kh(this,t);break}case M.IN_TABLE_TEXT:{ab(this,t);break}case M.IN_COLUMN_GROUP:{zl(this,t);break}case M.AFTER_BODY:{Vl(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){f6(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{Ua(this,t);break}case M.BEFORE_HEAD:{Ha(this,t);break}case M.IN_HEAD:{za(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ja(this,t);break}case M.AFTER_HEAD:{$a(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{kh(this,t);break}case M.IN_COLUMN_GROUP:{zl(this,t);break}case M.AFTER_BODY:{Vl(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){vh(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:{vh(this,t);break}case M.IN_TABLE_TEXT:{Ya(this,t);break}case M.AFTER_BODY:{VR(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{qR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{YR(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:{Ya(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)?p6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{WR(this,t);break}case M.BEFORE_HEAD:{XR(this,t);break}case M.IN_HEAD:{wr(this,t);break}case M.IN_HEAD_NO_SCRIPT:{JR(this,t);break}case M.AFTER_HEAD:{eL(this,t);break}case M.IN_BODY:{_n(this,t);break}case M.IN_TABLE:{fs(this,t);break}case M.IN_TABLE_TEXT:{Ya(this,t);break}case M.IN_CAPTION:{KL(this,t);break}case M.IN_COLUMN_GROUP:{Ph(this,t);break}case M.IN_TABLE_BODY:{jl(this,t);break}case M.IN_ROW:{$l(this,t);break}case M.IN_CELL:{ZL(this,t);break}case M.IN_SELECT:{cb(this,t);break}case M.IN_SELECT_IN_TABLE:{t6(this,t);break}case M.IN_TEMPLATE:{r6(this,t);break}case M.AFTER_BODY:{o6(this,t);break}case M.IN_FRAMESET:{s6(this,t);break}case M.AFTER_FRAMESET:{u6(this,t);break}case M.AFTER_AFTER_BODY:{c6(this,t);break}case M.AFTER_AFTER_FRAMESET:{d6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?m6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{GR(this,t);break}case M.BEFORE_HEAD:{KR(this,t);break}case M.IN_HEAD:{QR(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ZR(this,t);break}case M.AFTER_HEAD:{tL(this,t);break}case M.IN_BODY:{Hl(this,t);break}case M.TEXT:{HL(this,t);break}case M.IN_TABLE:{Va(this,t);break}case M.IN_TABLE_TEXT:{Ya(this,t);break}case M.IN_CAPTION:{QL(this,t);break}case M.IN_COLUMN_GROUP:{JL(this,t);break}case M.IN_TABLE_BODY:{Nh(this,t);break}case M.IN_ROW:{lb(this,t);break}case M.IN_CELL:{e6(this,t);break}case M.IN_SELECT:{db(this,t);break}case M.IN_SELECT_IN_TABLE:{n6(this,t);break}case M.IN_TEMPLATE:{i6(this,t);break}case M.AFTER_BODY:{hb(this,t);break}case M.IN_FRAMESET:{a6(this,t);break}case M.AFTER_FRAMESET:{l6(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Ba(this,t);break}case M.BEFORE_HTML:{Ua(this,t);break}case M.BEFORE_HEAD:{Ha(this,t);break}case M.IN_HEAD:{za(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ja(this,t);break}case M.AFTER_HEAD:{$a(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:{ob(this,t);break}case M.TEXT:{zL(this,t);break}case M.IN_TABLE_TEXT:{Ya(this,t);break}case M.IN_TEMPLATE:{fb(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:{Ch(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:{Jy(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{kh(this,t);break}case M.IN_TABLE_TEXT:{sb(this,t);break}}}}function BR(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):ib(e,t),n}function UR(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function HR(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=MR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=zR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function zR(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),o=ds(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===g.TEMPLATE&&a===ue.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function $R(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function Ah(e,t){for(let n=0;n<DR;n++){const r=BR(e,t);if(!r)break;const o=UR(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=HR(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&jR(e,u,a),$R(e,o,r)}}function vh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function VR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function qR(e,t){e._appendCommentNode(t,e.document)}function Ch(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function YR(e,t){e._setDocumentType(t);const n=t.forceQuirks?cr.QUIRKS:SR(t);_R(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Ba(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,cr.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function WR(e,t){t.tagID===g.HTML?(e._insertElement(t,ue.HTML),e.insertionMode=M.BEFORE_HEAD):Ua(e,t)}function GR(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Ua(e,t)}function Ua(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function XR(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.HEAD:{e._insertElement(t,ue.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:Ha(e,t)}}function KR(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Ha(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function Ha(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function wr(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,ue.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Ft.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ft.RAWTEXT):(e._insertElement(t,ue.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Ft.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Ft.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:za(e,t)}}function QR(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:{za(e,t);break}case g.TEMPLATE:{go(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function go(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 za(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function JR(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:{wr(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:ja(e,t)}}function ZR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case g.BR:{ja(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function ja(e,t){const n=t.type===Qe.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function eL(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.BODY:{e._insertElement(t,ue.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,ue.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),wr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:$a(e,t)}}function tL(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{$a(e,t);break}case g.TEMPLATE:{go(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function $a(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=M.IN_BODY,Ul(e,t)}function Ul(e,t){switch(t.type){case Qe.CHARACTER:{Zy(e,t);break}case Qe.WHITESPACE_CHARACTER:{Jy(e,t);break}case Qe.COMMENT:{vh(e,t);break}case Qe.START_TAG:{_n(e,t);break}case Qe.END_TAG:{Hl(e,t);break}case Qe.EOF:{ob(e,t);break}}}function Jy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Zy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function nL(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function rL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function iL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_FRAMESET)}function oL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML)}function sL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Sh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ue.HTML)}function aL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function uL(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),n||(e.formElement=e.openElements.current))}function lL(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===g.LI&&o===g.LI||(n===g.DD||n===g.DT)&&(o===g.DD||o===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==g.ADDRESS&&o!==g.DIV&&o!==g.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML)}function cL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),e.tokenizer.state=Ft.PLAINTEXT}function dL(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.framesetOk=!1}function fL(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Ah(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function hL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function pL(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Ah(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ue.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function gL(e,t){e.treeAdapter.getDocumentMode(e.document)!==cr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ue.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function eb(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ue.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function tb(e){const t=Ry(e,mo.TYPE);return t!=null&&t.toLowerCase()===LR}function EL(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ue.HTML),tb(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function yL(e,t){e._appendElement(t,ue.HTML),t.ackSelfClosing=!0}function bL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,ue.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function TL(e,t){t.tagName=X.IMG,t.tagID=g.IMG,eb(e,t)}function _L(e,t){e._insertElement(t,ue.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ft.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function SL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ft.RAWTEXT)}function xL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ft.RAWTEXT)}function nb(e,t){e._switchToTextParsing(t,Ft.RAWTEXT)}function wL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.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 AL(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ue.HTML)}function vL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ue.HTML)}function CL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,ue.HTML)}function kL(e,t){e._reconstructActiveFormattingElements(),Wy(t),wh(t),t.selfClosing?e._appendElement(t,ue.MATHML):e._insertElement(t,ue.MATHML),t.ackSelfClosing=!0}function PL(e,t){e._reconstructActiveFormattingElements(),Gy(t),wh(t),t.selfClosing?e._appendElement(t,ue.SVG):e._insertElement(t,ue.SVG),t.ackSelfClosing=!0}function rb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ue.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:{hL(e,t);break}case g.A:{fL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{sL(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:{oL(e,t);break}case g.LI:case g.DD:case g.DT:{lL(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{eb(e,t);break}case g.HR:{bL(e,t);break}case g.RB:case g.RTC:{vL(e,t);break}case g.RT:case g.RP:{CL(e,t);break}case g.PRE:case g.LISTING:{aL(e,t);break}case g.XMP:{SL(e,t);break}case g.SVG:{PL(e,t);break}case g.HTML:{nL(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:{wr(e,t);break}case g.BODY:{rL(e,t);break}case g.FORM:{uL(e,t);break}case g.NOBR:{pL(e,t);break}case g.MATH:{kL(e,t);break}case g.TABLE:{gL(e,t);break}case g.INPUT:{EL(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{yL(e,t);break}case g.IMAGE:{TL(e,t);break}case g.BUTTON:{dL(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{mL(e,t);break}case g.IFRAME:{xL(e,t);break}case g.SELECT:{wL(e,t);break}case g.OPTION:case g.OPTGROUP:{AL(e,t);break}case g.NOEMBED:case g.NOFRAMES:{nb(e,t);break}case g.FRAMESET:{iL(e,t);break}case g.TEXTAREA:{_L(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?nb(e,t):rb(e,t);break}case g.PLAINTEXT:{cL(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:rb(e,t)}}function NL(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 OL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,hb(e,t))}function IL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function RL(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 LL(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function DL(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function ML(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function FL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function BL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function UL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function ib(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function Hl(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:{Ah(e,t);break}case g.P:{LL(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:{IL(e,t);break}case g.LI:{DL(e);break}case g.DD:case g.DT:{ML(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{FL(e);break}case g.BR:{UL(e);break}case g.BODY:{NL(e,t);break}case g.HTML:{OL(e,t);break}case g.FORM:{RL(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{BL(e,t);break}case g.TEMPLATE:{go(e,t);break}default:ib(e,t)}}function ob(e,t){e.tmplInsertionModeStack.length>0?fb(e,t):Ch(e,t)}function HL(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 zL(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function kh(e,t){if(e.openElements.currentTagId!==void 0&&Xy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case Qe.CHARACTER:{ab(e,t);break}case Qe.WHITESPACE_CHARACTER:{sb(e,t);break}}else qa(e,t)}function jL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_CAPTION}function $L(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function VL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,Ph(e,t)}function qL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ue.HTML),e.insertionMode=M.IN_TABLE_BODY}function YL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=M.IN_TABLE_BODY,jl(e,t)}function WL(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function GL(e,t){tb(t)?e._appendElement(t,ue.HTML):qa(e,t),t.ackSelfClosing=!0}function XL(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ue.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function fs(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{YL(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{wr(e,t);break}case g.COL:{VL(e,t);break}case g.FORM:{XL(e,t);break}case g.TABLE:{WL(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{qL(e,t);break}case g.INPUT:{GL(e,t);break}case g.CAPTION:{jL(e,t);break}case g.COLGROUP:{$L(e,t);break}default:qa(e,t)}}function Va(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{go(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:qa(e,t)}}function qa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ul(e,t),e.fosterParentingEnabled=n}function sb(e,t){e.pendingCharacterTokens.push(t)}function ab(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ya(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)qa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const ub=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function KL(e,t){const n=t.tagID;ub.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,fs(e,t)):_n(e,t)}function QL(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&&Va(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:Hl(e,t)}}function Ph(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.COL:{e._appendElement(t,ue.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{wr(e,t);break}default:zl(e,t)}}function JL(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:{go(e,t);break}case g.COL:break;default:zl(e,t)}}function zl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function jl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ue.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,$l(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,fs(e,t));break}default:fs(e,t)}}function Nh(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,Va(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:Va(e,t)}}function $l(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ue.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,jl(e,t));break}default:fs(e,t)}}function lb(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,Nh(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,Nh(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:Va(e,t)}}function ZL(e,t){const n=t.tagID;ub.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),$l(e,t)):_n(e,t)}function e6(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(),lb(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Hl(e,t)}}function cb(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,ue.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ue.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ue.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:{wr(e,t);break}}}function db(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:{go(e,t);break}}}function t6(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):cb(e,t)}function n6(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)):db(e,t)}function r6(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:{wr(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,fs(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,Ph(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,jl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,$l(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,_n(e,t)}}function i6(e,t){t.tagID===g.TEMPLATE&&go(e,t)}function fb(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ch(e,t)}function o6(e,t){t.tagID===g.HTML?_n(e,t):Vl(e,t)}function hb(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 Vl(e,t)}function Vl(e,t){e.insertionMode=M.IN_BODY,Ul(e,t)}function s6(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.FRAMESET:{e._insertElement(t,ue.HTML);break}case g.FRAME:{e._appendElement(t,ue.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{wr(e,t);break}}}function a6(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 u6(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.NOFRAMES:{wr(e,t);break}}}function l6(e,t){t.tagID===g.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function c6(e,t){t.tagID===g.HTML?_n(e,t):ql(e,t)}function ql(e,t){e.insertionMode=M.IN_BODY,Ul(e,t)}function d6(e,t){switch(t.tagID){case g.HTML:{_n(e,t);break}case g.NOFRAMES:{wr(e,t);break}}}function f6(e,t){t.chars=vt,e._insertCharacters(t)}function h6(e,t){e._insertCharacters(t),e.framesetOk=!1}function pb(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ue.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function p6(e,t){if(PR(t))pb(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ue.MATHML?Wy(t):r===ue.SVG&&(NR(t),Gy(t)),wh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function m6(e,t){if(t.tagID===g.P||t.tagID===g.BR){pb(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)===ue.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,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 g6=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,E6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),mb={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function gb(e,t){const n=C6(e),r=ky("type",{handlers:{root:y6,element:b6,text:T6,comment:yb,doctype:_6,raw:x6},unknown:w6}),o={parser:n?new Qy(mb):Qy.getFragmentParser(void 0,mb),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),hs(o,Hr());const a=n?o.parser.document:o.parser.getFragment(),u=y3(a,{file:o.options.file});return o.stitches&&Ll(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 y6(e,t){Eb(e.children,t)}function b6(e,t){A6(e,t),Eb(e.children,t),v6(e,t)}function T6(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Qe.CHARACTER,chars:e.value,location:Wa(e)};hs(t,Hr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function _6(e,t){const n={type:Qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Wa(e)};hs(t,Hr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function S6(e,t){t.stitches=!0;const n=k6(e);if("children"in e&&"children"in n){const r=gb({type:"root",children:e.children},t.options);n.children=r.children}yb({type:"comment",value:{stitch:n}},t)}function yb(e,t){const n=e.value,r={type:Qe.COMMENT,data:n,location:Wa(e)};hs(t,Hr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function x6(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,bb(t,Hr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(g6,"<$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 w6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))S6(n,t);else{let r="";throw E6.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function hs(e,t){bb(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=Ft.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 bb(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 A6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ft.PLAINTEXT)return;hs(t,Hr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:ho.html;o===ho.html&&n==="svg"&&(o=ho.svg);const a=R3(pe(F({},e),{children:[]}),{space:o===ho.svg?"svg":"html"}),u={type:Qe.START_TAG,tagName:n,tagID:ds(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Wa(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function v6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&z3.includes(n)||t.parser.tokenizer.state===Ft.PLAINTEXT)return;hs(t,xl(e));const r={type:Qe.END_TAG,tagName:n,tagID:ds(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Wa(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ft.RCDATA||t.parser.tokenizer.state===Ft.RAWTEXT||t.parser.tokenizer.state===Ft.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ft.DATA)}function C6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Wa(e){const t=Hr(e)||{line:void 0,column:void 0,offset:void 0},n=xl(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 k6(e){return"children"in e?fo(pe(F({},e),{children:[]})):fo(e)}function Tb(e){return function(t,n){return gb(t,pe(F({},e),{file:n}))}}const Eo=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],_b={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Eo,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Eo],h2:[["className","sr-only"]],img:[...Eo,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Eo,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Eo],table:[...Eo],ul:[...Eo,["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"]},Ri={}.hasOwnProperty;function P6(e,t){let n={type:"root",children:[]};const r={schema:t?F(F({},_b),t):_b,stack:[]},o=Sb(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function Sb(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return N6(e,n);case"doctype":return O6(e,n);case"element":return I6(e,n);case"root":return R6(e,n);case"text":return L6(e,n)}}}function N6(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return Ga(a,t),a}}function O6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ga(n,t),n}}function I6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=xb(e,t.children),o=D6(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&&Ri.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return Ga(u,t),u}function R6(e,t){const r={type:"root",children:xb(e,t.children)};return Ga(r,t),r}function L6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ga(r,t),r}function xb(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=Sb(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function D6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Ri.call(r,n)?r[n]:void 0,u=r&&Ri.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(Ri.call(c,f)){const p=c[f];let m=wb(e,vb(a,f),f,p);m==null&&(m=wb(e,vb(u,f),f,p)),m!=null&&(d[f]=m)}if(o&&Ri.call(o,n)){const p=o[n];for(f in p)Ri.call(p,f)&&!Ri.call(d,f)&&(d[f]=p[f])}return d}function wb(e,t,n,r){return t?Array.isArray(r)?M6(e,t,n,r):Ab(e,t,n,r):void 0}function M6(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Ab(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Ab(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&F6(e,n,r)){if(typeof t=="object"&&t.length>1){let o=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){o=!0;break}}else if(u===r){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function F6(e,t,n){const r=e.schema.protocols&&Ri.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),c=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&o.slice(0,p.length)===p)return!0}return!1}function Ga(e,t){const n=aE(t);t.data&&(e.data=fo(t.data)),n&&(e.position=n)}function vb(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],a=typeof o=="string"?o:o[0];if(a===t)return o;a==="data*"&&(n=o)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function B6(e){return function(t){return P6(t,e)}}const Cb=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return x.jsx("a",pe(F(F({className:W(e,`${z}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},U6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=rt();return!e&&!t?null:x.jsx("div",{className:W(n,`${z}-disclaimer`),children:t?x.jsx(uy,{rehypePlugins:[Tb,B6],components:{ul:({children:r})=>x.jsx("ul",{className:W(n,`${z}-ul`),children:r}),ol:({children:r})=>x.jsx("ol",{className:W(n,`${z}-ol`),children:r}),li:({children:r})=>x.jsx("li",{className:W(n,`${z}-li`),children:r}),a:({href:r,title:o,children:a})=>x.jsx(Cb,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>x.jsx("img",{className:W(n,`${z}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>x.jsx("p",{className:W(n,`${z}-disclaimer-text`),children:r}),span:({children:r})=>x.jsx("span",{className:W(n,`${z}-disclaimer-text-span`),children:r})},children:t}):x.jsx("p",{className:W(n,`${z}-disclaimer-text`),children:e})})},Oh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=ar(),{setImageFile:u}=Qo(),{logger:c,globalClassName:d,searchConfig:f,features:p}=rt(),m=B.useRef(null),T=B.useRef(null),y=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",w=!!o||!1,C=w?"connected":"disconnected",A=t||!w,P=()=>a?new Promise((D,q)=>{const re=new FileReader;re.readAsDataURL(a),re.onload=()=>D(re.result),re.onerror=me=>q(me)}):Promise.resolve(""),v=D=>Je(null,null,function*(){var me;if(A)return;const q=10*1024*1024,re=(me=D.target.files)==null?void 0:me[0];if(re){if(re.size>q){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(re)}}),H=()=>{u(null),T.current&&(T.current.value="")},Y=D=>Je(null,null,function*(){var me;D.preventDefault();const q=(((me=m.current)==null?void 0:me.value)||"").trim();let re="";try{re=yield P()}catch(V){c==null||c.error("Error converting file to base64:",V),alert("There was an error processing the file. Please try again.");return}q&&(H(),m.current.value="",r(q,re))});return x.jsxs("div",{className:W(d,e,`cim-${n}-component`,a&&"with-attachments",`${z}-search-bar-wrapper`),children:[a&&x.jsxs("div",{className:W(d,`cim-${n}-component`,`${z}-image-file-preview`),children:[x.jsx("img",{className:W(d,`cim-${n}-component`,`${z}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),x.jsx("span",{className:W(d,`cim-${n}-component`,`${z}-image-file-name`),title:_,children:_}),x.jsx(H1,{className:W(`cim-${n}-component`,"clear-attachment"),label:"Remove image",onClick:H})]}),x.jsxs("form",{className:W(d,e,`cim-${n}-component`,`${z}-search-bar`),name:`${z}-search-form`,onSubmit:Y,children:[x.jsx("span",{role:"status",className:W(`${z}-connection-status-icon`,C)}),y&&x.jsxs("div",{role:"button",className:W(d,e,`cim-${n}-component`,A&&"disabled",`${z}-image-upload-button`),"aria-disabled":A,tabIndex:0,children:[x.jsx("label",{className:W(d,e,`cim-${n}-component`,A&&"disabled",`${z}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:x.jsx(tP,{})}),x.jsx("input",{className:W(d,e,`cim-${n}-component`,`${z}-file-input`),type:"file",ref:T,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${z}-file-input`,disabled:A,onInput:v})]}),x.jsx("input",{className:W(d,e,`cim-${n}-component`,`${z}-search-input`),type:"text",ref:m,placeholder:f==null?void 0:f.placeholder,name:`${z}-user-input`}),x.jsx(aP,{isLoading:A}),x.jsx(iP,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:A})]}),x.jsx(U6,{})]})};function H6(e){return At({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 z6(e){return At({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 kb=B.createContext({isOpen:!1}),Ih=B.createContext(null),Pb=B.createContext(null),ps=()=>{var n,r;const e=B.useContext(Ih),t=B.useContext(Pb);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Nb=({onClearChat:e,componentType:t})=>{const n=ps(),r=()=>{e(),n()};return x.jsxs("button",{className:W(`${z}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[x.jsx(z6,{}),"Clear chat"]})};function j6(e){return e==null?[]:Array.isArray(e)?e:[e]}var $6=(e,...t)=>e.concat(t),V6=(e,...t)=>e.filter(n=>!t.includes(n)),q6=e=>Array.from(new Set(e));function Ob(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?o?c:0:a>=u?o?0:t>u?u:t:a}function Y6(e,t,n={}){const{step:r=1,loop:o=!0}=n;return Ob(e,t,{step:-r,loop:o})}var W6=e=>Array.isArray(e),Ib=e=>e!=null&&typeof e=="object",G6=e=>Ib(e)&&!W6(e),Yl=e=>typeof e=="string",ms=e=>typeof e=="function",X6=e=>e==null,K6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Q6=e=>Object.prototype.toString.call(e),Rb=Function.prototype.toString,J6=Rb.call(Object),Z6=e=>{if(!Ib(e)||Q6(e)!="[object Object]"||n4(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=K6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Rb.call(n)==J6},e4=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,t4=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,n4=e=>e4(e)||t4(e),r4=e=>e(),i4=()=>{},Rh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function o4(e,t=0){let n=0,r=null;return((...o)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...o),n=a):r||(r=setTimeout(()=>{e(...o),n=Date.now(),r=null},t-u))})}var{min:s4,max:a4}=Math,u4=e=>Number.isNaN(e),l4=e=>u4(e)?0:e,Lb=(e,t,n)=>s4(a4(l4(e),t),n);function Lh(e){if(!Z6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=Lh(o))}return n}function Dh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function c4(e,t){if(e==null)throw new Error(t())}function d4(e,t,n){let r=[];for(const o of t)e[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var f4=Object.defineProperty,h4=(e,t,n)=>t in e?f4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mh=(e,t,n)=>h4(e,typeof t!="symbol"?t+"":t,n),Db=()=>{},Wl=e=>typeof e=="object"&&e!==null,gs=e=>e?"":void 0,Mb=e=>e?"true":void 0,p4=1,m4=9,g4=11,tn=e=>Wl(e)&&e.nodeType===p4&&typeof e.nodeName=="string",Gl=e=>Wl(e)&&e.nodeType===m4,E4=e=>Wl(e)&&e===e.window,Fb=e=>tn(e)?e.localName||"":"#document";function y4(e){return["html","body","#document"].includes(Fb(e))}var b4=e=>Wl(e)&&e.nodeType!==void 0,yo=e=>b4(e)&&e.nodeType===g4&&"host"in e,T4=e=>tn(e)&&e.localName==="input",_4=e=>tn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Xa(e){if(!e)return!1;const t=e.getRootNode();return bs(t)===e}var S4=/(textarea|select)/;function x4(e){if(e==null||!tn(e))return!1;try{return T4(e)&&e.selectionStart!=null||S4.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Es(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&&yo(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function $r(e){var t;return Gl(e)?e:E4(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function w4(e){return $r(e).documentElement}function ys(e){var t,n,r;return yo(e)?ys(e.host):Gl(e)?(t=e.defaultView)!=null?t:window:tn(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function bs(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 A4(e){if(Fb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yo(e)&&e.host||w4(e);return yo(t)?t.host:t}function Fh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Gl(t)||yo(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Bh=new WeakMap;function Ts(e){return Bh.has(e)||Bh.set(e,ys(e).getComputedStyle(e)),Bh.get(e)}var Uh=new Set(["menu","listbox","dialog","grid","tree","region"]),v4=e=>Uh.has(e),Bb=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Ub(e,t){const n=new Set,r=Fh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Bb(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&&v4(m)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function Hb(e,t){const n=Fh(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Bb(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&&Uh.has(m)&&!T&&(t(p),o(p))}}}};o(e)}function C4(e){const t=new Set;return Hb(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function k4(e){const t=e.getAttribute("role");return!!(t&&Uh.has(t))}function P4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function N4(e){var t;return P4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function O4(e){if(!e.id)return!1;const t=Fh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&k4(e))}var Hh=()=>typeof document!="undefined";function I4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var zh=e=>Hh()&&e.test(I4()),R4=e=>Hh()&&e.test(navigator.vendor),zb=()=>Hh()&&!!navigator.maxTouchPoints,L4=()=>zh(/^iPhone/i),D4=()=>zh(/^iPad/i)||jh()&&navigator.maxTouchPoints>1,Xl=()=>L4()||D4(),M4=()=>jh()||Xl(),jh=()=>zh(/^Mac/i),F4=()=>M4()&&R4(/apple/i);function B4(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function Ar(e){var n;const t=B4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var jb=e=>e.button===0,U4=e=>e.button===2||jh()&&e.ctrlKey&&e.button===0,H4=e=>"touches"in e&&e.touches.length>0,z4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},$b={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function j4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=z4[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in $b&&(o=$b[o]),o}function Vb(e,t="client"){const n=H4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var nn=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},qb=e=>tn(e)&&e.tagName==="IFRAME",$4=/^(audio|video|details)$/;function Yb(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var V4=e=>!Number.isNaN(Yb(e)),q4=e=>Yb(e)<0;function Y4(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 Wb(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<o.length;){const d=o[c++];if(!d||a.has(d))continue;a.add(d);const f=Y4(d,t);if(f){const p=Array.from(f.querySelectorAll(Kl)).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+_)})}o.push(...p)}}return r}var Kl="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",Gb=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Kl));(n==!0||n=="if-empty"&&o.length===0)&&tn(e)&&Vr(e)&&o.unshift(e);const u=[];for(const c of o)if(Vr(c)){if(qb(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...Gb(d,{getShadowRoot:r}));continue}u.push(c)}return r?Wb(u,r,Vr):u};function Vr(e){return!tn(e)||e.closest("[inert]")?!1:e.matches(Kl)&&_4(e)}function _s(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Kl));n&&bo(e)&&o.unshift(e);const a=[];for(const u of o)if(bo(u)){if(qb(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(..._s(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Wb(a,r,bo);return!u.length&&n?o:u}return!a.length&&n?o:a}function bo(e){return tn(e)&&e.tabIndex>0?!0:Vr(e)&&!q4(e)}function W4(e,t={}){const n=_s(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function G4(e,t={}){const{current:n,getShadowRoot:r}=t,o=_s(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:bs(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Ka(e){return e.tabIndex<0&&($4.test(e.localName)||x4(e))&&!V4(e)?0:e.tabIndex}function Xb(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=_s(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var X4=class e2{constructor(){Mh(this,"id",null),Mh(this,"fn_cleanup"),Mh(this,"cleanup",()=>{this.cancel()})}static create(){return new e2}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 Yt(e){const t=X4.create();return t.request(e),t.cleanup}function Kb(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function $h(e){const t=A4(e);return y4(t)?$r(t).body:tn(t)&&J4(t)?t:$h(t)}var K4=/auto|scroll|overlay|hidden|clip/,Q4=new Set(["inline","contents"]);function J4(e){const t=ys(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return K4.test(n+o+r)&&!Q4.has(a)}var Ss="default",Vh="",Ql=new WeakMap;function Z4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Xl()?(Ss==="default"&&(Vh=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Ss="disabled"):t&&(Ql.set(t,t.style.userSelect),t.style.userSelect="none"),()=>eD({target:t,doc:r})}function eD(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Xl()){if(Ss!=="disabled")return;Ss="restoring",setTimeout(()=>{Kb(()=>{Ss==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=Vh||""),Vh="",Ss="default")})},300)}else if(t&&Ql.has(t)){const a=Ql.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Ql.delete(t)}}function tD(e={}){const u=e,{defer:t,target:n}=u,r=mn(u,["defer","target"]),o=t?Yt:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(Z4(pe(F({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function nD(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=Vb(c),f=Math.sqrt(oa(d.x,2)+oa(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=Vb(c);r({point:d,event:c})},u=[nn(e,"pointermove",o,!1),nn(e,"pointerup",a,!1),nn(e,"pointercancel",a,!1),nn(e,"contextmenu",a,!1),tD({doc:e})];return()=>{u.forEach(c=>c())}}function rD(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,T]=W4(e,{includeContainer:!0,getShadowRoot:a}),y=G4(c,{current:n,getShadowRoot:a}),_=!m&&!T;f.shiftKey&&Xa(y)?(o==null||o(),p=T):f.shiftKey&&(Xa(m)||_)?p=n:!f.shiftKey&&Xa(n)?(o==null||o(),p=m):!f.shiftKey&&(Xa(T)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return nn(u,"keydown",d,!0)}function iD(e,t){const c=t,{defer:n,triggerElement:r}=c,o=mn(c,["defer","triggerElement"]),a=n?Yt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(rD(d,F({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function oD(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Jl(e,t){if(!e)return Db;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function sD(e,t,n){if(!e)return Db;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 aD(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 uD(e,t){const{timeout:n,rootNode:r}=t,o=ys(r),a=$r(r),u=new o.AbortController;return aD(new Promise(c=>{const d=e();if(d){c(d);return}const f=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var lD=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),cD=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Qb=e=>{const t={};let n;for(;n=cD.exec(e);)t[n[1]]=n[2];return t},dD=(e,t)=>{if(Yl(e)){if(Yl(t))return`${e};${t}`;e=Qb(e)}else Yl(t)&&(t=Qb(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Wt(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=Rh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=lD(t[o],n[o]);continue}if(o==="style"){t[o]=dD(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function WU(e){return e}var xs=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(xs||{}),qh="__init__";function fD(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>$r(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>bs(t()),a=u=>t().getElementById(u);return pe(F({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:Xa,getById:a})}function hD(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var ws=()=>e=>Array.from(new Set(e)),Jb=typeof globalThis.document!="undefined"?B.useLayoutEffect:B.useEffect;function Zl(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=B.useState(t),[o,a]=B.useState(r),u=e().value!==void 0,c=B.useRef(o);c.current=u?e().value:o;const d=B.useRef(c.current);Jb(()=>{d.current=c.current},[o,e().value]);const f=y=>{var C,A;const _=d.current,w=ms(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:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Jo.flushSync:r4)(()=>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)}}}Zl.cleanup=e=>{B.useEffect(()=>e,[])},Zl.ref=e=>{const t=B.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function pD(e){const t=B.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var mD=(e,t)=>{const n=B.useRef(!1),r=B.useRef(!1);B.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),B.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function ec(e,t={}){var oe,ce,de,ne,Te,Pe;const n=B.useMemo(()=>{const{id:se,ids:K,getRootNode:ie}=t;return fD({id:se,ids:K,getRootNode:ie})},[t]),r=(...se)=>{e.debug&&console.log(...se)},o=(ce=(oe=e.props)==null?void 0:oe.call(e,{props:Lh(t),scope:n}))!=null?ce:t,a=gD(o),u=(de=e.context)==null?void 0:de.call(e,{prop:a,bindable:Zl,scope:n,flush:eT,getContext(){return d},getComputed(){return Y},getRefs(){return w},getEvent(){return y()}}),c=Zb(u),d={get(se){var K;return(K=c.current)==null?void 0:K[se].ref.current},set(se,K){var ie;(ie=c.current)==null||ie[se].set(K)},initial(se){var K;return(K=c.current)==null?void 0:K[se].initial},hash(se){var ie,k;const K=(ie=c.current)==null?void 0:ie[se].get();return(k=c.current)==null?void 0:k[se].hash(K)}},f=B.useRef(new Map),p=B.useRef(null),m=B.useRef(null),T=B.useRef({type:""}),y=()=>pe(F({},T.current),{current(){return T.current},previous(){return m.current}}),_=()=>pe(F({},D),{matches(...se){return se.includes(D.ref.current)},hasTag(se){var K,ie;return!!((ie=(K=e.states[D.ref.current])==null?void 0:K.tags)!=null&&ie.includes(se))}}),w=pD((Te=(ne=e.refs)==null?void 0:ne.call(e,{prop:a,context:d}))!=null?Te:{}),C=()=>({state:_(),context:d,event:y(),prop:a,send:V,action:A,guard:P,track:mD,refs:w,computed:Y,flush:eT,scope:n,choose:H}),A=se=>{const K=ms(se)?se(C()):se;if(!K)return;const ie=K.map(k=>{var ee,I;const L=(I=(ee=e.implementations)==null?void 0:ee.actions)==null?void 0:I[k];return L||Dh(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),L});for(const k of ie)k==null||k(C())},P=se=>{var K,ie;return ms(se)?se(C()):(ie=(K=e.implementations)==null?void 0:K.guards)==null?void 0:ie[se](C())},v=se=>{const K=ms(se)?se(C()):se;if(!K)return;const ie=K.map(L=>{var I,Se;const ee=(Se=(I=e.implementations)==null?void 0:I.effects)==null?void 0:Se[L];return ee||Dh(`[zag-js] No implementation found for effect "${JSON.stringify(L)}"`),ee}),k=[];for(const L of ie){const ee=L==null?void 0:L(C());ee&&k.push(ee)}return()=>k.forEach(L=>L==null?void 0:L())},H=se=>j6(se).find(K=>{let ie=!K.guard;return Yl(K.guard)?ie=!!P(K.guard):ms(K.guard)&&(ie=K.guard(C())),ie}),Y=se=>{c4(e.computed,()=>"[zag-js] No computed object found on machine");const K=e.computed[se];return K({context:d,event:y(),prop:a,refs:w,scope:n,computed:Y})},D=Zl(()=>({defaultValue:e.initialState({prop:a}),onChange(se,K){var k,L,ee,I;if(K){const Se=f.current.get(K);Se==null||Se(),f.current.delete(K)}K&&A((k=e.states[K])==null?void 0:k.exit),A((L=p.current)==null?void 0:L.actions);const ie=v((ee=e.states[se])==null?void 0:ee.effects);if(ie&&f.current.set(se,ie),K===qh){A(e.entry);const Se=v(e.effects);Se&&f.current.set(qh,Se)}A((I=e.states[se])==null?void 0:I.entry)}})),q=B.useRef(void 0),re=B.useRef(xs.NotStarted);Jb(()=>{queueMicrotask(()=>{var L;const ie=re.current===xs.Started;re.current=xs.Started,r(ie?"rehydrating...":"initializing...");const k=(L=q.current)!=null?L:D.initial;D.invoke(k,ie?D.get():qh)});const se=f.current,K=D.ref.current;return()=>{r("unmounting..."),q.current=K,re.current=xs.Stopped,se.forEach(ie=>ie==null?void 0:ie()),f.current=new Map,p.current=null,queueMicrotask(()=>{A(e.exit)})}},[]);const me=()=>"ref"in D?D.ref.current:D.get(),V=se=>{queueMicrotask(()=>{var I,Se,je,Ee,Be;if(re.current!==xs.Started)return;m.current=T.current,T.current=se;let K=me();const ie=(je=(I=e.states[K].on)==null?void 0:I[se.type])!=null?je:(Se=e.on)==null?void 0:Se[se.type],k=H(ie);if(!k)return;p.current=k;const L=(Ee=k.target)!=null?Ee:K;r("transition",se.type,k.target||K,`(${k.actions})`);const ee=L!==K;ee?Jo.flushSync(()=>D.set(L)):k.reenter&&!ee?D.invoke(K,K):A((Be=k.actions)!=null?Be:[])})};return(Pe=e.watch)==null||Pe.call(e,C()),{state:_(),send:V,context:d,prop:a,scope:n,refs:w,computed:Y,event:y(),getStatus:()=>re.current}}function Zb(e){const t=B.useRef(e);return t.current=e,t}function gD(e){const t=Zb(e);return function(r){return t.current[r]}}function eT(e){queueMicrotask(()=>{Jo.flushSync(()=>e())})}var Yh=hD(e=>e);function tc(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const o=r(t);typeof o=="function"&&n.push(o)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function ED(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Wh=e=>{const t=B.memo(B.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=mn(f,["asChild","children"]);if(!o)return B.createElement(e,pe(F({},u),{ref:r}),a);if(!B.isValidElement(a))return null;const c=B.Children.only(a),d=ED(c);return B.cloneElement(c,pe(F({},Wt(u,c.props)),{ref:r?tc(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Sn=(()=>{const e=new Map;return new Proxy(Wh,{apply(t,n,r){return Wh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Wh(r)),e.get(r)}})})();function yD(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function To(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=B.createContext(u);c.displayName=t;function d(){var p;const f=B.useContext(c);if(!f&&n){const m=new Error(a!=null?a:yD(r,o));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[c.Provider,d,c]}const[bD,Gh]=To({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[tT,Qa]=To({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),nT=B.forwardRef((e,t)=>{const n=Gh(),r=Qa(),o=Wt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Sn.div,pe(F({},o),{ref:tc(r.ref,t)}))});nT.displayName="PopoverContent";const rT=B.forwardRef((e,t)=>{const n=Gh(),r=Qa(),o=Wt(n.getPositionerProps(),e);return r.unmounted?null:x.jsx(Sn.div,pe(F({},o),{ref:t}))});rT.displayName="PopoverPositioner";const Ja=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},F({},e)]),iT=e=>Ja()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function TD(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var _D={props({props:e}){return pe(F({},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",Ts(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!o&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});Yt(()=>{var c,d;const u=nc(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})=>{Yt(()=>{e.set("prevAnimationName",nc(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var p,m,T;((T=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?T:d.target)===o&&e.set("prevAnimationName",nc(t.get("styles")))},u=d=>{const f=nc(t.get("styles"));Ar(d)===o&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const c=Jl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),Kb(()=>c())}}}}};function nc(e){return(e==null?void 0:e.animationName)||"none"}ws()(["onExitComplete","present","immediate"]);function SD(e,t={}){const{sync:n=!1}=t,r=xD(e);return B.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function xD(e){const t=B.useRef(e);return t.current=e,t}const Xh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=mn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=B.useRef(!1),c=pe(F({},a),{present:r,onExitComplete:SD(e.onExitComplete)}),d=ec(_D,c),f=TD(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var _o=(e,t=[])=>({parts:(...n)=>{if(wD(t))return _o(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>_o(e,[...t,...n]),omit:(...n)=>_o(e,t.filter(r=>!n.includes(r))),rename:n=>_o(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${As(e)}"][data-part="${As(r)}"]`,`& [data-scope="${As(e)}"][data-part="${As(r)}"]`].join(", "),attrs:{"data-scope":As(e),"data-part":As(r)}}}),{})}),As=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),wD=e=>e.length===0;const AD=["top","right","bottom","left"],Li=Math.min,Qn=Math.max,rc=Math.round,ic=Math.floor,qr=e=>({x:e,y:e}),vD={left:"right",right:"left",bottom:"top",top:"bottom"},CD={start:"end",end:"start"};function Kh(e,t,n){return Qn(e,Li(t,n))}function fi(e,t){return typeof e=="function"?e(t):e}function hi(e){return e.split("-")[0]}function vs(e){return e.split("-")[1]}function Qh(e){return e==="x"?"y":"x"}function Jh(e){return e==="y"?"height":"width"}const kD=new Set(["top","bottom"]);function Yr(e){return kD.has(hi(e))?"y":"x"}function Zh(e){return Qh(Yr(e))}function PD(e,t,n){n===void 0&&(n=!1);const r=vs(e),o=Zh(e),a=Jh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=oc(u)),[u,oc(u)]}function ND(e){const t=oc(e);return[ep(e),t,ep(t)]}function ep(e){return e.replace(/start|end/g,t=>CD[t])}const oT=["left","right"],sT=["right","left"],OD=["top","bottom"],ID=["bottom","top"];function RD(e,t,n){switch(e){case"top":case"bottom":return n?t?sT:oT:t?oT:sT;case"left":case"right":return t?OD:ID;default:return[]}}function LD(e,t,n,r){const o=vs(e);let a=RD(hi(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(ep)))),a}function oc(e){return e.replace(/left|right|bottom|top/g,t=>vD[t])}function DD(e){return F({top:0,right:0,bottom:0,left:0},e)}function aT(e){return typeof e!="number"?DD(e):{top:e,right:e,bottom:e,left:e}}function sc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function uT(e,t,n){let{reference:r,floating:o}=e;const a=Yr(t),u=Zh(t),c=Jh(u),d=hi(t),f=a==="y",p=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,T=r[c]/2-o[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-o.width,y:m};break;default:y={x:r.x,y:r.y}}switch(vs(t)){case"start":y[u]-=T*(n&&f?-1:1);break;case"end":y[u]+=T*(n&&f?-1:1);break}return y}const MD=(e,t,n)=>Je(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,c=a.filter(Boolean),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:m}=uT(f,r,d),T=r,y={},_=0;for(let w=0;w<c.length;w++){const{name:C,fn:A}=c[w],{x:P,y:v,data:H,reset:Y}=yield A({x:p,y:m,initialPlacement:r,placement:T,strategy:o,middlewareData:y,rects:f,platform:u,elements:{reference:e,floating:t}});p=P!=null?P:p,m=v!=null?v:m,y=pe(F({},y),{[C]:F(F({},y[C]),H)}),Y&&_<=50&&(_++,typeof Y=="object"&&(Y.placement&&(T=Y.placement),Y.rects&&(f=Y.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):Y.rects),{x:p,y:m}=uT(f,T,d)),w=-1)}return{x:p,y:m,placement:T,strategy:o,middlewareData:y}});function Za(e,t){return Je(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:T=!1,padding:y=0}=fi(t,e),_=aT(y),C=c[T?m==="floating"?"reference":"floating":m],A=sc(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})),P=m==="floating"?{x:r,y:o,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}:{x:1,y:1},Y=sc(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:P,offsetParent:v,strategy:d}):P);return{top:(A.top-Y.top+_.top)/H.y,bottom:(Y.bottom-A.bottom+_.bottom)/H.y,left:(A.left-Y.left+_.left)/H.x,right:(Y.right-A.right+_.right)/H.x}})}const FD=e=>({name:"arrow",options:e,fn(n){return Je(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=fi(e,n)||{};if(p==null)return{};const T=aT(m),y={x:r,y:o},_=Zh(a),w=Jh(_),C=yield c.getDimensions(p),A=_==="y",P=A?"top":"left",v=A?"bottom":"right",H=A?"clientHeight":"clientWidth",Y=u.reference[w]+u.reference[_]-y[_]-u.floating[w],D=y[_]-u.reference[_],q=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let re=q?q[H]:0;(!re||!(yield c.isElement==null?void 0:c.isElement(q)))&&(re=d.floating[H]||u.floating[w]);const me=Y/2-D/2,V=re/2-C[w]/2-1,oe=Li(T[P],V),ce=Li(T[v],V),de=oe,ne=re-C[w]-ce,Te=re/2-C[w]/2+me,Pe=Kh(de,Te,ne),se=!f.arrow&&vs(a)!=null&&Te!==Pe&&u.reference[w]/2-(Te<de?oe:ce)-C[w]/2<0,K=se?Te<de?Te-de:Te-ne:0;return{[_]:y[_]+K,data:F({[_]:Pe,centerOffset:Te-Pe-K},se&&{alignmentOffset:K}),reset:se}})}}),BD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Je(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,Te=fi(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0}=Te,A=mn(Te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const P=hi(a),v=Yr(d),H=hi(d)===d,Y=yield f.isRTL==null?void 0:f.isRTL(p.floating),D=y||(H||!C?[oc(d)]:ND(d)),q=w!=="none";!y&&q&&D.push(...LD(d,C,w,Y));const re=[d,...D],me=yield Za(n,A),V=[];let oe=((o=u.flip)==null?void 0:o.overflows)||[];if(m&&V.push(me[P]),T){const Pe=PD(a,c,Y);V.push(me[Pe[0]],me[Pe[1]])}if(oe=[...oe,{placement:a,overflows:V}],!V.every(Pe=>Pe<=0)){var ce,de;const Pe=(((ce=u.flip)==null?void 0:ce.index)||0)+1,se=re[Pe];if(se&&(!(T==="alignment"?v!==Yr(se):!1)||oe.every(k=>Yr(k.placement)===v?k.overflows[0]>0:!0)))return{data:{index:Pe,overflows:oe},reset:{placement:se}};let K=(de=oe.filter(ie=>ie.overflows[0]<=0).sort((ie,k)=>ie.overflows[1]-k.overflows[1])[0])==null?void 0:de.placement;if(!K)switch(_){case"bestFit":{var ne;const ie=(ne=oe.filter(k=>{if(q){const L=Yr(k.placement);return L===v||L==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(L=>L>0).reduce((L,ee)=>L+ee,0)]).sort((k,L)=>k[1]-L[1])[0])==null?void 0:ne[0];ie&&(K=ie);break}case"initialPlacement":K=d;break}if(a!==K)return{reset:{placement:K}}}return{}})}}};function lT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function cT(e){return AD.some(t=>e[t]>=0)}const UD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Je(this,null,function*(){const{rects:r}=n,u=fi(e,n),{strategy:o="referenceHidden"}=u,a=mn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield Za(n,pe(F({},a),{elementContext:"reference"})),d=lT(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:cT(d)}}}case"escaped":{const c=yield Za(n,pe(F({},a),{altBoundary:!0})),d=lT(c,r.floating);return{data:{escapedOffsets:d,escaped:cT(d)}}}default:return{}}})}}},dT=new Set(["left","top"]);function HD(e,t){return Je(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=hi(n),c=vs(n),d=Yr(n)==="y",f=dT.has(u)?-1:1,p=a&&d?-1:1,m=fi(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 zD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Je(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield HD(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:pe(F({},f),{placement:c})}})}}},jD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Je(this,null,function*(){const{x:r,y:o,placement:a}=n,A=fi(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:P=>{let{x:v,y:H}=P;return{x:v,y:H}}}}=A,f=mn(A,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},m=yield Za(n,f),T=Yr(hi(a)),y=Qh(T);let _=p[y],w=p[T];if(u){const P=y==="y"?"top":"left",v=y==="y"?"bottom":"right",H=_+m[P],Y=_-m[v];_=Kh(H,_,Y)}if(c){const P=T==="y"?"top":"left",v=T==="y"?"bottom":"right",H=w+m[P],Y=w-m[v];w=Kh(H,w,Y)}const C=d.fn(pe(F({},n),{[y]:_,[T]:w}));return pe(F({},C),{data:{x:C.x-r,y:C.y-o,enabled:{[y]:u,[T]:c}}})})}}},$D=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=fi(e,t),p={x:n,y:r},m=Yr(o),T=Qh(m);let y=p[T],_=p[m];const w=fi(c,t),C=typeof w=="number"?{mainAxis:w,crossAxis:0}:F({mainAxis:0,crossAxis:0},w);if(d){const v=T==="y"?"height":"width",H=a.reference[T]-a.floating[v]+C.mainAxis,Y=a.reference[T]+a.reference[v]-C.mainAxis;y<H?y=H:y>Y&&(y=Y)}if(f){var A,P;const v=T==="y"?"width":"height",H=dT.has(hi(o)),Y=a.reference[m]-a.floating[v]+(H&&((A=u.offset)==null?void 0:A[m])||0)+(H?0:C.crossAxis),D=a.reference[m]+a.reference[v]+(H?0:((P=u.offset)==null?void 0:P[m])||0)-(H?C.crossAxis:0);_<Y?_=Y:_>D&&(_=D)}return{[T]:y,[m]:_}}}},VD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Je(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,oe=fi(e,n),{apply:f=()=>{}}=oe,p=mn(oe,["apply"]),m=yield Za(n,p),T=hi(a),y=vs(a),_=Yr(a)==="y",{width:w,height:C}=u.floating;let A,P;T==="top"||T==="bottom"?(A=T,P=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(P=T,A=y==="end"?"top":"bottom");const v=C-m.top-m.bottom,H=w-m.left-m.right,Y=Li(C-m[A],v),D=Li(w-m[P],H),q=!n.middlewareData.shift;let re=Y,me=D;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(me=H),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(re=v),q&&!y){const ce=Qn(m.left,0),de=Qn(m.right,0),ne=Qn(m.top,0),Te=Qn(m.bottom,0);_?me=w-2*(ce!==0||de!==0?ce+de:Qn(m.left,m.right)):re=C-2*(ne!==0||Te!==0?ne+Te:Qn(m.top,m.bottom))}yield f(pe(F({},n),{availableWidth:me,availableHeight:re}));const V=yield c.getDimensions(d.floating);return w!==V.width||C!==V.height?{reset:{rects:!0}}:{}})}}};function ac(){return typeof window!="undefined"}function Cs(e){return fT(e)?(e.nodeName||"").toLowerCase():"#document"}function Jn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wr(e){var t;return(t=(fT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fT(e){return ac()?e instanceof Node||e instanceof Jn(e).Node:!1}function vr(e){return ac()?e instanceof Element||e instanceof Jn(e).Element:!1}function Gr(e){return ac()?e instanceof HTMLElement||e instanceof Jn(e).HTMLElement:!1}function hT(e){return!ac()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Jn(e).ShadowRoot}const qD=new Set(["inline","contents"]);function eu(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Cr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!qD.has(o)}const YD=new Set(["table","td","th"]);function WD(e){return YD.has(Cs(e))}const GD=[":popover-open",":modal"];function uc(e){return GD.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const XD=["transform","translate","scale","rotate","perspective"],KD=["transform","translate","scale","rotate","perspective","filter"],QD=["paint","layout","strict","content"];function tp(e){const t=np(),n=vr(e)?Cr(e):e;return XD.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||KD.some(r=>(n.willChange||"").includes(r))||QD.some(r=>(n.contain||"").includes(r))}function JD(e){let t=Di(e);for(;Gr(t)&&!ks(t);){if(tp(t))return t;if(uc(t))return null;t=Di(t)}return null}function np(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ZD=new Set(["html","body","#document"]);function ks(e){return ZD.has(Cs(e))}function Cr(e){return Jn(e).getComputedStyle(e)}function lc(e){return vr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Di(e){if(Cs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hT(e)&&e.host||Wr(e);return hT(t)?t.host:t}function pT(e){const t=Di(e);return ks(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gr(t)&&eu(t)?t:pT(t)}function tu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=pT(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Jn(o);if(a){const c=rp(u);return t.concat(u,u.visualViewport||[],eu(o)?o:[],c&&n?tu(c):[])}return t.concat(o,tu(o,[],n))}function rp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mT(e){const t=Cr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Gr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=rc(n)!==a||rc(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function ip(e){return vr(e)?e:e.contextElement}function Ps(e){const t=ip(e);if(!Gr(t))return qr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=mT(t);let u=(a?rc(n.width):n.width)/r,c=(a?rc(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const e5=qr(0);function gT(e){const t=Jn(e);return!np()||!t.visualViewport?e5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function t5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jn(e)?!1:t}function So(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=ip(e);let u=qr(1);t&&(r?vr(r)&&(u=Ps(r)):u=Ps(e));const c=t5(a,n,r)?gT(a):qr(0);let d=(o.left+c.x)/u.x,f=(o.top+c.y)/u.y,p=o.width/u.x,m=o.height/u.y;if(a){const T=Jn(a),y=r&&vr(r)?Jn(r):r;let _=T,w=rp(_);for(;w&&r&&y!==_;){const C=Ps(w),A=w.getBoundingClientRect(),P=Cr(w),v=A.left+(w.clientLeft+parseFloat(P.paddingLeft))*C.x,H=A.top+(w.clientTop+parseFloat(P.paddingTop))*C.y;d*=C.x,f*=C.y,p*=C.x,m*=C.y,d+=v,f+=H,_=Jn(w),w=rp(_)}}return sc({width:p,height:m,x:d,y:f})}function cc(e,t){const n=lc(e).scrollLeft;return t?t.left+n:So(Wr(e)).left+n}function ET(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-cc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function n5(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Wr(r),c=t?uc(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=qr(1);const p=qr(0),m=Gr(r);if((m||!m&&!a)&&((Cs(r)!=="body"||eu(u))&&(d=lc(r)),Gr(r))){const y=So(r);f=Ps(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?ET(u,d):qr(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 r5(e){return Array.from(e.getClientRects())}function i5(e){const t=Wr(e),n=lc(e),r=e.ownerDocument.body,o=Qn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Qn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+cc(e);const c=-n.scrollTop;return Cr(r).direction==="rtl"&&(u+=Qn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const yT=25;function o5(e,t){const n=Jn(e),r=Wr(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(o){a=o.width,u=o.height;const p=np();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const f=cc(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);_<=yT&&(a-=_)}else f<=yT&&(a+=f);return{width:a,height:u,x:c,y:d}}const s5=new Set(["absolute","fixed"]);function a5(e,t){const n=So(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Gr(e)?Ps(e):qr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=o*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function bT(e,t,n){let r;if(t==="viewport")r=o5(e,n);else if(t==="document")r=i5(Wr(e));else if(vr(t))r=a5(t,n);else{const o=gT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sc(r)}function TT(e,t){const n=Di(e);return n===t||!vr(n)||ks(n)?!1:Cr(n).position==="fixed"||TT(n,t)}function u5(e,t){const n=t.get(e);if(n)return n;let r=tu(e,[],!1).filter(c=>vr(c)&&Cs(c)!=="body"),o=null;const a=Cr(e).position==="fixed";let u=a?Di(e):e;for(;vr(u)&&!ks(u);){const c=Cr(u),d=tp(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&s5.has(o.position)||eu(u)&&!d&&TT(e,u))?r=r.filter(p=>p!==u):o=c,u=Di(u)}return t.set(e,r),r}function l5(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?uc(t)?[]:u5(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const m=bT(t,p,o);return f.top=Qn(m.top,f.top),f.right=Li(m.right,f.right),f.bottom=Li(m.bottom,f.bottom),f.left=Qn(m.left,f.left),f},bT(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function c5(e){const{width:t,height:n}=mT(e);return{width:t,height:n}}function d5(e,t,n){const r=Gr(t),o=Wr(t),a=n==="fixed",u=So(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=qr(0);function f(){d.x=cc(o)}if(r||!r&&!a)if((Cs(t)!=="body"||eu(o))&&(c=lc(t)),r){const y=So(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else o&&f();a&&!r&&o&&f();const p=o&&!r&&!a?ET(o,c):qr(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 op(e){return Cr(e).position==="static"}function _T(e,t){if(!Gr(e)||Cr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Wr(e)===n&&(n=n.ownerDocument.body),n}function ST(e,t){const n=Jn(e);if(uc(e))return n;if(!Gr(e)){let o=Di(e);for(;o&&!ks(o);){if(vr(o)&&!op(o))return o;o=Di(o)}return n}let r=_T(e,t);for(;r&&WD(r)&&op(r);)r=_T(r,t);return r&&ks(r)&&op(r)&&!tp(r)?n:r||JD(e)||n}const f5=function(e){return Je(this,null,function*(){const t=this.getOffsetParent||ST,n=this.getDimensions,r=yield n(e.floating);return{reference:d5(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function h5(e){return Cr(e).direction==="rtl"}const p5={convertOffsetParentRelativeRectToViewportRelativeRect:n5,getDocumentElement:Wr,getClippingRect:l5,getOffsetParent:ST,getElementRects:f5,getClientRects:r5,getDimensions:c5,getScale:Ps,isElement:vr,isRTL:h5};function xT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function m5(e,t){let n=null,r;const o=Wr(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 _=ic(m),w=ic(o.clientWidth-(p+T)),C=ic(o.clientHeight-(m+y)),A=ic(p),v={rootMargin:-_+"px "+-w+"px "+-C+"px "+-A+"px",threshold:Qn(0,Li(1,d))||1};let H=!0;function Y(D){const q=D[0].intersectionRatio;if(q!==d){if(!H)return u();q?u(!1,q):r=setTimeout(()=>{u(!1,1e-7)},1e3)}q===1&&!xT(f,e.getBoundingClientRect())&&u(),H=!1}try{n=new IntersectionObserver(Y,pe(F({},v),{root:o.ownerDocument}))}catch(D){n=new IntersectionObserver(Y,v)}n.observe(e)}return u(!0),a}function g5(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=ip(e),p=o||a?[...f?tu(f):[],...tu(t)]:[];p.forEach(A=>{o&&A.addEventListener("scroll",n,{passive:!0}),a&&A.addEventListener("resize",n)});const m=f&&c?m5(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(A=>{let[P]=A;P&&P.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?So(e):null;d&&C();function C(){const A=So(e);w&&!xT(w,A)&&n(),w=A,_=requestAnimationFrame(C)}return n(),()=>{var A;p.forEach(P=>{o&&P.removeEventListener("scroll",n),a&&P.removeEventListener("resize",n)}),m==null||m(),(A=y)==null||A.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const E5=zD,y5=jD,b5=BD,T5=VD,_5=UD,S5=FD,x5=$D,w5=(e,t,n)=>{const r=new Map,o=F({platform:p5},n),a=pe(F({},o.platform),{_c:r});return MD(e,t,pe(F({},o),{platform:a}))};function wT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return pe(F({},o),{toJSON:()=>o})}function A5(e){if(!e)return wT();const{x:t,y:n,width:r,height:o}=e;return wT(t,n,r,o)}function v5(e,t){return{contextElement:tn(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?A5(r):n.getBoundingClientRect()}}}var nu=e=>({variable:e,reference:`var(${e})`}),pi={arrowSize:nu("--arrow-size"),arrowSizeHalf:nu("--arrow-size-half"),arrowBg:nu("--arrow-background"),transformOrigin:nu("--transform-origin"),arrowOffset:nu("--arrow-offset")},C5=e=>e==="top"||e==="bottom"?"y":"x";function k5(e,t){return{name:"transformOrigin",fn(n){var me,V,oe,ce,de;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=C5(d),p=((me=o.arrow)==null?void 0:me.x)||0,m=((V=o.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(((oe=o.shift)==null?void 0:oe.y)||0),A=u.reference.height/2,P=y/2,v=(de=(ce=e.offset)==null?void 0:ce.mainAxis)!=null?de:e.gutter,H=typeof v=="number"?v+P:v!=null?v:P,Y=C>H,D={top:`${_}px calc(100% + ${H}px)`,bottom:`${_}px ${-H}px`,left:`calc(100% + ${H}px) ${w}px`,right:`${-H}px ${w}px`}[d],q=`${_}px ${u.reference.y+A-c}px`,re=!!e.overlap&&f==="y"&&Y;return r.floating.style.setProperty(pi.transformOrigin.variable,re?q:D),{data:{transformOrigin:re?q:D}}}}}var P5={name:"rects",fn({rects:e}){return{data:e}}},N5=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${pi.arrowOffset.reference})`}),{}}}};function O5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var I5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function AT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function sp(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function R5(e,t,n){const r=e||t.createElement("div");return S5({element:r,padding:n.arrowPadding})}function L5(e,t){var n;if(!X6((n=t.offset)!=null?n:t.gutter))return E5(({placement:r})=>{var p,m,T,y;const o=((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+o:a!=null?a:o,{hasAlign:c}=O5(r),d=c?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Lh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function D5(e){if(!e.flip)return;const t=sp(e.boundary);return b5(pe(F({},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=sp(e.boundary);return y5(pe(F({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:x5()}))}function F5(e){return T5({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function B5(e){var t;if(e.hideWhenDetached)return _5({strategy:"referenceHidden",boundary:(t=sp(e.boundary))!=null?t:"clippingAncestors"})}function U5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function H5(e,t,n={}){const r=v5(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},I5,n),a=t.querySelector("[data-part=arrow]"),u=[L5(a,o),D5(o),M5(o),R5(a,t.ownerDocument,o),N5(a),k5({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),F5(o),B5(o),P5],{placement:c,strategy:d,onComplete:f,onPositioned:p}=o,m=()=>Je(null,null,function*(){var H;if(!r||!t)return;const w=yield w5(r,t,{placement:c,middleware:u,strategy:d});f==null||f(w),p==null||p({placed:!0});const C=ys(t),A=AT(C,w.x),P=AT(C,w.y);t.style.setProperty("--x",`${A}px`),t.style.setProperty("--y",`${P}px`),o.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 Y=Ts(v);t.style.setProperty("--z-index",Y.zIndex)}}),T=()=>Je(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=U5(o.listeners),_=o.listeners?g5(r,t,T,y):i4;return T(),()=>{_==null||_(),p==null||p({placed:!1})}}function vT(e,t,n={}){const c=n,{defer:r}=c,o=mn(c,["defer"]),a=r?Yt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(H5(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var z5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function j5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:pi.arrowSize.reference,height:pi.arrowSize.reference,[pi.arrowSizeHalf.variable]:`calc(${pi.arrowSize.reference} / 2)`,[pi.arrowOffset.variable]:`calc(${pi.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?z5[t.split("-")[0]]:void 0,background:pi.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var Ns=new WeakMap,dc=new WeakMap,fc={},ap=0,CT=e=>e&&(e.host||CT(e.parentNode)),$5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=CT(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),V5=new Set(["script","output","status","next-route-announcer"]),q5=e=>V5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),Y5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=$5(n,Array.isArray(e)?e:[e]);fc[r]||(fc[r]=new WeakMap);const c=fc[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)&&Hb(y,_=>{m(_)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))T(_);else try{if(q5(_))return;const C=_.getAttribute(o)==="true",A=(Ns.get(_)||0)+1,P=(c.get(_)||0)+1;Ns.set(_,A),c.set(_,P),d.push(_),A===1&&C&&dc.set(_,!0),P===1&&_.setAttribute(r,""),C||_.setAttribute(o,"true")}catch(w){console.error("[zag-js > ariaHidden] cannot operate on ",_,w)}})};return T(n),f.clear(),ap++,()=>{d.forEach(y=>{const _=Ns.get(y)-1,w=c.get(y)-1;Ns.set(y,_),c.set(y,w),_||(dc.has(y)||y.removeAttribute(o),dc.delete(y)),w||y.removeAttribute(r)}),ap--,ap||(Ns=new WeakMap,Ns=new WeakMap,dc=new WeakMap,fc={})}},W5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,G5=(e,t=W5(e),n="data-aria-hidden",r=!0)=>{if(t)return Y5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},X5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function kT(e,t={}){const{defer:n=!0}=t,r=n?X5:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(G5(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function K5(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const a=e.frames[o];a&&n(a)}},addEventListener(n,r,o){return t.each(a=>{try{a.document.addEventListener(n,r,o)}catch(u){}}),()=>{try{t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener(n,r,o){t.each(a=>{try{a.document.removeEventListener(n,r,o)}catch(u){}})}};return t}function Q5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}}}var PT="pointerdown.outside",NT="focus.outside";function J5(e){for(const t of e)if(tn(t)&&Vr(t))return!0;return!1}var OT=e=>"clientY"in e;function Z5(e,t){if(!OT(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 eM(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function IT(e,t){if(!t||!OT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return eM(u,c)?r||a:!1}function tM(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=$r(e),f=ys(e),p=K5(f),m=Q5(f);function T(v,H){if(!tn(H)||!H.isConnected||Es(e,H)||Z5(e,v)||c&&Ub(e,H))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const q=$h(Y);if(IT(v,q))return!1}const D=$h(e);return IT(v,D)?!1:!(n!=null&&n(H))}const y=new Set,_=yo(e==null?void 0:e.getRootNode());function w(v){function H(Y){var me,V;const D=u&&!zb()?Yt:oe=>oe(),q=Y!=null?Y:v,re=(V=(me=q==null?void 0:q.composedPath)==null?void 0:me.call(q))!=null?V:[q==null?void 0:q.target];D(()=>{const oe=_?re[0]:Ar(v);if(!(!e||!T(v,oe))){if(o||a){const ce=Rh(o,a);e.addEventListener(PT,ce,{once:!0})}RT(e,PT,{bubbles:!1,cancelable:!0,detail:{originalEvent:q,contextmenu:U4(q),focusable:J5(re),target:oe}})}})}v.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(nn(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(nn(d,"pointerdown",w,!0)),C.add(m.addEventListener("pointerdown",w,!0)),C.add(p.addEventListener("pointerdown",w,!0))},0);function P(v){(u?Yt:Y=>Y())(()=>{var q,re;const Y=(re=(q=v==null?void 0:v.composedPath)==null?void 0:q.call(v))!=null?re:[v==null?void 0:v.target],D=_?Y[0]:Ar(v);if(!(!e||!T(v,D))){if(r||a){const me=Rh(r,a);e.addEventListener(NT,me,{once:!0})}RT(e,NT,{bubbles:!1,cancelable:!0,detail:{originalEvent:v,contextmenu:!1,focusable:Vr(D),target:D}})}})}return zb()||(C.add(nn(d,"focusin",P,!0)),C.add(m.addEventListener("focusin",P,!0)),C.add(p.addEventListener("focusin",P,!0))),()=>{clearTimeout(A),y.forEach(v=>v()),C.forEach(v=>v())}}function nM(e,t){const{defer:n}=t,r=n?Yt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(tM(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function RT(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function rM(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return nn($r(e),"keydown",n,{capture:!0})}var LT="layer:request-dismiss",dr={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=>Es(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Es(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=>dr.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];oM(e,LT,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),iM(e,LT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function iM(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function oM(e,t,n){e.addEventListener(t,n,{once:!0})}var DT;function MT(){dr.layers.forEach(({node:e})=>{e.style.pointerEvents=dr.isBelowPointerBlockingLayer(e)?"none":"auto"})}function sM(e){e.style.pointerEvents=""}function aM(e,t){const n=$r(e),r=[];return dr.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(DT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=uD(()=>{const c=o();return tn(c)?c:null},{timeout:1e3});a.then(c=>r.push(Jl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{dr.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=DT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function uM(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Dh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};dr.add(f),MT();function p(w){var A,P;const C=Ar(w.detail.originalEvent);dr.isBelowPointerBlockingLayer(e)||dr.isInBranch(C)||((A=t.onPointerDownOutside)==null||A.call(t,w),(P=t.onInteractOutside)==null||P.call(t,w),!w.defaultPrevented&&(c&&console.log("onPointerDownOutside:",w.detail.originalEvent),r==null||r()))}function m(w){var A,P;const C=Ar(w.detail.originalEvent);dr.isInBranch(C)||((A=t.onFocusOutside)==null||A.call(t,w),(P=t.onInteractOutside)==null||P.call(t,w),!w.defaultPrevented&&(c&&console.log("onFocusOutside:",w.detail.originalEvent),r==null||r()))}function T(w){var C;dr.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],P=(v=t.persistentElements)==null?void 0:v.map(H=>H()).filter(tn);return P&&A.push(...P),A.some(H=>Es(H,w))||dr.isInNestedLayer(e,w)}const _=[a?aM(e,t.persistentElements):void 0,rM(e,T),nM(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{dr.remove(e),MT(),sM(e),_.forEach(w=>w==null?void 0:w())}}function FT(e,t){const{defer:n}=t,r=n?Yt:a=>a(),o=[];return o.push(r(()=>{const a=ms(e)?e():e;o.push(uM(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var lM=Object.defineProperty,cM=(e,t,n)=>t in e?lM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ct=(e,t,n)=>cM(e,typeof t!="symbol"?t+"":t,n),BT={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()}},dM=[],fM=class{constructor(e,t){Ct(this,"trapStack"),Ct(this,"config"),Ct(this,"doc"),Ct(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ct(this,"portalContainers",new Set),Ct(this,"listenerCleanups",[]),Ct(this,"handleFocus",r=>{const o=Ar(r),a=this.findContainerIndex(o,r)>=0;if(a||Gl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Ka(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=>Ka(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}),Ct(this,"handlePointerDown",r=>{const o=Ar(r);if(!(this.findContainerIndex(o,r)>=0)){if(iu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}iu(this.config.allowOutsideClick,r)||r.preventDefault()}}),Ct(this,"handleClick",r=>{const o=Ar(r);this.findContainerIndex(o,r)>=0||iu(this.config.clickOutsideDeactivates,r)||iu(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Ct(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;ru(r)&&r.preventDefault(),this.tryFocus(a)}}),Ct(this,"handleEscapeKey",r=>{hM(r)&&iu(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Ct(this,"_mutationObserver"),Ct(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return N4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?O4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ct(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),Ct(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Vr(r)){const o=bs(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),Ct(this,"tryFocus",r=>{if(r!==!1&&r!==bs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,pM(r)&&r.select()}}),Ct(this,"deactivate",r=>{if(!this.state.active)return this;const o=F({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(),BT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{UT(()=>{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}),Ct(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),Ct(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),Ct(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ct(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),Ct(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),Ct(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),Ct(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Ar(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),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||Vr(u)&&!bo(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=Ka(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else ru(o)||(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||Vr(u)&&!bo(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=Ka(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else ru(o)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||dM;const n=F({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return ru(r)&&!r.shiftKey},isKeyBackward(r){return ru(r)&&r.shiftKey}},t);this.doc=n.document||$r(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{C4(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?Ub(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=_s(e,{getShadowRoot:this.config.getShadowRoot}),n=Gb(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let f=0;f<t.length;f++)if(Ka(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(bo(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(bo(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return BT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?UT(()=>{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=bs(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},ru=e=>e.key==="Tab",iu=(e,...t)=>typeof e=="function"?e(...t):e,hM=e=>!e.isComposing&&e.key==="Escape",UT=e=>setTimeout(e,0),pM=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function HT(e,t={}){let n;const r=Yt(()=>{const o=typeof e=="function"?e():e;if(o){n=new fM(o,pe(F({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:$r(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var up="data-scroll-lock";function mM(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function zT(e){const t=Ts(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function jT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(up))return;const u=zT(r)||zT(o),c=n.innerWidth-r.clientWidth;o.setAttribute(up,"");const d=()=>sD(r,"--scrollbar-width",`${c}px`),f=mM(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Jl(o,_)},m=()=>{var Y,D;const{scrollX:_,scrollY:w,visualViewport:C}=n,A=(Y=C==null?void 0:C.offsetLeft)!=null?Y:0,P=(D=C==null?void 0:C.offsetTop)!=null?D:0,v={position:"fixed",overflow:"hidden",top:`${-(w-Math.floor(P))}px`,left:`${-(_-Math.floor(A))}px`,right:"0"};!u&&c>0&&(v[f]=`${c}px`);const H=Jl(o,v);return()=>{H==null||H(),n.scrollTo({left:_,top:w,behavior:"instant"})}},T=[d(),Xl()?m():p()];return()=>{T.forEach(_=>_==null?void 0:_()),o.removeAttribute(up)}}var gM=_o("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Xr=gM.build(),$T=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},VT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},lp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},qT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},EM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},cp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},dp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},yM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},YT=e=>e.getById($T(e)),Os=e=>e.getById(VT(e)),Is=e=>e.getById(lp(e)),WT=e=>e.getById(qT(e)),bM=e=>e.getById(cp(e)),TM=e=>e.getById(dp(e));function _M(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=j5(pe(F({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&o({type:y?"OPEN":"CLOSE"})},reposition(y={}){o({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(pe(F({id:EM(c)},Xr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(pe(F({},Xr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(pe(F({},Xr.anchor.attrs),{dir:u("dir"),id:$T(c)}))},getTriggerProps(){return t.button(pe(F({},Xr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:VT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":lp(c),onPointerDown(y){jb(y)&&F4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(pe(F({},Xr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(pe(F({id:qT(c)},Xr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(pe(F({},Xr.content.attrs),{dir:u("dir"),id:lp(c),tabIndex:-1,role:"dialog","aria-modal":Mb(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":gs(d),"aria-labelledby":m.title?cp(c):void 0,"aria-describedby":m.description?dp(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(pe(F({},Xr.title.attrs),{id:cp(c),dir:u("dir")}))},getDescriptionProps(){return t.element(pe(F({},Xr.description.attrs),{id:dp(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(pe(F({},Xr.closeTrigger.attrs),{dir:u("dir"),id:yM(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var SM={props({props:e}){return pe(F({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:F({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=YT(n))!=null?a:Os(n);return vT(r,()=>WT(n),pe(F({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Is(n);let o=!0;return FT(r,{type:"popover",pointerBlocking:t("modal"),exclude:Os(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(o=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:iD(()=>Is(t),{triggerElement:Os(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?kT(()=>[Is(t),Os(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return jT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?HT(()=>Is(t),{initialFocus:()=>Xb({root:Is(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=YT(n))!=null?u:Os(n);vT(o,()=>WT(n),pe(F(F({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Yt(()=>{Object.assign(e.get("renderedElements"),{title:!!bM(t),description:!!TM(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Yt(()=>{const n=Xb({root:Is(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||Yt(()=>{const a=Os(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})}}}};ws()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[XU,hc]=To({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[KU,fp]=To({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),xM=e=>{const t=B.useId(),{getRootNode:n}=hc(),{dir:r}=fp(),o=F({id:t,dir:r,getRootNode:n},e),a=ec(SM,o);return _M(a,Yh)},wM=e=>{const[t,u]=iT(e),c=u,{children:n}=c,r=mn(c,["children"]),o=xM(r),a=Xh(Wt({present:o.open},t));return x.jsx(bD,{value:o,children:x.jsx(tT,{value:a,children:n})})},GT=B.forwardRef((e,t)=>{const n=Gh(),r=Qa(),o=Wt(pe(F({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return x.jsx(Sn.button,pe(F({},o),{ref:t}))});GT.displayName="PopoverTrigger";function AM(e){return At({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 vM(e){return At({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 CM(e){return At({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 kM(e){return At({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 PM(e){return At({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 NM(e){return At({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 hp(e){return At({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 XT(e){return At({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 OM=({className:e,componentType:t,children:n})=>{const[r,o]=B.useState(!1),{globalClassName:a}=rt(),u=f=>{o(f.open)},c=B.useCallback(()=>{o(!1)},[]),d=B.useMemo(()=>({closeMenu:c}),[c]);return x.jsxs(wM,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[x.jsx(GT,{"aria-label":`Overflow menu for ${t}`,className:W(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,a,e,`cim-${t}-component`),children:x.jsx(XT,{})}),x.jsx(rT,{children:x.jsx(nT,{className:W(`${z}-overflow-menu-list`,a,`cim-${t}-component`),children:x.jsx(Pb.Provider,{value:d,children:n})})})]})};function KT(e){return At({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 QT(e){return At({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[IM,xo]=To({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),JT=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getControlProps(),e);return x.jsx(Sn.div,pe(F(F({},r),e),{ref:t}))});JT.displayName="CarouselControl";const ZT=B.forwardRef((e,t)=>{const[n,r]=Ja()(e,["readOnly","index"]),o=xo(),a=Wt(o.getIndicatorProps(n),r);return x.jsx(Sn.button,pe(F({},a),{ref:t}))});ZT.displayName="CarouselIndicator";const e_=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getIndicatorGroupProps(),e);return x.jsx(Sn.div,pe(F({},r),{ref:t}))});e_.displayName="CarouselIndicatorGroup";const t_=B.forwardRef((e,t)=>{const[n,r]=Ja()(e,["index","snapAlign"]),o=xo(),a=Wt(o.getItemProps(n),r);return x.jsx(Sn.div,pe(F({},a),{ref:t}))});t_.displayName="CarouselItem";const n_=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getItemGroupProps(),e);return x.jsx(Sn.div,pe(F({},r),{ref:t}))});n_.displayName="CarouselItemGroup";const r_=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getNextTriggerProps(),e);return x.jsx(Sn.button,pe(F({},r),{ref:t}))});r_.displayName="CarouselNextTrigger";const i_=B.forwardRef((e,t)=>{const n=xo(),r=Wt(n.getPrevTriggerProps(),e);return x.jsx(Sn.button,pe(F({},r),{ref:t}))});i_.displayName="CarouselPrevTrigger";function RM(e){const t=Ts(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(T,y){let _=parseFloat(T);return/%/.test(T)&&(_/=100,_*=y),Number.isNaN(_)?0:_}let d=c(r,n.width),f=c(o,n.height),p=c(a,n.width),m=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function LM(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 o_(e){let t=[];for(const n of e.children)t=t.concat(n,o_(n));return t}function s_(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?o_(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 o){const m=p.getBoundingClientRect();if(!LM(n,m,u))continue;const T=Ts(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 a_(e){const t=e.getBoundingClientRect(),n=RM(e),r=s_(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:u_([...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(l_(0,o.x))),y:u_([...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(l_(0,o.y)))}}function DM(e,t,n){const r=s_(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var u_=e=>[...new Set(e)],l_=(e,t)=>n=>Math.max(e,Math.min(t,n)),MM=_o("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),mi=MM.build(),FM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},BM=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},pc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},UM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},HM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},zM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},c_=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},Un=e=>e.getById(pc(e)),d_=e=>oD(Un(e),"[data-part=item]"),jM=(e,t)=>e.getById(c_(e,t)),f_=e=>{const t=Un(e);if(!t)return;const n=_s(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function $M(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=o("canScrollNext"),m=o("canScrollPrev"),T=o("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(P,v){a({type:"INDEX.SET",index:P,instant:v})},scrollTo(P,v){a({type:"PAGE.SET",index:P,instant:v})},scrollNext(P){a({type:"PAGE.NEXT",instant:P})},scrollPrev(P){a({type:"PAGE.PREV",instant:P})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(P){return Array.from(r.get("slidesInView")).includes(P)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(pe(F({},mi.root.attrs),{id:FM(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(pe(F({},mi.itemGroup.attrs),{id:pc(u),"data-orientation":c("orientation"),"data-dragging":gs(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(P){Es(P.currentTarget,Ar(P))&&a({type:"VIEWPORT.FOCUS"})},onBlur(P){Es(P.currentTarget,P.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(P){if(P.defaultPrevented||!c("allowMouseDrag")||!jb(P))return;const v=Ar(P);Vr(v)&&v!==P.currentTarget||(P.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:o4(P=>{const v=c("orientation")==="horizontal"?"deltaX":"deltaY";P[v]<0&&!o("canScrollPrev")||P[v]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",c("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:C,[T?"paddingInline":"paddingBlock"]:C,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(P){const v=r.get("slidesInView").includes(P.index);return t.element(pe(F({},mi.item.attrs),{id:BM(u,P.index),dir:c("dir"),role:"group","data-index":P.index,"data-inview":gs(v),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":A.item(P.index,c("slideCount")),"aria-hidden":Mb(!v),style:{scrollSnapAlign:(()=>{var re;const H=(re=P.snapAlign)!=null?re:"start",Y=c("slidesPerMove"),D=Y==="auto"?Math.floor(c("slidesPerPage")):Y;return(P.index+D)%D===0?H:void 0})()}}))},getControlProps(){return t.element(pe(F({},mi.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(pe(F({},mi.prevTrigger.attrs),{id:HM(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":A.prevTrigger,"data-orientation":c("orientation"),"aria-controls":pc(u),onClick(P){P.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(pe(F({},mi.nextTrigger.attrs),{dir:c("dir"),id:UM(u),type:"button","aria-label":A.nextTrigger,"data-orientation":c("orientation"),"aria-controls":pc(u),disabled:!p,onClick(P){P.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(pe(F({},mi.indicatorGroup.attrs),{dir:c("dir"),id:zM(u),"data-orientation":c("orientation"),onKeyDown(P){if(P.defaultPrevented)return;const v="indicator",H={ArrowDown(q){T||(a({type:"PAGE.NEXT",src:v}),q.preventDefault())},ArrowUp(q){T||(a({type:"PAGE.PREV",src:v}),q.preventDefault())},ArrowRight(q){T&&(a({type:"PAGE.NEXT",src:v}),q.preventDefault())},ArrowLeft(q){T&&(a({type:"PAGE.PREV",src:v}),q.preventDefault())},Home(q){a({type:"PAGE.SET",index:0,src:v}),q.preventDefault()},End(q){a({type:"PAGE.SET",index:y.length-1,src:v}),q.preventDefault()}},Y=j4(P,{dir:c("dir"),orientation:c("orientation")}),D=H[Y];D==null||D(P)}}))},getIndicatorProps(P){return t.button(pe(F({},mi.indicator.attrs),{dir:c("dir"),id:c_(u,P.index),type:"button","data-orientation":c("orientation"),"data-index":P.index,"data-readonly":gs(P.readOnly),"data-current":gs(P.index===_),"aria-label":A.indicator(P.index),onClick(v){v.defaultPrevented||P.readOnly||a({type:"PAGE.SET",index:P.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(pe(F({},mi.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":gs(d),"aria-label":d?A.autoplayStop:A.autoplayStart,onClick(P){P.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var VM={props({props:e}){return d4(e,["slideCount"],"carousel"),pe(F({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:F({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:qM(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 G6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(Un(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=Un(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),f_(e)});return f_(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!Un(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Yt(()=>{o(),Yt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return d_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Un(e),o=e.getWin(),a=new o.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?$6(d,m):V6(d,m)},n.get("slidesInView"));n.set("slidesInView",q6(c))},{root:r,threshold:t("inViewThreshold")});return d_(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Un(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 nD(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:o}){var f;const a=t.instant?"instant":"smooth",u=Lb((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=Un(n);if(!c)return;const d=r("isHorizontal")?"left":"top";o(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=Un(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=Ob(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=Y6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=Un(r);if(!o)return;const a=DM(o,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=Lb(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Un(n);if(!r)return;const o=a_(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=Un(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=Un(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Un(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=a_(r),c=u.x.reduce((f,p)=>Math.abs(p-o)<Math.abs(f-o)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);Yt(()=>{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=jM(n,e.get("page"));r&&Yt(()=>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 qM(e,t,n){if(e==null||n<=0)return[];const r=[],o=t==="auto"?Math.floor(n):t;if(o<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=o)r.push(a);return r}ws()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),ws()(["index","readOnly"]),ws()(["index","snapAlign"]);const YM=e=>{const t=B.useId(),{getRootNode:n}=hc(),{dir:r}=fp(),o=F({id:t,dir:r,getRootNode:n},e),a=ec(VM,o);return $M(a,Yh)},h_=B.forwardRef((e,t)=>{const[n,r]=Ja()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=YM(n),a=Wt(o.getRootProps(),r);return x.jsx(IM,{value:o,children:x.jsx(Sn.div,pe(F({},a),{ref:t}))})});h_.displayName="CarouselRoot";const WM=180,GM=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},XM=({globalClassName:e,className:t,itemMinWidth:n=WM,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p),T=m.length,y=B.useRef(null),[_,w]=B.useState(0),{width:C}=$C();B.useLayoutEffect(()=>{y.current&&w(y.current.getBoundingClientRect().width)},[C,T]);const A=GM(r),P=n+A,v=_>0?(_+A)/P:1,H=Math.max(1,Math.floor(v));if(T===0)return null;const Y=T>H,D=Math.ceil(T/H),q=Y?Math.max(1,v):H;return x.jsxs(h_,{ref:y,className:W(e,t,`${z}-carousel`),slidesPerPage:q,slidesPerMove:H,spacing:r,loop:o,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[x.jsx(n_,{className:W(e,`${z}-carousel__item-group`,{"carousel-row-container":!Y}),children:m.map((re,me)=>x.jsx(t_,{index:me,className:W(e,`${z}-carousel__item`),children:re},me))}),c&&Y&&x.jsxs(JT,{className:W(e,`${z}-carousel__control`),children:[x.jsx(i_,{className:W(e,`${z}-carousel__prev-trigger`),"aria-label":"Previous slide",children:x.jsx(CM,{size:"16px"})}),x.jsx(r_,{className:W(e,`${z}-carousel__next-trigger`),"aria-label":"Next slide",children:x.jsx(kM,{size:"16px"})})]}),u&&Y&&x.jsx(e_,{className:W(e,`${z}-carousel__indicator-group`),children:Array.from({length:D},(re,me)=>x.jsx(ZT,{index:me,className:W(e,`${z}-carousel__indicator`),"aria-label":`Go to slide group ${me+1}`},me))})]})},[KM,QM]=To({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),JM=e=>Ja()(e,["lazyMount","unmountOnExit"]),[ZM,ou]=To({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),p_=B.forwardRef((e,t)=>{const n=ou(),r=QM(),o=Xh(pe(F({},r),{present:n.open})),a=Wt(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:x.jsx(Sn.div,pe(F({},a),{ref:tc(o.ref,t)}))});p_.displayName="DialogBackdrop";const pp=B.forwardRef((e,t)=>{const n=ou(),r=Qa(),o=Wt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Sn.div,pe(F({},o),{ref:tc(r.ref,t)}))});pp.displayName="DialogContent";const mp=B.forwardRef((e,t)=>{const n=ou(),r=Wt(n.getDescriptionProps(),e);return x.jsx(Sn.div,pe(F({},r),{ref:t}))});mp.displayName="DialogDescription";const gp=B.forwardRef((e,t)=>{const n=ou(),r=Wt(n.getPositionerProps(),e);return Qa().unmounted?null:x.jsx(Sn.div,pe(F({},r),{ref:t}))});gp.displayName="DialogPositioner";var e8=_o("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),wo=e8.build(),m_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},g_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},E_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},yp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},bp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},y_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},mc=e=>e.getById(Ep(e)),t8=e=>e.getById(m_(e)),n8=e=>e.getById(g_(e)),r8=e=>e.getById(E_(e)),i8=e=>e.getById(yp(e)),o8=e=>e.getById(bp(e)),s8=e=>e.getById(y_(e));function a8(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(pe(F({},wo.trigger.attrs),{dir:a("dir"),id:E_(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Ep(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(pe(F({},wo.backdrop.attrs),{dir:a("dir"),hidden:!d,id:g_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(pe(F({},wo.positioner.attrs),{dir:a("dir"),id:m_(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(pe(F({},wo.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Ep(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:yp(u),"aria-describedby":f.description?bp(u):void 0}))},getTitleProps(){return t.element(pe(F({},wo.title.attrs),{dir:a("dir"),id:yp(u)}))},getDescriptionProps(){return t.element(pe(F({},wo.description.attrs),{dir:a("dir"),id:bp(u)}))},getCloseTriggerProps(){return t.button(pe(F({},wo.closeTrigger.attrs),{dir:a("dir"),id:y_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var u8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>s8(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return F({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return FT(()=>mc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[r8(e)],onInteractOutside(o){var a;(a=n("onInteractOutside"))==null||a(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var a;(a=n("onEscapeKeyDown"))==null||a(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return jT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?HT(()=>mc(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,a;return(a=(o=t("finalFocusEl"))==null?void 0:o())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?kT(()=>[mc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Yt(()=>{e.set("rendered",{title:!!i8(t),description:!!o8(t)})})},syncZIndex({scope:e}){Yt(()=>{const t=mc(e);if(!t)return;const n=Ts(t);[t8(e),n8(e)].forEach(o=>{o==null||o.style.setProperty("--z-index",n.zIndex),o==null||o.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};ws()(["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 l8=e=>{const t=B.useId(),{getRootNode:n}=hc(),{dir:r}=fp(),o=F({id:t,getRootNode:n,dir:r},e),a=ec(u8,o);return a8(a,Yh)},b_=e=>{const[t,c]=iT(e),d=c,{children:n}=d,r=mn(d,["children"]),[o]=JM(t),a=l8(r),u=Xh(Wt({present:a.open},t));return x.jsx(ZM,{value:a,children:x.jsx(KM,{value:o,children:x.jsx(tT,{value:u,children:n})})})},T_=B.forwardRef((e,t)=>{const n=ou(),r=Wt(n.getTitleProps(),e);return x.jsx(Sn.h2,pe(F({},r),{ref:t}))});T_.displayName="DialogTitle";const c8=({children:e})=>{const[t,n]=B.useState(!1),r=B.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=B.useMemo(()=>({isOpen:t}),[t]);return x.jsx(Ih.Provider,{value:r,children:x.jsx(kb.Provider,{value:o,children:e})})},__=()=>B.useContext(kb),S_=()=>{const e=B.useContext(Ih);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},d8=`${z}-overflow-menu-button-trigger`,f8=({componentType:e,children:t})=>{const{isOpen:n}=__(),{closeMenu:r}=S_(),{globalClassName:o}=rt(),a=B.useRef(null);return B.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const f=d.target;f instanceof Element&&f.closest(`.${d8}`)||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?x.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:W(`${z}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},h8=({componentType:e,className:t})=>{const{toggleMenu:n}=S_(),{isOpen:r}=__(),{globalClassName:o}=rt();return x.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:W(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:x.jsx(XT,{})})},Tp=()=>{const{status:e,entryType:t}=sr(),{messages:n}=ar(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},p8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=rt(),{previousComponentType:r}=sr(),o=ps(),a=()=>{El(r||"dialog"),o()};return t?x.jsx(ci,{className:W(n,`${z}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:x.jsx(KT,{})}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(KT,{}),"Show ",r||"dialog"]})},m8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=rt(),{isModalFullscreen:r}=sr(),o=ps(),a=()=>{vf(!r),o()},u=r?Zk:eP,c="Toggle Fullscreen";return t?x.jsx(ci,{ariaLabel:c,title:c,className:W(n,`${z}-modal-fullscreen-button`,`cim-${e}-component`),icon:x.jsx(u,{}),onClick:a}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(u,{}),c]})},g8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=rt(),{dialogPosition:r}=sr(),o=ps(),a=r==="bottom-left",u=()=>{Cf(a?"bottom-right":"bottom-left"),o()},c=a?vM:AM,d=a?"Move right":"Move left";return t?x.jsx(ci,{className:W(n,`${z}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:x.jsx(c,{})}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[x.jsx(c,{}),d]})},x_=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:o,globalClassName:a,mode:u,enableDownloadTranscript:c}=rt(),{mode:d}=sr(),f=u==="messaging"&&c&&!!r,p=d==="standalone",m=e==="modal",T=m?p8:w_,y=m?m8:g8,_=B.useMemo(()=>o?nP(o):{},[o]);return x.jsx(c8,{children:x.jsxs("div",{className:W(a,`${z}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[x.jsxs("div",{className:W(a,`${z}-${e}-header`,{standalone:p,embedded:!p}),style:_,children:[(o==null?void 0:o.logoUrl)&&x.jsx("img",{alt:"",role:"img",className:W(a,`${z}-${e}-logo`,{standalone:p,embedded:!p}),src:o.logoUrl}),x.jsx(T_,{className:W(a,`${z}-${e}-title`,{standalone:p,embedded:!p}),children:o==null?void 0:o.headerText}),x.jsxs("div",{className:W(a,`${z}-${e}-controls`),children:[x.jsx(T,{componentType:e,isIcon:!0}),x.jsx(h8,{componentType:e}),x.jsx(H1,{className:W(a,`cim-${e}-component`),onClick:n})]})]}),x.jsxs(f8,{componentType:e,children:[x.jsx(y,{componentType:e}),x.jsx(T8,{componentType:e}),x.jsx(Nb,{componentType:e,onClearChat:t}),f&&x.jsx(E8,{componentType:e,onDownloadTranscript:r})]})]})})},E8=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=rt(),r=ps(),[o,a]=B.useState(!1),u=()=>Je(null,null,function*(){if(!o){a(!0);try{yield e(),r()}catch(c){n==null||n.error("Error downloading transcript:",c)}finally{a(!1)}}});return x.jsxs("button",{className:W(`${z}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:o,children:[x.jsx(H6,{}),"Download transcript"]})},y8={sparkle:hp,plus:PM,"paper-plane":NM},_p=({icon:e,className:t})=>{const n=y8[e];return n?x.jsx(n,{className:t,"aria-hidden":"true"}):null},b8=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=rt(),c=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=o?"standalone":"embedded",p=_=>()=>{a(_)},m={"has-icon":!!c,"icon-right":!!c&&d==="right"},T=_=>x.jsxs(x.Fragment,{children:[c&&x.jsx(_p,{icon:c,className:`${z}-suggestion-button-icon`}),x.jsx("span",{children:_})]});return x.jsx("div",{className:W(t,`${z}-suggestion-container ${f}`,e),children:n.map(_=>o?x.jsx(_l,{disabled:r,className:W(t,`${z}-suggestion-button standalone`,m),onClick:p(_),children:T(_)},_):x.jsx("button",{disabled:r,className:W(t,`${z}-suggestion-button embedded`,m),onClick:p(_),children:T(_)},_))})},T8=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=rt();if(!r)return null;const o=()=>{ui(!1),gl(!0)};return t?x.jsx(ci,{className:W(n,`${z}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:x.jsx(B1,{})}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[x.jsx(B1,{}),"Minimize"]})},w_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=rt(),r=ps(),o=()=>{El("modal"),r()};return t?x.jsx(ci,{className:W(n,`${z}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:x.jsx(QT,{})}):x.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[x.jsx(QT,{}),"Show modal"]})},_8=({isWidgetStandalone:e})=>{var _,w;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:o}=rt(),{askCimPrompts:a,messages:u}=ar(),{isLoading:c,handleSuggestion:d}=Ur(),f=o==null?void 0:o.icon,p=(_=o==null?void 0:o.iconPosition)!=null?_:"left",m=B.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 u.some(P=>P.name==="conversation_reset")&&r||C},[u,n,r]),T=((w=a.message)==null?void 0:w.suggestions)||[],y=(C,A)=>()=>{d(C,A)};return x.jsxs("div",{className:W(t,`${z}-ask-cim-entry-message`,`${z}-message-group`,e?"standalone":"embedded"),children:[x.jsx("p",{className:W(t,`${z}-ask-cim-entry-text`),children:m}),!!(T!=null&&T.length)&&x.jsx("div",{className:W(t,`${z}-ask-cim-suggestions-container`,`${z}-suggestion-container`,e?"standalone":"embedded"),children:T.map(C=>{var A;return x.jsxs(_l,{disabled:c,className:W(t,`${z}-ask-cim-suggestion-button`,`${z}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!f,"icon-right":!!f&&p==="right"}),onClick:y(C,((A=a.message)==null?void 0:A.eventSourceId)||""),children:[f&&x.jsx(_p,{icon:f,className:`${z}-suggestion-button-icon`}),x.jsx("span",{children:C.displayText})]},C.displayText)})})]})},S8=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o}=rt();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 x.jsxs("div",{className:W(r,`${z}-product-tile`,{embedded:!e,standalone:e}),children:[m?x.jsx("a",{href:`${m}`,target:o?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${a}`,children:x.jsx("img",{className:W(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):x.jsx("img",{className:W(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),x.jsxs("div",{className:W(r,`${z}-product-tile-details`,{embedded:!e,standalone:e}),children:[x.jsxs("div",{className:W(r,`${z}-product-tile-content`),children:[u&&x.jsx("p",{className:`${z}-product-tile-brand`,children:u}),m?x.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:W(r,`${z}-product-tile-pdp`),href:`${m}`,target:o?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",x.jsx("span",{className:W(r,`${z}-product-tile-pdp-arrow`),children:"→"})]}):x.jsx("p",{className:W(r,`${z}-product-tile-name`),title:a,children:a})]}),x.jsx("div",{className:W(r,`${z}-product-tile-footer`),children:x.jsx("p",{className:W(r,`${z}-product-tile-price`),children:c})})]})]})},x8=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=rt(),o=t;return n?x.jsxs("div",{className:W(r,`${z}-display-products`),children:[x.jsx("p",{children:o.message}),o.products&&o.products.length>0&&x.jsx(XM,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:o.products.map(a=>{const u=n.getPid(a);return x.jsx(S8,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},w8=({globalClassName:e,message:t,isWidgetStandalone:n})=>x.jsx("div",{className:W(e,`${z}-error-message`,{standalone:n,embedded:!n}),children:x.jsxs("p",{className:W(e,`${z}-error-message-text`,{standalone:n,embedded:!n}),children:[x.jsx(Kk,{})," ",t.message||"An error occurred while processing your request."]})}),A8=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var _;const{isLoading:a}=Ur(),{messages:u}=ar(),c=u.find(w=>w.id===n.eventSourceId),d=!!c,f=((_=c==null?void 0:c.name)==null?void 0:_.replace("_suggestions",""))||"",p=d?vA(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=w=>{const C=n.suggestions.find(A=>A.displayText===w);C&&o(C,n.eventSourceId||n.id)};return x.jsxs("div",{className:W(e,`${z}-follow-up`),children:[x.jsx("p",{className:W(e,`${z}-text`),children:n.message}),x.jsx(b8,{suggestions:n.suggestions.map(w=>w.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function A_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function v8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function C8(e,t,n){const o=Il((n||{}).ignore||[]),a=k8(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(o(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,P=[];T.lastIndex=0;let v=T.exec(f.value);for(;v;){const H=v.index,Y={index:v.index,input:v.input,stack:[...p,f]};let D=y(...v,Y);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?T.lastIndex=H+1:(_!==H&&P.push({type:"text",value:f.value.slice(_,H)}),Array.isArray(D)?P.push(...D):D&&P.push(D),_=H+v[0].length,A=!0),!T.global)break;v=T.exec(f.value)}return A?(_<f.value.length&&P.push({type:"text",value:f.value.slice(_)}),m.children.splice(C,1,...P)):P=[f],C+P.length}}function k8(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([P8(o[0]),N8(o[1])])}return t}function P8(e){return typeof e=="string"?new RegExp(v8(e),"g"):e}function N8(e){return typeof e=="function"?e:function(){return e}}const Sp="phrasing",xp=["autolink","link","image","label"];function O8(){return{transforms:[B8],enter:{literalAutolink:R8,literalAutolinkEmail:wp,literalAutolinkHttp:wp,literalAutolinkWww:wp},exit:{literalAutolink:F8,literalAutolinkEmail:M8,literalAutolinkHttp:L8,literalAutolinkWww:D8}}}function I8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Sp,notInConstruct:xp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Sp,notInConstruct:xp},{character:":",before:"[ps]",after:"\\/",inConstruct:Sp,notInConstruct:xp}]}}function R8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function wp(e){this.config.enter.autolinkProtocol.call(this,e)}function L8(e){this.config.exit.autolinkProtocol.call(this,e)}function D8(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 M8(e){this.config.exit.autolinkEmail.call(this,e)}function F8(e){this.exit(e)}function B8(e){C8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,U8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),H8]],{ignore:["link","linkReference"]})}function U8(e,t,n,r,o){let a="";if(!v_(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!z8(n)))return!1;const u=j8(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 H8(e,t,n,r){return!v_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function z8(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 j8(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=A_(e,"(");let a=A_(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function v_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||co(n)||Al(n))&&(!t||n!==47)}C_.peek=Q8;function $8(){this.buffer()}function V8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function q8(){this.buffer()}function Y8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function W8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=xr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function G8(e){this.exit(e)}function X8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=xr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function K8(e){this.exit(e)}function Q8(){return"["}function C_(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function J8(){return{enter:{gfmFootnoteCallString:$8,gfmFootnoteCall:V8,gfmFootnoteDefinitionLabelString:q8,gfmFootnoteDefinition:Y8},exit:{gfmFootnoteCallString:W8,gfmFootnoteCall:G8,gfmFootnoteDefinitionLabelString:X8,gfmFootnoteDefinition:K8}}}function Z8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:C_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,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
32
|
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?k_:eF))),f(),d}}function eF(e,t,n){return t===0?e:k_(e,t,n)}function k_(e,t,n){return(n?"":" ")+e}const tF=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];P_.peek=sF;function nF(){return{canContainEols:["delete"],enter:{strikethrough:iF},exit:{strikethrough:oF}}}function rF(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:tF}],handlers:{delete:P_}}}function iF(e){this.enter({type:"delete",children:[]},e)}function oF(e){this.exit(e)}function P_(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,pe(F({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function sF(){return"~"}function aF(e){return e.length}function uF(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||aF,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 P=lF(e[p][A]);if(n.alignDelimiters!==!1){const v=o(P);C[A]=v,(d[A]===void 0||v>d[A])&&(d[A]=v)}w.push(P)}u[p]=w,c[p]=C}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=N_(r[m]);else{const w=N_(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 P=n.alignDelimiters===!1?1:Math.max(1,d[m]-C.length-A.length);const v=C+"-".repeat(P)+A;n.alignDelimiters!==!1&&(P=C.length+P+A.length,P>d[m]&&(d[m]=P),y[m]=P),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 P=w[m]||"";let v="",H="";if(n.alignDelimiters!==!1){const Y=d[m]-(C[m]||0),D=a[m];D===114?v=" ".repeat(Y):D===99?Y%2?(v=" ".repeat(Y/2+.5),H=" ".repeat(Y/2-.5)):(v=" ".repeat(Y/2),H=v):H=" ".repeat(Y)}n.delimiterStart!==!1&&!m&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&P==="")&&(n.delimiterStart!==!1||m)&&A.push(" "),n.alignDelimiters!==!1&&A.push(v),A.push(P),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
33
|
`)}function lF(e){return e==null?"":String(e)}function N_(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 cF(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),dF);return o(),u}function dF(e,t,n){return">"+(n?"":" ")+e}function fF(e,t){return O_(e,t.inConstruct,!0)&&!O_(e,t.notInConstruct,!1)}function O_(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 I_(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
34
34
|
`&&fF(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
@@ -43,4 +43,4 @@ Error generating stack: `+b.message+`
|
|
|
43
43
|
`))+1))}const u="#".repeat(o),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,F({before:"# ",after:`
|
|
44
44
|
`},a.current()));return/^[\t ]/.test(f)&&(f=su(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}L_.peek=xF;function L_(e){return e.value||""}function xF(){return"<"}D_.peek=wF;function D_(e,t,n,r){const o=Ap(n),a=o==='"'?"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,F({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,F({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,F({before:f,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,F({before:f,after:o},d.current()))),f+=d.move(o),c()),f+=d.move(")"),u(),f}function wF(){return"!"}M_.peek=AF;function M_(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,F({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),F({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==m?d+=c.move(m+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function AF(){return"!"}F_.peek=vF;function F_(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],c=n.compilePattern(u);let d;if(u.atBreak)for(;d=c.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return o+r+o}function vF(){return"`"}function B_(e,t){const n=Vf(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))}U_.peek=CF;function U_(e,t,n,r){const o=Ap(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(B_(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,F({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,F({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,F({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,F({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+o),f+=u.move(n.safe(e.title,F({before:f,after:o},u.current()))),f+=u.move(o),d()),f+=u.move(")"),c(),f}function CF(e,t,n){return B_(e,n)?"<":"["}H_.peek=kF;function H_(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,F({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),F({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==m?d+=c.move(m+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function kF(){return"["}function vp(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 PF(e){const t=vp(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 NF(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 z_(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 OF(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?NF(n):vp(n);const c=e.ordered?u==="."?")":".":PF(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),z_(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,o(),f}function IF(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 RF(e,t,n,r){const o=IF(n);let a=n.bulletCurrent||vp(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const d=n.enter("listItem"),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 LF(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const DF=Il(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function MF(e,t,n,r){return(e.children.some(function(u){return DF(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function FF(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}j_.peek=BF;function j_(e,t,n,r){const o=FF(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(o+o);let d=u.move(n.containerPhrasing(e,F({after:o,before:c},u.current())));const f=d.charCodeAt(0),p=gc(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=su(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=gc(r.after.charCodeAt(0),m,o);T.inside&&(d=d.slice(0,-1)+su(m));const y=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},c+d+y}function BF(e,t,n){return n.options.strong||"*"}function UF(e,t,n,r){return n.safe(e.value,r)}function HF(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 zF(e,t,n){const r=(z_(n)+(n.options.ruleSpaces?" ":"")).repeat(HF(n));return n.options.ruleSpaces?r.slice(0,-1):r}const $_={blockquote:cF,break:I_,code:gF,definition:yF,emphasis:R_,hardBreak:I_,heading:SF,html:L_,image:D_,imageReference:M_,inlineCode:F_,link:U_,linkReference:H_,list:OF,listItem:RF,paragraph:LF,root:MF,strong:j_,text:UF,thematicBreak:zF};function jF(){return{enter:{table:$F,tableData:V_,tableHeader:V_,tableRow:qF},exit:{codeText:YF,table:VF,tableData:Cp,tableHeader:Cp,tableRow:Cp}}}function $F(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 VF(e){this.exit(e),this.data.inTable=void 0}function qF(e){this.enter({type:"tableRow",children:[]},e)}function Cp(e){this.exit(e)}function V_(e){this.enter({type:"tableCell",children:[]},e)}function YF(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,WF));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function WF(e,t){return t==="|"?t:e}function GF(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
45
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),P=f([A]);return P.slice(0,P.indexOf(`
|
|
46
|
-
`))}function d(y,_,w,C){const A=w.enter("tableCell"),P=w.enter("phrasing"),v=w.containerPhrasing(y,pe(F({},C),{before:a,after:a}));return P(),A(),v}function f(y,_){return uF(y,{align:_,alignDelimiters:r,padding:n,stringLength:o})}function p(y,_,w){const C=y.children;let A=-1;const P=[],v=_.enter("table");for(;++A<C.length;)P[A]=m(C[A],_,w);return v(),P}function m(y,_,w){const C=y.children;let A=-1;const P=[],v=_.enter("tableRow");for(;++A<C.length;)P[A]=d(C[A],y,_,w);return v(),P}function T(y,_,w){let C=$_.inlineCode(y,_,w);return w.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function XF(){return{exit:{taskListCheckValueChecked:q_,taskListCheckValueUnchecked:q_,paragraph:QF}}}function KF(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:JF}}}function q_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function QF(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,u;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function JF(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=$_.listItem(e,t,n,F(F({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function ZF(){return[O8(),J8(),nF(),jF(),XF()]}function e9(e){return{extensions:[I8(),Z8(e),rF(),GF(e),KF()]}}const t9={tokenize:a9,partial:!0},Y_={tokenize:u9,partial:!0},W_={tokenize:l9,partial:!0},G_={tokenize:c9,partial:!0},n9={tokenize:d9,partial:!0},X_={name:"wwwAutolink",tokenize:o9,previous:Q_},K_={name:"protocolAutolink",tokenize:s9,previous:J_},gi={name:"emailAutolink",tokenize:i9,previous:Z_},Kr={};function r9(){return{text:Kr}}let Ao=48;for(;Ao<123;)Kr[Ao]=gi,Ao++,Ao===58?Ao=65:Ao===91&&(Ao=97);Kr[43]=gi,Kr[45]=gi,Kr[46]=gi,Kr[95]=gi,Kr[72]=[gi,K_],Kr[104]=[gi,K_],Kr[87]=[gi,X_],Kr[119]=[gi,X_];function i9(e,t,n){const r=this;let o,a;return u;function u(m){return!kp(m)||!Z_.call(r,r.previous)||Pp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return kp(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(n9,p,f)(m):m===45||m===95||Tn(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),o=!0,d}function p(m){return a&&o&&kn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function o9(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!Q_.call(r,r.previous)||Pp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(t9,e.attempt(Y_,e.attempt(W_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function s9(e,t,n){const r=this;let o="",a=!1;return u;function u(m){return(m===72||m===104)&&J_.call(r,r.previous)&&!Pp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(kn(m)&&o.length<5)return o+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const T=o.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||wl(m)||ht(m)||co(m)||Al(m)?n(m):e.attempt(Y_,e.attempt(W_,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function a9(e,t,n){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function u9(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(G_,d,c)(f):f===null||ht(f)||co(f)||f!==45&&Al(f)?d(f):(a=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(o=r,r=void 0),e.consume(f),u}function d(f){return o||r||!a?n(f):t(f)}}function l9(e,t){let n=0,r=0;return o;function o(u){return u===40?(n++,e.consume(u),o):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(G_,t,a)(u):u===null||ht(u)||co(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function c9(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||ht(c)||co(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||ht(c)||co(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 d9(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return Tn(a)?n(a):t(a)}}function Q_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ht(e)}function J_(e){return!kn(e)}function Z_(e){return!(e===47||kp(e))}function kp(e){return e===43||e===45||e===46||e===95||Tn(e)}function Pp(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 f9={tokenize:T9,partial:!0};function h9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:E9,continuation:{tokenize:y9},exit:b9}},text:{91:{name:"gfmFootnoteCall",tokenize:g9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:p9,resolveTo:m9}}}}function p9(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const f=xr(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 m9(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function g9(e,t,n){const r=this,o=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 o.includes(xr(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 E9(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(_)}function p(_){if(u>999||_===93&&!c||_===null||_===91||ht(_))return n(_);if(_===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=xr(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return ht(_)||(c=!0),u++,e.consume(_),_===92?m:p}function m(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function T(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),o.includes(a)||o.push(a),it(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function y9(e,t,n){return e.check(Na,t,e.attempt(f9,t,n))}function b9(e){e.exit("gfmFootnoteDefinition")}function T9(e,t,n){const r=this;return it(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function _9(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let 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&&Xn(T,T.length,0,vl(y,u.slice(f+1,d),c)),Xn(T,T.length,0,[["exit",m,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),Xn(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=os(f);if(_===126)return m>1?d(_):(u.consume(_),m++,y);if(m<2&&!n)return d(_);const C=u.exit("strikethroughSequenceTemporary"),A=os(_);return C._open=!A||A===2&&!!w,C._close=!w||w===2&&!!A,c(_)}}}class S9{constructor(){this.map=[]}add(t,n,r){x9(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function x9(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function w9(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function A9(){return{flow:{null:{name:"table",tokenize:v9,resolveAll:C9}}}}function v9(e,t,n){const r=this;let o=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 ce=se>-1?r.events[se][1].type:null,de=ce==="tableHead"||ce==="tableRow"?D:d;return de===D&&r.parser.lazy[r.now().line]?n(V):de(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):He(V)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),y):n(V):tt(V)?it(e,p,"whitespace")(V):(a+=1,u&&(u=!1,o+=1),V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(V)))}function m(V){return V===null||V===124||ht(V)?(e.exit("data"),p(V)):(e.consume(V),V===92?T:m)}function T(V){return V===92||V===124?(e.consume(V),m):m(V)}function y(V){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(V):(e.enter("tableDelimiterRow"),u=!1,tt(V)?it(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):Y(V)}function w(V){return tt(V)?it(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||He(V)?H(V):Y(V)}function A(V){return V===45?(e.enter("tableDelimiterFiller"),P(V)):Y(V)}function P(V){return V===45?(e.consume(V),P):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 tt(V)?it(e,H,"whitespace")(V):H(V)}function H(V){return V===124?_(V):V===null||He(V)?!u||o!==a?Y(V):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(V)):Y(V)}function Y(V){return n(V)}function D(V){return e.enter("tableRow"),q(V)}function q(V){return V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),q):V===null||He(V)?(e.exit("tableRow"),t(V)):tt(V)?it(e,q,"whitespace")(V):(e.enter("data"),re(V))}function re(V){return V===null||V===124||ht(V)?(e.exit("data"),q(V)):(e.consume(V),V===92?me:re)}function me(V){return V===92||V===124?(e.consume(V),re):re(V)}}function C9(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,p,m;const T=new S9;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(eS(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]])),o=_.type==="tableDelimiterRow"?2:p?3:1):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=Ec(T,t,a,o,void 0,m),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=Ec(T,t,a,o,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=Ec(T,t,a,o,n,m)):u[1]!==0&&(m=Ec(T,t,u,o,n,m)),o=0):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&eS(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=w9(t.events,n))}return e}function Ec(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},Rs(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Rs(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=Rs(t.events,n[2]),p=Rs(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 o!==void 0&&(a.end=Object.assign({},Rs(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function eS(e,t,n,r,o){const a=[],u=Rs(t.events,n);o&&(o.end=Object.assign({},u),a.push(["exit",o,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function Rs(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const k9={name:"tasklistCheck",tokenize:N9};function P9(){return{text:{91:k9}}}function N9(e,t,n){const r=this;return o;function o(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return 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 He(d)?t(d):tt(d)?e.check({tokenize:O9},t,n)(d):n(d)}}function O9(e,t,n){return it(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function I9(e){return yE([r9(),h9(),_9(e),A9(),P9()])}const R9={};function L9(e){const t=this,n=e||R9,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(I9(n)),a.push(ZF()),u.push(e9(n))}const yc=()=>x.jsx("span",{className:`${z}-blinking-cursor`,children:x.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),Np=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>x.jsx(uy,{remarkPlugins:[L9],rehypePlugins:[Tb],components:{h1:({children:o})=>x.jsx("h1",{className:W(e,`${z}-header h1`),children:o}),h2:({children:o})=>x.jsx("h2",{className:W(e,`${z}-header h2`),children:o}),h3:({children:o})=>x.jsx("h3",{className:W(e,`${z}-header h3`),children:o}),ul:({children:o})=>x.jsx("ul",{className:W(e,`${z}-ul`),children:o}),ol:({children:o})=>x.jsx("ol",{className:W(e,`${z}-ol`),children:o}),li:({children:o})=>x.jsx("li",{className:W(e,`${z}-li`),children:o}),a:({href:o,children:a})=>x.jsx(Cb,{globalClassName:e,openLinksInNewTab:t,href:o,children:a}),table:({children:o})=>x.jsx("div",{className:W(e,`${z}-table-container`),children:x.jsx("table",{className:W(e,`${z}-table`),children:o})}),thead:({children:o})=>x.jsx("thead",{className:W(e,`${z}-thead`),children:o}),tbody:({children:o})=>x.jsx("tbody",{className:W(e,`${z}-tbody`),children:o}),tr:({children:o})=>x.jsx("tr",{className:W(e,`${z}-tr`),children:o}),th:({children:o})=>x.jsx("th",{className:W(e,`${z}-th`),children:o}),td:({children:o})=>x.jsx("td",{className:W(e,`${z}-td`),children:o}),span:({className:o,children:a})=>o===`${z}-blinking-cursor`?x.jsx(yc,{}):x.jsx("span",{children:a})},children:r+(n?`<span className='${z}-blinking-cursor'></span>`:"")}),D9=({globalClassName:e,message:t})=>{const[n,r]=B.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,c=()=>{r(d=>!d)};return x.jsxs("div",{children:[x.jsxs("div",{className:W(e,`${z}-progress-message`,"standalone"),children:[x.jsx("span",{className:W(e,`${z}-message-icon`,"progress-icon","standalone"),children:x.jsx(F1,{})}),x.jsx("p",{className:W(e,`${z}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&x.jsxs(x.Fragment,{children:[x.jsx(_l,{className:W(e,`${z}-thought-context-button`),onClick:c,children:n?x.jsxs(x.Fragment,{children:["Hide ",x.jsx(Qk,{})]}):x.jsxs(x.Fragment,{children:["Context ",x.jsx(Jk,{})]})}),n&&x.jsx("div",{className:W(e,`${z}-thought-container`),children:a&&x.jsx("p",{className:W(e,`${z}-progress-thought`),children:t.thought})})]})]})},M9=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?x.jsx(D9,{globalClassName:e,message:t}):x.jsxs("div",{className:W(e,`${z}-progress-message`,"embedded"),title:t.message,children:[x.jsx("span",{className:W(e,`${z}-message-icon`,"progress-icon","embedded"),children:x.jsx(F1,{})}),x.jsx("i",{className:W(e,`${z}-progress-text`,"embedded"),children:t.message})]}),F9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return x.jsxs("div",{className:W(e,`${z}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&x.jsxs("div",{className:W(e,`${z}-refined-event-query`,{embedded:!n,standalone:n}),children:[x.jsx("span",{className:W(e,`${z}-message-icon`,`${z}-refined-event-icon`,{embedded:!n,standalone:n}),children:x.jsx(Zo,{role:"img"})}),x.jsx("p",{className:W(e,`${z}-text`,`${z}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),x.jsx(Np,{text:t.message})]})},tS=e=>{var d,f;const{configModule:t}=rt(),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:o={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(o).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}},bc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>x.jsx("span",{className:W(t,`${z}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),nS=({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),o=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var f;const d=((f=o[c])==null?void 0:f.join(", "))||"";return x.jsxs("div",{className:W(e,`${z}-facets`),children:[x.jsx("p",{className:W(e,`${z}-facet-category`),children:c}),x.jsx("p",{className:W(e,`${z}-facet-values`),children:d})]},c)})},au=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>x.jsx("span",{className:W(e,`${z}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),B9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=tS(t),c=new Date(o).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?x.jsxs("div",{className:W(e,`${z}-user-message standalone`),children:[x.jsxs("div",{className:W(e,`${z}-user-message-row standalone`),children:[d?x.jsx("img",{className:W(e,`${z}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):x.jsx("span",{className:W(e,`${z}-message-icon user-message-icon standalone`),children:x.jsx(U1,{})}),x.jsx("p",{className:W(e,`${z}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&x.jsx(bc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),x.jsx(nS,{globalClassName:e,facetFiltersList:a,message:t}),x.jsx(au,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):x.jsxs("div",{className:W(e,`${z}-user-message embedded`),children:[x.jsxs("div",{className:W(e,`${z}-user-message-row embedded`),children:[d?x.jsx("img",{className:W(e,`${z}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):x.jsx("span",{className:W(e,`${z}-message-icon user-message-icon embedded`),children:x.jsx(U1,{})}),x.jsx("p",{className:W(e,`${z}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&x.jsx(bc,{isWidgetStandalone:!1,filterCount:u})]}),x.jsx(au,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},U9=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>x.jsxs("div",{className:W(e,`${z}-user-search standalone`),children:[x.jsxs("div",{children:[x.jsxs("div",{className:W(e,`${z}-user-search-query standalone`),children:[d?x.jsx("img",{className:W(e,`${z}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):x.jsx("span",{className:W(e,`${z}-message-icon user-search-icon standalone`),children:x.jsx(Zo,{})}),x.jsx("p",{className:W(e,`${z}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&x.jsx(bc,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),x.jsx(nS,{globalClassName:e,facetFiltersList:u,message:a})]}),x.jsx(au,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),H9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=tS(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}=B.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(o){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:""}}},[o,r]);return m?n?x.jsx(U9,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:T,facetFiltersList:u,filterCount:c}):x.jsxs("div",{className:W(e,`${z}-user-search embedded`),children:[x.jsxs("div",{className:W(e,`${z}-user-search-query embedded`),children:[f?x.jsx("img",{className:W(e,`${z}-user-search-image embedded`),src:f,alt:T||m,loading:"lazy"}):x.jsx("span",{className:W(e,`${z}-message-icon user-search-icon embedded`),children:x.jsx(Zo,{})}),x.jsx("p",{className:W(e,`${z}-text bold embedded`),children:T||m}),u.length>0&&x.jsx(bc,{isWidgetStandalone:!1,filterCount:c})]}),x.jsx(au,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},rS=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:o,isWidgetStandalone:a,handleSuggestionClick:u})=>{var T;const{isLoading:c,isResponseLoading:d}=Ur(),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?x.jsx(B9,{globalClassName:t,isWidgetStandalone:a,message:e}):x.jsx(H9,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return x.jsx(F9,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return x.jsx(A8,{globalClassName:t,entryType:o,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return x.jsx(Np,{globalClassName:t,openLinksInNewTab:n,showIsLoading:f,text:e.message});case"error":return x.jsx(w8,{message:e,isWidgetStandalone:a});case"display_products":return x.jsx(x8,{message:e,isWidgetStandalone:a});case"progress":return x.jsx(M9,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return o==="ask_cim"?null:x.jsxs(x.Fragment,{children:[x.jsx("p",{className:W(t,`${z}-reset-message`),children:"This conversation has been reset."}),x.jsx("p",{className:W(t,`${z}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},z9=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:o}=rt(),{groupedMessages:a}=ar(),{entryType:u}=sr();return x.jsxs(x.Fragment,{children:[u==="ask_cim"&&x.jsx(_8,{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()),x.jsxs("div",{className:W(n,`${z}-message-group`,e?"standalone":"embedded"),children:[c.messages.length>0&&c.messages.map(p=>x.jsx("div",{className:`${z}-message-group-child`,children:x.jsx(rS,{id:p.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),x.jsx(au,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${c.eventSourceId}`)}else if(c.type==="individual"&&c.message)return x.jsx("div",{className:W(n,`${z}-message`,e?"standalone":"embedded",{error:c.message.name.includes("error")}),children:x.jsx(rS,{id:c.message.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:c.message,handleSuggestionClick:t})},c.message.id);return null})]})},j9=({isOpen:e}={})=>{const{messages:t}=Ur(),{autoScroll:n}=rt(),r=B.useRef(null);return B.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[t,n]),B.useEffect(()=>{e&&r.current&&r.current.scrollIntoView(!0)},[e]),r},$9={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},Op=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:o})=>{const a=j9({isOpen:e});return x.jsxs(x.Fragment,{children:[x.jsx(z9,{isWidgetStandalone:t,handleSuggestionClick:r}),n&&x.jsx("div",{style:F(F({},$9),o),children:x.jsx(yc,{})}),x.jsx("div",{ref:a})]})},iS=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=rt(),{copilot:r,isLoading:o,handleUserInput:a,handleSuggestion:u,resetConversation:c}=Ur();return Tp()?r?x.jsxs("div",{className:W(e,`${z}-container`,`${z}-embedded-chat`),style:t,children:[x.jsx("div",{className:W(e,`${z}-message-container`,`container-${n}`,"embedded"),children:x.jsx(Op,{isWidgetStandalone:!1,isLoading:o,handleSuggestionClick:u})}),x.jsx(Oh,{componentType:"chat",className:"embedded-chat",isLoading:o,onSubmit:a}),x.jsx("div",{className:W(`${z}-embedded-chat-menu`),children:x.jsxs(OM,{componentType:"chat",children:[x.jsx(w_,{componentType:"chat"}),x.jsx(Nb,{componentType:"chat",onClearChat:c})]})})]}):x.jsx("div",{children:"Loading Copilot..."}):null},oS=e=>{var d;const{children:t,disabled:n}=e,[r,o]=B.useState((d=e.container)==null?void 0:d.current),a=B.useSyncExternalStore(q9,()=>!1,()=>!0),{getRootNode:u}=hc();if(B.useEffect(()=>{o(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return x.jsx(x.Fragment,{children:t});const c=r!=null?r:V9(u);return x.jsx(x.Fragment,{children:B.Children.map(t,f=>Jo.createPortal(f,c))})},V9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return yo(n)?n:$r(t).body},q9=()=>()=>{},sS=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=rt(),{mode:r,status:o,dialogPosition:a,isDialogFullHeight:u,dialogWidth:c}=sr(),{copilot:d,isLoading:f,handleUserInput:p,handleSuggestion:m,resetConversation:T}=Ur(),y=Tp(),{isOpen:_}=o||{},w=r==="standalone",C=()=>{ui(!1)};return y?d?x.jsx(b_,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:y,children:x.jsx(oS,{children:x.jsx(gp,{className:W(e,`${z}-container`,`${z}-dialog`,a,u&&"full-height"),style:F(F({},t),c&&{width:c}),children:x.jsxs(pp,{className:W(e,`${z}-dialog-content`,{standalone:w,embedded:!w}),children:[x.jsx(x_,{componentType:"dialog",onClearChat:T,onClose:C}),x.jsx(mp,{className:W(e,`${z}-message-container`,`container-${n}`,{standalone:w,embedded:!w}),children:x.jsx(Op,{isWidgetStandalone:w,isLoading:f,isOpen:_,handleSuggestionClick:m})}),x.jsx(Oh,{componentType:"dialog",isLoading:f,onSubmit:p})]})})})}):x.jsx("div",{children:"Loading Copilot..."}):null},aS=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=rt(),{mode:r,status:o,isModalFullscreen:a}=sr(),{copilot:u,isLoading:c,handleUserInput:d,handleSuggestion:f,resetConversation:p}=Ur(),{isOpen:m}=o||{},T=r==="standalone",y=Tp(),_=({open:C})=>{ui(C)},w=()=>{ui(!1)};return y?u?x.jsx(b_,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:_,children:x.jsx(oS,{children:x.jsxs("div",{className:W(e,`${z}-modal-container`),style:t,children:[x.jsx(p_,{className:W(e,`${z}-modal-backdrop`)}),x.jsx(gp,{className:W(e,`${z}-container`,`${z}-modal`,{fullscreen:a,standalone:T,embedded:!T}),children:x.jsxs(pp,{className:W(e,`${z}-modal-content`,{standalone:T,embedded:!T}),children:[x.jsx(x_,{componentType:"modal",onClearChat:p,onClose:w}),x.jsx(mp,{className:W(e,`${z}-message-container`,`container-${n}`,{standalone:T,embedded:!T}),children:x.jsx(Op,{isWidgetStandalone:T,isLoading:c,isOpen:m,handleSuggestionClick:f,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),x.jsx(Oh,{componentType:"modal",isLoading:c,onSubmit:d})]})})]})})}):x.jsx("div",{children:"Loading Copilot..."}):null},Y9=()=>{const e=sr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?x.jsx(Xk,{}):t==="dialog"?x.jsx(sS,{}):t==="modal"?x.jsx(aS,{}):x.jsx(iS,{})},W9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:o}=Pf();B.useEffect(()=>{const a=u=>{const{property:c,value:d}=u.detail||{};!c||d===void 0||(c==="isOpen"&&e(d),c==="isInline"&&t(d),c==="elementId"&&n(d),c==="entryType"&&r(d),c==="params"&&o(d))};return ok(a),()=>{sk(a)}},[e,t,n,r,o])},G9=()=>{const{copilot:e}=ar(),{entryType:t,activePromptsId:n,params:r}=li(),{setIsInitialized:o,setActivePromptsId:a,setPromptsMessage:u,setResponseMessage:c,setIsResponseLoading:d}=Pf(),{getCopilotSuggestions:f}=A1();W9();const p=B.useCallback(_=>{if(!t||!_)return;f(_,t,C=>{a(C.id)})},[t,f,a]);B.useEffect(()=>{!e||!t||!r||p(r)},[e,t,r,p]);const m=B.useCallback(_=>{_.eventSourceId===n&&(u(_),a(_.id),o(!0))},[n,u,a,o]),T=B.useCallback(_=>{(_==null?void 0:_.eventSourceId)===n&&(c(_),d(!1))},[n,c,d]),y=B.useCallback(()=>{o(!0),d(!1)},[o,d]);return B.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},uS={copilot:"Ask Copilot",messaging:"Ask a question"},X9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=rt(),{placeholder:o,isResponseLoading:a}=li(),u=o||uS[r],[c,d]=B.useState(""),f=t||a,p=m=>{const T=c.trim();T&&(m.preventDefault(),e(T),d(""))};return x.jsxs("form",{className:W(n,`${z}-prompts-input-container`),name:`${z}-prompts-form`,onSubmit:p,children:[x.jsx("label",{htmlFor:`${z}-prompts-input`,"aria-label":u,children:x.jsx(hp,{className:W(n,`${z}-prompts-input-icon`)})}),x.jsx("input",{id:`${z}-prompts-input`,className:W(n,`${z}-prompts-input`),name:`${z}-prompts-input`,placeholder:u,type:"text",disabled:f,value:c,onChange:m=>d(m.target.value)}),x.jsx(ci,{className:W(n,`${z}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:x.jsx(Zo,{}),disabled:f})]})},K9=()=>{const{globalClassName:e,mode:t}=rt(),{placeholder:n}=li(),r=n||uS[t];return x.jsxs("div",{className:W(e,`${z}-prompts-header`),children:[x.jsx(hp,{className:W(e,`${z}-prompts-input-icon`),"aria-hidden":"true"}),x.jsx("span",{className:W(e,`${z}-prompts-header-text`),children:r})]})},lS=({label:e,disabled:t=!1,onClick:n})=>{var c;const{globalClassName:r,suggestionButtonConfig:o}=rt(),a=o==null?void 0:o.icon,u=(c=o==null?void 0:o.iconPosition)!=null?c:"left";return x.jsxs("button",{className:W(r,`${z}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&x.jsx(_p,{icon:a,className:`${z}-suggestion-button-icon`}),x.jsx("span",{children:e})]})},Q9="Ask me something else",J9=({label:e,disabled:t=!1})=>x.jsx(lS,{label:e||Q9,disabled:t,onClick:()=>ui(!0)}),Z9=({sendCopilotPrompt:e})=>{var _,w;const{globalClassName:t}=rt(),{promptsMessage:n,isResponseLoading:r,isInitialized:o,isInline:a,askElseButtonLabel:u,disableAskElseButton:c}=li(),d=o?(w=(_=n==null?void 0:n.suggestions)==null?void 0:_.map(C=>C.displayText.trim()).filter(Boolean))!=null?w:[]:[],f=o?Array.from(new Set(d)):[],p=!o,T=f.length>0&&!a&&!c,y=C=>()=>{const A=C.trim();A&&e(A)};return x.jsxs("div",{className:W(t,`${z}-prompts-button-group`),children:[p&&x.jsx(yc,{}),f.map(C=>x.jsx(lS,{label:C,disabled:r,onClick:y(C)},C)),T&&x.jsx(J9,{label:u,disabled:r})]})},eB=()=>{const{globalClassName:e}=rt(),{isInline:t,userPrompt:n}=li();return!n||!t?null:x.jsx("div",{className:W(e,`${z}-prompts-user-message-container`),children:x.jsx("p",{className:W(e,`${z}-prompts-user-message`),children:n})})},tB=()=>{const{globalClassName:e,openLinksInNewTab:t}=rt(),{isInline:n,responseMessage:r,isResponseLoading:o}=li();return!n||!r&&!o?null:o?x.jsx(yc,{}):r?x.jsx("div",{className:W(e,`${z}-prompts-response-container`,`${z}-message-container`),children:x.jsx(Np,{globalClassName:e,openLinksInNewTab:t,text:r.message})}):null},nB=()=>{const{globalClassName:e,themeVariables:t}=rt(),{connected:n,copilot:r}=ar(),{handleCopilotRequestAck:o}=Qo(),{status:{isOpen:a}}=sr(),{isOpen:u,isInline:c,elementId:d,entryType:f,params:p,promptsDisplay:m}=li(),T=m!=="buttons",y=m!=="input",{setActivePromptsId:_,setUserPrompt:w,setResponseMessage:C,setIsResponseLoading:A}=Pf(),[P,v]=B.useState(null);B.useEffect(()=>{if(!d||P)return;const Y=document.getElementById(d);Y&&v(Y)},[d,P]);const H=B.useCallback(Y=>{if(!r||!f||!p)return;const D=re=>{c?(C(null),w(Y),_(re.id),A(!0)):(a||ui(!0),o(re))},q={userPrompt:Y,clientContext:F({_cimEventSource:"prompts-extension"},c?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(q,D);break;case"search":r.search(F({searchParams:p},q),D);break;case"browse":r.browse(F({browseParams:p},q),D);break;case"pdp":r.productView(F(F({},p),q),D);break}},[r,c,f,p,a,_,C,w,A,o]);return!n||!u||!P||!f?null:Jo.createPortal(x.jsxs("div",{className:W(e,`${z}-prompts-extension-container`),style:t,children:[T&&x.jsx(X9,{onSubmit:H}),!T&&x.jsx(K9,{}),y&&x.jsx(Z9,{sendCopilotPrompt:H}),x.jsxs("div",{className:W(e,`${z}-prompts-extension-messages-container`),children:[x.jsx(eB,{}),x.jsx(tB,{})]})]}),P)},rB=()=>x.jsxs(x.Fragment,{children:[x.jsx(G9,{}),x.jsx(nB,{})]}),Ip=e=>x.jsxs(v1,pe(F({},e),{children:[x.jsx(Y9,{}),x.jsx(rB,{})]}));var Tc={},cS;function iB(){if(cS)return Tc;cS=1;var e=O1();return Tc.createRoot=e.createRoot,Tc.hydrateRoot=e.hydrateRoot,Tc}var dS=iB();const oB=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=mn(o,["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&&(Ko(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=dS.createRoot(T))==null||p.render(x.jsx(Ip,F({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ko(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},sB=r=>{var o=r,{timeout:e,elementId:t}=o,n=mn(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Ko(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Ko(!0,"warn","Container element not found for id:",t),Ko(!0,"warn","Beginning observation for element"),oB(F({elementId:t,timeout:e},n));return}dS.createRoot(a).render(x.jsx(Ip,F({},n)))},aB={search:yk,browse:ek,pdp:{setPdpContext:c1,updatePdpProductId:nk,updatePdpLink:rk},components:{setEntryType:_a,toggleWidgetOpen:ui,toggleWidgetMinimized:gl,toggleModalFullscreen:vf,setWidgetType:El,setWidgetDialogPosition:Cf,togglePromptsExtensionOpen:f1,togglePromptsExtensionInline:h1,loadPromptsComponent:dk,getAskCimPrompts:ak,getSearchPrompts:uk,getBrowsePrompts:lk,getProductViewPrompts:ck},session:fk},uB=()=>Object.freeze({search:Object.freeze(Tt.state),browse:Object.freeze(lt.state),pdp:Object.freeze(Sr.state),isConnected:et.state.connected,isOpen:et.isOpen,entryType:et.entryType});De.CopilotDialog=sS,De.CopilotEmbed=iS,De.CopilotModal=aS,De.CopilotWidget=Ip,De.CopilotWidgetProvider=v1,De.eventHandlers=aB,De.injectCopilotWidget=sB,De.state=uB,De.useCopilot=Ur,Object.defineProperty(De,Symbol.toStringTag,{value:"Module"})}));
|
|
46
|
+
`))}function d(y,_,w,C){const A=w.enter("tableCell"),P=w.enter("phrasing"),v=w.containerPhrasing(y,pe(F({},C),{before:a,after:a}));return P(),A(),v}function f(y,_){return uF(y,{align:_,alignDelimiters:r,padding:n,stringLength:o})}function p(y,_,w){const C=y.children;let A=-1;const P=[],v=_.enter("table");for(;++A<C.length;)P[A]=m(C[A],_,w);return v(),P}function m(y,_,w){const C=y.children;let A=-1;const P=[],v=_.enter("tableRow");for(;++A<C.length;)P[A]=d(C[A],y,_,w);return v(),P}function T(y,_,w){let C=$_.inlineCode(y,_,w);return w.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function XF(){return{exit:{taskListCheckValueChecked:q_,taskListCheckValueUnchecked:q_,paragraph:QF}}}function KF(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:JF}}}function q_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function QF(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,u;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function JF(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=$_.listItem(e,t,n,F(F({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function ZF(){return[O8(),J8(),nF(),jF(),XF()]}function e9(e){return{extensions:[I8(),Z8(e),rF(),GF(e),KF()]}}const t9={tokenize:a9,partial:!0},Y_={tokenize:u9,partial:!0},W_={tokenize:l9,partial:!0},G_={tokenize:c9,partial:!0},n9={tokenize:d9,partial:!0},X_={name:"wwwAutolink",tokenize:o9,previous:Q_},K_={name:"protocolAutolink",tokenize:s9,previous:J_},gi={name:"emailAutolink",tokenize:i9,previous:Z_},Kr={};function r9(){return{text:Kr}}let Ao=48;for(;Ao<123;)Kr[Ao]=gi,Ao++,Ao===58?Ao=65:Ao===91&&(Ao=97);Kr[43]=gi,Kr[45]=gi,Kr[46]=gi,Kr[95]=gi,Kr[72]=[gi,K_],Kr[104]=[gi,K_],Kr[87]=[gi,X_],Kr[119]=[gi,X_];function i9(e,t,n){const r=this;let o,a;return u;function u(m){return!kp(m)||!Z_.call(r,r.previous)||Pp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return kp(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(n9,p,f)(m):m===45||m===95||Tn(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),o=!0,d}function p(m){return a&&o&&kn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function o9(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!Q_.call(r,r.previous)||Pp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(t9,e.attempt(Y_,e.attempt(W_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function s9(e,t,n){const r=this;let o="",a=!1;return u;function u(m){return(m===72||m===104)&&J_.call(r,r.previous)&&!Pp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(kn(m)&&o.length<5)return o+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const T=o.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||wl(m)||ht(m)||co(m)||Al(m)?n(m):e.attempt(Y_,e.attempt(W_,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function a9(e,t,n){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function u9(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(G_,d,c)(f):f===null||ht(f)||co(f)||f!==45&&Al(f)?d(f):(a=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(o=r,r=void 0),e.consume(f),u}function d(f){return o||r||!a?n(f):t(f)}}function l9(e,t){let n=0,r=0;return o;function o(u){return u===40?(n++,e.consume(u),o):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(G_,t,a)(u):u===null||ht(u)||co(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function c9(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||ht(c)||co(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||ht(c)||co(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 d9(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return Tn(a)?n(a):t(a)}}function Q_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ht(e)}function J_(e){return!kn(e)}function Z_(e){return!(e===47||kp(e))}function kp(e){return e===43||e===45||e===46||e===95||Tn(e)}function Pp(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 f9={tokenize:T9,partial:!0};function h9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:E9,continuation:{tokenize:y9},exit:b9}},text:{91:{name:"gfmFootnoteCall",tokenize:g9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:p9,resolveTo:m9}}}}function p9(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const f=xr(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 m9(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function g9(e,t,n){const r=this,o=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 o.includes(xr(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 E9(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(_)}function p(_){if(u>999||_===93&&!c||_===null||_===91||ht(_))return n(_);if(_===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=xr(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return ht(_)||(c=!0),u++,e.consume(_),_===92?m:p}function m(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function T(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),o.includes(a)||o.push(a),it(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function y9(e,t,n){return e.check(Na,t,e.attempt(f9,t,n))}function b9(e){e.exit("gfmFootnoteDefinition")}function T9(e,t,n){const r=this;return it(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function _9(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let 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&&Xn(T,T.length,0,vl(y,u.slice(f+1,d),c)),Xn(T,T.length,0,[["exit",m,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),Xn(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=os(f);if(_===126)return m>1?d(_):(u.consume(_),m++,y);if(m<2&&!n)return d(_);const C=u.exit("strikethroughSequenceTemporary"),A=os(_);return C._open=!A||A===2&&!!w,C._close=!w||w===2&&!!A,c(_)}}}class S9{constructor(){this.map=[]}add(t,n,r){x9(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function x9(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function w9(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function A9(){return{flow:{null:{name:"table",tokenize:v9,resolveAll:C9}}}}function v9(e,t,n){const r=this;let o=0,a=0,u;return c;function c(V){let oe=r.events.length-1;for(;oe>-1;){const ne=r.events[oe][1].type;if(ne==="lineEnding"||ne==="linePrefix")oe--;else break}const ce=oe>-1?r.events[oe][1].type:null,de=ce==="tableHead"||ce==="tableRow"?D:d;return de===D&&r.parser.lazy[r.now().line]?n(V):de(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):tt(V)?it(e,p,"whitespace")(V):(a+=1,u&&(u=!1,o+=1),V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(V)))}function m(V){return V===null||V===124||ht(V)?(e.exit("data"),p(V)):(e.consume(V),V===92?T:m)}function T(V){return V===92||V===124?(e.consume(V),m):m(V)}function y(V){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(V):(e.enter("tableDelimiterRow"),u=!1,tt(V)?it(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):Y(V)}function w(V){return tt(V)?it(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):Y(V)}function A(V){return V===45?(e.enter("tableDelimiterFiller"),P(V)):Y(V)}function P(V){return V===45?(e.consume(V),P):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 tt(V)?it(e,H,"whitespace")(V):H(V)}function H(V){return V===124?_(V):V===null||Ue(V)?!u||o!==a?Y(V):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(V)):Y(V)}function Y(V){return n(V)}function D(V){return e.enter("tableRow"),q(V)}function q(V){return V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),q):V===null||Ue(V)?(e.exit("tableRow"),t(V)):tt(V)?it(e,q,"whitespace")(V):(e.enter("data"),re(V))}function re(V){return V===null||V===124||ht(V)?(e.exit("data"),q(V)):(e.consume(V),V===92?me:re)}function me(V){return V===92||V===124?(e.consume(V),re):re(V)}}function C9(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,p,m;const T=new S9;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(eS(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]])),o=_.type==="tableDelimiterRow"?2:p?3:1):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=Ec(T,t,a,o,void 0,m),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=Ec(T,t,a,o,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=Ec(T,t,a,o,n,m)):u[1]!==0&&(m=Ec(T,t,u,o,n,m)),o=0):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&eS(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=w9(t.events,n))}return e}function Ec(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},Rs(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Rs(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=Rs(t.events,n[2]),p=Rs(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 o!==void 0&&(a.end=Object.assign({},Rs(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function eS(e,t,n,r,o){const a=[],u=Rs(t.events,n);o&&(o.end=Object.assign({},u),a.push(["exit",o,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function Rs(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const k9={name:"tasklistCheck",tokenize:N9};function P9(){return{text:{91:k9}}}function N9(e,t,n){const r=this;return o;function o(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return 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):tt(d)?e.check({tokenize:O9},t,n)(d):n(d)}}function O9(e,t,n){return it(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function I9(e){return yE([r9(),h9(),_9(e),A9(),P9()])}const R9={};function L9(e){const t=this,n=e||R9,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(I9(n)),a.push(ZF()),u.push(e9(n))}const yc=()=>x.jsx("span",{className:`${z}-blinking-cursor`,children:x.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),Np=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>x.jsx(uy,{remarkPlugins:[L9],rehypePlugins:[Tb],components:{h1:({children:o})=>x.jsx("h1",{className:W(e,`${z}-header h1`),children:o}),h2:({children:o})=>x.jsx("h2",{className:W(e,`${z}-header h2`),children:o}),h3:({children:o})=>x.jsx("h3",{className:W(e,`${z}-header h3`),children:o}),ul:({children:o})=>x.jsx("ul",{className:W(e,`${z}-ul`),children:o}),ol:({children:o})=>x.jsx("ol",{className:W(e,`${z}-ol`),children:o}),li:({children:o})=>x.jsx("li",{className:W(e,`${z}-li`),children:o}),a:({href:o,children:a})=>x.jsx(Cb,{globalClassName:e,openLinksInNewTab:t,href:o,children:a}),table:({children:o})=>x.jsx("div",{className:W(e,`${z}-table-container`),children:x.jsx("table",{className:W(e,`${z}-table`),children:o})}),thead:({children:o})=>x.jsx("thead",{className:W(e,`${z}-thead`),children:o}),tbody:({children:o})=>x.jsx("tbody",{className:W(e,`${z}-tbody`),children:o}),tr:({children:o})=>x.jsx("tr",{className:W(e,`${z}-tr`),children:o}),th:({children:o})=>x.jsx("th",{className:W(e,`${z}-th`),children:o}),td:({children:o})=>x.jsx("td",{className:W(e,`${z}-td`),children:o}),span:({className:o,children:a})=>o===`${z}-blinking-cursor`?x.jsx(yc,{}):x.jsx("span",{children:a})},children:r+(n?`<span className='${z}-blinking-cursor'></span>`:"")}),D9=({globalClassName:e,message:t})=>{const[n,r]=B.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,c=()=>{r(d=>!d)};return x.jsxs("div",{children:[x.jsxs("div",{className:W(e,`${z}-progress-message`,"standalone"),children:[x.jsx("span",{className:W(e,`${z}-message-icon`,"progress-icon","standalone"),children:x.jsx(F1,{})}),x.jsx("p",{className:W(e,`${z}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&x.jsxs(x.Fragment,{children:[x.jsx(_l,{className:W(e,`${z}-thought-context-button`),onClick:c,children:n?x.jsxs(x.Fragment,{children:["Hide ",x.jsx(Qk,{})]}):x.jsxs(x.Fragment,{children:["Context ",x.jsx(Jk,{})]})}),n&&x.jsx("div",{className:W(e,`${z}-thought-container`),children:a&&x.jsx("p",{className:W(e,`${z}-progress-thought`),children:t.thought})})]})]})},M9=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?x.jsx(D9,{globalClassName:e,message:t}):x.jsxs("div",{className:W(e,`${z}-progress-message`,"embedded"),title:t.message,children:[x.jsx("span",{className:W(e,`${z}-message-icon`,"progress-icon","embedded"),children:x.jsx(F1,{})}),x.jsx("i",{className:W(e,`${z}-progress-text`,"embedded"),children:t.message})]}),F9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return x.jsxs("div",{className:W(e,`${z}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&x.jsxs("div",{className:W(e,`${z}-refined-event-query`,{embedded:!n,standalone:n}),children:[x.jsx("span",{className:W(e,`${z}-message-icon`,`${z}-refined-event-icon`,{embedded:!n,standalone:n}),children:x.jsx(Zo,{role:"img"})}),x.jsx("p",{className:W(e,`${z}-text`,`${z}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),x.jsx(Np,{text:t.message})]})},tS=e=>{var d,f;const{configModule:t}=rt(),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:o={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(o).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}},bc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>x.jsx("span",{className:W(t,`${z}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),nS=({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),o=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var f;const d=((f=o[c])==null?void 0:f.join(", "))||"";return x.jsxs("div",{className:W(e,`${z}-facets`),children:[x.jsx("p",{className:W(e,`${z}-facet-category`),children:c}),x.jsx("p",{className:W(e,`${z}-facet-values`),children:d})]},c)})},au=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>x.jsx("span",{className:W(e,`${z}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),B9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=tS(t),c=new Date(o).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?x.jsxs("div",{className:W(e,`${z}-user-message standalone`),children:[x.jsxs("div",{className:W(e,`${z}-user-message-row standalone`),children:[d?x.jsx("img",{className:W(e,`${z}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):x.jsx("span",{className:W(e,`${z}-message-icon user-message-icon standalone`),children:x.jsx(U1,{})}),x.jsx("p",{className:W(e,`${z}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&x.jsx(bc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),x.jsx(nS,{globalClassName:e,facetFiltersList:a,message:t}),x.jsx(au,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):x.jsxs("div",{className:W(e,`${z}-user-message embedded`),children:[x.jsxs("div",{className:W(e,`${z}-user-message-row embedded`),children:[d?x.jsx("img",{className:W(e,`${z}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):x.jsx("span",{className:W(e,`${z}-message-icon user-message-icon embedded`),children:x.jsx(U1,{})}),x.jsx("p",{className:W(e,`${z}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&x.jsx(bc,{isWidgetStandalone:!1,filterCount:u})]}),x.jsx(au,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},U9=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>x.jsxs("div",{className:W(e,`${z}-user-search standalone`),children:[x.jsxs("div",{children:[x.jsxs("div",{className:W(e,`${z}-user-search-query standalone`),children:[d?x.jsx("img",{className:W(e,`${z}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):x.jsx("span",{className:W(e,`${z}-message-icon user-search-icon standalone`),children:x.jsx(Zo,{})}),x.jsx("p",{className:W(e,`${z}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&x.jsx(bc,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),x.jsx(nS,{globalClassName:e,facetFiltersList:u,message:a})]}),x.jsx(au,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),H9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=tS(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}=B.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(o){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:""}}},[o,r]);return m?n?x.jsx(U9,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:T,facetFiltersList:u,filterCount:c}):x.jsxs("div",{className:W(e,`${z}-user-search embedded`),children:[x.jsxs("div",{className:W(e,`${z}-user-search-query embedded`),children:[f?x.jsx("img",{className:W(e,`${z}-user-search-image embedded`),src:f,alt:T||m,loading:"lazy"}):x.jsx("span",{className:W(e,`${z}-message-icon user-search-icon embedded`),children:x.jsx(Zo,{})}),x.jsx("p",{className:W(e,`${z}-text bold embedded`),children:T||m}),u.length>0&&x.jsx(bc,{isWidgetStandalone:!1,filterCount:c})]}),x.jsx(au,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},rS=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:o,isWidgetStandalone:a,handleSuggestionClick:u})=>{var T;const{isLoading:c,isResponseLoading:d}=Ur(),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?x.jsx(B9,{globalClassName:t,isWidgetStandalone:a,message:e}):x.jsx(H9,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return x.jsx(F9,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return x.jsx(A8,{globalClassName:t,entryType:o,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return x.jsx(Np,{globalClassName:t,openLinksInNewTab:n,showIsLoading:f,text:e.message});case"error":return x.jsx(w8,{message:e,isWidgetStandalone:a});case"display_products":return x.jsx(x8,{message:e,isWidgetStandalone:a});case"progress":return x.jsx(M9,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return o==="ask_cim"?null:x.jsxs(x.Fragment,{children:[x.jsx("p",{className:W(t,`${z}-reset-message`),children:"This conversation has been reset."}),x.jsx("p",{className:W(t,`${z}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},z9=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:o}=rt(),{groupedMessages:a}=ar(),{entryType:u}=sr();return x.jsxs(x.Fragment,{children:[u==="ask_cim"&&x.jsx(_8,{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()),x.jsxs("div",{className:W(n,`${z}-message-group`,e?"standalone":"embedded"),children:[c.messages.length>0&&c.messages.map(p=>x.jsx("div",{className:`${z}-message-group-child`,children:x.jsx(rS,{id:p.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),x.jsx(au,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${c.eventSourceId}`)}else if(c.type==="individual"&&c.message)return x.jsx("div",{className:W(n,`${z}-message`,e?"standalone":"embedded",{error:c.message.name.includes("error")}),children:x.jsx(rS,{id:c.message.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:c.message,handleSuggestionClick:t})},c.message.id);return null})]})},j9=({isOpen:e}={})=>{const{messages:t}=Ur(),{autoScroll:n}=rt(),r=B.useRef(null);return B.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[t,n]),B.useEffect(()=>{e&&r.current&&r.current.scrollIntoView(!0)},[e]),r},$9={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},Op=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:o})=>{const a=j9({isOpen:e});return x.jsxs(x.Fragment,{children:[x.jsx(z9,{isWidgetStandalone:t,handleSuggestionClick:r}),n&&x.jsx("div",{style:F(F({},$9),o),children:x.jsx(yc,{})}),x.jsx("div",{ref:a})]})},iS=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=rt(),{copilot:r,isLoading:o,handleUserInput:a,handleSuggestion:u,resetConversation:c}=Ur();return Tp()?r?x.jsxs("div",{className:W(e,`${z}-container`,`${z}-embedded-chat`),style:t,children:[x.jsx("div",{className:W(e,`${z}-message-container`,`container-${n}`,"embedded"),children:x.jsx(Op,{isWidgetStandalone:!1,isLoading:o,handleSuggestionClick:u})}),x.jsx(Oh,{componentType:"chat",className:"embedded-chat",isLoading:o,onSubmit:a}),x.jsx("div",{className:W(`${z}-embedded-chat-menu`),children:x.jsxs(OM,{componentType:"chat",children:[x.jsx(w_,{componentType:"chat"}),x.jsx(Nb,{componentType:"chat",onClearChat:c})]})})]}):x.jsx("div",{children:"Loading Copilot..."}):null},oS=e=>{var d;const{children:t,disabled:n}=e,[r,o]=B.useState((d=e.container)==null?void 0:d.current),a=B.useSyncExternalStore(q9,()=>!1,()=>!0),{getRootNode:u}=hc();if(B.useEffect(()=>{o(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return x.jsx(x.Fragment,{children:t});const c=r!=null?r:V9(u);return x.jsx(x.Fragment,{children:B.Children.map(t,f=>Jo.createPortal(f,c))})},V9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return yo(n)?n:$r(t).body},q9=()=>()=>{},sS=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=rt(),{mode:r,status:o,dialogPosition:a,isDialogFullHeight:u,dialogWidth:c}=sr(),{copilot:d,isLoading:f,handleUserInput:p,handleSuggestion:m,resetConversation:T}=Ur(),y=Tp(),{isOpen:_}=o||{},w=r==="standalone",C=()=>{ui(!1)};return y?d?x.jsx(b_,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:y,children:x.jsx(oS,{children:x.jsx(gp,{className:W(e,`${z}-container`,`${z}-dialog`,a,u&&"full-height"),style:F(F({},t),c&&{width:c}),children:x.jsxs(pp,{className:W(e,`${z}-dialog-content`,{standalone:w,embedded:!w}),children:[x.jsx(x_,{componentType:"dialog",onClearChat:T,onClose:C}),x.jsx(mp,{className:W(e,`${z}-message-container`,`container-${n}`,{standalone:w,embedded:!w}),children:x.jsx(Op,{isWidgetStandalone:w,isLoading:f,isOpen:_,handleSuggestionClick:m})}),x.jsx(Oh,{componentType:"dialog",isLoading:f,onSubmit:p})]})})})}):x.jsx("div",{children:"Loading Copilot..."}):null},aS=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=rt(),{mode:r,status:o,isModalFullscreen:a}=sr(),{copilot:u,isLoading:c,handleUserInput:d,handleSuggestion:f,resetConversation:p}=Ur(),{isOpen:m}=o||{},T=r==="standalone",y=Tp(),_=({open:C})=>{ui(C)},w=()=>{ui(!1)};return y?u?x.jsx(b_,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:_,children:x.jsx(oS,{children:x.jsxs("div",{className:W(e,`${z}-modal-container`),style:t,children:[x.jsx(p_,{className:W(e,`${z}-modal-backdrop`)}),x.jsx(gp,{className:W(e,`${z}-container`,`${z}-modal`,{fullscreen:a,standalone:T,embedded:!T}),children:x.jsxs(pp,{className:W(e,`${z}-modal-content`,{standalone:T,embedded:!T}),children:[x.jsx(x_,{componentType:"modal",onClearChat:p,onClose:w}),x.jsx(mp,{className:W(e,`${z}-message-container`,`container-${n}`,{standalone:T,embedded:!T}),children:x.jsx(Op,{isWidgetStandalone:T,isLoading:c,isOpen:m,handleSuggestionClick:f,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),x.jsx(Oh,{componentType:"modal",isLoading:c,onSubmit:d})]})})]})})}):x.jsx("div",{children:"Loading Copilot..."}):null},Y9=()=>{const e=sr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?x.jsx(Xk,{}):t==="dialog"?x.jsx(sS,{}):t==="modal"?x.jsx(aS,{}):x.jsx(iS,{})},W9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:o}=Pf();B.useEffect(()=>{const a=u=>{const{property:c,value:d}=u.detail||{};!c||d===void 0||(c==="isOpen"&&e(d),c==="isInline"&&t(d),c==="elementId"&&n(d),c==="entryType"&&r(d),c==="params"&&o(d))};return ok(a),()=>{sk(a)}},[e,t,n,r,o])},G9=()=>{const{copilot:e}=ar(),{entryType:t,activePromptsId:n,params:r}=li(),{setIsInitialized:o,setActivePromptsId:a,setPromptsMessage:u,setResponseMessage:c,setIsResponseLoading:d}=Pf(),{getCopilotSuggestions:f}=A1();W9();const p=B.useCallback(_=>{if(!t||!_)return;f(_,t,C=>{a(C.id)})},[t,f,a]);B.useEffect(()=>{!e||!t||!r||p(r)},[e,t,r,p]);const m=B.useCallback(_=>{_.eventSourceId===n&&(u(_),a(_.id),o(!0))},[n,u,a,o]),T=B.useCallback(_=>{(_==null?void 0:_.eventSourceId)===n&&(c(_),d(!1))},[n,c,d]),y=B.useCallback(()=>{o(!0),d(!1)},[o,d]);return B.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},uS={copilot:"Ask Copilot",messaging:"Ask a question"},X9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=rt(),{placeholder:o,isResponseLoading:a}=li(),u=o||uS[r],[c,d]=B.useState(""),f=t||a,p=m=>{const T=c.trim();T&&(m.preventDefault(),e(T),d(""))};return x.jsxs("form",{className:W(n,`${z}-prompts-input-container`),name:`${z}-prompts-form`,onSubmit:p,children:[x.jsx("label",{htmlFor:`${z}-prompts-input`,"aria-label":u,children:x.jsx(hp,{className:W(n,`${z}-prompts-input-icon`)})}),x.jsx("input",{id:`${z}-prompts-input`,className:W(n,`${z}-prompts-input`),name:`${z}-prompts-input`,placeholder:u,type:"text",disabled:f,value:c,onChange:m=>d(m.target.value)}),x.jsx(ci,{className:W(n,`${z}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:x.jsx(Zo,{}),disabled:f})]})},K9=()=>{const{globalClassName:e,mode:t}=rt(),{placeholder:n}=li(),r=n||uS[t];return x.jsxs("div",{className:W(e,`${z}-prompts-header`),children:[x.jsx(hp,{className:W(e,`${z}-prompts-input-icon`),"aria-hidden":"true"}),x.jsx("span",{className:W(e,`${z}-prompts-header-text`),children:r})]})},lS=({label:e,disabled:t=!1,onClick:n})=>{var c;const{globalClassName:r,suggestionButtonConfig:o}=rt(),a=o==null?void 0:o.icon,u=(c=o==null?void 0:o.iconPosition)!=null?c:"left";return x.jsxs("button",{className:W(r,`${z}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&x.jsx(_p,{icon:a,className:`${z}-suggestion-button-icon`}),x.jsx("span",{children:e})]})},Q9="Ask me something else",J9=({label:e,disabled:t=!1})=>x.jsx(lS,{label:e||Q9,disabled:t,onClick:()=>ui(!0)}),Z9=({sendCopilotPrompt:e})=>{var _,w;const{globalClassName:t}=rt(),{promptsMessage:n,isResponseLoading:r,isInitialized:o,isInline:a,askElseButtonLabel:u,disableAskElseButton:c}=li(),d=o?(w=(_=n==null?void 0:n.suggestions)==null?void 0:_.map(C=>C.displayText.trim()).filter(Boolean))!=null?w:[]:[],f=o?Array.from(new Set(d)):[],p=!o,T=f.length>0&&!a&&!c,y=C=>()=>{const A=C.trim();A&&e(A)};return x.jsxs("div",{className:W(t,`${z}-prompts-button-group`),children:[p&&x.jsx(yc,{}),f.map(C=>x.jsx(lS,{label:C,disabled:r,onClick:y(C)},C)),T&&x.jsx(J9,{label:u,disabled:r})]})},eB=()=>{const{globalClassName:e}=rt(),{isInline:t,userPrompt:n}=li();return!n||!t?null:x.jsx("div",{className:W(e,`${z}-prompts-user-message-container`),children:x.jsx("p",{className:W(e,`${z}-prompts-user-message`),children:n})})},tB=()=>{const{globalClassName:e,openLinksInNewTab:t}=rt(),{isInline:n,responseMessage:r,isResponseLoading:o}=li();return!n||!r&&!o?null:o?x.jsx(yc,{}):r?x.jsx("div",{className:W(e,`${z}-prompts-response-container`,`${z}-message-container`),children:x.jsx(Np,{globalClassName:e,openLinksInNewTab:t,text:r.message})}):null},nB=()=>{const{globalClassName:e,themeVariables:t}=rt(),{connected:n,copilot:r}=ar(),{handleCopilotRequestAck:o}=Qo(),{status:{isOpen:a}}=sr(),{isOpen:u,isInline:c,elementId:d,entryType:f,params:p,promptsDisplay:m}=li(),T=m!=="buttons",y=m!=="input",{setActivePromptsId:_,setUserPrompt:w,setResponseMessage:C,setIsResponseLoading:A}=Pf(),[P,v]=B.useState(null);B.useEffect(()=>{if(!d||P)return;const Y=document.getElementById(d);Y&&v(Y)},[d,P]);const H=B.useCallback(Y=>{if(!r||!f||!p)return;const D=re=>{c?(C(null),w(Y),_(re.id),A(!0)):(a||ui(!0),o(re))},q={userPrompt:Y,clientContext:F({_cimEventSource:"prompts-extension"},c?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(q,D);break;case"search":r.search(F({searchParams:p},q),D);break;case"browse":r.browse(F({browseParams:p},q),D);break;case"pdp":r.productView(F(F({},p),q),D);break}},[r,c,f,p,a,_,C,w,A,o]);return!n||!u||!P||!f?null:Jo.createPortal(x.jsxs("div",{className:W(e,`${z}-prompts-extension-container`),style:t,children:[T&&x.jsx(X9,{onSubmit:H}),!T&&x.jsx(K9,{}),y&&x.jsx(Z9,{sendCopilotPrompt:H}),x.jsxs("div",{className:W(e,`${z}-prompts-extension-messages-container`),children:[x.jsx(eB,{}),x.jsx(tB,{})]})]}),P)},rB=()=>x.jsxs(x.Fragment,{children:[x.jsx(G9,{}),x.jsx(nB,{})]}),Ip=e=>x.jsxs(v1,pe(F({},e),{children:[x.jsx(Y9,{}),x.jsx(rB,{})]}));var Tc={},cS;function iB(){if(cS)return Tc;cS=1;var e=O1();return Tc.createRoot=e.createRoot,Tc.hydrateRoot=e.hydrateRoot,Tc}var dS=iB();const oB=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=mn(o,["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&&(Ko(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=dS.createRoot(T))==null||p.render(x.jsx(Ip,F({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ko(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},sB=r=>{var o=r,{timeout:e,elementId:t}=o,n=mn(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Ko(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Ko(!0,"warn","Container element not found for id:",t),Ko(!0,"warn","Beginning observation for element"),oB(F({elementId:t,timeout:e},n));return}dS.createRoot(a).render(x.jsx(Ip,F({},n)))},aB={search:yk,browse:ek,pdp:{setPdpContext:c1,updatePdpProductId:nk,updatePdpLink:rk},components:{setEntryType:_a,toggleWidgetOpen:ui,toggleWidgetMinimized:gl,toggleModalFullscreen:vf,setWidgetType:El,setWidgetDialogPosition:Cf,togglePromptsExtensionOpen:f1,togglePromptsExtensionInline:h1,loadPromptsComponent:dk,getAskCimPrompts:ak,getSearchPrompts:uk,getBrowsePrompts:lk,getProductViewPrompts:ck},session:fk},uB=()=>Object.freeze({search:Object.freeze(Tt.state),browse:Object.freeze(lt.state),pdp:Object.freeze(Sr.state),isConnected:et.state.connected,isOpen:et.isOpen,entryType:et.entryType});De.CopilotDialog=sS,De.CopilotEmbed=iS,De.CopilotModal=aS,De.CopilotWidget=Ip,De.CopilotWidgetProvider=v1,De.eventHandlers=aB,De.injectCopilotWidget=sB,De.state=uB,De.useCopilot=Ur,Object.defineProperty(De,Symbol.toStringTag,{value:"Module"})}));
|