@cimulate/copilot-widget 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,43 +1,46 @@
|
|
|
1
|
-
(function(Ie,Fe){typeof exports=="object"&&typeof module!="undefined"?Fe(exports):typeof define=="function"&&define.amd?define(["exports"],Fe):(Ie=typeof globalThis!="undefined"?globalThis:Ie||self,Fe(Ie["cimulate-copilot-widget"]={}))})(this,(function(Ie){"use strict";var ZF=Object.defineProperty,eB=Object.defineProperties;var tB=Object.getOwnPropertyDescriptors;var id=Object.getOwnPropertySymbols;var Fx=Object.prototype.hasOwnProperty,Bx=Object.prototype.propertyIsEnumerable;var Fo=(Ie,Fe)=>(Fe=Symbol[Ie])?Fe:Symbol.for("Symbol."+Ie),nB=Ie=>{throw TypeError(Ie)},sd=Math.pow,$m=(Ie,Fe,Ke)=>Fe in Ie?ZF(Ie,Fe,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):Ie[Fe]=Ke,H=(Ie,Fe)=>{for(var Ke in Fe||(Fe={}))Fx.call(Fe,Ke)&&$m(Ie,Ke,Fe[Ke]);if(id)for(var Ke of id(Fe))Bx.call(Fe,Ke)&&$m(Ie,Ke,Fe[Ke]);return Ie},Te=(Ie,Fe)=>eB(Ie,tB(Fe));var nn=(Ie,Fe)=>{var Ke={};for(var ct in Ie)Fx.call(Ie,ct)&&Fe.indexOf(ct)<0&&(Ke[ct]=Ie[ct]);if(Ie!=null&&id)for(var ct of id(Ie))Fe.indexOf(ct)<0&&Bx.call(Ie,ct)&&(Ke[ct]=Ie[ct]);return Ke};var ve=(Ie,Fe,Ke)=>$m(Ie,typeof Fe!="symbol"?Fe+"":Fe,Ke);var rt=(Ie,Fe,Ke)=>new Promise((ct,kt)=>{var bt=It=>{try{$t(Ke.next(It))}catch(yn){kt(yn)}},Pe=It=>{try{$t(Ke.throw(It))}catch(yn){kt(yn)}},$t=It=>It.done?ct(It.value):Promise.resolve(It.value).then(bt,Pe);$t((Ke=Ke.apply(Ie,Fe)).next())}),Hr=function(Ie,Fe){this[0]=Ie,this[1]=Fe},od=(Ie,Fe,Ke)=>{var ct=(Pe,$t,It,yn)=>{try{var As=Ke[Pe]($t),Bo=($t=As.value)instanceof Hr,ad=As.done;Promise.resolve(Bo?$t[0]:$t).then(rr=>Bo?ct(Pe==="return"?Pe:"next",$t[1]?{done:rr.done,value:rr.value}:rr,It,yn):It({value:rr,done:ad})).catch(rr=>ct("throw",rr,It,yn))}catch(rr){yn(rr)}},kt=Pe=>bt[Pe]=$t=>new Promise((It,yn)=>ct(Pe,$t,It,yn)),bt={};return Ke=Ke.apply(Ie,Fe),bt[Fo("asyncIterator")]=()=>bt,kt("next"),kt("throw"),kt("return"),bt},Vm=Ie=>{var Fe=Ie[Fo("asyncIterator")],Ke=!1,ct,kt={};return Fe==null?(Fe=Ie[Fo("iterator")](),ct=bt=>kt[bt]=Pe=>Fe[bt](Pe)):(Fe=Fe.call(Ie),ct=bt=>kt[bt]=Pe=>{if(Ke){if(Ke=!1,bt==="throw")throw Pe;return Pe}return Ke=!0,{done:!1,value:new Hr(new Promise($t=>{var It=Fe[bt](Pe);It instanceof Object||nB("Object expected"),$t(It)}),1)}}),kt[Fo("iterator")]=()=>kt,ct("next"),"throw"in Fe?ct("throw"):kt.throw=bt=>{throw bt},"return"in Fe&&ct("return"),kt},Ux=(Ie,Fe,Ke)=>(Fe=Ie[Fo("asyncIterator")])?Fe.call(Ie):(Ie=Ie[Fo("iterator")](),Fe={},Ke=(ct,kt)=>(kt=Ie[ct])&&(Fe[ct]=bt=>new Promise((Pe,$t,It)=>(bt=kt.call(Ie,bt),It=bt.done,Promise.resolve(bt.value).then(yn=>Pe({value:yn,done:It}),$t)))),Ke("next"),Ke("return"),Fe);var Fe=document.createElement("style");Fe.textContent=`.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;border-radius:4px;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;background-color:var(--base-color);border-radius:4px;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-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;background-color:transparent;border:1px solid transparent;border-radius:4px;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-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;&.modal{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}.cim-widget-search-input{width:100%;height:-webkit-fill-available;padding:0 8px;background-color:transparent;border:1px solid #00000040;border-radius:4px}.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:130px;background:#fff;padding:.25rem 0;border-radius:.5rem;border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;background-color:#fff;border:1px solid transparent;border-radius:4px;cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;svg{font-size:.75rem}}.cim-widget-clear-chat-icon-button{min-height:32px}.cim-widget-toggle-modal-button.dialog{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.dialog{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border-radius:4px;box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:15dvw;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;overflow-x:hidden}.cim-widget-product-list{flex:1;display:inline-flex;gap:.5rem;padding:.5rem .5rem .5rem 0;overflow-x:auto}.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-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:4px;background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;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);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.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{width:100%;margin-top:1rem;margin-bottom:1rem;border-radius:.5rem;border:1px solid #8a8a8a;border-collapse:collapse}.cim-widget-thead{background-color:#f0f0f0;border-bottom-width:2px;border-color:#8a8a8a}.cim-widget-tr{border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:#8a8a8a}.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;border-radius:8px;padding:.5rem 1rem;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;border-radius:8px;padding:.5rem 1rem;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:1rem;margin-bottom:1rem;border-radius:8px;&.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:8px;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.chat{border:1px solid var(--cim-widget-border-color)}.cim-widget-dialog{position:fixed;width:35dvw;height:55dvh;border-radius:.5rem;border:1px solid var(--cim-widget-border-color);font-size:.875rem;&.bottom-left{bottom:.5rem;left:.5rem}&.bottom-right{bottom:.5rem;right:.5rem}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:1rem 1rem 0;margin-bottom:.5rem;gap:8px}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{margin-top:0;margin-bottom:0}@media(576px<=width<=768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100%;border-radius:0;&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw}.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:.5rem;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:1rem 1rem 0;margin-bottom:1rem;gap:8px}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{margin-top:0;margin-bottom:0}.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-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:.5rem;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-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{flex:1;overflow-y:auto;padding:1rem}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(Fe);function Ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ct={exports:{}},kt={},bt={exports:{}},Pe={};var $t;function It(){if($t)return Pe;$t=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"),E=Symbol.iterator;function T(L){return L===null||typeof L!="object"?null:(L=E&&L[E]||L["@@iterator"],typeof L=="function"?L:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,w={};function k(L,K,O){this.props=L,this.context=K,this.refs=w,this.updater=O||b}k.prototype.isReactComponent={},k.prototype.setState=function(L,K){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,K,"setState")},k.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function v(){}v.prototype=k.prototype;function F(L,K,O){this.props=L,this.context=K,this.refs=w,this.updater=O||b}var R=F.prototype=new v;R.constructor=F,_(R,k.prototype),R.isPureReactComponent=!0;var W=Array.isArray,X=Object.prototype.hasOwnProperty,B={current:null},te={key:!0,ref:!0,__self:!0,__source:!0};function ge(L,K,O){var _e,Re={},Oe=null,Ge=null;if(K!=null)for(_e in K.ref!==void 0&&(Ge=K.ref),K.key!==void 0&&(Oe=""+K.key),K)X.call(K,_e)&&!te.hasOwnProperty(_e)&&(Re[_e]=K[_e]);var Ye=arguments.length-2;if(Ye===1)Re.children=O;else if(1<Ye){for(var et=Array(Ye),Nt=0;Nt<Ye;Nt++)et[Nt]=arguments[Nt+2];Re.children=et}if(L&&L.defaultProps)for(_e in Ye=L.defaultProps,Ye)Re[_e]===void 0&&(Re[_e]=Ye[_e]);return{$$typeof:e,type:L,key:Oe,ref:Ge,props:Re,_owner:B.current}}function ye(L,K){return{$$typeof:e,type:L.type,key:K,ref:L.ref,props:L.props,_owner:L._owner}}function M(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function ae(L){var K={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(O){return K[O]})}var he=/\/+/g;function ue(L,K){return typeof L=="object"&&L!==null&&L.key!=null?ae(""+L.key):K.toString(36)}function de(L,K,O,_e,Re){var Oe=typeof L;(Oe==="undefined"||Oe==="boolean")&&(L=null);var Ge=!1;if(L===null)Ge=!0;else switch(Oe){case"string":case"number":Ge=!0;break;case"object":switch(L.$$typeof){case e:case t:Ge=!0}}if(Ge)return Ge=L,Re=Re(Ge),L=_e===""?"."+ue(Ge,0):_e,W(Re)?(O="",L!=null&&(O=L.replace(he,"$&/")+"/"),de(Re,K,O,"",function(Nt){return Nt})):Re!=null&&(M(Re)&&(Re=ye(Re,O+(!Re.key||Ge&&Ge.key===Re.key?"":(""+Re.key).replace(he,"$&/")+"/")+L)),K.push(Re)),1;if(Ge=0,_e=_e===""?".":_e+":",W(L))for(var Ye=0;Ye<L.length;Ye++){Oe=L[Ye];var et=_e+ue(Oe,Ye);Ge+=de(Oe,K,O,et,Re)}else if(et=T(L),typeof et=="function")for(L=et.call(L),Ye=0;!(Oe=L.next()).done;)Oe=Oe.value,et=_e+ue(Oe,Ye++),Ge+=de(Oe,K,O,et,Re);else if(Oe==="object")throw K=String(L),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return Ge}function be(L,K,O){if(L==null)return L;var _e=[],Re=0;return de(L,_e,"","",function(Oe){return K.call(O,Oe,Re++)}),_e}function Ce(L){if(L._status===-1){var K=L._result;K=K(),K.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=K)}if(L._status===1)return L._result.default;throw L._result}var oe={current:null},q={transition:null},ne={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:q,ReactCurrentOwner:B};function S(){throw Error("act(...) is not supported in production builds of React.")}return Pe.Children={map:be,forEach:function(L,K,O){be(L,function(){K.apply(this,arguments)},O)},count:function(L){var K=0;return be(L,function(){K++}),K},toArray:function(L){return be(L,function(K){return K})||[]},only:function(L){if(!M(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},Pe.Component=k,Pe.Fragment=n,Pe.Profiler=o,Pe.PureComponent=F,Pe.StrictMode=r,Pe.Suspense=d,Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,Pe.act=S,Pe.cloneElement=function(L,K,O){if(L==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var _e=_({},L.props),Re=L.key,Oe=L.ref,Ge=L._owner;if(K!=null){if(K.ref!==void 0&&(Oe=K.ref,Ge=B.current),K.key!==void 0&&(Re=""+K.key),L.type&&L.type.defaultProps)var Ye=L.type.defaultProps;for(et in K)X.call(K,et)&&!te.hasOwnProperty(et)&&(_e[et]=K[et]===void 0&&Ye!==void 0?Ye[et]:K[et])}var et=arguments.length-2;if(et===1)_e.children=O;else if(1<et){Ye=Array(et);for(var Nt=0;Nt<et;Nt++)Ye[Nt]=arguments[Nt+2];_e.children=Ye}return{$$typeof:e,type:L.type,key:Re,ref:Oe,props:_e,_owner:Ge}},Pe.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},Pe.createElement=ge,Pe.createFactory=function(L){var K=ge.bind(null,L);return K.type=L,K},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(L){return{$$typeof:c,render:L}},Pe.isValidElement=M,Pe.lazy=function(L){return{$$typeof:p,_payload:{_status:-1,_result:L},_init:Ce}},Pe.memo=function(L,K){return{$$typeof:f,type:L,compare:K===void 0?null:K}},Pe.startTransition=function(L){var K=q.transition;q.transition={};try{L()}finally{q.transition=K}},Pe.unstable_act=S,Pe.useCallback=function(L,K){return oe.current.useCallback(L,K)},Pe.useContext=function(L){return oe.current.useContext(L)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(L){return oe.current.useDeferredValue(L)},Pe.useEffect=function(L,K){return oe.current.useEffect(L,K)},Pe.useId=function(){return oe.current.useId()},Pe.useImperativeHandle=function(L,K,O){return oe.current.useImperativeHandle(L,K,O)},Pe.useInsertionEffect=function(L,K){return oe.current.useInsertionEffect(L,K)},Pe.useLayoutEffect=function(L,K){return oe.current.useLayoutEffect(L,K)},Pe.useMemo=function(L,K){return oe.current.useMemo(L,K)},Pe.useReducer=function(L,K,O){return oe.current.useReducer(L,K,O)},Pe.useRef=function(L){return oe.current.useRef(L)},Pe.useState=function(L){return oe.current.useState(L)},Pe.useSyncExternalStore=function(L,K,O){return oe.current.useSyncExternalStore(L,K,O)},Pe.useTransition=function(){return oe.current.useTransition()},Pe.version="18.3.1",Pe}var yn;function As(){return yn||(yn=1,bt.exports=It()),bt.exports}var Bo;function ad(){if(Bo)return kt;Bo=1;var e=As(),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,E={},T=null,b=null;f!==void 0&&(T=""+f),d.key!==void 0&&(T=""+d.key),d.ref!==void 0&&(b=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(E[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)E[p]===void 0&&(E[p]=d[p]);return{$$typeof:t,type:c,key:T,ref:b,props:E,_owner:o.current}}return kt.Fragment=n,kt.jsx=u,kt.jsxs=u,kt}var rr;function $x(){return rr||(rr=1,ct.exports=ad()),ct.exports}var C=$x();const Tr=Object.create(null);Tr.open="0",Tr.close="1",Tr.ping="2",Tr.pong="3",Tr.message="4",Tr.upgrade="5",Tr.noop="6";const Su=Object.create(null);Object.keys(Tr).forEach(e=>{Su[Tr[e]]=e});const ud={type:"error",data:"parser error"},qm=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ym=typeof ArrayBuffer=="function",Wm=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,ld=({type:e,data:t},n,r)=>qm&&t instanceof Blob?n?r(t):Gm(t,r):Ym&&(t instanceof ArrayBuffer||Wm(t))?n?r(t):Gm(new Blob([t]),r):r(Tr[e]+(t||"")),Gm=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Km(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let cd;function Vx(e,t){if(qm&&e.data instanceof Blob)return e.data.arrayBuffer().then(Km).then(t);if(Ym&&(e.data instanceof ArrayBuffer||Wm(e.data)))return t(Km(e.data));ld(e,!1,n=>{cd||(cd=new TextEncoder),t(cd.encode(n))})}const Qm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Uo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Qm.length;e++)Uo[Qm.charCodeAt(e)]=e;const qx=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=Uo[e.charCodeAt(r)],u=Uo[e.charCodeAt(r+1)],c=Uo[e.charCodeAt(r+2)],d=Uo[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},Yx=typeof ArrayBuffer=="function",dd=(e,t)=>{if(typeof e!="string")return{type:"message",data:Xm(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Wx(e.substring(1),t)}:Su[n]?e.length>1?{type:Su[n],data:e.substring(1)}:{type:Su[n]}:ud},Wx=(e,t)=>{if(Yx){const n=qx(e);return Xm(n,t)}else return{base64:!0,data:e}},Xm=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Jm="",Gx=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{ld(a,!1,c=>{r[u]=c,++o===n&&t(r.join(Jm))})})},Kx=(e,t)=>{const n=e.split(Jm),r=[];for(let o=0;o<n.length;o++){const a=dd(n[o],t);if(r.push(a),a.type==="error")break}return r};function Qx(){return new TransformStream({transform(e,t){Vx(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 fd;function Cu(e){return e.reduce((t,n)=>t+n.length,0)}function Au(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 Xx(e,t){fd||(fd=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(Cu(n)<1)break;const d=Au(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(Cu(n)<2)break;const d=Au(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Cu(n)<8)break;const d=Au(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(ud);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Cu(n)<o)break;const d=Au(n,o);c.enqueue(dd(a?d:fd.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(ud);break}}}})}const Zm=4;function Ft(e){if(e)return Jx(e)}function Jx(e){for(var t in Ft.prototype)e[t]=Ft.prototype[t];return e}Ft.prototype.on=Ft.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ft.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ft.prototype.off=Ft.prototype.removeListener=Ft.prototype.removeAllListeners=Ft.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,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},Ft.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},Ft.prototype.emitReserved=Ft.prototype.emit,Ft.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ft.prototype.hasListeners=function(e){return!!this.listeners(e).length};const vu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),jn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),Zx="arraybuffer";function rB(){}function e0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const ew=jn.setTimeout,tw=jn.clearTimeout;function ku(e,t){t.useNativeTimers?(e.setTimeoutFn=ew.bind(jn),e.clearTimeoutFn=tw.bind(jn)):(e.setTimeoutFn=jn.setTimeout.bind(jn),e.clearTimeoutFn=jn.clearTimeout.bind(jn))}const nw=1.33;function rw(e){return typeof e=="string"?iw(e):Math.ceil((e.byteLength||e.size)*nw)}function iw(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 t0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function sw(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function ow(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 aw extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class hd extends Ft{constructor(t){super(),this.writable=!1,ku(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 aw(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=dd(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&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=sw(t);return n.length?"?"+n:""}}class uw extends hd{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)};Kx(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,Gx(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=t0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let n0=!1;try{n0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const lw=n0;function cw(){}class dw extends uw{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 _r extends Ft{constructor(t,n,r){super(),this.createRequest=t,ku(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=e0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=_r.requestsCount++,_r.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=cw,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete _r.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(_r.requestsCount=0,_r.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",r0);else if(typeof addEventListener=="function"){const e="onpagehide"in jn?"pagehide":"unload";addEventListener(e,r0,!1)}}function r0(){for(let e in _r.requests)_r.requests.hasOwnProperty(e)&&_r.requests[e].abort()}const fw=(function(){const e=i0({xdomain:!1});return e&&e.responseType!==null})();class hw extends dw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=fw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new _r(i0,this.uri(),t)}}function i0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||lw))return new XMLHttpRequest}catch(n){}if(!t)try{return new jn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const s0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class pw extends hd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=s0?{}:e0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;ld(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&vu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=t0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const pd=jn.WebSocket||jn.MozWebSocket;class mw extends pw{createSocket(t,n,r){return s0?new pd(t,n,r):n?new pd(t,n):new pd(t)}doWrite(t,n){this.ws.send(n)}}class gw extends hd{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=Xx(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=Qx();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&&vu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Ew={websocket:mw,webtransport:gw,polling:hw},yw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,bw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function md(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=yw.exec(e||""),a={},u=14;for(;u--;)a[bw[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=Tw(a,a.path),a.queryKey=_w(a,a.query),a}function Tw(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 _w(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const gd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Nu=[];gd&&addEventListener("offline",()=>{Nu.forEach(e=>e())},!1);class li extends Ft{constructor(t,n){if(super(),this.binaryType=Zx,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=md(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=md(n.host).host);ku(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=ow(this.opts.query)),gd&&(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"})},Nu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Zm,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&&li.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",li.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+=rw(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,vu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,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(li.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(),gd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Nu.indexOf(this._offlineEventListener);r!==-1&&Nu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}li.protocol=Zm;class xw extends li{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;li.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",E=>{if(!r)if(E.type==="pong"&&E.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;li.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=E=>{const T=new Error("probe error: "+E);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function c(){u("transport closed")}function d(){u("socket closed")}function f(E){n&&E.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 ww=class extends xw{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>Ew[o]).filter(o=>!!o)),super(t,r)}};function Sw(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=md(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 Cw=typeof ArrayBuffer=="function",Aw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,o0=Object.prototype.toString,vw=typeof Blob=="function"||typeof Blob!="undefined"&&o0.call(Blob)==="[object BlobConstructor]",kw=typeof File=="function"||typeof File!="undefined"&&o0.call(File)==="[object FileConstructor]";function Ed(e){return Cw&&(e instanceof ArrayBuffer||Aw(e))||vw&&e instanceof Blob||kw&&e instanceof File}function Ou(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ou(e[n]))return!0;return!1}if(Ed(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ou(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ou(e[n]))return!0;return!1}function Nw(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(Ed(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]=yd(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]=yd(e[r],t));return n}return e}function Ow(e,t){return e.data=bd(e.data,t),delete e.attachments,e}function bd(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=bd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=bd(e[n],t));return e}const Iw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Je;(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"})(Je||(Je={}));class Pw{constructor(t){this.replacer=t}encode(t){return(t.type===Je.EVENT||t.type===Je.ACK)&&Ou(t)?this.encodeAsBinary({type:t.type===Je.EVENT?Je.BINARY_EVENT:Je.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Je.BINARY_EVENT||t.type===Je.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=Nw(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Td extends Ft{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Je.BINARY_EVENT;r||n.type===Je.BINARY_ACK?(n.type=r?Je.EVENT:Je.ACK,this.reconstructor=new Rw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Ed(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(Je[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Je.BINARY_EVENT||r.type===Je.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(!Lw(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(Td.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Je.CONNECT:return a0(n);case Je.DISCONNECT:return n===void 0;case Je.CONNECT_ERROR:return typeof n=="string"||a0(n);case Je.EVENT:case Je.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Iw.indexOf(n[0])===-1);case Je.ACK:case Je.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Rw{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=Ow(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Lw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function a0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Dw=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Td,Encoder:Pw,get PacketType(){return Je}},Symbol.toStringTag,{value:"Module"}));function ir(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Mw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class u0 extends Ft{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ir(t,"open",this.onopen.bind(this)),ir(t,"packet",this.onpacket.bind(this)),ir(t,"error",this.onerror.bind(this)),ir(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(Mw.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:Je.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,E=n.pop();this._registerAckCallback(p,E),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)=>r!==this._queue[0]?void 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:Je.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 Je.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 Je.EVENT:case Je.BINARY_EVENT:this.onevent(t);break;case Je.ACK:case Je.BINARY_ACK:this.onack(t);break;case Je.DISCONNECT:this.ondisconnect();break;case Je.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:Je.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.emitReserved("connect"),this._drainQueue(!0)}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:Je.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 vs(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}vs.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},vs.prototype.reset=function(){this.attempts=0},vs.prototype.setMin=function(e){this.ms=e},vs.prototype.setMax=function(e){this.max=e},vs.prototype.setJitter=function(e){this.jitter=e};class _d extends Ft{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,ku(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 vs({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||Dw;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 ww(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=ir(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=ir(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(ir(t,"ping",this.onping.bind(this)),ir(t,"data",this.ondata.bind(this)),ir(t,"error",this.onerror.bind(this)),ir(t,"close",this.onclose.bind(this)),ir(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){vu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new u0(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 Ho={};function Iu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Sw(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=Ho[o]&&a in Ho[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new _d(r,t):(Ho[o]||(Ho[o]=new _d(r,t)),d=Ho[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Iu,{Manager:_d,Socket:u0,io:Iu,connect:Iu});var Fw=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===Bw})(t)})(e)},Bw=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function zo(e,t){return t.clone!==!1&&t.isMergeableObject(e)?ks((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Uw(e,t,n){return e.concat(t).map((function(r){return zo(r,n)}))}function l0(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 c0(e,t){try{return t in e}catch(n){return!1}}function Hw(e,t,n){var r={};return n.isMergeableObject(e)&&l0(e).forEach((function(o){r[o]=zo(e[o],n)})),l0(t).forEach((function(o){(function(a,u){return c0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(c0(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,u){if(!u.customMerge)return ks;var c=u.customMerge(a);return typeof c=="function"?c:ks})(o,n)(e[o],t[o],n):r[o]=zo(t[o],n))})),r}function ks(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Uw,n.isMergeableObject=n.isMergeableObject||Fw,n.cloneUnlessOtherwiseSpecified=zo;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Hw(e,t,n):zo(t,n)}ks.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return ks(n,r,t)}),{})};var zw=ks;class jw{constructor(t){Object.assign(this,t)}}function hn(e){if(e)return(function(t){for(var n in hn.prototype)t[n]=hn.prototype[n];return t})(e)}hn.prototype.on=hn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},hn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},hn.prototype.off=hn.prototype.removeListener=hn.prototype.removeAllListeners=hn.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},hn.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},hn.prototype.emitReserved=hn.prototype.emit,hn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},hn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const $w=typeof ArrayBuffer=="function",d0=Object.prototype.toString,Vw=typeof Blob=="function"||typeof Blob!="undefined"&&d0.call(Blob)==="[object BlobConstructor]",qw=typeof File=="function"||typeof File!="undefined"&&d0.call(File)==="[object FileConstructor]";function xd(e){return $w&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||Vw&&e instanceof Blob||qw&&e instanceof File}function Pu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Pu(e[n]))return!0;return!1}if(xd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Pu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Pu(e[n]))return!0;return!1}function Yw(e){const t=[],n=e.data,r=e;return r.data=wd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function wd(e,t){if(!e)return e;if(xd(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]=wd(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]=wd(e[r],t));return n}return e}function Ww(e,t){return e.data=Sd(e.data,t),delete e.attachments,e}function Sd(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]=Sd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Sd(e[n],t));return e}const Gw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ct;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Ct||(Ct={}));class Kw{constructor(t){this.replacer=t}encode(t){return t.type!==Ct.EVENT&&t.type!==Ct.ACK||!Pu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Ct.EVENT?Ct.BINARY_EVENT:Ct.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==Ct.BINARY_EVENT&&t.type!==Ct.BINARY_ACK||(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Yw(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function f0(e){return Object.prototype.toString.call(e)==="[object Object]"}class Cd extends hn{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Ct.BINARY_EVENT;r||n.type===Ct.BINARY_ACK?(n.type=r?Ct.EVENT:Ct.ACK,this.reconstructor=new Qw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!xd(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n))}}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Ct[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ct.BINARY_EVENT||r.type===Ct.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(u)}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(!Cd.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Ct.CONNECT:return f0(n);case Ct.DISCONNECT:return n===void 0;case Ct.CONNECT_ERROR:return typeof n=="string"||f0(n);case Ct.EVENT:case Ct.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Gw.indexOf(n[0])===-1);case Ct.ACK:case Ct.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Qw{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Ww(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const h0=["searchParams.facetFilters","browseParams.facetFilters","hits","products"],p0=(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)},m0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),Xw=p0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),h0),g0=p0(m0,m0,h0),Jw={Encoder:class extends Kw{encode(e){var t,n;return super.encode(Te(H({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],Xw(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 Cd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?g0(r):r)):n instanceof Object?g0(n):n)):t))}}},Zw={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class eS{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",socketOptions:a={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=f=>{console.log("[Copilot SDK] Connect Ack:",f),this.socket.auth={[this.sessionIdKey]:f.sessionId}},this.handleDisconnect=f=>{console.warn(`[Copilot SDK] Disconnected: ${f}`),f!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${f}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=f=>{console.error(`[Copilot SDK] Connect error: ${f.message}`);const p=f.message.match(/['"]error['"]:\s*['"](\w+)['"]/),E=p==null?void 0:p[1];E&&["InvalidApiKey","InvalidToken","BadRequest"].includes(E)?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 u=`${r}${o}`,c={};t?c["x-cimulate-api-key"]=t:n&&(c.Authorization=`Bearer ${n}`);const d=[Zw,a,{parser:Jw,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=Iu(u,zw.all(d))}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*sd(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 rt(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}search(t,n){return rt(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}facetedNavigation(t,n){return rt(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 rt(this,null,function*(){return this.asyncResponse("product_view",t,n)})}askCim(t,n){return rt(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}requestSessionInformation(t){return rt(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return rt(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 rt(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const a=(function(u){return od(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Hr(u({emit:E=>{c.push(E),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Hr(new Promise((E=>{f=E})));for(;c.length>0;)yield c.shift()}finally{yield new Hr(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),()=>rt(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 jw(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}var $=As();const $i=Ke($);function E0(e,t){return function(){return e.apply(t,arguments)}}const{toString:tS}=Object.prototype,{getPrototypeOf:Ad}=Object,{iterator:Ru,toStringTag:y0}=Symbol,Lu=(e=>t=>{const n=tS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),sr=e=>(e=e.toLowerCase(),t=>Lu(t)===e),Du=e=>t=>typeof t===e,{isArray:Ns}=Array,Os=Du("undefined");function jo(e){return e!==null&&!Os(e)&&e.constructor!==null&&!Os(e.constructor)&&bn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const b0=sr("ArrayBuffer");function nS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&b0(e.buffer),t}const rS=Du("string"),bn=Du("function"),T0=Du("number"),$o=e=>e!==null&&typeof e=="object",iS=e=>e===!0||e===!1,Mu=e=>{if(Lu(e)!=="object")return!1;const t=Ad(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(y0 in e)&&!(Ru in e)},sS=e=>{if(!$o(e)||jo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},oS=sr("Date"),aS=sr("File"),uS=sr("Blob"),lS=sr("FileList"),cS=e=>$o(e)&&bn(e.pipe),dS=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||bn(e.append)&&((t=Lu(e))==="formdata"||t==="object"&&bn(e.toString)&&e.toString()==="[object FormData]"))},fS=sr("URLSearchParams"),[hS,pS,mS,gS]=["ReadableStream","Request","Response","Headers"].map(sr),ES=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Vo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),Ns(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(jo(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 _0(e,t){if(jo(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Vi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,x0=e=>!Os(e)&&e!==Vi;function vd(){const{caseless:e,skipUndefined:t}=x0(this)&&this||{},n={},r=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const u=e&&_0(n,a)||a;Mu(n[u])&&Mu(o)?n[u]=vd(n[u],o):Mu(o)?n[u]=vd({},o):Ns(o)?n[u]=o.slice():(!t||!Os(o))&&(n[u]=o)};for(let o=0,a=arguments.length;o<a;o++)arguments[o]&&Vo(arguments[o],r);return n}const yS=(e,t,n,{allOwnKeys:r}={})=>(Vo(t,(o,a)=>{n&&bn(o)?Object.defineProperty(e,a,{value:E0(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),bS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),TS=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},_S=(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&&Ad(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},xS=(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},wS=e=>{if(!e)return null;if(Ns(e))return e;let t=e.length;if(!T0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},SS=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Ad(Uint8Array)),CS=(e,t)=>{const r=(e&&e[Ru]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},AS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},vS=sr("HTMLFormElement"),kS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),w0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),NS=sr("RegExp"),S0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Vo(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},OS=e=>{S0(e,(t,n)=>{if(bn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(bn(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+"'")})}})},IS=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return Ns(e)?r(e):r(String(e).split(t)),n},PS=()=>{},RS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function LS(e){return!!(e&&bn(e.append)&&e[y0]==="FormData"&&e[Ru])}const DS=e=>{const t=new Array(10),n=(r,o)=>{if($o(r)){if(t.indexOf(r)>=0)return;if(jo(r))return r;if(!("toJSON"in r)){t[o]=r;const a=Ns(r)?[]:{};return Vo(r,(u,c)=>{const d=n(u,o+1);!Os(d)&&(a[c]=d)}),t[o]=void 0,a}}return r};return n(e,0)},MS=sr("AsyncFunction"),FS=e=>e&&($o(e)||bn(e))&&bn(e.then)&&bn(e.catch),C0=((e,t)=>e?setImmediate:t?((n,r)=>(Vi.addEventListener("message",({source:o,data:a})=>{o===Vi&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Vi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",bn(Vi.postMessage)),BS=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Vi):typeof process!="undefined"&&process.nextTick||C0,Q={isArray:Ns,isArrayBuffer:b0,isBuffer:jo,isFormData:dS,isArrayBufferView:nS,isString:rS,isNumber:T0,isBoolean:iS,isObject:$o,isPlainObject:Mu,isEmptyObject:sS,isReadableStream:hS,isRequest:pS,isResponse:mS,isHeaders:gS,isUndefined:Os,isDate:oS,isFile:aS,isBlob:uS,isRegExp:NS,isFunction:bn,isStream:cS,isURLSearchParams:fS,isTypedArray:SS,isFileList:lS,forEach:Vo,merge:vd,extend:yS,trim:ES,stripBOM:bS,inherits:TS,toFlatObject:_S,kindOf:Lu,kindOfTest:sr,endsWith:xS,toArray:wS,forEachEntry:CS,matchAll:AS,isHTMLForm:vS,hasOwnProperty:w0,hasOwnProp:w0,reduceDescriptors:S0,freezeMethods:OS,toObjectSet:IS,toCamelCase:kS,noop:PS,toFiniteNumber:RS,findKey:_0,global:Vi,isContextDefined:x0,isSpecCompliantForm:LS,toJSONObject:DS,isAsyncFn:MS,isThenable:FS,setImmediate:C0,asap:BS,isIterable:e=>e!=null&&bn(e[Ru])};let He=class Hx extends Error{static from(t,n,r,o,a,u){const c=new Hx(t.message,n||t.code,r,o,a);return c.cause=t,c.name=t.name,u&&Object.assign(c,u),c}constructor(t,n,r,o,a){super(t),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(){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:Q.toJSONObject(this.config),code:this.code,status:this.status}}};He.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",He.ERR_BAD_OPTION="ERR_BAD_OPTION",He.ECONNABORTED="ECONNABORTED",He.ETIMEDOUT="ETIMEDOUT",He.ERR_NETWORK="ERR_NETWORK",He.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",He.ERR_DEPRECATED="ERR_DEPRECATED",He.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",He.ERR_BAD_REQUEST="ERR_BAD_REQUEST",He.ERR_CANCELED="ERR_CANCELED",He.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",He.ERR_INVALID_URL="ERR_INVALID_URL";const US=null;function kd(e){return Q.isPlainObject(e)||Q.isArray(e)}function A0(e){return Q.endsWith(e,"[]")?e.slice(0,-2):e}function v0(e,t,n){return e?e.concat(t).map(function(o,a){return o=A0(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function HS(e){return Q.isArray(e)&&!e.some(kd)}const zS=Q.toFlatObject(Q,{},null,function(t){return/^is[A-Z]/.test(t)});function Fu(e,t,n){if(!Q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,k){return!Q.isUndefined(k[w])});const r=n.metaTokens,o=n.visitor||p,a=n.dots,u=n.indexes,d=(n.Blob||typeof Blob!="undefined"&&Blob)&&Q.isSpecCompliantForm(t);if(!Q.isFunction(o))throw new TypeError("visitor must be a function");function f(_){if(_===null)return"";if(Q.isDate(_))return _.toISOString();if(Q.isBoolean(_))return _.toString();if(!d&&Q.isBlob(_))throw new He("Blob is not supported. Use a Buffer instead.");return Q.isArrayBuffer(_)||Q.isTypedArray(_)?d&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function p(_,w,k){let v=_;if(_&&!k&&typeof _=="object"){if(Q.endsWith(w,"{}"))w=r?w:w.slice(0,-2),_=JSON.stringify(_);else if(Q.isArray(_)&&HS(_)||(Q.isFileList(_)||Q.endsWith(w,"[]"))&&(v=Q.toArray(_)))return w=A0(w),v.forEach(function(R,W){!(Q.isUndefined(R)||R===null)&&t.append(u===!0?v0([w],W,a):u===null?w:w+"[]",f(R))}),!1}return kd(_)?!0:(t.append(v0(k,w,a),f(_)),!1)}const E=[],T=Object.assign(zS,{defaultVisitor:p,convertValue:f,isVisitable:kd});function b(_,w){if(!Q.isUndefined(_)){if(E.indexOf(_)!==-1)throw Error("Circular reference detected in "+w.join("."));E.push(_),Q.forEach(_,function(v,F){(!(Q.isUndefined(v)||v===null)&&o.call(t,v,Q.isString(F)?F.trim():F,w,T))===!0&&b(v,w?w.concat(F):[F])}),E.pop()}}if(!Q.isObject(e))throw new TypeError("data must be an object");return b(e),t}function k0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Nd(e,t){this._pairs=[],e&&Fu(e,this,t)}const N0=Nd.prototype;N0.append=function(t,n){this._pairs.push([t,n])},N0.toString=function(t){const n=t?function(r){return t.call(this,r,k0)}:k0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function jS(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function O0(e,t,n){if(!t)return e;const r=n&&n.encode||jS,o=Q.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=Q.isURLSearchParams(t)?t.toString():new Nd(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class I0{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){Q.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Od={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},$S={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Nd,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Id=typeof window!="undefined"&&typeof document!="undefined",Pd=typeof navigator=="object"&&navigator||void 0,VS=Id&&(!Pd||["ReactNative","NativeScript","NS"].indexOf(Pd.product)<0),qS=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",YS=Id&&window.location.href||"http://localhost",rn=H(H({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Id,hasStandardBrowserEnv:VS,hasStandardBrowserWebWorkerEnv:qS,navigator:Pd,origin:YS},Symbol.toStringTag,{value:"Module"}))),$S);function WS(e,t){return Fu(e,new rn.classes.URLSearchParams,H({visitor:function(n,r,o,a){return rn.isNode&&Q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function GS(e){return Q.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function KS(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 P0(e){function t(n,r,o,a){let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&Q.isArray(o)?o.length:u,d?(Q.hasOwnProp(o,u)?o[u]=[o[u],r]:o[u]=r,!c):((!o[u]||!Q.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&Q.isArray(o[u])&&(o[u]=KS(o[u])),!c)}if(Q.isFormData(e)&&Q.isFunction(e.entries)){const n={};return Q.forEachEntry(e,(r,o)=>{t(GS(r),o,n,0)}),n}return null}function QS(e,t,n){if(Q.isString(e))try{return(t||JSON.parse)(e),Q.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const qo={transitional:Od,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=Q.isObject(t);if(a&&Q.isHTMLForm(t)&&(t=new FormData(t)),Q.isFormData(t))return o?JSON.stringify(P0(t)):t;if(Q.isArrayBuffer(t)||Q.isBuffer(t)||Q.isStream(t)||Q.isFile(t)||Q.isBlob(t)||Q.isReadableStream(t))return t;if(Q.isArrayBufferView(t))return t.buffer;if(Q.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return WS(t,this.formSerializer).toString();if((c=Q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Fu(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),QS(t)):t}],transformResponse:[function(t){const n=this.transitional||qo.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(Q.isResponse(t)||Q.isReadableStream(t))return t;if(t&&Q.isString(t)&&(r&&!this.responseType||o)){const u=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(u)throw c.name==="SyntaxError"?He.from(c,He.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rn.classes.FormData,Blob:rn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Q.forEach(["delete","get","head","post","put","patch"],e=>{qo.headers[e]={}});const XS=Q.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"]),JS=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
3
|
-
`).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||t[n]&&
|
|
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[R0]=this[R0]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=Yo(u);r[c]||(nC(o,u),r[c]=!0)}return Q.isArray(t)?t.forEach(a):a(t),this}};Tn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Q.reduceDescriptors(Tn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),Q.freezeMethods(Tn);function Ld(e,t){const n=this||qo,r=t||n,o=Tn.from(r.headers);let a=r.data;return Q.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function L0(e){return!!(e&&e.__CANCEL__)}let Wo=class extends He{constructor(t,n,r){super(t==null?"canceled":t,He.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function D0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new He("Request failed with status code "+n.status,[He.ERR_BAD_REQUEST,He.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function rC(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function iC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let 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 E=a,T=0;for(;E!==o;)T+=n[E++],E=E%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),f-u<t)return;const b=p&&f-p;return b?Math.round(T*1e3/b):void 0}}function sC(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(),E=p-n;E>=r?u(f,p):(o=f,a||(a=setTimeout(()=>{a=null,u(o)},r-E)))},()=>o&&u(o)]}const Uu=(e,t,n=3)=>{let r=0;const o=iC(50,250);return sC(a=>{const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=u-r,f=o(d),p=u<=c;r=u;const E={loaded:u,total:c,progress:c?u/c:void 0,bytes:d,rate:f||void 0,estimated:f&&c&&p?(c-u)/f:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(E)},n)},M0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},F0=e=>(...t)=>Q.asap(()=>e(...t)),oC=rn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,rn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(rn.origin),rn.navigator&&/(msie|trident)/i.test(rn.navigator.userAgent)):()=>!0,aC=rn.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];Q.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),Q.isString(r)&&c.push(`path=${r}`),Q.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),Q.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function uC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function lC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function B0(e,t,n){let r=!uC(t);return e&&(r||n==!1)?lC(e,t):t}const U0=e=>e instanceof Tn?H({},e):e;function qi(e,t){t=t||{};const n={};function r(f,p,E,T){return Q.isPlainObject(f)&&Q.isPlainObject(p)?Q.merge.call({caseless:T},f,p):Q.isPlainObject(p)?Q.merge({},p):Q.isArray(p)?p.slice():p}function o(f,p,E,T){if(Q.isUndefined(p)){if(!Q.isUndefined(f))return r(void 0,f,E,T)}else return r(f,p,E,T)}function a(f,p){if(!Q.isUndefined(p))return r(void 0,p)}function u(f,p){if(Q.isUndefined(p)){if(!Q.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function c(f,p,E){if(E in t)return r(f,p);if(E in e)return r(void 0,f)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:c,headers:(f,p,E)=>o(U0(f),U0(p),E,!0)};return Q.forEach(Object.keys(H(H({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const E=Q.hasOwnProp(d,p)?d[p]:o,T=E(e[p],t[p],p);Q.isUndefined(T)&&E!==c||(n[p]=T)}),n}const H0=e=>{const t=qi({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:u,auth:c}=t;if(t.headers=u=Tn.from(u),t.url=O0(B0(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&u.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Q.isFormData(n)){if(rn.hasStandardBrowserEnv||rn.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(Q.isFunction(n.getHeaders)){const d=n.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([p,E])=>{f.includes(p.toLowerCase())&&u.set(p,E)})}}if(rn.hasStandardBrowserEnv&&(r&&Q.isFunction(r)&&(r=r(t)),r||r!==!1&&oC(t.url))){const d=o&&a&&aC.read(a);d&&u.set(o,d)}return t},cC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=H0(e);let a=o.data;const u=Tn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=o,p,E,T,b,_;function w(){b&&b(),_&&_(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let k=new XMLHttpRequest;k.open(o.method.toUpperCase(),o.url,!0),k.timeout=o.timeout;function v(){if(!k)return;const R=Tn.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),X={data:!c||c==="text"||c==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:R,config:e,request:k};D0(function(te){n(te),w()},function(te){r(te),w()},X),k=null}"onloadend"in k?k.onloadend=v:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(v)},k.onabort=function(){k&&(r(new He("Request aborted",He.ECONNABORTED,e,k)),k=null)},k.onerror=function(W){const X=W&&W.message?W.message:"Network Error",B=new He(X,He.ERR_NETWORK,e,k);B.event=W||null,r(B),k=null},k.ontimeout=function(){let W=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const X=o.transitional||Od;o.timeoutErrorMessage&&(W=o.timeoutErrorMessage),r(new He(W,X.clarifyTimeoutError?He.ETIMEDOUT:He.ECONNABORTED,e,k)),k=null},a===void 0&&u.setContentType(null),"setRequestHeader"in k&&Q.forEach(u.toJSON(),function(W,X){k.setRequestHeader(X,W)}),Q.isUndefined(o.withCredentials)||(k.withCredentials=!!o.withCredentials),c&&c!=="json"&&(k.responseType=o.responseType),f&&([T,_]=Uu(f,!0),k.addEventListener("progress",T)),d&&k.upload&&([E,b]=Uu(d),k.upload.addEventListener("progress",E),k.upload.addEventListener("loadend",b)),(o.cancelToken||o.signal)&&(p=R=>{k&&(r(!R||R.type?new Wo(null,e,k):R),k.abort(),k=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const F=rC(o.url);if(F&&rn.protocols.indexOf(F)===-1){r(new He("Unsupported protocol "+F+":",He.ERR_BAD_REQUEST,e));return}k.send(a||null)})},dC=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(f){if(!o){o=!0,c();const p=f instanceof Error?f:this.reason;r.abort(p instanceof He?p:new Wo(p instanceof Error?p.message:p))}};let u=t&&setTimeout(()=>{u=null,a(new He(`timeout of ${t}ms exceeded`,He.ETIMEDOUT))},t);const c=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(a):f.removeEventListener("abort",a)}),e=null)};e.forEach(f=>f.addEventListener("abort",a));const{signal:d}=r;return d.unsubscribe=()=>Q.asap(c),d}},fC=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},hC=function(e,t){return od(this,null,function*(){try{for(var n=Ux(pC(e)),r,o,a;r=!(o=yield new Hr(n.next())).done;r=!1){const u=o.value;yield*Vm(fC(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Hr(o.call(n)))}finally{if(a)throw a[0]}}})},pC=function(e){return od(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Vm(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Hr(t.read());if(n)break;yield r}}finally{yield new Hr(t.cancel())}})},z0=(e,t,n,r)=>{const o=hC(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return rt(this,null,function*(){try{const{done:p,value:E}=yield o.next();if(p){c(),f.close();return}let T=E.byteLength;if(n){let b=a+=T;n(b)}f.enqueue(new Uint8Array(E))}catch(p){throw c(p),p}})},cancel(f){return c(f),o.return()}},{highWaterMark:2})},j0=64*1024,{isFunction:Hu}=Q,mC=(({Request:e,Response:t})=>({Request:e,Response:t}))(Q.global),{ReadableStream:$0,TextEncoder:V0}=Q.global,q0=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},gC=e=>{e=Q.merge.call({skipUndefined:!0},mC,e);const{fetch:t,Request:n,Response:r}=e,o=t?Hu(t):typeof fetch=="function",a=Hu(n),u=Hu(r);if(!o)return!1;const c=o&&Hu($0),d=o&&(typeof V0=="function"?(_=>w=>_.encode(w))(new V0):_=>rt(null,null,function*(){return new Uint8Array(yield new n(_).arrayBuffer())})),f=a&&c&&q0(()=>{let _=!1;const w=new n(rn.origin,{body:new $0,method:"POST",get duplex(){return _=!0,"half"}}).headers.has("Content-Type");return _&&!w}),p=u&&c&&q0(()=>Q.isReadableStream(new r("").body)),E={stream:p&&(_=>_.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!E[_]&&(E[_]=(w,k)=>{let v=w&&w[_];if(v)return v.call(w);throw new He(`Response type '${_}' is not supported`,He.ERR_NOT_SUPPORT,k)})});const T=_=>rt(null,null,function*(){if(_==null)return 0;if(Q.isBlob(_))return _.size;if(Q.isSpecCompliantForm(_))return(yield new n(rn.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(Q.isArrayBufferView(_)||Q.isArrayBuffer(_))return _.byteLength;if(Q.isURLSearchParams(_)&&(_=_+""),Q.isString(_))return(yield d(_)).byteLength}),b=(_,w)=>rt(null,null,function*(){const k=Q.toFiniteNumber(_.getContentLength());return k==null?T(w):k});return _=>rt(null,null,function*(){let{url:w,method:k,data:v,signal:F,cancelToken:R,timeout:W,onDownloadProgress:X,onUploadProgress:B,responseType:te,headers:ge,withCredentials:ye="same-origin",fetchOptions:M}=H0(_),ae=t||fetch;te=te?(te+"").toLowerCase():"text";let he=dC([F,R&&R.toAbortSignal()],W),ue=null;const de=he&&he.unsubscribe&&(()=>{he.unsubscribe()});let be;try{if(B&&f&&k!=="get"&&k!=="head"&&(be=yield b(ge,v))!==0){let L=new n(w,{method:"POST",body:v,duplex:"half"}),K;if(Q.isFormData(v)&&(K=L.headers.get("content-type"))&&ge.setContentType(K),L.body){const[O,_e]=M0(be,Uu(F0(B)));v=z0(L.body,j0,O,_e)}}Q.isString(ye)||(ye=ye?"include":"omit");const Ce=a&&"credentials"in n.prototype,oe=Te(H({},M),{signal:he,method:k.toUpperCase(),headers:ge.normalize().toJSON(),body:v,duplex:"half",credentials:Ce?ye:void 0});ue=a&&new n(w,oe);let q=yield a?ae(ue,M):ae(w,oe);const ne=p&&(te==="stream"||te==="response");if(p&&(X||ne&&de)){const L={};["status","statusText","headers"].forEach(Re=>{L[Re]=q[Re]});const K=Q.toFiniteNumber(q.headers.get("content-length")),[O,_e]=X&&M0(K,Uu(F0(X),!0))||[];q=new r(z0(q.body,j0,O,()=>{_e&&_e(),de&&de()}),L)}te=te||"text";let S=yield E[Q.findKey(E,te)||"text"](q,_);return!ne&&de&&de(),yield new Promise((L,K)=>{D0(L,K,{data:S,headers:Tn.from(q.headers),status:q.status,statusText:q.statusText,config:_,request:ue})})}catch(Ce){throw de&&de(),Ce&&Ce.name==="TypeError"&&/Load failed|fetch/i.test(Ce.message)?Object.assign(new He("Network Error",He.ERR_NETWORK,_,ue,Ce&&Ce.response),{cause:Ce.cause||Ce}):He.from(Ce,Ce&&Ce.code,_,ue,Ce&&Ce.response)}})},EC=new Map,Y0=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=EC;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:gC(t)),p=f;return f};Y0();const Dd={http:US,xhr:cC,fetch:{get:Y0}};Q.forEach(Dd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const W0=e=>`- ${e}`,yC=e=>Q.isFunction(e)||e===null||e===!1;function bC(e,t){e=Q.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,!yC(r)&&(o=Dd[(c=String(r)).toLowerCase()],o===void 0))throw new He(`Unknown adapter '${c}'`);if(o&&(Q.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
|
-
`+u.map(
|
|
6
|
-
`):" "+
|
|
7
|
-
`+a):r.stack=a}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=qi(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&ju.assertOptions(r,{silentJSONParsing:$n.transitional($n.boolean),forcedJSONParsing:$n.transitional($n.boolean),clarifyTimeoutError:$n.transitional($n.boolean),legacyInterceptorReqResOrdering:$n.transitional($n.boolean)},!1),o!=null&&(Q.isFunction(o)?n.paramsSerializer={serialize:o}:ju.assertOptions(o,{encode:$n.function,serialize:$n.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ju.assertOptions(n,{baseUrl:$n.spelling("baseURL"),withXsrfToken:$n.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&Q.merge(a.common,a[n.method]);a&&Q.forEach(["delete","get","head","post","put","patch","common"],_=>{delete a[_]}),n.headers=Tn.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 k=n.transitional||Od;k&&k.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,E=0,T;if(!d){const _=[K0.bind(this),void 0];for(_.unshift(...c),_.push(...f),T=_.length,p=Promise.resolve(n);E<T;)p=p.then(_[E++],_[E++]);return p}T=c.length;let b=n;for(;E<T;){const _=c[E++],w=c[E++];try{b=_(b)}catch(k){w.call(this,k);break}}try{p=K0.call(this,b)}catch(_){return Promise.reject(_)}for(E=0,T=f.length;E<T;)p=p.then(f[E++],f[E++]);return p}getUri(t){t=qi(this.defaults,t);const n=B0(t.baseURL,t.url,t.allowAbsoluteUrls);return O0(n,t.params,t.paramsSerializer)}};Q.forEach(["delete","get","head","options"],function(t){Yi.prototype[t]=function(n,r){return this.request(qi(r||{},{method:t,url:n,data:(r||{}).data}))}}),Q.forEach(["post","put","patch"],function(t){function n(r){return function(a,u,c){return this.request(qi(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Yi.prototype[t]=n(),Yi.prototype[t+"Form"]=n(!0)});let _C=class zx{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 Wo(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 zx(function(o){t=o}),cancel:t}}};function xC(e){return function(n){return e.apply(null,n)}}function wC(e){return Q.isObject(e)&&e.isAxiosError===!0}const Fd={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(Fd).forEach(([e,t])=>{Fd[t]=e});function J0(e){const t=new Yi(e),n=E0(Yi.prototype.request,t);return Q.extend(n,Yi.prototype,t,{allOwnKeys:!0}),Q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return J0(qi(e,o))},n}const Pt=J0(qo);Pt.Axios=Yi,Pt.CanceledError=Wo,Pt.CancelToken=_C,Pt.isCancel=L0,Pt.VERSION=Q0,Pt.toFormData=Fu,Pt.AxiosError=He,Pt.Cancel=Pt.CanceledError,Pt.all=function(t){return Promise.all(t)},Pt.spread=xC,Pt.isAxiosError=wC,Pt.mergeConfig=qi,Pt.AxiosHeaders=Tn,Pt.formToJSON=e=>P0(Q.isHTMLForm(e)?new FormData(e):e),Pt.getAdapter=G0.getAdapter,Pt.HttpStatusCode=Fd,Pt.default=Pt;const{Axios:cB,AxiosError:dB,CanceledError:fB,isCancel:hB,CancelToken:pB,VERSION:mB,all:gB,Cancel:EB,isAxiosError:yB,spread:bB,toFormData:TB,AxiosHeaders:_B,HttpStatusCode:xB,formToJSON:wB,getAdapter:SB,mergeConfig:CB}=Pt;class Z0{constructor(t,n,r=!1){ve(this,"CIMULATE_API_HEADER","x-cimulate-api-key");ve(this,"CIMULATE_SEARCH_API_PATH","api/v1");ve(this,"baseApiUrl");ve(this,"headers",{});ve(this,"fetchConfig",()=>rt(this,null,function*(){try{const t=yield Pt.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}}));if(t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");t?this.headers[this.CIMULATE_API_HEADER]=t:n&&(this.headers.Authorization=`Bearer ${n}`),this.baseApiUrl=r?"https://staging.search.cimulate.ai":"https://prod.search.cimulate.ai"}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}const SC=$.createContext(void 0),CC=({apiKey:e,apiToken:t,isDevelopment:n=!1,children:r})=>{const o=$.useMemo(()=>new Z0(e,t,n),[e,t,n]);return C.jsx(SC.Provider,{value:o,children:r})};var eg=Symbol.for("immer-nothing"),tg=Symbol.for("immer-draftable"),ot=Symbol.for("immer-state");function Vn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Is=Object.getPrototypeOf;function Ps(e){return!!e&&!!e[ot]}function zr(e){var t;return e?ng(e)||Array.isArray(e)||!!e[tg]||!!((t=e.constructor)!=null&&t[tg])||Vu(e)||qu(e):!1}var AC=Object.prototype.constructor.toString();function ng(e){if(!e||typeof e!="object")return!1;const t=Is(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)===AC}function Go(e,t){$u(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function $u(e){const t=e[ot];return t?t.type_:Array.isArray(e)?1:Vu(e)?2:qu(e)?3:0}function Bd(e,t){return $u(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function rg(e,t,n){const r=$u(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function vC(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Vu(e){return e instanceof Map}function qu(e){return e instanceof Set}function Vt(e){return e.copy_||e.base_}function Ud(e,t){if(Vu(e))return new Map(e);if(qu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=ng(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[ot];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(Is(e),r)}else{const r=Is(e);if(r!==null&&n)return H({},e);const o=Object.create(r);return Object.assign(o,e)}}function Hd(e,t=!1){return Yu(e)||Ps(e)||!zr(e)||($u(e)>1&&(e.set=e.add=e.clear=e.delete=kC),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Hd(r,!0))),e}function kC(){Vn(2)}function Yu(e){return Object.isFrozen(e)}var zd={};function Wi(e){const t=zd[e];return t||Vn(0,e),t}function NC(e,t){zd[e]||(zd[e]=t)}var Ko;function Wu(){return Ko}function OC(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ig(e,t){t&&(Wi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function jd(e){$d(e),e.drafts_.forEach(IC),e.drafts_=null}function $d(e){e===Ko&&(Ko=e.parent_)}function sg(e){return Ko=OC(Ko,e)}function IC(e){const t=e[ot];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function og(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ot].modified_&&(jd(t),Vn(4)),zr(e)&&(e=Gu(t,e),t.parent_||Ku(t,e)),t.patches_&&Wi("Patches").generateReplacementPatches_(n[ot].base_,e,t.patches_,t.inversePatches_)):e=Gu(t,n,[]),jd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==eg?e:void 0}function Gu(e,t,n){if(Yu(t))return t;const r=t[ot];if(!r)return Go(t,(o,a)=>ag(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ku(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),Go(a,(c,d)=>ag(e,r,o,c,d,n,u)),Ku(e,o,!1),n&&e.patches_&&Wi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function ag(e,t,n,r,o,a,u){if(Ps(o)){const c=a&&t&&t.type_!==3&&!Bd(t.assigned_,r)?a.concat(r):void 0,d=Gu(e,o,c);if(rg(n,r,d),Ps(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(zr(o)&&!Yu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Gu(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Ku(e,o)}}function Ku(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Hd(t,n)}function PC(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Wu(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=Vd;n&&(o=[r],a=Qo);const{revoke:u,proxy:c}=Proxy.revocable(o,a);return r.draft_=c,r.revoke_=u,c}var Vd={get(e,t){if(t===ot)return e;const n=Vt(e);if(!Bd(n,t))return RC(e,n,t);const r=n[t];return e.finalized_||!zr(r)?r:r===qd(e.base_,t)?(Yd(e),e.copy_[t]=Xo(r,e)):r},has(e,t){return t in Vt(e)},ownKeys(e){return Reflect.ownKeys(Vt(e))},set(e,t,n){const r=ug(Vt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=qd(Vt(e),t),a=o==null?void 0:o[ot];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(vC(n,o)&&(n!==void 0||Bd(e.base_,t)))return!0;Yd(e),jr(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return qd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Yd(e),jr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Vt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Vn(11)},getPrototypeOf(e){return Is(e.base_)},setPrototypeOf(){Vn(12)}},Qo={};Go(Vd,(e,t)=>{Qo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Qo.deleteProperty=function(e,t){return Qo.set.call(this,e,t,void 0)},Qo.set=function(e,t,n){return Vd.set.call(this,e[0],t,n,e[0])};function qd(e,t){const n=e[ot];return(n?Vt(n):e)[t]}function RC(e,t,n){var o;const r=ug(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function ug(e,t){if(!(t in e))return;let n=Is(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Is(n)}}function jr(e){e.modified_||(e.modified_=!0,e.parent_&&jr(e.parent_))}function Yd(e){e.copy_||(e.copy_=Ud(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var LC=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"&&Vn(6),r!==void 0&&typeof r!="function"&&Vn(7);let o;if(zr(t)){const a=sg(this),u=Xo(t,void 0);let c=!0;try{o=n(u),c=!1}finally{c?jd(a):$d(a)}return ig(a,r),og(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===eg&&(o=void 0),this.autoFreeze_&&Hd(o,!0),r){const a=[],u=[];Wi("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else Vn(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){zr(e)||Vn(8),Ps(e)&&(e=DC(e));const t=sg(this),n=Xo(e,void 0);return n[ot].isManual_=!0,$d(t),n}finishDraft(e,t){const n=e&&e[ot];(!n||!n.isManual_)&&Vn(9);const{scope_:r}=n;return ig(r,t),og(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=Wi("Patches").applyPatches_;return Ps(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Xo(e,t){const n=Vu(e)?Wi("MapSet").proxyMap_(e,t):qu(e)?Wi("MapSet").proxySet_(e,t):PC(e,t);return(t?t.scope_:Wu()).drafts_.push(n),n}function DC(e){return Ps(e)||Vn(10,e),lg(e)}function lg(e){if(!zr(e)||Yu(e))return e;const t=e[ot];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ud(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ud(e,!0);return Go(n,(r,o)=>{rg(n,r,lg(o))}),t&&(t.finalized_=!1),n}function MC(){class e extends Map{constructor(d,f){super(),this[ot]={type_:2,parent_:f,scope_:f?f.scope_:Wu(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Vt(this[ot]).size}has(d){return Vt(this[ot]).has(d)}set(d,f){const p=this[ot];return u(p),(!Vt(p).has(d)||Vt(p).get(d)!==f)&&(n(p),jr(p),p.assigned_.set(d,!0),p.copy_.set(d,f),p.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const f=this[ot];return u(f),n(f),jr(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[ot];u(d),Vt(d).size&&(n(d),jr(d),d.assigned_=new Map,Go(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[ot];Vt(p).forEach((E,T,b)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[ot];u(f);const p=Vt(f).get(d);if(f.finalized_||!zr(p)||p!==f.base_.get(d))return p;const E=Xo(p,f);return n(f),f.copy_.set(d,E),E}keys(){return Vt(this[ot]).keys()}values(){const d=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const f=d.next();return f.done?f:{done:!1,value:this.get(f.value)}}}}entries(){const d=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const f=d.next();if(f.done)return f;const p=this.get(f.value);return{done:!1,value:[f.value,p]}}}}[Symbol.iterator](){return this.entries()}}function t(c,d){return new e(c,d)}function n(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.base_))}class r extends Set{constructor(d,f){super(),this[ot]={type_:3,parent_:f,scope_:f?f.scope_:Wu(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Vt(this[ot]).size}has(d){const f=this[ot];return u(f),f.copy_?!!(f.copy_.has(d)||f.drafts_.has(d)&&f.copy_.has(f.drafts_.get(d))):f.base_.has(d)}add(d){const f=this[ot];return u(f),this.has(d)||(a(f),jr(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[ot];return u(f),a(f),jr(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[ot];u(d),Vt(d).size&&(a(d),jr(d),d.copy_.clear())}values(){const d=this[ot];return u(d),a(d),d.copy_.values()}entries(){const d=this[ot];return u(d),a(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,f){const p=this.values();let E=p.next();for(;!E.done;)d.call(f,E.value,E.value,this),E=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(zr(d)){const f=Xo(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&Vn(3,JSON.stringify(Vt(c)))}NC("MapSet",{proxyMap_:t,proxySet_:o})}var In=new LC,FC=In.produce;In.produceWithPatches.bind(In),In.setAutoFreeze.bind(In),In.setUseStrictShallowCopy.bind(In),In.applyPatches.bind(In),In.createDraft.bind(In),In.finishDraft.bind(In);function BC(e,t,n){var r=$.useMemo(function(){return FC(e)},[e]);return $.useReducer(r,t,n)}const cg={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"},Tt={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",SET_ENTRY_TYPE:"SET_ENTRY_TYPE",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_IMAGE_FILE:"SET_IMAGE_FILE"},Rs={copilot:null,connected:!1,entryType:"search",messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],imageFile:null},UC=e=>{if(e.length===0)return null;const t=["copilot_search","copilot_browse","product_view","ask_cim"];return[...e].reverse().find(o=>t.some(a=>o.name.includes(a)))||null},HC=e=>{switch(!0){case e.includes("search"):return"search";case e.includes("browse"):return"browse";case e==="product_view":return"pdp";case e==="ask_cim":return"ask_cim";default:return"search"}},Jo="cimulate",Wd=`${Jo}:pdp-update`,Gd=`${Jo}:browse-update`,Kd=`${Jo}:search-update`,Qd=`${Jo}:ui-state-update`,Xd=`${Jo}:session-state`,xr=H({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},cg),zC={"browse-context":xr.CONTEXT_UPDATED,categoryId:xr.CATEGORY_ID_CHANGED,categoryName:xr.CATEGORY_NAME_CHANGED,page:xr.PAGE_CHANGED,pageSize:xr.PAGE_SIZE_CHANGED,includeFacets:xr.FACET_FILTERS_CHANGED,facetFilters:xr.FACET_FILTERS_CHANGED,rangeFilters:xr.RANGE_FILTERS_CHANGED,catalogSegment:xr.CATALOG_SEGMENT_CHANGED,pricebooks:xr.PRICEBOOKS_CHANGED},$r=H({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},cg),jC={"search-context":$r.SEARCH_CONTEXT_UPDATED,query:$r.QUERY_CHANGED,page:$r.PAGE_CHANGED,pageSize:$r.PAGE_SIZE_CHANGED,includeFacets:$r.FACET_FILTERS_CHANGED,facetFilters:$r.FACET_FILTERS_CHANGED,rangeFilters:$r.RANGE_FILTERS_CHANGED,catalogSegment:$r.CATALOG_SEGMENT_CHANGED,pricebooks:$r.PRICEBOOKS_CHANGED},Y="cim-widget",Ls=`--${Y}`,Gi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd"},$C=(e=Gi)=>({[`${Ls}-primary-color`]:e.primaryColor||Gi.primaryColor,[`${Ls}-secondary-color`]:e.secondaryColor||Gi.secondaryColor,[`${Ls}-font-color`]:e.fontColor||Gi.fontColor,[`${Ls}-font-family`]:e.fontFamily||Gi.fontFamily,[`${Ls}-background-color`]:e.backgroundColor||Gi.backgroundColor,[`${Ls}-border-color`]:e.borderColor||Gi.borderColor}),ci={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},dg=$.createContext(null),fg=$.createContext(null);class VC{constructor(t,n,r=!1){ve(this,"apiService");ve(this,"config",null);ve(this,"getConfig",()=>rt(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));ve(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));ve(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));ve(this,"getDescription",t=>this.getProductFieldValue(t,"description"));ve(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));ve(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));ve(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));ve(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));ve(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));ve(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});ve(this,"getProductField",t=>this.config?this.config[t]:"");ve(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new Z0(t,n,r)}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 Ds=(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 qC{constructor(t=!1){ve(this,"isDevelopment");ve(this,"_log",(t,n,...r)=>{Ds(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 hg=$.createContext(null),YC=({logoUrl:e,headerText:t="Your Search Assistant",globalClassName:n="",entryMessage:r,openLinksInNewTab:o=!1,disclaimerText:a,disclaimerMarkdown:u,searchPlaceholder:c,searchButtonLabel:d,searchConfig:f,componentConfig:p,conversationHistory:E,resetConversationMessage:T="What products would you like to explore today?",apiKey:b,apiToken:_,theme:w,isDevelopment:k,__features:v,children:F})=>{const R=$.useMemo(()=>new VC(b,_,k),[b,_,k]),W=$.useMemo(()=>new qC(k),[k]);$.useEffect(()=>{R.config||R.getConfig()},[R]);const X=$.useMemo(()=>$C(w),[w]),B=$.useMemo(()=>{const ge=(f==null?void 0:f.placeholder)||c,ye=(f==null?void 0:f.buttonLabel)||d;let M="icon";return f!=null&&f.buttonType?M=f.buttonType:d&&(M="text"),Te(H({},f||{}),{placeholder:ge,buttonLabel:ye,buttonType:M})},[f,c,d]),te=$.useMemo(()=>({configModule:R,logoUrl:e,headerText:t,entryMessage:r,globalClassName:n,openLinksInNewTab:o,disclaimerText:a,disclaimerMarkdown:u,themeVariables:X,logger:W,searchConfig:B,enableMinimize:!!(p!=null&&p.enableMinimize),resetConversationMessage:T,conversationHistory:{sinceHours:typeof(E==null?void 0:E.sinceHours)=="number"?E.sinceHours:1,limit:E==null?void 0:E.limit},features:v}),[R,e,t,r,n,a,u,o,B,p,T,W,X,E,v]);return C.jsx(hg.Provider,{value:te,children:F})},Rt=()=>{const e=$.useContext(hg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class WC{constructor(){ve(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left"},modal:{isFullscreen:!1}});ve(this,"connectedProxy");ve(this,"modeProxy");ve(this,"entryTypeProxy");ve(this,"statusProxy");ve(this,"dialogProxy");ve(this,"modalProxy",{isFullscreen:!1});ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return QC(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},{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},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const at=new WC,Ki=()=>at.connected,Zo=()=>at.isOpen,GC=e=>{window.addEventListener(Qd,e)},KC=e=>{window.removeEventListener(Qd,e)},QC=(e,t)=>{const n=new CustomEvent(Qd,{detail:{property:e,value:t}});window.dispatchEvent(n)},XC=e=>{at.connectedProxy.connected=e},ea=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);at.entryTypeProxy.entryType=e},Qi=e=>{const t=at.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;at.statusProxy.isOpen=n,n&&(at.statusProxy.isMinimized=!1)},Jd=e=>{const t=at.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;at.statusProxy.isMinimized=n,n&&(at.statusProxy.isOpen=!1)},Zd=e=>{at.modalProxy.isFullscreen=e},Qu=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);at.statusProxy.type=e,e==="dialog"||e==="chat"?at.modeProxy.mode="embedded":at.modeProxy.mode="standalone"},ef=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(", ")}.`);at.dialogProxy.position=e},JC=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=Rt(),o=$.useCallback(v=>{n({type:Tt.SET_COPILOT,payload:v})},[n]),a=$.useCallback(v=>{XC(v),n({type:Tt.SET_CONNECTED,payload:v})},[n]),u=$.useCallback(v=>{n({type:Tt.SET_ENTRY_TYPE,payload:v})},[n]),c=$.useCallback(()=>{n({type:Tt.RESET_COPILOT,payload:{}})},[n]),d=$.useCallback(()=>{n({type:Tt.RESET_STATE,payload:{}})},[n]),f=$.useCallback(v=>{r==null||r.log(`${v.name} event received`,v),n({type:Tt.ADD_MESSAGE,payload:v}),v.bypassHandlers||e==null||e(v)},[e,r,n]),p=$.useCallback(v=>{n({type:Tt.ADD_LOADING_MESSAGE,payload:v})},[n]),E=$.useCallback(v=>{n({type:Tt.REMOVE_LOADING_MESSAGE,payload:v})},[n]),T=$.useCallback(v=>{n({type:Tt.SET_ACTIVE_CONVERSATION_ID,payload:v})},[n]),b=$.useCallback(v=>{n({type:Tt.ADD_CONVERSATION_ID,payload:v})},[n]),_=$.useCallback(v=>{n({type:Tt.SET_CONVERSATION_IDS,payload:v})},[n]),w=$.useCallback(v=>{n({type:Tt.SET_IMAGE_FILE,payload:v})},[n]),k=$.useMemo(()=>({setCopilot:o,setConnected:a,setEntryType:u,resetCopilot:c,resetCopilotState:d,addCopilotEvent:f,addLoadingMessage:p,removeLoadingMessage:E,setActiveConversationId:T,addConversationId:b,setConversationIds:_,setImageFile:w}),[o,a,u,c,d,f,p,E,T,b,_,w]);return C.jsx(fg.Provider,{value:k,children:t})};MC();const ZC=(e,t)=>{const{type:n,payload:r}=t;if(n===Tt.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 Tt.RESET_STATE:e.messages=Rs.messages,e.groupedMessages=Rs.groupedMessages,e.loadingMessages=Rs.loadingMessages,e.entryType=Rs.entryType;break;case Tt.RESET_COPILOT:e.copilot=null;break;case Tt.SET_COPILOT:e.copilot=r;break;case Tt.SET_CONNECTED:e.connected=r;break;case Tt.SET_ENTRY_TYPE:e.entryType=r;break;case Tt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case Tt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case Tt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case Tt.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case Tt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case Tt.SET_IMAGE_FILE:e.imageFile=r;break}},eA=({entryType:e,onCopilotEvent:t,children:n})=>{const r=e?Te(H({},Rs),{entryType:e}):Rs,[o,a]=BC(ZC,r);return C.jsx(dg.Provider,{value:o,children:C.jsx(JC,{onCopilotEvent:t,dispatch:a,children:n})})};function tA(){var e=$.useRef(!0);return e.current?(e.current=!1,!0):e.current}var Xu=function(e){$.useEffect(e,[])},nA=function(e,t){return e===t};function rA(e,t){t===void 0&&(t=nA);var n=$.useRef(),r=$.useRef(e),o=tA();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}class iA{constructor(){ve(this,"items",[]);ve(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});ve(this,"remove",()=>this.items.shift());ve(this,"first",()=>this.items.length>0?this.items[0]:null);ve(this,"clear",()=>{this.items.length=0});ve(this,"processQueue",t=>{new Array(sn.size).fill(1).forEach(()=>{const r=sn.first();r&&(t(r),sn.remove())})})}get size(){return this.items.length}}const sn=new iA,pg=e=>{window.addEventListener(Kd,e)},mg=e=>{window.removeEventListener(Kd,e)},sA=(e,t,n)=>{const r=new CustomEvent(Kd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},gg=e=>{window.addEventListener(Gd,e)},Eg=e=>{window.removeEventListener(Gd,e)},oA=(e,t,n)=>{const r=new CustomEvent(Gd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},yg=e=>{window.addEventListener(Wd,e)},bg=e=>{window.removeEventListener(Wd,e)},Tg=(e,t,n)=>{const r=new CustomEvent(Wd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},aA=e=>{window.addEventListener(Xd,e)},uA=e=>{window.removeEventListener(Xd,e)},Ju=(e,t,n)=>{const r=new CustomEvent(Xd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class lA{constructor(){ve(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});ve(this,"categoryIdProxy");ve(this,"facetFiltersProxy");ve(this,"rangeFiltersProxy");ve(this,"catalogSegmentProxy");ve(this,"pricebooksProxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{const o=zC[n];return oA(o,n,r),Reflect.set(t,n,r)});ve(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId,categoryName:this.initialParams.categoryName},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get categoryId(){return this.categoryIdProxy.categoryId||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{categoryId:this.categoryId,categoryName:this.categoryIdProxy.categoryName,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const ut=new lA,_g=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},xg=(e,t,n)=>{var u,c;const r=H({},((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},wg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},Sg=({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},Cg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},Ag=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},cA=e=>{if(!Ki()||!Zo()){Ki()&&sn.clear(),sn.add({context:"browse",payload:Te(H({},ut.state),{categoryId:e})});return}ut.categoryIdProxy.categoryId=e},vg=e=>{_g(e,ut)},dA=(e,t)=>{xg(e,t,ut)},kg=e=>{wg(e,ut)},fA=({field:e,value:t})=>{Sg({field:e,value:t},ut)},hA=e=>{Cg(e,ut)},Ng=e=>{Ag(e,ut)},Og=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=Ki(),n=Zo();if(!t||!n){t&&sn.clear(),sn.add({context:"browse",payload:H({},e)});return}"facetFilters"in e&&vg(e.facetFilters||{}),"rangeFilters"in e&&kg(e.rangeFilters||[]),"catalogSegment"in e&&(ut.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Ng(e.pricebooks||[]),"categoryName"in e&&(ut.categoryIdProxy.categoryName=e.categoryName||""),ut.categoryIdProxy.categoryId=e.categoryId},pA=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:Og,updateBrowseCategoryId:cA,updateCatalogSegment:hA,updateFacetFilter:dA,updateFacetFilters:vg,updatePricebooks:Ng,updateRangeFilter:fA,updateRangeFilters:kg},Symbol.toStringTag,{value:"Module"}));class mA{constructor(){ve(this,"initialParams",{productId:"",productName:"",pdpLink:""});ve(this,"proxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>(Tg(n,r),Reflect.set(t,n,r)));ve(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 or=new mA,Ig=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=Ki(),n=Zo();if(!t||!n){t&&sn.clear(),sn.add({context:"pdp",payload:H({},e)});return}or.updateProxy(e),Tg("pdp-context",e)},gA=e=>{or.proxy.productId=e,Ki()||sn.add({context:"pdp",payload:H({},or.state)})},EA=e=>{or.proxy.pdpLink=e},yA=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{Ju("getConversationMessages",{payload:e,callback:t},ci.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{Ju("getSessionInformation",{callback:e},ci.GET_SESSION_INFORMATION)},loadConversation:e=>{Ju("loadConversation",e,ci.LOAD_CONVERSATION)},resetConversation:()=>{Ju("resetConversation",!0,ci.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class bA{constructor(){ve(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});ve(this,"queryProxy");ve(this,"facetFiltersProxy");ve(this,"rangeFiltersProxy");ve(this,"catalogSegmentProxy");ve(this,"pricebooksProxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{const o=jC[n];return sA(o,n,r),Reflect.set(t,n,r)});ve(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));ve(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 gt=new bA,TA=e=>{const t=Zo(),n=Ki();if(!n||!t){n&&sn.clear(),sn.add({context:"search",payload:Te(H({},gt.state),{query:e})});return}gt.queryProxy.query=e},Pg=e=>{_g(e,gt)},_A=(e,t)=>{xg(e,t,gt)},Rg=e=>{wg(e,gt)},xA=({field:e,value:t})=>{Sg({field:e,value:t},gt)},wA=e=>{Cg(e,gt)},Lg=e=>{Ag(e,gt)},Dg=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=Zo(),n=Ki();if(!n||!t){n&&sn.clear(),sn.add({context:"search",payload:H({},e)});return}"facetFilters"in e&&Pg(e.facetFilters||{}),"rangeFilters"in e&&Rg(e.rangeFilters||[]),"catalogSegment"in e&&(gt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Lg(e.pricebooks||[]),gt.queryProxy.query=e.query},SA=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:Dg,updateCatalogSegment:wA,updateFacetFilter:_A,updateFacetFilters:Pg,updatePricebooks:Lg,updateRangeFilter:xA,updateRangeFilters:Rg,updateSearchQuery:TA},Symbol.toStringTag,{value:"Module"})),CA={categoryId:ut.categoryId,categoryName:ut.categoryIdProxy.categoryName||"",facetFilters:ut.facetFilters,rangeFilters:ut.rangeFilters,catalogSegment:ut.catalogSegment,pricebooks:ut.pricebooks},Mg=$.createContext(CA),AA=({children:e})=>{const[t,n]=$.useState(ut.categoryId),[r,o]=$.useState(ut.categoryIdProxy.categoryName||""),[a,u]=$.useState(ut.facetFilters||{}),[c,d]=$.useState(ut.rangeFilters||[]),[f,p]=$.useState(ut.catalogSegment||null),[E,T]=$.useState(ut.pricebooks||null);$.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 gg(_),()=>{Eg(_)}},[]);const b=$.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:E}),[t,r,a,c,f,E]);return C.jsx(Mg.Provider,{value:b,children:e})},vA=()=>{const e=$.useContext(Mg);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},kA={searchQuery:gt.query,facetFilters:gt.facetFilters,rangeFilters:gt.rangeFilters,catalogSegment:gt.catalogSegment,pricebooks:gt.pricebooks},Fg=$.createContext(kA),NA=({children:e})=>{const[t,n]=$.useState(gt.query),[r,o]=$.useState(gt.facetFilters),[a,u]=$.useState(gt.rangeFilters),[c,d]=$.useState(gt.catalogSegment),[f,p]=$.useState(gt.pricebooks);$.useEffect(()=>{const T=({detail:b})=>{(b==null?void 0:b.property)==="query"&&n(b.value),(b==null?void 0:b.property)==="facetFilters"&&o(b.value),(b==null?void 0:b.property)==="rangeFilters"&&u(b.value),(b==null?void 0:b.property)==="catalogSegment"&&d(b.value),(b==null?void 0:b.property)==="pricebooks"&&p(b.value)};return pg(T),()=>{mg(T)}},[]);const E=$.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return C.jsx(Fg.Provider,{value:E,children:e})},OA=()=>{const e=$.useContext(Fg);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},IA={productId:or.productId,pdpLink:or.pdpLink},Bg=$.createContext(IA),PA=({children:e})=>{const[t,n]=$.useState(or.productId),[r,o]=$.useState(or.pdpLink);$.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 yg(u),()=>{bg(u)}},[]);const a=$.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return C.jsx(Bg.Provider,{value:a,children:e})},RA=()=>{const e=$.useContext(Bg);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},ta=()=>{const e=$.useContext(fg);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Ms=()=>{const e=$.useContext(dg);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},wr=()=>{const e=$.useContext(Hg);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},tf=()=>{const{status:e}=di(),{entryType:t,messages:n}=Ms(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},Ug=$.createContext({mode:at.modeProxy.mode,status:at.statusProxy,dialogPosition:at.dialogProxy.position,isModalFullscreen:at.modalProxy.isFullscreen,previousComponentType:at.statusProxy.type}),LA=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const{setEntryType:o}=ta(),[a,u]=$.useState(at.modeProxy.mode),[c,d]=$.useState({type:n||at.statusProxy.type,isOpen:at.statusProxy.isOpen,isMinimized:at.statusProxy.isMinimized}),[f,p]=$.useState(at.dialogProxy.position),[E,T]=$.useState(at.modalProxy.isFullscreen),b=rA(c.type);$.useEffect(()=>{const w=k=>{const{property:v,value:F}=k.detail||{};if(!(!v||F===void 0)){if(v==="mode"){u(F);return}if(v==="entryType"){o(F);return}if(v==="isMinimized"){d(R=>Te(H({},R),{isMinimized:F}));return}if(v==="isOpen"){d(R=>Te(H({},R),{isOpen:F}));return}if(v==="type"){d(R=>Te(H({},R),{type:F}));return}if(v==="position"){p(F);return}if(v==="isFullscreen"){T(F);return}}};return GC(w),()=>{KC(w)}},[o]),Xu(()=>{e&&ea(e)}),Xu(()=>{const w=n||(t==null?void 0:t.type);w&&Qu(w),t&&"isOpen"in t&&Qi(!!t.isOpen),t&&"isMinimized"in t&&Jd(!!t.isMinimized)}),Xu(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:w}=t.options;w&&ef(w),"isModalFullscreen"in t.options&&Zd(!!t.options.isModalFullscreen)});const _=$.useMemo(()=>({mode:a,status:c,previousComponentType:b||"dialog",dialogPosition:f,isModalFullscreen:E}),[a,c,b,f,E]);return C.jsx(Ug.Provider,{value:_,children:r})},di=()=>{const e=$.useContext(Ug);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},DA=({copilot:e})=>{const{logger:t,conversationHistory:n}=Rt(),{addCopilotEvent:r,setEntryType:o}=ta(),{activeConversationId:a}=Ms(),u=$.useCallback(d=>{e&&e.requestSessionInformation(f=>{t==null||t.log("Retrieved session information: ",f),d==null||d(f)})},[e,t]),c=$.useCallback((d,f)=>{e&&d.conversationId&&e.getConversationEvents(d,p=>{t==null||t.log("Retrieved conversation messages: ",p),f==null||f(p)})},[e,t]);return $.useEffect(()=>{if(!a||n.sinceHours===0||(n==null?void 0:n.limit)===0)return;const d=3600*1e3*n.sinceHours,f=new Date(Date.now()-d).toISOString(),p={conversationId:a,since:f,excludeEvents:["done","error","connection_error","refined_browse","refined_search"]};typeof n.limit=="number"&&(p.limit=n.limit),c(p,E=>{E.forEach(b=>{b.bypassHandlers=!0,r(b)});const T=UC(E);if(T!=null&&T.name){const b=HC(T.name);o(b)}})},[t,a,c,r,o,n]),{getSessionInformation:u,getConversationMessages:c}},Hg=$.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),MA=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>{const{logger:d}=Rt(),xi=OA(),{searchQuery:f}=xi,p=nn(xi,["searchQuery"]),Zr=vA(),{categoryId:E}=Zr,T=nn(Zr,["categoryId"]),{productId:b,pdpLink:_}=RA(),{setCopilot:w,setConnected:k,resetCopilot:v,resetCopilotState:F,addCopilotEvent:R,addLoadingMessage:W,removeLoadingMessage:X,setActiveConversationId:B,setConversationIds:te}=ta(),{connected:ge,entryType:ye,copilot:M,messages:ae,groupedMessages:he,loadingMessages:ue}=Ms(),{status:de}=di(),be=$.useRef(!1),Ce=$.useRef(!1),{getConversationMessages:oe,getSessionInformation:q}=DA({copilot:M}),ne=$.useMemo(()=>ue.size>0,[ue]),S=$.useCallback(we=>ue.has(we),[ue]),L=$.useCallback(we=>{R(we),W(we.id)},[R,W]),K=$.useCallback(({query:we,facetFilters:Ue,rangeFilters:je,catalogSegment:Xe,pricebooks:dt,userPrompt:wt,imageFile:mn})=>{if(!M){d==null||d.error("Copilot is not initialized");return}if(!we)return;const st={searchParams:{query:we}};wt&&(st.userPrompt=wt),mn&&(st.attachments={image:mn}),Ue&&Object.keys(Ue).length>0&&(st.searchParams.facetFilters=Ue),je&&je.length>0&&(st.searchParams.rangeFilters=je),Xe&&(st.searchParams.catalogSegment=Xe),dt&&(st.searchParams.pricebooks=dt),ea("search"),M.search(st,ee=>{const fe=H({},ee);be.current=!0,L(fe)})},[d,L,M]),O=$.useCallback(({categoryId:we,categoryName:Ue,facetFilters:je,rangeFilters:Xe,catalogSegment:dt,pricebooks:wt,userPrompt:mn,imageFile:st})=>{if(!M){d==null||d.error("Copilot is not initialized");return}const ee=je&&Object.keys(je).length>0;if(we===""&&!ee){d==null||d.error("Browse event must include facetFilters when categoryId is empty");return}const fe={browseParams:{categoryId:we||""}};mn&&(fe.userPrompt=mn),st&&(fe.attachments={image:st}),ee&&(fe.browseParams.facetFilters=je),Xe&&Xe.length>0&&(fe.browseParams.rangeFilters=Xe),dt&&(fe.browseParams.catalogSegment=dt),Array.isArray(wt)&&wt.length>0&&(fe.browseParams.pricebooks=wt),ea("browse"),M.browse(fe,Be=>{const Ve=H({},Be);Ue&&Ve.request&&(Ve.request.label=Ue),Ce.current=!0,L(Ve)})},[d,L,M]),_e=$.useCallback(({productId:we,productName:Ue,pdpLink:je,userPrompt:Xe,imageFile:dt})=>{if(!M){d==null||d.error("Copilot is not initialized");return}if(!we)return;const wt={productId:we};Xe&&(wt.userPrompt=Xe),je&&(wt.pdpLink=je),dt&&(wt.attachments={image:dt}),ea("pdp"),M.productView(wt,mn=>{const st=H({},mn);Ue&&st.request&&(st.request.label=Ue),L(st)})},[d,M,L]),Re=$.useCallback(({userPrompt:we,imageFile:Ue})=>{if(!M){d==null||d.error("Copilot is not initialized");return}if(!we)return;const je={userPrompt:we};Ue&&(je.attachments={image:Ue}),M.askCim(je,Xe=>{const dt=H({},Xe);L(dt)})},[d,M,L]),Oe=$.useCallback(we=>{const Ue=Te(H({},we),{id:we.inquiryLinkId||we.id});R(Ue)},[R]),Ge=$.useCallback(we=>{R(we),a==null||a(we)},[R,a]),Ye=$.useCallback(we=>{R(we),u==null||u(we)},[R,u]),et=$.useCallback(we=>{o==null||o(we),k(!0)},[o,k]);$.useEffect(()=>{!M||!ge||!de.isOpen||sn.size>0&&sn.processQueue(we=>{if(we.context==="search"){const Ue=H({},we.payload);Dg(Ue)}if(we.context==="browse"){const Ue=H({},we.payload);Og(Ue)}if(we.context==="pdp"){const Ue=H({},we.payload);Ig(Ue)}})},[de.isOpen,M,ge]);const Nt=$.useCallback(we=>{we.on("connect_ack",et),we.on("follow_up",R),we.on("inquiry",Oe),we.on("partial_inquiry",Oe),we.on("display_products",R),we.on("progress",R),we.on("refined_search",Ge),we.on("refined_browse",Ye),we.on("done",Ue=>{X(Ue.eventSourceId)}),we.on("error",Ue=>{R(Ue),X(Ue.eventSourceId)}),we.onDisconnect(Ue=>{const je=["io server disconnect","transport error","server shutting down"];if(d==null||d.log("Connection disconnected with reason: ",Ue),!je.includes(Ue)){k(!1);return}d==null||d.log("De-registering event listeners");const Xe=new Date().toISOString();R({name:"error",message:"Connection was lost. Please try again.",createdAt:Xe,id:`error-${Xe}`,sessionId:"session"}),we.off()})},[d,k,X,Oe,Ge,Ye,R,et]);Xu(()=>{let we;n?we=n:we=r?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Ue={baseUrl:we};e?Ue.apiKey=e:t&&(Ue.apiToken=t);const je=new eS(Ue);return w(je),Nt(je),je.connect(),je.requestSessionInformation(Xe=>{d==null||d.log("Session Information: ",Xe);const{activeConversationId:dt,conversationIds:wt}=Xe.data||{};dt&&B(dt),wt!=null&&wt.length&&te(wt)}),()=>{je.disconnect(),je.off(),v()}});const Kn=$.useCallback(we=>{if(!M)return;const Ue={eventId:we,reason:"User cancelled the request"};M.cancelRequest(Ue,je=>{R(je),X(we)})},[R,X,M]),cs=$.useCallback(()=>{M&&M.conversationReset({},we=>{F(),R(we),M.requestSessionInformation(Ue=>{d==null||d.log("Session Information: ",Ue);const{activeConversationId:je,conversationIds:Xe}=Ue.data||{};je&&B(je),Xe!=null&&Xe.length&&te(Xe)})})},[M,d,R,F,B,te]),Jr=$.useCallback((we,Ue)=>{if(!we)return;const je={userPrompt:we};switch(Ue&&(je.imageFile=Ue),ye){case"ask_cim":Re(je);return;case"search":K(H(H({query:f},p),je));return;case"browse":O(H(H({categoryId:E},T),je));return;case"pdp":_e(H({productId:b,pdpLink:_||""},je));return}},[ye,f,p,K,Re,E,T,O,_e,b,_]),_i=$.useCallback((we,Ue)=>{var wt,mn;const Xe=we.params.userPrompt||"";if(!Xe)return;const dt=ae.find(st=>st.id===Ue);if(dt){if(dt.name==="ask_cim"){Re({userPrompt:Xe});return}if(dt.name==="copilot_search"){const{query:st}=((wt=dt.request)==null?void 0:wt.searchParams)||{};st&&K(Te(H({query:st||f},p),{userPrompt:Xe}));return}if(dt.name==="copilot_browse"){const{categoryId:st}=((mn=dt.request)==null?void 0:mn.browseParams)||{};O(Te(H({categoryId:st||E||""},T),{userPrompt:Xe}));return}if(dt.name==="product_view"){const st=dt.request;st!=null&&st.productId&&_e(Te(H({},st),{userPrompt:Xe}))}}},[f,p,E,T,ae,K,Re,O,_e]),ds=$.useMemo(()=>({copilot:M,messages:ae,groupedMessages:he,isLoading:ne,isResponseLoading:S,handleAskCim:Re,handleSearch:K,handleBrowse:O,handlePdp:_e,handleUserInput:Jr,handleSuggestion:_i,handleCancel:Kn,resetConversation:cs,getSessionInformation:q,getConversationMessages:oe}),[M,ae,he,ne,S,Re,K,O,_e,Jr,_i,Kn,cs,q,oe]);return C.jsx(Hg.Provider,{value:ds,children:c})},FA=()=>{const{resetCopilotState:e,addCopilotEvent:t}=ta(),{copilot:n,handleSearch:r,handleBrowse:o,handlePdp:a,resetConversation:u,getSessionInformation:c,getConversationMessages:d}=wr(),f=$.useCallback(({query:T})=>{if(!n||!T)return;const{facetFilters:b}=gt.facetFiltersProxy,{rangeFilters:_}=gt.rangeFiltersProxy,{catalogSegment:w}=gt.catalogSegmentProxy,{pricebooks:k}=gt.pricebooksProxy,v={query:T};v.facetFilters=b||{},v.rangeFilters=_||[],v.catalogSegment=w||"",v.pricebooks=k||[],r(H({},v))},[n,r]),p=$.useCallback(({categoryId:T})=>{if(!n)return;const b=ut.categoryIdProxy.categoryName,{facetFilters:_}=ut.facetFiltersProxy,{rangeFilters:w}=ut.rangeFiltersProxy,{catalogSegment:k}=ut.catalogSegmentProxy,{pricebooks:v}=ut.pricebooksProxy,F={categoryId:T};F.categoryName=b||"",F.facetFilters=_||{},F.rangeFilters=w||[],F.catalogSegment=k||"",F.pricebooks=v||[],o(H({},F))},[n,o]),E=$.useCallback(({productId:T})=>{if(!n||!T)return;const b={productId:T,pdpLink:or.pdpLink,productName:or.proxy.productName||""};a(b)},[n,a]);return $.useEffect(()=>{const T=({detail:b})=>{(b==null?void 0:b.property)==="query"&&f({query:b.value})};return pg(T),()=>{mg(T)}},[f]),$.useEffect(()=>{const T=({detail:b})=>{if((b==null?void 0:b.property)==="pdp-context"){const _=b.value;E({productId:_.productId});return}(b==null?void 0:b.property)==="productId"&&E({productId:b.value})};return yg(T),()=>{bg(T)}},[E]),$.useEffect(()=>{const T=({detail:b})=>{(b==null?void 0:b.property)==="categoryId"&&p({categoryId:b.value})};return gg(T),()=>{Eg(T)}},[p]),$.useEffect(()=>{const T=({detail:b})=>{if((b==null?void 0:b.event)==ci.RESET_CONVERSATION&&u(),(b==null?void 0:b.event)==ci.GET_SESSION_INFORMATION){const _=b.value.callback;c(_)}if((b==null?void 0:b.event)==ci.GET_CONVERSATION_MESSAGES){const{payload:_,callback:w}=b.value;if(!_.conversationId||typeof w!="function")return;d(_,w)}if((b==null?void 0:b.event)==ci.LOAD_CONVERSATION){const _=b.value;if(!_.conversationId)return;d(_,k=>{e(),k.forEach(v=>{t(v)})})}};return aA(T),()=>{uA(T)}},[u,c,d,e,t]),null},BA=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>C.jsxs(MA,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:[C.jsx(FA,{}),c]}),zg=({apiKey:e,apiToken:t,baseUrl:n,logoUrl:r,headerText:o,theme:a,openLinksInNewTab:u,globalClassName:c,isDevelopment:d=!1,componentType:f,componentConfig:p,entryType:E,entryMessage:T,disclaimerText:b,disclaimerMarkdown:_,searchPlaceholder:w,searchButtonLabel:k,searchConfig:v,resetConversationMessage:F,conversationHistory:R,onConnect:W,onCopilotEvent:X,onRefinedSearch:B,onRefinedBrowse:te,__features:ge,children:ye})=>C.jsx(YC,{apiKey:e,logoUrl:r,headerText:o,entryMessage:T,theme:a,globalClassName:c,openLinksInNewTab:u,searchPlaceholder:w,searchButtonLabel:k,searchConfig:v,componentConfig:p,disclaimerMarkdown:_,disclaimerText:b,resetConversationMessage:F,conversationHistory:R,isDevelopment:d,__features:ge,children:C.jsx(CC,{apiKey:e,apiToken:t,isDevelopment:d,children:C.jsx(eA,{entryType:E,onCopilotEvent:X,children:C.jsx(PA,{children:C.jsx(AA,{children:C.jsx(NA,{children:C.jsx(LA,{entryType:E,componentConfig:p,componentType:f,children:C.jsx(BA,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:d,entryType:E,onConnect:W,onCopilotEvent:X,onRefinedSearch:B,onRefinedBrowse:te,children:ye})})})})})})})});function jg(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=jg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function J(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=jg(e))&&(r&&(r+=" "),r+=t);return r}var $g={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Vg=$i.createContext&&$i.createContext($g),UA=["attr","size","title"];function HA(e,t){if(e==null)return{};var n=zA(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zA(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Zu(){return Zu=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},Zu.apply(this,arguments)}function qg(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 el(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qg(Object(n),!0).forEach(function(r){jA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jA(e,t,n){return t=$A(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $A(e){var t=VA(e,"string");return typeof t=="symbol"?t:t+""}function VA(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 Yg(e){return e&&e.map((t,n)=>$i.createElement(t.tag,el({key:n},t.attr),Yg(t.child)))}function qt(e){return t=>$i.createElement(qA,Zu({attr:el({},e.attr)},t),Yg(e.child))}function qA(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=HA(e,UA),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),$i.createElement("svg",Zu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:el(el({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&$i.createElement("title",null,a),e.children)};return Vg!==void 0?$i.createElement(Vg.Consumer,null,n=>t(n)):t($g)}function Wg(e){return qt({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 Gg(e){return qt({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 na(e){return qt({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 YA(e){return qt({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 Kg(e){return qt({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 WA(e){return qt({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 GA(e){return qt({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 KA(e){return qt({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 QA(e){return qt({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 XA(e){return qt({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 nf=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>C.jsx("button",{"aria-label":t,className:J(e,`${Y}-close-button`),disabled:r,onClick:n,children:C.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:C.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"})})}),rf=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>C.jsx("button",{className:J(`${Y}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),Vr=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:C.jsx("button",{className:J(e,`${Y}-icon-button`),type:r,"aria-label":o,title:a,onClick:c,disabled:u,children:t?C.jsx("img",{className:J(`${Y}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),JA=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?C.jsx("img",{className:J(`${Y}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):C.jsx(na,{size:"1rem"})},ZA=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return C.jsx(Vr,{className:J(e,n,r,`${Y}-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:C.jsx(na,{size:"1rem"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return C.jsxs(rf,{className:J(e,n,r,`${Y}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&C.jsx(JA,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function ev(e){return qt({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 tv=()=>{const{messages:e}=Ms(),{handleCancel:t}=wr();return{cancelRequest:$.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],o=r.eventSourceId||r.id;t(o)},[t,e])}},nv=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=Rt(),{cancelRequest:r}=tv();return n!=null&&n.enableCancelSearch?C.jsx(Vr,{className:J(t,`${Y}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:C.jsx(ev,{}),disabled:!e,onClick:r}):null};function OB(){}function IB(){}function Qg(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(o,r).trim();(u||!a)&&t.push(u),o=r+1,r=n.indexOf(",",o)}return t}function Xg(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const rv=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iv=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sv={};function Jg(e,t){return(sv.jsx?iv:rv).test(e)}const ov=/[ \t\n\f\r]/g;function av(e){return typeof e=="object"?e.type==="text"?Zg(e.value):!1:Zg(e)}function Zg(e){return e.replace(ov,"")===""}let ra=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};ra.prototype.normal={},ra.prototype.property={},ra.prototype.space=void 0;function e1(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new ra(n,r,t)}function ia(e){return e.toLowerCase()}let _n=class{constructor(t,n){this.attribute=n,this.property=t}};_n.prototype.attribute="",_n.prototype.booleanish=!1,_n.prototype.boolean=!1,_n.prototype.commaOrSpaceSeparated=!1,_n.prototype.commaSeparated=!1,_n.prototype.defined=!1,_n.prototype.mustUseProperty=!1,_n.prototype.number=!1,_n.prototype.overloadedBoolean=!1,_n.prototype.property="",_n.prototype.spaceSeparated=!1,_n.prototype.space=void 0;let uv=0;const qe=Xi(),Bt=Xi(),sf=Xi(),pe=Xi(),ht=Xi(),Fs=Xi(),Pn=Xi();function Xi(){return sd(2,++uv)}const of=Object.freeze(Object.defineProperty({__proto__:null,boolean:qe,booleanish:Bt,commaOrSpaceSeparated:Pn,commaSeparated:Fs,number:pe,overloadedBoolean:sf,spaceSeparated:ht},Symbol.toStringTag,{value:"Module"})),af=Object.keys(of);let uf=class extends _n{constructor(t,n,r,o){let a=-1;if(super(t,n),t1(this,"space",o),typeof r=="number")for(;++a<af.length;){const u=af[a];t1(this,af[a],(r&of[u])===of[u])}}};uf.prototype.defined=!0;function t1(e,t,n){n&&(e[t]=n)}function Bs(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new uf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ia(r)]=r,n[ia(a.attribute)]=r}return new ra(t,n,e.space)}const n1=Bs({properties:{ariaActiveDescendant:null,ariaAtomic:Bt,ariaAutoComplete:null,ariaBusy:Bt,ariaChecked:Bt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:ht,ariaCurrent:null,ariaDescribedBy:ht,ariaDetails:null,ariaDisabled:Bt,ariaDropEffect:ht,ariaErrorMessage:null,ariaExpanded:Bt,ariaFlowTo:ht,ariaGrabbed:Bt,ariaHasPopup:null,ariaHidden:Bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ht,ariaLevel:pe,ariaLive:null,ariaModal:Bt,ariaMultiLine:Bt,ariaMultiSelectable:Bt,ariaOrientation:null,ariaOwns:ht,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:Bt,ariaReadOnly:Bt,ariaRelevant:null,ariaRequired:Bt,ariaRoleDescription:ht,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:Bt,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function r1(e,t){return t in e?e[t]:t}function i1(e,t){return r1(e,t.toLowerCase())}const lv=Bs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fs,acceptCharset:ht,accessKey:ht,action:null,allow:null,allowFullScreen:qe,allowPaymentRequest:qe,allowUserMedia:qe,alt:null,as:null,async:qe,autoCapitalize:null,autoComplete:ht,autoFocus:qe,autoPlay:qe,blocking:ht,capture:null,charSet:null,checked:qe,cite:null,className:ht,cols:pe,colSpan:null,content:null,contentEditable:Bt,controls:qe,controlsList:ht,coords:pe|Fs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:qe,defer:qe,dir:null,dirName:null,disabled:qe,download:sf,draggable:Bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:qe,formTarget:null,headers:ht,height:pe,hidden:sf,high:pe,href:null,hrefLang:null,htmlFor:ht,httpEquiv:ht,id:null,imageSizes:null,imageSrcSet:null,inert:qe,inputMode:null,integrity:null,is:null,isMap:qe,itemId:null,itemProp:ht,itemRef:ht,itemScope:qe,itemType:ht,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:qe,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:qe,muted:qe,name:null,nonce:null,noModule:qe,noValidate:qe,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:qe,optimum:pe,pattern:null,ping:ht,placeholder:null,playsInline:qe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:qe,referrerPolicy:null,rel:ht,required:qe,reversed:qe,rows:pe,rowSpan:pe,sandbox:ht,scope:null,scoped:qe,seamless:qe,selected:qe,shadowRootClonable:qe,shadowRootDelegatesFocus:qe,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:Bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:qe,useMap:null,value:Bt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ht,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:qe,declare:qe,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:qe,noHref:qe,noShade:qe,noWrap:qe,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:Bt,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:qe,disableRemotePlayback:qe,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:i1}),cv=Bs({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:Pn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:ht,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:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:qe,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,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:Fs,g2:Fs,glyphName:Fs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Pn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,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:pe,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:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ht,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pn,rev:Pn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pn,requiredFeatures:Pn,requiredFonts:Pn,requiredFormats:Pn,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:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Pn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pn,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:r1}),s1=Bs({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()}}),o1=Bs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:i1}),a1=Bs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),dv={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"},fv=/[A-Z]/g,u1=/-[a-z]/g,hv=/^data[-\w.:]+$/i;function lf(e,t){const n=ia(t);let r=t,o=_n;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&hv.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(u1,mv);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!u1.test(a)){let u=a.replace(fv,pv);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=uf}return new o(r,t)}function pv(e){return"-"+e.toLowerCase()}function mv(e){return e.charAt(1).toUpperCase()}const tl=e1([n1,lv,s1,o1,a1],"html"),Us=e1([n1,cv,s1,o1,a1],"svg");function l1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function c1(e){return e.join(" ").trim()}var Hs={},cf,d1;function gv(){if(d1)return cf;d1=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=`
|
|
8
|
-
`,f="/",p="*",E="",T="comment",b="declaration";cf=function(w,k){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];k=k||{};var v=1,F=1;function R(ue){var de=ue.match(t);de&&(v+=de.length);var be=ue.lastIndexOf(d);F=~be?ue.length-be:F+ue.length}function W(){var ue={line:v,column:F};return function(de){return de.position=new X(ue),ge(),de}}function X(ue){this.start=ue,this.end={line:v,column:F},this.source=k.source}X.prototype.content=w;function B(ue){var de=new Error(k.source+":"+v+":"+F+": "+ue);if(de.reason=ue,de.filename=k.source,de.line=v,de.column=F,de.source=w,!k.silent)throw de}function te(ue){var de=ue.exec(w);if(de){var be=de[0];return R(be),w=w.slice(be.length),de}}function ge(){te(n)}function ye(ue){var de;for(ue=ue||[];de=M();)de!==!1&&ue.push(de);return ue}function M(){var ue=W();if(!(f!=w.charAt(0)||p!=w.charAt(1))){for(var de=2;E!=w.charAt(de)&&(p!=w.charAt(de)||f!=w.charAt(de+1));)++de;if(de+=2,E===w.charAt(de-1))return B("End of comment missing");var be=w.slice(2,de-2);return F+=2,R(be),w=w.slice(de),F+=2,ue({type:T,comment:be})}}function ae(){var ue=W(),de=te(r);if(de){if(M(),!te(o))return B("property missing ':'");var be=te(a),Ce=ue({type:b,property:_(de[0].replace(e,E)),value:be?_(be[0].replace(e,E)):E});return te(u),Ce}}function he(){var ue=[];ye(ue);for(var de;de=ae();)de!==!1&&(ue.push(de),ye(ue));return ue}return ge(),he()};function _(w){return w?w.replace(c,E):E}return cf}var f1;function Ev(){if(f1)return Hs;f1=1;var e=Hs&&Hs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.default=n;var t=e(gv());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 Hs}var sa={},h1;function yv(){if(h1)return sa;h1=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,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 sa.camelCase=d,sa}var oa,p1;function bv(){if(p1)return oa;p1=1;var e=oa&&oa.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(Ev()),n=yv();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,oa=r,oa}var Tv=bv();const _v=Ke(Tv),nl=m1("end"),Sr=m1("start");function m1(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 g1(e){const t=Sr(e),n=nl(e);if(t&&n)return{start:t,end:n}}function aa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?E1(e.position):"start"in e||"end"in e?E1(e):"line"in e||"column"in e?df(e):""}function df(e){return y1(e&&e.line)+":"+y1(e&&e.column)}function E1(e){return df(e&&e.start)+"-"+df(e&&e.end)}function y1(e){return e&&typeof e=="number"?e:1}class on 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=H({},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=aa(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}}on.prototype.file="",on.prototype.name="",on.prototype.reason="",on.prototype.message="",on.prototype.stack="",on.prototype.column=void 0,on.prototype.line=void 0,on.prototype.ancestors=void 0,on.prototype.cause=void 0,on.prototype.fatal=void 0,on.prototype.place=void 0,on.prototype.ruleId=void 0,on.prototype.source=void 0;const ff={}.hasOwnProperty,xv=new Map,wv=/[A-Z]/g,Sv=new Set(["table","tbody","thead","tfoot","tr"]),Cv=new Set(["td","th"]),b1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Av(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=Lv(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=Rv(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"?Us:tl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=T1(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function T1(e,t,n){if(t.type==="element")return vv(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return kv(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Ov(e,t,n);if(t.type==="mdxjsEsm")return Nv(e,t);if(t.type==="root")return Iv(e,t,n);if(t.type==="text")return Pv(e,t)}function vv(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Us,e.schema=o),e.ancestors.push(t);const a=x1(e,t.tagName,!1),u=Dv(e,t);let c=pf(e,t);return Sv.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!av(d):!0})),_1(e,u,a,t),hf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function kv(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)}ua(e,t.position)}function Nv(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ua(e,t.position)}function Ov(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Us,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:x1(e,t.name,!0),u=Mv(e,t),c=pf(e,t);return _1(e,u,a,t),hf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function Iv(e,t,n){const r={};return hf(r,pf(e,t)),e.create(t,e.Fragment,r,n)}function Pv(e,t){return t.value}function _1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function hf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Rv(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 Lv(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=Sr(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 Dv(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&ff.call(t.properties,o)){const a=Fv(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&Cv.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 Mv(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 ua(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 ua(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function pf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:xv;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=T1(e,a,u);c!==void 0&&n.push(c)}return n}function Fv(e,t,n){const r=lf(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Xg(n):c1(n)),r.property==="style"){let o=typeof n=="object"?n:Bv(e,String(n));return e.stylePropertyNameCase==="css"&&(o=Uv(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?dv[r.property]||r.property:r.attribute,n]}}function Bv(e,t){try{return _v(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new on("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=b1+"#cannot-parse-style-attribute",o}}function x1(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=Jg(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=Jg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return ff.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);ua(e)}function ua(e,t){const n=new on("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=b1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Uv(e){const t={};let n;for(n in e)ff.call(e,n)&&(t[Hv(n)]=e[n]);return t}function Hv(e){let t=e.replace(wv,zv);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function zv(e){return"-"+e.toLowerCase()}const mf={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"]},jv={};function gf(e,t){const n=jv,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return w1(e,r,o)}function w1(e,t,n){if($v(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 S1(e.children,t,n)}return Array.isArray(e)?S1(e,t,n):""}function S1(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=w1(e[o],t,n);return r.join("")}function $v(e){return!!(e&&typeof e=="object")}const C1=document.createElement("i");function Ef(e){const t="&"+e+";";C1.innerHTML=t;const n=C1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Rn(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 qn(e,t){return e.length>0?(Rn(e,e.length,0,t),e):t}const A1={}.hasOwnProperty;function v1(e){const t={};let n=-1;for(;++n<e.length;)Vv(t,e[n]);return t}function Vv(e,t){let n;for(n in t){const o=(A1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){A1.call(o,u)||(o[u]=[]);const c=a[u];qv(o[u],Array.isArray(c)?c:c?[c]:[])}}}function qv(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Rn(e,0,0,r)}function k1(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 ar(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const pn=fi(/[A-Za-z]/),an=fi(/[\dA-Za-z]/),Yv=fi(/[#-'*+\--9=?A-Z^-~]/);function rl(e){return e!==null&&(e<32||e===127)}const yf=fi(/\d/),Wv=fi(/[\dA-Fa-f]/),Gv=fi(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function ft(e){return e!==null&&(e<0||e===32)}function Qe(e){return e===-2||e===-1||e===32}const il=fi(new RegExp("\\p{P}|\\p{S}","u")),Ji=fi(/\s/);function fi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function zs(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&an(e.charCodeAt(n+1))&&an(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 Ze(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Qe(d)?(e.enter(n),c(d)):t(d)}function c(d){return Qe(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const Kv={tokenize:Qv};function Qv(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"),Ze(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Le(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const Xv={tokenize:Jv},N1={tokenize:Zv};function Jv(e){const t=this,n=[];let r=0,o,a,u;return c;function c(R){if(r<n.length){const W=n[r];return t.containerState=W[1],e.attempt(W[0].continuation,d,f)(R)}return f(R)}function d(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&F();const W=t.events.length;let X=W,B;for(;X--;)if(t.events[X][0]==="exit"&&t.events[X][1].type==="chunkFlow"){B=t.events[X][1].end;break}v(r);let te=W;for(;te<t.events.length;)t.events[te][1].end=H({},B),te++;return Rn(t.events,X+1,0,t.events.slice(W)),t.events.length=te,f(R)}return c(R)}function f(R){if(r===n.length){if(!o)return T(R);if(o.currentConstruct&&o.currentConstruct.concrete)return _(R);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(N1,p,E)(R)}function p(R){return o&&F(),v(r),T(R)}function E(R){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(R)}function T(R){return t.containerState={},e.attempt(N1,b,_)(R)}function b(R){return r++,n.push([t.currentConstruct,t.containerState]),T(R)}function _(R){if(R===null){o&&F(),v(0),e.consume(R);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),w(R)}function w(R){if(R===null){k(e.exit("chunkFlow"),!0),v(0),e.consume(R);return}return Le(R)?(e.consume(R),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(R),w)}function k(R,W){const X=t.sliceStream(R);if(W&&X.push(null),R.previous=a,a&&(a.next=R),a=R,o.defineSkip(R.start),o.write(X),t.parser.lazy[R.start.line]){let B=o.events.length;for(;B--;)if(o.events[B][1].start.offset<u&&(!o.events[B][1].end||o.events[B][1].end.offset>u))return;const te=t.events.length;let ge=te,ye,M;for(;ge--;)if(t.events[ge][0]==="exit"&&t.events[ge][1].type==="chunkFlow"){if(ye){M=t.events[ge][1].end;break}ye=!0}for(v(r),B=te;B<t.events.length;)t.events[B][1].end=H({},M),B++;Rn(t.events,ge+1,0,t.events.slice(te)),t.events.length=B}}function v(R){let W=n.length;for(;W-- >R;){const X=n[W];t.containerState=X[1],X[0].exit.call(t,e)}n.length=R}function F(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function Zv(e,t,n){return Ze(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function js(e){if(e===null||ft(e)||Ji(e))return 1;if(il(e))return 2}function sl(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 bf={name:"attention",resolveAll:ek,tokenize:tk};function ek(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 E=H({},e[r][1].end),T=H({},e[n][1].start);O1(E,-d),O1(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:E,end:H({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:H({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:H({},e[r][1].end),end:H({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:H({},u.start),end:H({},c.end)},e[r][1].end=H({},u.start),e[n][1].start=H({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=qn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=qn(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=qn(f,sl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=qn(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=qn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Rn(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 tk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=js(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=js(d),E=!p||p===2&&o||n.includes(d),T=!o||o===2&&p||n.includes(r);return f._open=!!(a===42?E:E&&(o||!T)),f._close=!!(a===42?T:T&&(p||!E)),t(d)}}function O1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const nk={name:"autolink",tokenize:rk};function rk(e,t,n){let r=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(b){return pn(b)?(e.consume(b),u):b===64?n(b):f(b)}function u(b){return b===43||b===45||b===46||an(b)?(r=1,c(b)):f(b)}function c(b){return b===58?(e.consume(b),r=0,d):(b===43||b===45||b===46||an(b))&&r++<32?(e.consume(b),c):(r=0,f(b))}function d(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||rl(b)?n(b):(e.consume(b),d)}function f(b){return b===64?(e.consume(b),p):Yv(b)?(e.consume(b),f):n(b)}function p(b){return an(b)?E(b):n(b)}function E(b){return b===46?(e.consume(b),r=0,p):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):T(b)}function T(b){if((b===45||an(b))&&r++<63){const _=b===45?T:E;return e.consume(b),_}return n(b)}}const la={partial:!0,tokenize:ik};function ik(e,t,n){return r;function r(a){return Qe(a)?Ze(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Le(a)?t(a):n(a)}}const I1={continuation:{tokenize:ok},exit:ak,name:"blockQuote",tokenize:sk};function sk(e,t,n){const r=this;return o;function o(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Qe(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function ok(e,t,n){const r=this;return o;function o(u){return Qe(u)?Ze(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(I1,t,n)(u)}}function ak(e){e.exit("blockQuote")}const P1={name:"characterEscape",tokenize:uk};function uk(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 Gv(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const R1={name:"characterReference",tokenize:lk};function lk(e,t,n){const r=this;let o=0,a,u;return c;function c(E){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),d}function d(E){return E===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(E),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=an,p(E))}function f(E){return E===88||E===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(E),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=Wv,p):(e.enter("characterReferenceValue"),a=7,u=yf,p(E))}function p(E){if(E===59&&o){const T=e.exit("characterReferenceValue");return u===an&&!Ef(r.sliceSerialize(T))?n(E):(e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(E)&&o++<a?(e.consume(E),p):n(E)}}const L1={partial:!0,tokenize:dk},D1={concrete:!0,name:"codeFenced",tokenize:ck};function ck(e,t,n){const r=this,o={partial:!0,tokenize:X};let a=0,u=0,c;return d;function d(B){return f(B)}function f(B){const te=r.events[r.events.length-1];return a=te&&te[1].type==="linePrefix"?te[2].sliceSerialize(te[1],!0).length:0,c=B,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(B)}function p(B){return B===c?(u++,e.consume(B),p):u<3?n(B):(e.exit("codeFencedFenceSequence"),Qe(B)?Ze(e,E,"whitespace")(B):E(B))}function E(B){return B===null||Le(B)?(e.exit("codeFencedFence"),r.interrupt?t(B):e.check(L1,w,W)(B)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(B))}function T(B){return B===null||Le(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),E(B)):Qe(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ze(e,b,"whitespace")(B)):B===96&&B===c?n(B):(e.consume(B),T)}function b(B){return B===null||Le(B)?E(B):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(B))}function _(B){return B===null||Le(B)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),E(B)):B===96&&B===c?n(B):(e.consume(B),_)}function w(B){return e.attempt(o,W,k)(B)}function k(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),v}function v(B){return a>0&&Qe(B)?Ze(e,F,"linePrefix",a+1)(B):F(B)}function F(B){return B===null||Le(B)?e.check(L1,w,W)(B):(e.enter("codeFlowValue"),R(B))}function R(B){return B===null||Le(B)?(e.exit("codeFlowValue"),F(B)):(e.consume(B),R)}function W(B){return e.exit("codeFenced"),t(B)}function X(B,te,ge){let ye=0;return M;function M(be){return B.enter("lineEnding"),B.consume(be),B.exit("lineEnding"),ae}function ae(be){return B.enter("codeFencedFence"),Qe(be)?Ze(B,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(be):he(be)}function he(be){return be===c?(B.enter("codeFencedFenceSequence"),ue(be)):ge(be)}function ue(be){return be===c?(ye++,B.consume(be),ue):ye>=u?(B.exit("codeFencedFenceSequence"),Qe(be)?Ze(B,de,"whitespace")(be):de(be)):ge(be)}function de(be){return be===null||Le(be)?(B.exit("codeFencedFence"),te(be)):ge(be)}}}function dk(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 Tf={name:"codeIndented",tokenize:hk},fk={partial:!0,tokenize:pk};function hk(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),Ze(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):Le(f)?e.attempt(fk,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||Le(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function pk(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):Ze(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Le(u)?o(u):n(u)}}const mk={name:"codeText",previous:Ek,resolve:gk,tokenize:yk};function gk(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 Ek(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function yk(e,t,n){let r=0,o,a;return u;function u(E){return e.enter("codeText"),e.enter("codeTextSequence"),c(E)}function c(E){return E===96?(e.consume(E),r++,c):(e.exit("codeTextSequence"),d(E))}function d(E){return E===null?n(E):E===32?(e.enter("space"),e.consume(E),e.exit("space"),d):E===96?(a=e.enter("codeTextSequence"),o=0,p(E)):Le(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(E))}function f(E){return E===null||E===32||E===96||Le(E)?(e.exit("codeTextData"),d(E)):(e.consume(E),f)}function p(E){return E===96?(e.consume(E),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(E)):(a.type="codeTextData",f(E))}}class bk{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&ca(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),ca(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ca(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);ca(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ca(this.left,n.reverse())}}}function ca(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 M1(e){const t={};let n=-1,r,o,a,u,c,d,f;const p=new bk(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Tk(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=H({},p.get(o)[1].start),c=p.slice(o,n),c.unshift(r),p.splice(o,n-o+1,c))}}return Rn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function Tk(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,E,T=-1,b=n,_=0,w=0;const k=[w];for(;b;){for(;e.get(++o)[1]!==b;);a.push(o),b._tokenizer||(p=r.sliceStream(b),b.next||p.push(null),E&&u.defineSkip(b.start),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),E=b,b=b.next}for(b=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,k.push(w),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(u.events=[],b?(b._tokenizer=void 0,b.previous=void 0):k.pop(),T=k.length;T--;){const v=c.slice(k[T],k[T+1]),F=a.pop();d.push([F,F+v.length-1]),e.splice(F,2,v)}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 _k={resolve:wk,tokenize:Sk},xk={partial:!0,tokenize:Ck};function wk(e){return M1(e),e}function Sk(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):Le(c)?e.check(xk,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 Ck(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Ze(e,a,"linePrefix")}function a(u){if(u===null||Le(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function F1(e,t,n,r,o,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return E;function E(v){return v===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(v),e.exit(a),T):v===null||v===32||v===41||rl(v)?n(v):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),w(v))}function T(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===62?(e.exit("chunkString"),e.exit(c),T(v)):v===null||v===60||Le(v)?n(v):(e.consume(v),v===92?_:b)}function _(v){return v===60||v===62||v===92?(e.consume(v),b):b(v)}function w(v){return!p&&(v===null||v===41||ft(v))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(v)):p<f&&v===40?(e.consume(v),p++,w):v===41?(e.consume(v),p--,w):v===null||v===32||v===40||rl(v)?n(v):(e.consume(v),v===92?k:w)}function k(v){return v===40||v===41||v===92?(e.consume(v),w):w(v)}}function B1(e,t,n,r,o,a){const u=this;let c=0,d;return f;function f(b){return e.enter(r),e.enter(o),e.consume(b),e.exit(o),e.enter(a),p}function p(b){return c>999||b===null||b===91||b===93&&!d||b===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(b):b===93?(e.exit(a),e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):Le(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),E(b))}function E(b){return b===null||b===91||b===93||Le(b)||c++>999?(e.exit("chunkString"),p(b)):(e.consume(b),d||(d=!Qe(b)),b===92?T:E)}function T(b){return b===91||b===92||b===93?(e.consume(b),c++,E):E(b)}}function U1(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):Le(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Ze(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||Le(T)?(e.exit("chunkString"),f(T)):(e.consume(T),T===92?E:p)}function E(T){return T===u||T===92?(e.consume(T),p):p(T)}}function da(e,t){let n;return r;function r(o){return Le(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Qe(o)?Ze(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Ak={name:"definition",tokenize:kk},vk={partial:!0,tokenize:Nk};function kk(e,t,n){const r=this;let o;return a;function a(b){return e.enter("definition"),u(b)}function u(b){return B1.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function c(b){return o=ar(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),d):n(b)}function d(b){return ft(b)?da(e,f)(b):f(b)}function f(b){return F1(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function p(b){return e.attempt(vk,E,E)(b)}function E(b){return Qe(b)?Ze(e,T,"whitespace")(b):T(b)}function T(b){return b===null||Le(b)?(e.exit("definition"),r.parser.defined.push(o),t(b)):n(b)}}function Nk(e,t,n){return r;function r(c){return ft(c)?da(e,o)(c):n(c)}function o(c){return U1(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Qe(c)?Ze(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Le(c)?t(c):n(c)}}const Ok={name:"hardBreakEscape",tokenize:Ik};function Ik(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Le(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Pk={name:"headingAtx",resolve:Rk,tokenize:Lk};function Rk(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"},Rn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function Lk(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||ft(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Le(p)?(e.exit("atxHeading"),t(p)):Qe(p)?Ze(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||ft(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const Dk=["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"],H1=["pre","script","style","textarea"],Mk={concrete:!0,name:"htmlFlow",resolveTo:Uk,tokenize:Hk},Fk={partial:!0,tokenize:jk},Bk={partial:!0,tokenize:zk};function Uk(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 Hk(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),E}function E(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:S):pn(O)?(e.consume(O),u=String.fromCharCode(O),k):n(O)}function T(O){return O===45?(e.consume(O),o=2,b):O===91?(e.consume(O),o=5,c=0,_):pn(O)?(e.consume(O),o=4,r.interrupt?t:S):n(O)}function b(O){return O===45?(e.consume(O),r.interrupt?t:S):n(O)}function _(O){const _e="CDATA[";return O===_e.charCodeAt(c++)?(e.consume(O),c===_e.length?r.interrupt?t:he:_):n(O)}function w(O){return pn(O)?(e.consume(O),u=String.fromCharCode(O),k):n(O)}function k(O){if(O===null||O===47||O===62||ft(O)){const _e=O===47,Re=u.toLowerCase();return!_e&&!a&&H1.includes(Re)?(o=1,r.interrupt?t(O):he(O)):Dk.includes(u.toLowerCase())?(o=6,_e?(e.consume(O),v):r.interrupt?t(O):he(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?F(O):R(O))}return O===45||an(O)?(e.consume(O),u+=String.fromCharCode(O),k):n(O)}function v(O){return O===62?(e.consume(O),r.interrupt?t:he):n(O)}function F(O){return Qe(O)?(e.consume(O),F):M(O)}function R(O){return O===47?(e.consume(O),M):O===58||O===95||pn(O)?(e.consume(O),W):Qe(O)?(e.consume(O),R):M(O)}function W(O){return O===45||O===46||O===58||O===95||an(O)?(e.consume(O),W):X(O)}function X(O){return O===61?(e.consume(O),B):Qe(O)?(e.consume(O),X):R(O)}function B(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,te):Qe(O)?(e.consume(O),B):ge(O)}function te(O){return O===d?(e.consume(O),d=null,ye):O===null||Le(O)?n(O):(e.consume(O),te)}function ge(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||ft(O)?X(O):(e.consume(O),ge)}function ye(O){return O===47||O===62||Qe(O)?R(O):n(O)}function M(O){return O===62?(e.consume(O),ae):n(O)}function ae(O){return O===null||Le(O)?he(O):Qe(O)?(e.consume(O),ae):n(O)}function he(O){return O===45&&o===2?(e.consume(O),Ce):O===60&&o===1?(e.consume(O),oe):O===62&&o===4?(e.consume(O),L):O===63&&o===3?(e.consume(O),S):O===93&&o===5?(e.consume(O),ne):Le(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(Fk,K,ue)(O)):O===null||Le(O)?(e.exit("htmlFlowData"),ue(O)):(e.consume(O),he)}function ue(O){return e.check(Bk,de,K)(O)}function de(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),be}function be(O){return O===null||Le(O)?ue(O):(e.enter("htmlFlowData"),he(O))}function Ce(O){return O===45?(e.consume(O),S):he(O)}function oe(O){return O===47?(e.consume(O),u="",q):he(O)}function q(O){if(O===62){const _e=u.toLowerCase();return H1.includes(_e)?(e.consume(O),L):he(O)}return pn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),q):he(O)}function ne(O){return O===93?(e.consume(O),S):he(O)}function S(O){return O===62?(e.consume(O),L):O===45&&o===2?(e.consume(O),S):he(O)}function L(O){return O===null||Le(O)?(e.exit("htmlFlowData"),K(O)):(e.consume(O),L)}function K(O){return e.exit("htmlFlow"),t(O)}}function zk(e,t,n){const r=this;return o;function o(u){return Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function jk(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(la,t,n)}}const $k={name:"htmlText",tokenize:Vk};function Vk(e,t,n){const r=this;let o,a,u;return c;function c(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),d}function d(S){return S===33?(e.consume(S),f):S===47?(e.consume(S),X):S===63?(e.consume(S),R):pn(S)?(e.consume(S),ge):n(S)}function f(S){return S===45?(e.consume(S),p):S===91?(e.consume(S),a=0,_):pn(S)?(e.consume(S),F):n(S)}function p(S){return S===45?(e.consume(S),b):n(S)}function E(S){return S===null?n(S):S===45?(e.consume(S),T):Le(S)?(u=E,oe(S)):(e.consume(S),E)}function T(S){return S===45?(e.consume(S),b):E(S)}function b(S){return S===62?Ce(S):S===45?T(S):E(S)}function _(S){const L="CDATA[";return S===L.charCodeAt(a++)?(e.consume(S),a===L.length?w:_):n(S)}function w(S){return S===null?n(S):S===93?(e.consume(S),k):Le(S)?(u=w,oe(S)):(e.consume(S),w)}function k(S){return S===93?(e.consume(S),v):w(S)}function v(S){return S===62?Ce(S):S===93?(e.consume(S),v):w(S)}function F(S){return S===null||S===62?Ce(S):Le(S)?(u=F,oe(S)):(e.consume(S),F)}function R(S){return S===null?n(S):S===63?(e.consume(S),W):Le(S)?(u=R,oe(S)):(e.consume(S),R)}function W(S){return S===62?Ce(S):R(S)}function X(S){return pn(S)?(e.consume(S),B):n(S)}function B(S){return S===45||an(S)?(e.consume(S),B):te(S)}function te(S){return Le(S)?(u=te,oe(S)):Qe(S)?(e.consume(S),te):Ce(S)}function ge(S){return S===45||an(S)?(e.consume(S),ge):S===47||S===62||ft(S)?ye(S):n(S)}function ye(S){return S===47?(e.consume(S),Ce):S===58||S===95||pn(S)?(e.consume(S),M):Le(S)?(u=ye,oe(S)):Qe(S)?(e.consume(S),ye):Ce(S)}function M(S){return S===45||S===46||S===58||S===95||an(S)?(e.consume(S),M):ae(S)}function ae(S){return S===61?(e.consume(S),he):Le(S)?(u=ae,oe(S)):Qe(S)?(e.consume(S),ae):ye(S)}function he(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),o=S,ue):Le(S)?(u=he,oe(S)):Qe(S)?(e.consume(S),he):(e.consume(S),de)}function ue(S){return S===o?(e.consume(S),o=void 0,be):S===null?n(S):Le(S)?(u=ue,oe(S)):(e.consume(S),ue)}function de(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||ft(S)?ye(S):(e.consume(S),de)}function be(S){return S===47||S===62||ft(S)?ye(S):n(S)}function Ce(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function oe(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),q}function q(S){return Qe(S)?Ze(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):ne(S)}function ne(S){return e.enter("htmlTextData"),u(S)}}const _f={name:"labelEnd",resolveAll:Gk,resolveTo:Kk,tokenize:Qk},qk={tokenize:Xk},Yk={tokenize:Jk},Wk={tokenize:Zk};function Gk(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&&Rn(e,0,e.length,n),e}function Kk(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:H({},e[a][1].start),end:H({},e[e.length-1][1].end)},f={type:"label",start:H({},e[a][1].start),end:H({},e[u][1].end)},p={type:"labelText",start:H({},e[a+r+2][1].end),end:H({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=qn(c,e.slice(a+1,a+r+3)),c=qn(c,[["enter",p,t]]),c=qn(c,sl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=qn(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=qn(c,e.slice(u+1)),c=qn(c,[["exit",d,t]]),Rn(e,a,e.length,c),e}function Qk(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?E(T):(u=r.parser.defined.includes(ar(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(qk,p,u?p:E)(T):T===91?e.attempt(Yk,p,u?f:E)(T):u?p(T):E(T)}function f(T){return e.attempt(Wk,p,E)(T)}function p(T){return t(T)}function E(T){return a._balanced=!0,n(T)}}function Xk(e,t,n){return r;function r(E){return e.enter("resource"),e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),o}function o(E){return ft(E)?da(e,a)(E):a(E)}function a(E){return E===41?p(E):F1(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(E)}function u(E){return ft(E)?da(e,d)(E):p(E)}function c(E){return n(E)}function d(E){return E===34||E===39||E===40?U1(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(E):p(E)}function f(E){return ft(E)?da(e,p)(E):p(E)}function p(E){return E===41?(e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),e.exit("resource"),t):n(E)}}function Jk(e,t,n){const r=this;return o;function o(c){return B1.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(ar(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function Zk(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 eN={name:"labelStartImage",resolveAll:_f.resolveAll,tokenize:tN};function tN(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const nN={name:"labelStartLink",resolveAll:_f.resolveAll,tokenize:rN};function rN(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 xf={name:"lineEnding",tokenize:iN};function iN(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ze(e,t,"linePrefix")}}const ol={name:"thematicBreak",tokenize:sN};function sN(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||Le(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Qe(f)?Ze(e,c,"whitespace")(f):c(f))}}const xn={continuation:{tokenize:lN},exit:dN,name:"list",tokenize:uN},oN={partial:!0,tokenize:fN},aN={partial:!0,tokenize:cN};function uN(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(b){const _=r.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||b===r.containerState.marker:yf(b)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(ol,n,f)(b):f(b);if(!r.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(b)}return n(b)}function d(b){return yf(b)&&++u<10?(e.consume(b),d):(!r.interrupt||u<2)&&(r.containerState.marker?b===r.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),f(b)):n(b)}function f(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||b,e.check(la,r.interrupt?n:p,e.attempt(oN,T,E))}function p(b){return r.containerState.initialBlankLine=!0,a++,T(b)}function E(b){return Qe(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),T):n(b)}function T(b){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function lN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(la,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ze(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Qe(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(aN,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ze(e,e.attempt(xn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function cN(e,t,n){const r=this;return Ze(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 dN(e){e.exit(this.containerState.type)}function fN(e,t,n){const r=this;return Ze(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!Qe(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const z1={name:"setextUnderline",resolveTo:hN,tokenize:pN};function hN(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:H({},e[r][1].start),end:H({},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=H({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function pN(e,t,n){const r=this;let o;return a;function a(f){let p=r.events.length,E;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){E=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||E)?(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"),Qe(f)?Ze(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Le(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const mN={tokenize:gN};function gN(e){const t=this,n=e.attempt(la,r,e.attempt(this.parser.constructs.flowInitial,o,Ze(e,e.attempt(this.parser.constructs.flow,o,e.attempt(_k,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 EN={resolveAll:$1()},yN=j1("string"),bN=j1("text");function j1(e){return{resolveAll:$1(e==="text"?TN: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 E=o[p];let T=-1;if(E)for(;++T<E.length;){const b=E[T];if(!b.previous||b.previous.call(r,r.previous))return!0}return!1}}}function $1(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 TN(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:H({},r.end)};r.end=H({},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 _N=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Ak},disable:{null:[]},document:{42:xn,43:xn,45:xn,48:xn,49:xn,50:xn,51:xn,52:xn,53:xn,54:xn,55:xn,56:xn,57:xn,62:I1},flow:{35:Pk,42:ol,45:[z1,ol],60:Mk,61:z1,95:ol,96:D1,126:D1},flowInitial:{[-2]:Tf,[-1]:Tf,32:Tf},insideSpan:{null:[bf,EN]},string:{38:R1,92:P1},text:{[-5]:xf,[-4]:xf,[-3]:xf,33:eN,38:R1,42:bf,60:[nk,$k],91:nN,92:[Ok,P1],93:_f,95:bf,96:mk}},Symbol.toStringTag,{value:"Module"}));function xN(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let u=[],c=[];const d={attempt:te(X),check:te(B),consume:F,enter:R,exit:W,interrupt:te(B,{interrupt:!0})},f={code:null,containerState:{},defineSkip:w,events:[],now:_,parser:e,previous:null,sliceSerialize:T,sliceStream:b,write:E};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function E(ae){return u=qn(u,ae),k(),u[u.length-1]!==null?[]:(ge(t,0),f.events=sl(a,f.events,f),f.events)}function T(ae,he){return SN(b(ae),he)}function b(ae){return wN(u,ae)}function _(){const{_bufferIndex:ae,_index:he,line:ue,column:de,offset:be}=r;return{_bufferIndex:ae,_index:he,line:ue,column:de,offset:be}}function w(ae){o[ae.line]=ae.column,M()}function k(){let ae;for(;r._index<u.length;){const he=u[r._index];if(typeof he=="string")for(ae=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ae&&r._bufferIndex<he.length;)v(he.charCodeAt(r._bufferIndex));else v(he)}}function v(ae){p=p(ae)}function F(ae){Le(ae)?(r.line++,r.column=1,r.offset+=ae===-3?2:1,M()):ae!==-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=ae}function R(ae,he){const ue=he||{};return ue.type=ae,ue.start=_(),f.events.push(["enter",ue,f]),c.push(ue),ue}function W(ae){const he=c.pop();return he.end=_(),f.events.push(["exit",he,f]),he}function X(ae,he){ge(ae,he.from)}function B(ae,he){he.restore()}function te(ae,he){return ue;function ue(de,be,Ce){let oe,q,ne,S;return Array.isArray(de)?K(de):"tokenize"in de?K([de]):L(de);function L(Oe){return Ge;function Ge(Ye){const et=Ye!==null&&Oe[Ye],Nt=Ye!==null&&Oe.null,Kn=[...Array.isArray(et)?et:et?[et]:[],...Array.isArray(Nt)?Nt:Nt?[Nt]:[]];return K(Kn)(Ye)}}function K(Oe){return oe=Oe,q=0,Oe.length===0?Ce:O(Oe[q])}function O(Oe){return Ge;function Ge(Ye){return S=ye(),ne=Oe,Oe.partial||(f.currentConstruct=Oe),Oe.name&&f.parser.constructs.disable.null.includes(Oe.name)?Re():Oe.tokenize.call(he?Object.assign(Object.create(f),he):f,d,_e,Re)(Ye)}}function _e(Oe){return ae(ne,S),be}function Re(Oe){return S.restore(),++q<oe.length?O(oe[q]):Ce}}}function ge(ae,he){ae.resolveAll&&!a.includes(ae)&&a.push(ae),ae.resolve&&Rn(f.events,he,f.events.length-he,ae.resolve(f.events.slice(he),f)),ae.resolveTo&&(f.events=ae.resolveTo(f.events,f))}function ye(){const ae=_(),he=f.previous,ue=f.currentConstruct,de=f.events.length,be=Array.from(c);return{from:de,restore:Ce};function Ce(){r=ae,f.previous=he,f.currentConstruct=ue,f.events.length=de,c=be,M()}}function M(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function wN(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 SN(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=`
|
|
1
|
+
(function(Ie,Ue){typeof exports=="object"&&typeof module!="undefined"?Ue(exports):typeof define=="function"&&define.amd?define(["exports"],Ue):(Ie=typeof globalThis!="undefined"?globalThis:Ie||self,Ue(Ie["cimulate-copilot-widget"]={}))})(this,(function(Ie){"use strict";var sB=Object.defineProperty,oB=Object.defineProperties;var aB=Object.getOwnPropertyDescriptors;var sd=Object.getOwnPropertySymbols;var Ux=Object.prototype.hasOwnProperty,Hx=Object.prototype.propertyIsEnumerable;var Fo=(Ie,Ue)=>(Ue=Symbol[Ie])?Ue:Symbol.for("Symbol."+Ie),uB=Ie=>{throw TypeError(Ie)},od=Math.pow,Vm=(Ie,Ue,Ke)=>Ue in Ie?sB(Ie,Ue,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):Ie[Ue]=Ke,H=(Ie,Ue)=>{for(var Ke in Ue||(Ue={}))Ux.call(Ue,Ke)&&Vm(Ie,Ke,Ue[Ke]);if(sd)for(var Ke of sd(Ue))Hx.call(Ue,Ke)&&Vm(Ie,Ke,Ue[Ke]);return Ie},Te=(Ie,Ue)=>oB(Ie,aB(Ue));var nn=(Ie,Ue)=>{var Ke={};for(var lt in Ie)Ux.call(Ie,lt)&&Ue.indexOf(lt)<0&&(Ke[lt]=Ie[lt]);if(Ie!=null&&sd)for(var lt of sd(Ie))Ue.indexOf(lt)<0&&Hx.call(Ie,lt)&&(Ke[lt]=Ie[lt]);return Ke};var Ce=(Ie,Ue,Ke)=>Vm(Ie,typeof Ue!="symbol"?Ue+"":Ue,Ke);var rt=(Ie,Ue,Ke)=>new Promise((lt,kt)=>{var bt=It=>{try{Vt(Ke.next(It))}catch(yn){kt(yn)}},Pe=It=>{try{Vt(Ke.throw(It))}catch(yn){kt(yn)}},Vt=It=>It.done?lt(It.value):Promise.resolve(It.value).then(bt,Pe);Vt((Ke=Ke.apply(Ie,Ue)).next())}),zr=function(Ie,Ue){this[0]=Ie,this[1]=Ue},ad=(Ie,Ue,Ke)=>{var lt=(Pe,Vt,It,yn)=>{try{var vs=Ke[Pe](Vt),Bo=(Vt=vs.value)instanceof zr,ud=vs.done;Promise.resolve(Bo?Vt[0]:Vt).then(ir=>Bo?lt(Pe==="return"?Pe:"next",Vt[1]?{done:ir.done,value:ir.value}:ir,It,yn):It({value:ir,done:ud})).catch(ir=>lt("throw",ir,It,yn))}catch(ir){yn(ir)}},kt=Pe=>bt[Pe]=Vt=>new Promise((It,yn)=>lt(Pe,Vt,It,yn)),bt={};return Ke=Ke.apply(Ie,Ue),bt[Fo("asyncIterator")]=()=>bt,kt("next"),kt("throw"),kt("return"),bt},qm=Ie=>{var Ue=Ie[Fo("asyncIterator")],Ke=!1,lt,kt={};return Ue==null?(Ue=Ie[Fo("iterator")](),lt=bt=>kt[bt]=Pe=>Ue[bt](Pe)):(Ue=Ue.call(Ie),lt=bt=>kt[bt]=Pe=>{if(Ke){if(Ke=!1,bt==="throw")throw Pe;return Pe}return Ke=!0,{done:!1,value:new zr(new Promise(Vt=>{var It=Ue[bt](Pe);It instanceof Object||uB("Object expected"),Vt(It)}),1)}}),kt[Fo("iterator")]=()=>kt,lt("next"),"throw"in Ue?lt("throw"):kt.throw=bt=>{throw bt},"return"in Ue&<("return"),kt},zx=(Ie,Ue,Ke)=>(Ue=Ie[Fo("asyncIterator")])?Ue.call(Ie):(Ie=Ie[Fo("iterator")](),Ue={},Ke=(lt,kt)=>(kt=Ie[lt])&&(Ue[lt]=bt=>new Promise((Pe,Vt,It)=>(bt=kt.call(Ie,bt),It=bt.done,Promise.resolve(bt.value).then(yn=>Pe({value:yn,done:It}),Vt)))),Ke("next"),Ke("return"),Ue);var Ue=document.createElement("style");Ue.textContent=`.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;border-radius:4px;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;background-color:var(--base-color);border-radius:4px;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-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;background-color:transparent;border:1px solid transparent;border-radius:4px;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-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;&.modal{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}.cim-widget-search-input{width:100%;height:100%;padding:0 8px;background-color:transparent;border:1px solid #00000040;border-radius:4px}.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:130px;background:#fff;padding:.25rem 0;border-radius:.5rem;border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;background-color:#fff;border:1px solid transparent;border-radius:4px;cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;svg{font-size:.75rem}}.cim-widget-clear-chat-icon-button{min-height:32px}.cim-widget-toggle-modal-button.dialog{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.dialog{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border-radius:4px;box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:15dvw;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;overflow-x:hidden}.cim-widget-product-list{flex:1;display:inline-flex;gap:.5rem;padding:.5rem .5rem .5rem 0;overflow-x:auto}.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-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:4px;background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;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);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.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{width:100%;margin-top:1rem;margin-bottom:1rem;border-radius:.5rem;border:1px solid #8a8a8a;border-collapse:collapse}.cim-widget-thead{background-color:#f0f0f0;border-bottom-width:2px;border-color:#8a8a8a}.cim-widget-tr{border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:#8a8a8a}.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;border-radius:8px;padding:.5rem 1rem;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;border-radius:8px;padding:.5rem 1rem;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:1rem;margin-bottom:1rem;border-radius:8px;&.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:8px;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.chat{border:1px solid var(--cim-widget-border-color)}.cim-widget-dialog{position:fixed;width:35dvw;height:55dvh;border-radius:.5rem;border:1px solid var(--cim-widget-border-color);font-size:.875rem;&.bottom-left{bottom:.5rem;left:.5rem}&.bottom-right{bottom:.5rem;right:.5rem}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:1rem 1rem 0;margin-bottom:.5rem;gap:8px}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{margin-top:0;margin-bottom:0}@media(576px<=width<=768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100%;border-radius:0;&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw}.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:.5rem;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:1rem 1rem 0;margin-bottom:1rem;gap:8px}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{margin-top:0;margin-bottom:0}.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-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:.5rem;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-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{flex:1;overflow-y:auto;padding:1rem}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(Ue);function Ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lt={exports:{}},kt={},bt={exports:{}},Pe={};var Vt;function It(){if(Vt)return Pe;Vt=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"),m=Symbol.for("react.lazy"),E=Symbol.iterator;function T(R){return R===null||typeof R!="object"?null:(R=E&&R[E]||R["@@iterator"],typeof R=="function"?R:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,w={};function v(R,Q,O){this.props=R,this.context=Q,this.refs=w,this.updater=O||b}v.prototype.isReactComponent={},v.prototype.setState=function(R,Q){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,Q,"setState")},v.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function A(){}A.prototype=v.prototype;function M(R,Q,O){this.props=R,this.context=Q,this.refs=w,this.updater=O||b}var L=M.prototype=new A;L.constructor=M,_(L,v.prototype),L.isPureReactComponent=!0;var W=Array.isArray,J=Object.prototype.hasOwnProperty,B={current:null},te={key:!0,ref:!0,__self:!0,__source:!0};function ge(R,Q,O){var _e,Le={},Oe=null,Ge=null;if(Q!=null)for(_e in Q.ref!==void 0&&(Ge=Q.ref),Q.key!==void 0&&(Oe=""+Q.key),Q)J.call(Q,_e)&&!te.hasOwnProperty(_e)&&(Le[_e]=Q[_e]);var Ye=arguments.length-2;if(Ye===1)Le.children=O;else if(1<Ye){for(var tt=Array(Ye),Nt=0;Nt<Ye;Nt++)tt[Nt]=arguments[Nt+2];Le.children=tt}if(R&&R.defaultProps)for(_e in Ye=R.defaultProps,Ye)Le[_e]===void 0&&(Le[_e]=Ye[_e]);return{$$typeof:e,type:R,key:Oe,ref:Ge,props:Le,_owner:B.current}}function ye(R,Q){return{$$typeof:e,type:R.type,key:Q,ref:R.ref,props:R.props,_owner:R._owner}}function F(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function se(R){var Q={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(O){return Q[O]})}var he=/\/+/g;function le(R,Q){return typeof R=="object"&&R!==null&&R.key!=null?se(""+R.key):Q.toString(36)}function fe(R,Q,O,_e,Le){var Oe=typeof R;(Oe==="undefined"||Oe==="boolean")&&(R=null);var Ge=!1;if(R===null)Ge=!0;else switch(Oe){case"string":case"number":Ge=!0;break;case"object":switch(R.$$typeof){case e:case t:Ge=!0}}if(Ge)return Ge=R,Le=Le(Ge),R=_e===""?"."+le(Ge,0):_e,W(Le)?(O="",R!=null&&(O=R.replace(he,"$&/")+"/"),fe(Le,Q,O,"",function(Nt){return Nt})):Le!=null&&(F(Le)&&(Le=ye(Le,O+(!Le.key||Ge&&Ge.key===Le.key?"":(""+Le.key).replace(he,"$&/")+"/")+R)),Q.push(Le)),1;if(Ge=0,_e=_e===""?".":_e+":",W(R))for(var Ye=0;Ye<R.length;Ye++){Oe=R[Ye];var tt=_e+le(Oe,Ye);Ge+=fe(Oe,Q,O,tt,Le)}else if(tt=T(R),typeof tt=="function")for(R=tt.call(R),Ye=0;!(Oe=R.next()).done;)Oe=Oe.value,tt=_e+le(Oe,Ye++),Ge+=fe(Oe,Q,O,tt,Le);else if(Oe==="object")throw Q=String(R),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return Ge}function be(R,Q,O){if(R==null)return R;var _e=[],Le=0;return fe(R,_e,"","",function(Oe){return Q.call(O,Oe,Le++)}),_e}function Ae(R){if(R._status===-1){var Q=R._result;Q=Q(),Q.then(function(O){(R._status===0||R._status===-1)&&(R._status=1,R._result=O)},function(O){(R._status===0||R._status===-1)&&(R._status=2,R._result=O)}),R._status===-1&&(R._status=0,R._result=Q)}if(R._status===1)return R._result.default;throw R._result}var ue={current:null},q={transition:null},ne={ReactCurrentDispatcher:ue,ReactCurrentBatchConfig:q,ReactCurrentOwner:B};function S(){throw Error("act(...) is not supported in production builds of React.")}return Pe.Children={map:be,forEach:function(R,Q,O){be(R,function(){Q.apply(this,arguments)},O)},count:function(R){var Q=0;return be(R,function(){Q++}),Q},toArray:function(R){return be(R,function(Q){return Q})||[]},only:function(R){if(!F(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},Pe.Component=v,Pe.Fragment=n,Pe.Profiler=o,Pe.PureComponent=M,Pe.StrictMode=r,Pe.Suspense=d,Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,Pe.act=S,Pe.cloneElement=function(R,Q,O){if(R==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+R+".");var _e=_({},R.props),Le=R.key,Oe=R.ref,Ge=R._owner;if(Q!=null){if(Q.ref!==void 0&&(Oe=Q.ref,Ge=B.current),Q.key!==void 0&&(Le=""+Q.key),R.type&&R.type.defaultProps)var Ye=R.type.defaultProps;for(tt in Q)J.call(Q,tt)&&!te.hasOwnProperty(tt)&&(_e[tt]=Q[tt]===void 0&&Ye!==void 0?Ye[tt]:Q[tt])}var tt=arguments.length-2;if(tt===1)_e.children=O;else if(1<tt){Ye=Array(tt);for(var Nt=0;Nt<tt;Nt++)Ye[Nt]=arguments[Nt+2];_e.children=Ye}return{$$typeof:e,type:R.type,key:Le,ref:Oe,props:_e,_owner:Ge}},Pe.createContext=function(R){return R={$$typeof:u,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},R.Provider={$$typeof:a,_context:R},R.Consumer=R},Pe.createElement=ge,Pe.createFactory=function(R){var Q=ge.bind(null,R);return Q.type=R,Q},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(R){return{$$typeof:c,render:R}},Pe.isValidElement=F,Pe.lazy=function(R){return{$$typeof:m,_payload:{_status:-1,_result:R},_init:Ae}},Pe.memo=function(R,Q){return{$$typeof:f,type:R,compare:Q===void 0?null:Q}},Pe.startTransition=function(R){var Q=q.transition;q.transition={};try{R()}finally{q.transition=Q}},Pe.unstable_act=S,Pe.useCallback=function(R,Q){return ue.current.useCallback(R,Q)},Pe.useContext=function(R){return ue.current.useContext(R)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(R){return ue.current.useDeferredValue(R)},Pe.useEffect=function(R,Q){return ue.current.useEffect(R,Q)},Pe.useId=function(){return ue.current.useId()},Pe.useImperativeHandle=function(R,Q,O){return ue.current.useImperativeHandle(R,Q,O)},Pe.useInsertionEffect=function(R,Q){return ue.current.useInsertionEffect(R,Q)},Pe.useLayoutEffect=function(R,Q){return ue.current.useLayoutEffect(R,Q)},Pe.useMemo=function(R,Q){return ue.current.useMemo(R,Q)},Pe.useReducer=function(R,Q,O){return ue.current.useReducer(R,Q,O)},Pe.useRef=function(R){return ue.current.useRef(R)},Pe.useState=function(R){return ue.current.useState(R)},Pe.useSyncExternalStore=function(R,Q,O){return ue.current.useSyncExternalStore(R,Q,O)},Pe.useTransition=function(){return ue.current.useTransition()},Pe.version="18.3.1",Pe}var yn;function vs(){return yn||(yn=1,bt.exports=It()),bt.exports}var Bo;function ud(){if(Bo)return kt;Bo=1;var e=vs(),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 m,E={},T=null,b=null;f!==void 0&&(T=""+f),d.key!==void 0&&(T=""+d.key),d.ref!==void 0&&(b=d.ref);for(m in d)r.call(d,m)&&!a.hasOwnProperty(m)&&(E[m]=d[m]);if(c&&c.defaultProps)for(m in d=c.defaultProps,d)E[m]===void 0&&(E[m]=d[m]);return{$$typeof:t,type:c,key:T,ref:b,props:E,_owner:o.current}}return kt.Fragment=n,kt.jsx=u,kt.jsxs=u,kt}var ir;function qx(){return ir||(ir=1,lt.exports=ud()),lt.exports}var C=qx();const _r=Object.create(null);_r.open="0",_r.close="1",_r.ping="2",_r.pong="3",_r.message="4",_r.upgrade="5",_r.noop="6";const Su=Object.create(null);Object.keys(_r).forEach(e=>{Su[_r[e]]=e});const ld={type:"error",data:"parser error"},Ym=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Wm=typeof ArrayBuffer=="function",Gm=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,cd=({type:e,data:t},n,r)=>Ym&&t instanceof Blob?n?r(t):Km(t,r):Wm&&(t instanceof ArrayBuffer||Gm(t))?n?r(t):Km(new Blob([t]),r):r(_r[e]+(t||"")),Km=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Qm(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let dd;function Yx(e,t){if(Ym&&e.data instanceof Blob)return e.data.arrayBuffer().then(Qm).then(t);if(Wm&&(e.data instanceof ArrayBuffer||Gm(e.data)))return t(Qm(e.data));cd(e,!1,n=>{dd||(dd=new TextEncoder),t(dd.encode(n))})}const Xm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Uo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Xm.length;e++)Uo[Xm.charCodeAt(e)]=e;const Wx=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),m=new Uint8Array(f);for(r=0;r<n;r+=4)a=Uo[e.charCodeAt(r)],u=Uo[e.charCodeAt(r+1)],c=Uo[e.charCodeAt(r+2)],d=Uo[e.charCodeAt(r+3)],m[o++]=a<<2|u>>4,m[o++]=(u&15)<<4|c>>2,m[o++]=(c&3)<<6|d&63;return f},Gx=typeof ArrayBuffer=="function",fd=(e,t)=>{if(typeof e!="string")return{type:"message",data:Jm(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Kx(e.substring(1),t)}:Su[n]?e.length>1?{type:Su[n],data:e.substring(1)}:{type:Su[n]}:ld},Kx=(e,t)=>{if(Gx){const n=Wx(e);return Jm(n,t)}else return{base64:!0,data:e}},Jm=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Zm="",Qx=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{cd(a,!1,c=>{r[u]=c,++o===n&&t(r.join(Zm))})})},Xx=(e,t)=>{const n=e.split(Zm),r=[];for(let o=0;o<n.length;o++){const a=fd(n[o],t);if(r.push(a),a.type==="error")break}return r};function Jx(){return new TransformStream({transform(e,t){Yx(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let hd;function Cu(e){return e.reduce((t,n)=>t+n.length,0)}function Au(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 Zx(e,t){hd||(hd=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(Cu(n)<1)break;const d=Au(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(Cu(n)<2)break;const d=Au(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Cu(n)<8)break;const d=Au(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),m=f.getUint32(0);if(m>Math.pow(2,21)-1){c.enqueue(ld);break}o=m*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Cu(n)<o)break;const d=Au(n,o);c.enqueue(fd(a?d:hd.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(ld);break}}}})}const e0=4;function Ft(e){if(e)return ew(e)}function ew(e){for(var t in Ft.prototype)e[t]=Ft.prototype[t];return e}Ft.prototype.on=Ft.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ft.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ft.prototype.off=Ft.prototype.removeListener=Ft.prototype.removeAllListeners=Ft.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,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},Ft.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},Ft.prototype.emitReserved=Ft.prototype.emit,Ft.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ft.prototype.hasListeners=function(e){return!!this.listeners(e).length};const vu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),jn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),tw="arraybuffer";function lB(){}function t0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const nw=jn.setTimeout,rw=jn.clearTimeout;function ku(e,t){t.useNativeTimers?(e.setTimeoutFn=nw.bind(jn),e.clearTimeoutFn=rw.bind(jn)):(e.setTimeoutFn=jn.setTimeout.bind(jn),e.clearTimeoutFn=jn.clearTimeout.bind(jn))}const iw=1.33;function sw(e){return typeof e=="string"?ow(e):Math.ceil((e.byteLength||e.size)*iw)}function ow(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 aw(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function uw(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 lw extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class pd extends Ft{constructor(t){super(),this.writable=!1,ku(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 lw(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=fd(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=aw(t);return n.length?"?"+n:""}}class cw extends pd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Xx(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,Qx(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 r0=!1;try{r0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const dw=r0;function fw(){}class hw extends cw{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 xr extends Ft{constructor(t,n,r){super(),this.createRequest=t,ku(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=t0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let 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=xr.requestsCount++,xr.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=fw,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete xr.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(xr.requestsCount=0,xr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",i0);else if(typeof addEventListener=="function"){const e="onpagehide"in jn?"pagehide":"unload";addEventListener(e,i0,!1)}}function i0(){for(let e in xr.requests)xr.requests.hasOwnProperty(e)&&xr.requests[e].abort()}const pw=(function(){const e=s0({xdomain:!1});return e&&e.responseType!==null})();class mw extends hw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=pw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new xr(s0,this.uri(),t)}}function s0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||dw))return new XMLHttpRequest}catch(n){}if(!t)try{return new jn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const o0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class gw extends pd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=o0?{}:t0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;cd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&vu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=n0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const md=jn.WebSocket||jn.MozWebSocket;class Ew extends gw{createSocket(t,n,r){return o0?new md(t,n,r):n?new md(t,n):new md(t)}doWrite(t,n){this.ws.send(n)}}class yw extends pd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=Zx(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=Jx();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&&vu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const bw={websocket:Ew,webtransport:yw,polling:mw},Tw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,_w=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function gd(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=Tw.exec(e||""),a={},u=14;for(;u--;)a[_w[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=xw(a,a.path),a.queryKey=ww(a,a.query),a}function xw(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 ww(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Ed=typeof addEventListener=="function"&&typeof removeEventListener=="function",Nu=[];Ed&&addEventListener("offline",()=>{Nu.forEach(e=>e())},!1);class li extends Ft{constructor(t,n){if(super(),this.binaryType=tw,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=gd(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=gd(n.host).host);ku(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=uw(this.opts.query)),Ed&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Nu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=e0,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&&li.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",li.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+=sw(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,vu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,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(li.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Ed&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Nu.indexOf(this._offlineEventListener);r!==-1&&Nu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}li.protocol=e0;class Sw extends li{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;li.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",E=>{if(!r)if(E.type==="pong"&&E.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;li.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(m(),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,m(),n.close(),n=null)}const u=E=>{const T=new Error("probe error: "+E);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function c(){u("transport closed")}function d(){u("socket closed")}function f(E){n&&E.name!==n.name&&a()}const m=()=>{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 Cw=class extends Sw{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>bw[o]).filter(o=>!!o)),super(t,r)}};function Aw(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=gd(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const vw=typeof ArrayBuffer=="function",kw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,a0=Object.prototype.toString,Nw=typeof Blob=="function"||typeof Blob!="undefined"&&a0.call(Blob)==="[object BlobConstructor]",Ow=typeof File=="function"||typeof File!="undefined"&&a0.call(File)==="[object FileConstructor]";function yd(e){return vw&&(e instanceof ArrayBuffer||kw(e))||Nw&&e instanceof Blob||Ow&&e instanceof File}function Ou(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ou(e[n]))return!0;return!1}if(yd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ou(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ou(e[n]))return!0;return!1}function Iw(e){const t=[],n=e.data,r=e;return r.data=bd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function bd(e,t){if(!e)return e;if(yd(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=bd(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]=bd(e[r],t));return n}return e}function Pw(e,t){return e.data=Td(e.data,t),delete e.attachments,e}function Td(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]=Td(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Td(e[n],t));return e}const Rw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ze;(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"})(Ze||(Ze={}));class Lw{constructor(t){this.replacer=t}encode(t){return(t.type===Ze.EVENT||t.type===Ze.ACK)&&Ou(t)?this.encodeAsBinary({type:t.type===Ze.EVENT?Ze.BINARY_EVENT:Ze.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Ze.BINARY_EVENT||t.type===Ze.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=Iw(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class _d extends Ft{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Ze.BINARY_EVENT;r||n.type===Ze.BINARY_ACK?(n.type=r?Ze.EVENT:Ze.ACK,this.reconstructor=new Dw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(yd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Ze[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ze.BINARY_EVENT||r.type===Ze.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(!Mw(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 Ze.CONNECT:return u0(n);case Ze.DISCONNECT:return n===void 0;case Ze.CONNECT_ERROR:return typeof n=="string"||u0(n);case Ze.EVENT:case Ze.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Rw.indexOf(n[0])===-1);case Ze.ACK:case Ze.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Dw{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=Pw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Mw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function u0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Fw=Object.freeze(Object.defineProperty({__proto__:null,Decoder:_d,Encoder:Lw,get PacketType(){return Ze}},Symbol.toStringTag,{value:"Module"}));function sr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Bw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class l0 extends Ft{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[sr(t,"open",this.onopen.bind(this)),sr(t,"packet",this.onpacket.bind(this)),sr(t,"error",this.onerror.bind(this)),sr(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(Bw.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:Ze.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const m=this.ids++,E=n.pop();this._registerAckCallback(m,E),u.id=m}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)=>r!==this._queue[0]?void 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:Ze.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 Ze.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 Ze.EVENT:case Ze.BINARY_EVENT:this.onevent(t);break;case Ze.ACK:case Ze.BINARY_ACK:this.onack(t);break;case Ze.DISCONNECT:this.ondisconnect();break;case Ze.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:Ze.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.emitReserved("connect"),this._drainQueue(!0)}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:Ze.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 ks(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}ks.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},ks.prototype.reset=function(){this.attempts=0},ks.prototype.setMin=function(e){this.ms=e},ks.prototype.setMax=function(e){this.max=e},ks.prototype.setJitter=function(e){this.jitter=e};class xd extends Ft{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,ku(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 ks({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||Fw;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 Cw(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=sr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=sr(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(sr(t,"ping",this.onping.bind(this)),sr(t,"data",this.ondata.bind(this)),sr(t,"error",this.onerror.bind(this)),sr(t,"close",this.onclose.bind(this)),sr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){vu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new l0(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 Ho={};function Iu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Aw(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=Ho[o]&&a in Ho[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new xd(r,t):(Ho[o]||(Ho[o]=new xd(r,t)),d=Ho[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Iu,{Manager:xd,Socket:l0,io:Iu,connect:Iu});var Uw=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===Hw})(t)})(e)},Hw=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function zo(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ns((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function zw(e,t,n){return e.concat(t).map((function(r){return zo(r,n)}))}function c0(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 d0(e,t){try{return t in e}catch(n){return!1}}function jw(e,t,n){var r={};return n.isMergeableObject(e)&&c0(e).forEach((function(o){r[o]=zo(e[o],n)})),c0(t).forEach((function(o){(function(a,u){return d0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(d0(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,u){if(!u.customMerge)return Ns;var c=u.customMerge(a);return typeof c=="function"?c:Ns})(o,n)(e[o],t[o],n):r[o]=zo(t[o],n))})),r}function Ns(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||zw,n.isMergeableObject=n.isMergeableObject||Uw,n.cloneUnlessOtherwiseSpecified=zo;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):jw(e,t,n):zo(t,n)}Ns.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Ns(n,r,t)}),{})};var $w=Ns;class Vw{constructor(t){Object.assign(this,t)}}function hn(e){if(e)return(function(t){for(var n in hn.prototype)t[n]=hn.prototype[n];return t})(e)}hn.prototype.on=hn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},hn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},hn.prototype.off=hn.prototype.removeListener=hn.prototype.removeAllListeners=hn.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},hn.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},hn.prototype.emitReserved=hn.prototype.emit,hn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},hn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const qw=typeof ArrayBuffer=="function",f0=Object.prototype.toString,Yw=typeof Blob=="function"||typeof Blob!="undefined"&&f0.call(Blob)==="[object BlobConstructor]",Ww=typeof File=="function"||typeof File!="undefined"&&f0.call(File)==="[object FileConstructor]";function wd(e){return qw&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||Yw&&e instanceof Blob||Ww&&e instanceof File}function Pu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Pu(e[n]))return!0;return!1}if(wd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Pu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Pu(e[n]))return!0;return!1}function Gw(e){const t=[],n=e.data,r=e;return r.data=Sd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Sd(e,t){if(!e)return e;if(wd(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]=Sd(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]=Sd(e[r],t));return n}return e}function Kw(e,t){return e.data=Cd(e.data,t),delete e.attachments,e}function Cd(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]=Cd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Cd(e[n],t));return e}const Qw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var St;(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"})(St||(St={}));class Xw{constructor(t){this.replacer=t}encode(t){return t.type!==St.EVENT&&t.type!==St.ACK||!Pu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===St.EVENT?St.BINARY_EVENT:St.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==St.BINARY_EVENT&&t.type!==St.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=Gw(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function h0(e){return Object.prototype.toString.call(e)==="[object Object]"}class Ad extends hn{constructor(t){super(),this.reviver=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===St.BINARY_EVENT;r||n.type===St.BINARY_ACK?(n.type=r?St.EVENT:St.ACK,this.reconstructor=new Jw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!wd(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(St[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===St.BINARY_EVENT||r.type===St.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");r.attachments=Number(u)}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(!Ad.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case St.CONNECT:return h0(n);case St.DISCONNECT:return n===void 0;case St.CONNECT_ERROR:return typeof n=="string"||h0(n);case St.EVENT:case St.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Qw.indexOf(n[0])===-1);case St.ACK:case St.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Jw{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=Kw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const p0=["searchParams.facetFilters","browseParams.facetFilters","hits","products"],m0=(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)},g0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),Zw=m0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),p0),E0=m0(g0,g0,p0),eS={Encoder:class extends Xw{encode(e){var t,n;return super.encode(Te(H({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],Zw(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 Ad{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?E0(r):r)):n instanceof Object?E0(n):n)):t))}}},tS={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class nS{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",socketOptions:a={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=f=>{console.log("[Copilot SDK] Connect Ack:",f),this.socket.auth={[this.sessionIdKey]:f.sessionId}},this.handleDisconnect=f=>{console.warn(`[Copilot SDK] Disconnected: ${f}`),f!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${f}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=f=>{console.error(`[Copilot SDK] Connect error: ${f.message}`);const m=f.message.match(/['"]error['"]:\s*['"](\w+)['"]/),E=m==null?void 0:m[1];E&&["InvalidApiKey","InvalidToken","BadRequest"].includes(E)?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 u=`${r}${o}`,c={};t?c["x-cimulate-api-key"]=t:n&&(c.Authorization=`Bearer ${n}`);const d=[tS,a,{parser:eS,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=Iu(u,$w.all(d))}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*od(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 rt(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}search(t,n){return rt(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}facetedNavigation(t,n){return rt(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 rt(this,null,function*(){return this.asyncResponse("product_view",t,n)})}askCim(t,n){return rt(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}requestSessionInformation(t){return rt(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return rt(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 rt(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const a=(function(u){return ad(this,null,function*(){const c=[];let d=!1,f=null;const m=yield new zr(u({emit:E=>{c.push(E),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new zr(new Promise((E=>{f=E})));for(;c.length>0;)yield c.shift()}finally{yield new zr(m==null?void 0:m())}})})((({emit:u,cancel:c})=>{const d=(f,m)=>{["done","error"].includes(m.name)&&c(),m.eventSourceId==o&&u(m)};return this.socket.onAny(d),()=>rt(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 Vw(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}var V=vs();const $i=Ke(V);var y0=Symbol.for("immer-nothing"),b0=Symbol.for("immer-draftable"),st=Symbol.for("immer-state");function $n(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Os=Object.getPrototypeOf;function Is(e){return!!e&&!!e[st]}function jr(e){var t;return e?T0(e)||Array.isArray(e)||!!e[b0]||!!((t=e.constructor)!=null&&t[b0])||Lu(e)||Du(e):!1}var rS=Object.prototype.constructor.toString();function T0(e){if(!e||typeof e!="object")return!1;const t=Os(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)===rS}function jo(e,t){Ru(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ru(e){const t=e[st];return t?t.type_:Array.isArray(e)?1:Lu(e)?2:Du(e)?3:0}function vd(e,t){return Ru(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function _0(e,t,n){const r=Ru(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function iS(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Lu(e){return e instanceof Map}function Du(e){return e instanceof Set}function qt(e){return e.copy_||e.base_}function kd(e,t){if(Lu(e))return new Map(e);if(Du(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=T0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[st];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(Os(e),r)}else{const r=Os(e);if(r!==null&&n)return H({},e);const o=Object.create(r);return Object.assign(o,e)}}function Nd(e,t=!1){return Mu(e)||Is(e)||!jr(e)||(Ru(e)>1&&(e.set=e.add=e.clear=e.delete=sS),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Nd(r,!0))),e}function sS(){$n(2)}function Mu(e){return Object.isFrozen(e)}var Od={};function Vi(e){const t=Od[e];return t||$n(0,e),t}function oS(e,t){Od[e]||(Od[e]=t)}var $o;function Fu(){return $o}function aS(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function x0(e,t){t&&(Vi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Id(e){Pd(e),e.drafts_.forEach(uS),e.drafts_=null}function Pd(e){e===$o&&($o=e.parent_)}function w0(e){return $o=aS($o,e)}function uS(e){const t=e[st];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function S0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[st].modified_&&(Id(t),$n(4)),jr(e)&&(e=Bu(t,e),t.parent_||Uu(t,e)),t.patches_&&Vi("Patches").generateReplacementPatches_(n[st].base_,e,t.patches_,t.inversePatches_)):e=Bu(t,n,[]),Id(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==y0?e:void 0}function Bu(e,t,n){if(Mu(t))return t;const r=t[st];if(!r)return jo(t,(o,a)=>C0(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Uu(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),jo(a,(c,d)=>C0(e,r,o,c,d,n,u)),Uu(e,o,!1),n&&e.patches_&&Vi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function C0(e,t,n,r,o,a,u){if(Is(o)){const c=a&&t&&t.type_!==3&&!vd(t.assigned_,r)?a.concat(r):void 0,d=Bu(e,o,c);if(_0(n,r,d),Is(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(jr(o)&&!Mu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Bu(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Uu(e,o)}}function Uu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Nd(t,n)}function lS(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Fu(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=Rd;n&&(o=[r],a=Vo);const{revoke:u,proxy:c}=Proxy.revocable(o,a);return r.draft_=c,r.revoke_=u,c}var Rd={get(e,t){if(t===st)return e;const n=qt(e);if(!vd(n,t))return cS(e,n,t);const r=n[t];return e.finalized_||!jr(r)?r:r===Ld(e.base_,t)?(Dd(e),e.copy_[t]=qo(r,e)):r},has(e,t){return t in qt(e)},ownKeys(e){return Reflect.ownKeys(qt(e))},set(e,t,n){const r=A0(qt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Ld(qt(e),t),a=o==null?void 0:o[st];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(iS(n,o)&&(n!==void 0||vd(e.base_,t)))return!0;Dd(e),$r(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 Ld(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Dd(e),$r(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=qt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){$n(11)},getPrototypeOf(e){return Os(e.base_)},setPrototypeOf(){$n(12)}},Vo={};jo(Rd,(e,t)=>{Vo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Vo.deleteProperty=function(e,t){return Vo.set.call(this,e,t,void 0)},Vo.set=function(e,t,n){return Rd.set.call(this,e[0],t,n,e[0])};function Ld(e,t){const n=e[st];return(n?qt(n):e)[t]}function cS(e,t,n){var o;const r=A0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function A0(e,t){if(!(t in e))return;let n=Os(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Os(n)}}function $r(e){e.modified_||(e.modified_=!0,e.parent_&&$r(e.parent_))}function Dd(e){e.copy_||(e.copy_=kd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var dS=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,m=>n.call(this,m,...f))}}typeof n!="function"&&$n(6),r!==void 0&&typeof r!="function"&&$n(7);let o;if(jr(t)){const a=w0(this),u=qo(t,void 0);let c=!0;try{o=n(u),c=!1}finally{c?Id(a):Pd(a)}return x0(a,r),S0(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===y0&&(o=void 0),this.autoFreeze_&&Nd(o,!0),r){const a=[],u=[];Vi("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else $n(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){jr(e)||$n(8),Is(e)&&(e=fS(e));const t=w0(this),n=qo(e,void 0);return n[st].isManual_=!0,Pd(t),n}finishDraft(e,t){const n=e&&e[st];(!n||!n.isManual_)&&$n(9);const{scope_:r}=n;return x0(r,t),S0(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=Vi("Patches").applyPatches_;return Is(e)?r(e,t):this.produce(e,o=>r(o,t))}};function qo(e,t){const n=Lu(e)?Vi("MapSet").proxyMap_(e,t):Du(e)?Vi("MapSet").proxySet_(e,t):lS(e,t);return(t?t.scope_:Fu()).drafts_.push(n),n}function fS(e){return Is(e)||$n(10,e),v0(e)}function v0(e){if(!jr(e)||Mu(e))return e;const t=e[st];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 jo(n,(r,o)=>{_0(n,r,v0(o))}),t&&(t.finalized_=!1),n}function hS(){class e extends Map{constructor(d,f){super(),this[st]={type_:2,parent_:f,scope_:f?f.scope_:Fu(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return qt(this[st]).size}has(d){return qt(this[st]).has(d)}set(d,f){const m=this[st];return u(m),(!qt(m).has(d)||qt(m).get(d)!==f)&&(n(m),$r(m),m.assigned_.set(d,!0),m.copy_.set(d,f),m.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const f=this[st];return u(f),n(f),$r(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[st];u(d),qt(d).size&&(n(d),$r(d),d.assigned_=new Map,jo(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const m=this[st];qt(m).forEach((E,T,b)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[st];u(f);const m=qt(f).get(d);if(f.finalized_||!jr(m)||m!==f.base_.get(d))return m;const E=qo(m,f);return n(f),f.copy_.set(d,E),E}keys(){return qt(this[st]).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 m=this.get(f.value);return{done:!1,value:[f.value,m]}}}}[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[st]={type_:3,parent_:f,scope_:f?f.scope_:Fu(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return qt(this[st]).size}has(d){const f=this[st];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[st];return u(f),this.has(d)||(a(f),$r(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[st];return u(f),a(f),$r(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[st];u(d),qt(d).size&&(a(d),$r(d),d.copy_.clear())}values(){const d=this[st];return u(d),a(d),d.copy_.values()}entries(){const d=this[st];return u(d),a(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,f){const m=this.values();let E=m.next();for(;!E.done;)d.call(f,E.value,E.value,this),E=m.next()}}function o(c,d){return new r(c,d)}function a(c){c.copy_||(c.copy_=new Set,c.base_.forEach(d=>{if(jr(d)){const f=qo(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&$n(3,JSON.stringify(qt(c)))}oS("MapSet",{proxyMap_:t,proxySet_:o})}var In=new dS,pS=In.produce;In.produceWithPatches.bind(In),In.setAutoFreeze.bind(In),In.setUseStrictShallowCopy.bind(In),In.applyPatches.bind(In),In.createDraft.bind(In),In.finishDraft.bind(In);function mS(e,t,n){var r=V.useMemo(function(){return pS(e)},[e]);return V.useReducer(r,t,n)}const k0={PAGE_CHANGED:"page-changed",PAGE_SIZE_CHANGED:"page-size-changed",FACET_FILTERS_CHANGED:"facet-filters-changed",RANGE_FILTERS_CHANGED:"range-filters-changed",CATALOG_SEGMENT_CHANGED:"catalog-segment-changed",PRICEBOOKS_CHANGED:"pricebooks-changed"},Tt={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",SET_ENTRY_TYPE:"SET_ENTRY_TYPE",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_IMAGE_FILE:"SET_IMAGE_FILE"},Ps={copilot:null,connected:!1,entryType:"search",messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],imageFile:null},gS=e=>{if(e.length===0)return null;const t=["copilot_search","copilot_browse","product_view","ask_cim"];return[...e].reverse().find(o=>t.some(a=>o.name.includes(a)))||null},ES=e=>{switch(!0){case e.includes("search"):return"search";case e.includes("browse"):return"browse";case e==="product_view":return"pdp";case e==="ask_cim":return"ask_cim";default:return"search"}},Yo="cimulate",Md=`${Yo}:pdp-update`,Fd=`${Yo}:browse-update`,Bd=`${Yo}:search-update`,Ud=`${Yo}:ui-state-update`,Hd=`${Yo}:session-state`,wr=H({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},k0),yS={"browse-context":wr.CONTEXT_UPDATED,categoryId:wr.CATEGORY_ID_CHANGED,categoryName:wr.CATEGORY_NAME_CHANGED,page:wr.PAGE_CHANGED,pageSize:wr.PAGE_SIZE_CHANGED,includeFacets:wr.FACET_FILTERS_CHANGED,facetFilters:wr.FACET_FILTERS_CHANGED,rangeFilters:wr.RANGE_FILTERS_CHANGED,catalogSegment:wr.CATALOG_SEGMENT_CHANGED,pricebooks:wr.PRICEBOOKS_CHANGED},Vr=H({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},k0),bS={"search-context":Vr.SEARCH_CONTEXT_UPDATED,query:Vr.QUERY_CHANGED,page:Vr.PAGE_CHANGED,pageSize:Vr.PAGE_SIZE_CHANGED,includeFacets:Vr.FACET_FILTERS_CHANGED,facetFilters:Vr.FACET_FILTERS_CHANGED,rangeFilters:Vr.RANGE_FILTERS_CHANGED,catalogSegment:Vr.CATALOG_SEGMENT_CHANGED,pricebooks:Vr.PRICEBOOKS_CHANGED},Y="cim-widget",Rs=`--${Y}`,qi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd"},TS=(e=qi)=>({[`${Rs}-primary-color`]:e.primaryColor||qi.primaryColor,[`${Rs}-secondary-color`]:e.secondaryColor||qi.secondaryColor,[`${Rs}-font-color`]:e.fontColor||qi.fontColor,[`${Rs}-font-family`]:e.fontFamily||qi.fontFamily,[`${Rs}-background-color`]:e.backgroundColor||qi.backgroundColor,[`${Rs}-border-color`]:e.borderColor||qi.borderColor}),ci={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},N0=V.createContext(null),O0=V.createContext(null);function I0(e,t){return function(){return e.apply(t,arguments)}}const{toString:_S}=Object.prototype,{getPrototypeOf:zd}=Object,{iterator:Hu,toStringTag:P0}=Symbol,zu=(e=>t=>{const n=_S.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),or=e=>(e=e.toLowerCase(),t=>zu(t)===e),ju=e=>t=>typeof t===e,{isArray:Ls}=Array,Ds=ju("undefined");function Wo(e){return e!==null&&!Ds(e)&&e.constructor!==null&&!Ds(e.constructor)&&bn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const R0=or("ArrayBuffer");function xS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&R0(e.buffer),t}const wS=ju("string"),bn=ju("function"),L0=ju("number"),Go=e=>e!==null&&typeof e=="object",SS=e=>e===!0||e===!1,$u=e=>{if(zu(e)!=="object")return!1;const t=zd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(P0 in e)&&!(Hu in e)},CS=e=>{if(!Go(e)||Wo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},AS=or("Date"),vS=or("File"),kS=e=>!!(e&&typeof e.uri!="undefined"),NS=e=>e&&typeof e.getParts!="undefined",OS=or("Blob"),IS=or("FileList"),PS=e=>Go(e)&&bn(e.pipe);function RS(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const D0=RS(),M0=typeof D0.FormData!="undefined"?D0.FormData:void 0,LS=e=>{let t;return e&&(M0&&e instanceof M0||bn(e.append)&&((t=zu(e))==="formdata"||t==="object"&&bn(e.toString)&&e.toString()==="[object FormData]"))},DS=or("URLSearchParams"),[MS,FS,BS,US]=["ReadableStream","Request","Response","Headers"].map(or),HS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ko(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),Ls(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 F0(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 Yi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,B0=e=>!Ds(e)&&e!==Yi;function jd(){const{caseless:e,skipUndefined:t}=B0(this)&&this||{},n={},r=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const u=e&&F0(n,a)||a;$u(n[u])&&$u(o)?n[u]=jd(n[u],o):$u(o)?n[u]=jd({},o):Ls(o)?n[u]=o.slice():(!t||!Ds(o))&&(n[u]=o)};for(let o=0,a=arguments.length;o<a;o++)arguments[o]&&Ko(arguments[o],r);return n}const zS=(e,t,n,{allOwnKeys:r}={})=>(Ko(t,(o,a)=>{n&&bn(o)?Object.defineProperty(e,a,{value:I0(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),jS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),$S=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},VS=(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&&zd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},qS=(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},YS=e=>{if(!e)return null;if(Ls(e))return e;let t=e.length;if(!L0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},WS=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&zd(Uint8Array)),GS=(e,t)=>{const r=(e&&e[Hu]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},KS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},QS=or("HTMLFormElement"),XS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),U0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),JS=or("RegExp"),H0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ko(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},ZS=e=>{H0(e,(t,n)=>{if(bn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(bn(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+"'")})}})},eC=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return Ls(e)?r(e):r(String(e).split(t)),n},tC=()=>{},nC=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function rC(e){return!!(e&&bn(e.append)&&e[P0]==="FormData"&&e[Hu])}const iC=e=>{const t=new Array(10),n=(r,o)=>{if(Go(r)){if(t.indexOf(r)>=0)return;if(Wo(r))return r;if(!("toJSON"in r)){t[o]=r;const a=Ls(r)?[]:{};return Ko(r,(u,c)=>{const d=n(u,o+1);!Ds(d)&&(a[c]=d)}),t[o]=void 0,a}}return r};return n(e,0)},sC=or("AsyncFunction"),oC=e=>e&&(Go(e)||bn(e))&&bn(e.then)&&bn(e.catch),z0=((e,t)=>e?setImmediate:t?((n,r)=>(Yi.addEventListener("message",({source:o,data:a})=>{o===Yi&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Yi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",bn(Yi.postMessage)),aC=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Yi):typeof process!="undefined"&&process.nextTick||z0,K={isArray:Ls,isArrayBuffer:R0,isBuffer:Wo,isFormData:LS,isArrayBufferView:xS,isString:wS,isNumber:L0,isBoolean:SS,isObject:Go,isPlainObject:$u,isEmptyObject:CS,isReadableStream:MS,isRequest:FS,isResponse:BS,isHeaders:US,isUndefined:Ds,isDate:AS,isFile:vS,isReactNativeBlob:kS,isReactNative:NS,isBlob:OS,isRegExp:JS,isFunction:bn,isStream:PS,isURLSearchParams:DS,isTypedArray:WS,isFileList:IS,forEach:Ko,merge:jd,extend:zS,trim:HS,stripBOM:jS,inherits:$S,toFlatObject:VS,kindOf:zu,kindOfTest:or,endsWith:qS,toArray:YS,forEachEntry:GS,matchAll:KS,isHTMLForm:QS,hasOwnProperty:U0,hasOwnProp:U0,reduceDescriptors:H0,freezeMethods:ZS,toObjectSet:eC,toCamelCase:XS,noop:tC,toFiniteNumber:nC,findKey:F0,global:Yi,isContextDefined:B0,isSpecCompliantForm:rC,toJSONObject:iC,isAsyncFn:sC,isThenable:oC,setImmediate:z0,asap:aC,isIterable:e=>e!=null&&bn(e[Hu])};let He=class jx extends Error{static from(t,n,r,o,a,u){const c=new jx(t.message,n||t.code,r,o,a);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,o,a){super(t),Object.defineProperty(this,"message",{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(){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:K.toJSONObject(this.config),code:this.code,status:this.status}}};He.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",He.ERR_BAD_OPTION="ERR_BAD_OPTION",He.ECONNABORTED="ECONNABORTED",He.ETIMEDOUT="ETIMEDOUT",He.ERR_NETWORK="ERR_NETWORK",He.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",He.ERR_DEPRECATED="ERR_DEPRECATED",He.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",He.ERR_BAD_REQUEST="ERR_BAD_REQUEST",He.ERR_CANCELED="ERR_CANCELED",He.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",He.ERR_INVALID_URL="ERR_INVALID_URL";const uC=null;function $d(e){return K.isPlainObject(e)||K.isArray(e)}function j0(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function Vd(e,t,n){return e?e.concat(t).map(function(o,a){return o=j0(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function lC(e){return K.isArray(e)&&!e.some($d)}const cC=K.toFlatObject(K,{},null,function(t){return/^is[A-Z]/.test(t)});function Vu(e,t,n){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,v){return!K.isUndefined(v[w])});const r=n.metaTokens,o=n.visitor||m,a=n.dots,u=n.indexes,d=(n.Blob||typeof Blob!="undefined"&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(o))throw new TypeError("visitor must be a function");function f(_){if(_===null)return"";if(K.isDate(_))return _.toISOString();if(K.isBoolean(_))return _.toString();if(!d&&K.isBlob(_))throw new He("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(_)||K.isTypedArray(_)?d&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function m(_,w,v){let A=_;if(K.isReactNative(t)&&K.isReactNativeBlob(_))return t.append(Vd(v,w,a),f(_)),!1;if(_&&!v&&typeof _=="object"){if(K.endsWith(w,"{}"))w=r?w:w.slice(0,-2),_=JSON.stringify(_);else if(K.isArray(_)&&lC(_)||(K.isFileList(_)||K.endsWith(w,"[]"))&&(A=K.toArray(_)))return w=j0(w),A.forEach(function(L,W){!(K.isUndefined(L)||L===null)&&t.append(u===!0?Vd([w],W,a):u===null?w:w+"[]",f(L))}),!1}return $d(_)?!0:(t.append(Vd(v,w,a),f(_)),!1)}const E=[],T=Object.assign(cC,{defaultVisitor:m,convertValue:f,isVisitable:$d});function b(_,w){if(!K.isUndefined(_)){if(E.indexOf(_)!==-1)throw Error("Circular reference detected in "+w.join("."));E.push(_),K.forEach(_,function(A,M){(!(K.isUndefined(A)||A===null)&&o.call(t,A,K.isString(M)?M.trim():M,w,T))===!0&&b(A,w?w.concat(M):[M])}),E.pop()}}if(!K.isObject(e))throw new TypeError("data must be an object");return b(e),t}function $0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function qd(e,t){this._pairs=[],e&&Vu(e,this,t)}const V0=qd.prototype;V0.append=function(t,n){this._pairs.push([t,n])},V0.toString=function(t){const n=t?function(r){return t.call(this,r,$0)}:$0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function dC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function q0(e,t,n){if(!t)return e;const r=n&&n.encode||dC,o=K.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=K.isURLSearchParams(t)?t.toString():new qd(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class Y0{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){K.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Yd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},fC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:qd,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Wd=typeof window!="undefined"&&typeof document!="undefined",Gd=typeof navigator=="object"&&navigator||void 0,hC=Wd&&(!Gd||["ReactNative","NativeScript","NS"].indexOf(Gd.product)<0),pC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",mC=Wd&&window.location.href||"http://localhost",rn=H(H({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Wd,hasStandardBrowserEnv:hC,hasStandardBrowserWebWorkerEnv:pC,navigator:Gd,origin:mC},Symbol.toStringTag,{value:"Module"}))),fC);function gC(e,t){return Vu(e,new rn.classes.URLSearchParams,H({visitor:function(n,r,o,a){return rn.isNode&&K.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function EC(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function yC(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 W0(e){function t(n,r,o,a){let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&K.isArray(o)?o.length:u,d?(K.hasOwnProp(o,u)?o[u]=[o[u],r]:o[u]=r,!c):((!o[u]||!K.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&K.isArray(o[u])&&(o[u]=yC(o[u])),!c)}if(K.isFormData(e)&&K.isFunction(e.entries)){const n={};return K.forEachEntry(e,(r,o)=>{t(EC(r),o,n,0)}),n}return null}function bC(e,t,n){if(K.isString(e))try{return(t||JSON.parse)(e),K.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Qo={transitional:Yd,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=K.isObject(t);if(a&&K.isHTMLForm(t)&&(t=new FormData(t)),K.isFormData(t))return o?JSON.stringify(W0(t)):t;if(K.isArrayBuffer(t)||K.isBuffer(t)||K.isStream(t)||K.isFile(t)||K.isBlob(t)||K.isReadableStream(t))return t;if(K.isArrayBufferView(t))return t.buffer;if(K.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return gC(t,this.formSerializer).toString();if((c=K.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Vu(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),bC(t)):t}],transformResponse:[function(t){const n=this.transitional||Qo.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(K.isResponse(t)||K.isReadableStream(t))return t;if(t&&K.isString(t)&&(r&&!this.responseType||o)){const u=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(u)throw c.name==="SyntaxError"?He.from(c,He.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rn.classes.FormData,Blob:rn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],e=>{Qo.headers[e]={}});const TC=K.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"]),_C=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
3
|
+
`).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||t[n]&&TC[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},G0=Symbol("internals"),xC=e=>!/[\r\n]/.test(e);function K0(e,t){if(!(e===!1||e==null)){if(K.isArray(e)){e.forEach(n=>K0(n,t));return}if(!xC(String(e)))throw new Error(`Invalid character in header content ["${t}"]`)}}function Xo(e){return e&&String(e).trim().toLowerCase()}function wC(e){let t=e.length;for(;t>0;){const n=e.charCodeAt(t-1);if(n!==10&&n!==13)break;t-=1}return t===e.length?e:e.slice(0,t)}function qu(e){return e===!1||e==null?e:K.isArray(e)?e.map(qu):wC(String(e))}function SC(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 CC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Kd(e,t,n,r,o){if(K.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!K.isString(t)){if(K.isString(r))return t.indexOf(r)!==-1;if(K.isRegExp(r))return r.test(t)}}function AC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function vC(e,t){const n=K.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let Tn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(c,d,f){const m=Xo(d);if(!m)throw new Error("header name must be a non-empty string");const E=K.findKey(o,m);(!E||o[E]===void 0||f===!0||f===void 0&&o[E]!==!1)&&(K0(c,d),o[E||d]=qu(c))}const u=(c,d)=>K.forEach(c,(f,m)=>a(f,m,d));if(K.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(K.isString(t)&&(t=t.trim())&&!CC(t))u(_C(t),n);else if(K.isObject(t)&&K.isIterable(t)){let c={},d,f;for(const m of t){if(!K.isArray(m))throw TypeError("Object iterator must return a key-value pair");c[f=m[0]]=(d=c[f])?K.isArray(d)?[...d,m[1]]:[d,m[1]]:m[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=Xo(t),t){const r=K.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return SC(o);if(K.isFunction(n))return n.call(this,o,r);if(K.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Xo(t),t){const r=K.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Kd(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=Xo(u),u){const c=K.findKey(r,u);c&&(!n||Kd(r,r[c],c,n))&&(delete r[c],o=!0)}}return K.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||Kd(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return K.forEach(this,(o,a)=>{const u=K.findKey(r,a);if(u){n[u]=qu(o),delete n[a];return}const c=t?AC(a):String(a).trim();c!==a&&delete n[a],n[c]=qu(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return K.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&K.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[G0]=this[G0]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=Xo(u);r[c]||(vC(o,u),r[c]=!0)}return K.isArray(t)?t.forEach(a):a(t),this}};Tn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(Tn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),K.freezeMethods(Tn);function Qd(e,t){const n=this||Qo,r=t||n,o=Tn.from(r.headers);let a=r.data;return K.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Q0(e){return!!(e&&e.__CANCEL__)}let Jo=class extends He{constructor(t,n,r){super(t==null?"canceled":t,He.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function X0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new He("Request failed with status code "+n.status,[He.ERR_BAD_REQUEST,He.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function kC(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function NC(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(),m=r[a];u||(u=f),n[o]=d,r[o]=f;let E=a,T=0;for(;E!==o;)T+=n[E++],E=E%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),f-u<t)return;const b=m&&f-m;return b?Math.round(T*1e3/b):void 0}}function OC(e,t){let n=0,r=1e3/t,o,a;const u=(f,m=Date.now())=>{n=m,o=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const m=Date.now(),E=m-n;E>=r?u(f,m):(o=f,a||(a=setTimeout(()=>{a=null,u(o)},r-E)))},()=>o&&u(o)]}const Yu=(e,t,n=3)=>{let r=0;const o=NC(50,250);return OC(a=>{const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=u-r,f=o(d),m=u<=c;r=u;const E={loaded:u,total:c,progress:c?u/c:void 0,bytes:d,rate:f||void 0,estimated:f&&c&&m?(c-u)/f:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(E)},n)},J0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Z0=e=>(...t)=>K.asap(()=>e(...t)),IC=rn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,rn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(rn.origin),rn.navigator&&/(msie|trident)/i.test(rn.navigator.userAgent)):()=>!0,PC=rn.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];K.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),K.isString(r)&&c.push(`path=${r}`),K.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),K.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function RC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function LC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function eg(e,t,n){let r=!RC(t);return e&&(r||n==!1)?LC(e,t):t}const tg=e=>e instanceof Tn?H({},e):e;function Wi(e,t){t=t||{};const n={};function r(f,m,E,T){return K.isPlainObject(f)&&K.isPlainObject(m)?K.merge.call({caseless:T},f,m):K.isPlainObject(m)?K.merge({},m):K.isArray(m)?m.slice():m}function o(f,m,E,T){if(K.isUndefined(m)){if(!K.isUndefined(f))return r(void 0,f,E,T)}else return r(f,m,E,T)}function a(f,m){if(!K.isUndefined(m))return r(void 0,m)}function u(f,m){if(K.isUndefined(m)){if(!K.isUndefined(f))return r(void 0,f)}else return r(void 0,m)}function c(f,m,E){if(E in t)return r(f,m);if(E in e)return r(void 0,f)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:c,headers:(f,m,E)=>o(tg(f),tg(m),E,!0)};return K.forEach(Object.keys(H(H({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const E=K.hasOwnProp(d,m)?d[m]:o,T=E(e[m],t[m],m);K.isUndefined(T)&&E!==c||(n[m]=T)}),n}const ng=e=>{const t=Wi({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:u,auth:c}=t;if(t.headers=u=Tn.from(u),t.url=q0(eg(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&u.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),K.isFormData(n)){if(rn.hasStandardBrowserEnv||rn.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(K.isFunction(n.getHeaders)){const d=n.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([m,E])=>{f.includes(m.toLowerCase())&&u.set(m,E)})}}if(rn.hasStandardBrowserEnv&&(r&&K.isFunction(r)&&(r=r(t)),r||r!==!1&&IC(t.url))){const d=o&&a&&PC.read(a);d&&u.set(o,d)}return t},DC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=ng(e);let a=o.data;const u=Tn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=o,m,E,T,b,_;function w(){b&&b(),_&&_(),o.cancelToken&&o.cancelToken.unsubscribe(m),o.signal&&o.signal.removeEventListener("abort",m)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,!0),v.timeout=o.timeout;function A(){if(!v)return;const L=Tn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),J={data:!c||c==="text"||c==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:L,config:e,request:v};X0(function(te){n(te),w()},function(te){r(te),w()},J),v=null}"onloadend"in v?v.onloadend=A:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(A)},v.onabort=function(){v&&(r(new He("Request aborted",He.ECONNABORTED,e,v)),v=null)},v.onerror=function(W){const J=W&&W.message?W.message:"Network Error",B=new He(J,He.ERR_NETWORK,e,v);B.event=W||null,r(B),v=null},v.ontimeout=function(){let W=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const J=o.transitional||Yd;o.timeoutErrorMessage&&(W=o.timeoutErrorMessage),r(new He(W,J.clarifyTimeoutError?He.ETIMEDOUT:He.ECONNABORTED,e,v)),v=null},a===void 0&&u.setContentType(null),"setRequestHeader"in v&&K.forEach(u.toJSON(),function(W,J){v.setRequestHeader(J,W)}),K.isUndefined(o.withCredentials)||(v.withCredentials=!!o.withCredentials),c&&c!=="json"&&(v.responseType=o.responseType),f&&([T,_]=Yu(f,!0),v.addEventListener("progress",T)),d&&v.upload&&([E,b]=Yu(d),v.upload.addEventListener("progress",E),v.upload.addEventListener("loadend",b)),(o.cancelToken||o.signal)&&(m=L=>{v&&(r(!L||L.type?new Jo(null,e,v):L),v.abort(),v=null)},o.cancelToken&&o.cancelToken.subscribe(m),o.signal&&(o.signal.aborted?m():o.signal.addEventListener("abort",m)));const M=kC(o.url);if(M&&rn.protocols.indexOf(M)===-1){r(new He("Unsupported protocol "+M+":",He.ERR_BAD_REQUEST,e));return}v.send(a||null)})},MC=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(f){if(!o){o=!0,c();const m=f instanceof Error?f:this.reason;r.abort(m instanceof He?m:new Jo(m instanceof Error?m.message:m))}};let u=t&&setTimeout(()=>{u=null,a(new He(`timeout of ${t}ms exceeded`,He.ETIMEDOUT))},t);const c=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(a):f.removeEventListener("abort",a)}),e=null)};e.forEach(f=>f.addEventListener("abort",a));const{signal:d}=r;return d.unsubscribe=()=>K.asap(c),d}},FC=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},BC=function(e,t){return ad(this,null,function*(){try{for(var n=zx(UC(e)),r,o,a;r=!(o=yield new zr(n.next())).done;r=!1){const u=o.value;yield*qm(FC(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new zr(o.call(n)))}finally{if(a)throw a[0]}}})},UC=function(e){return ad(this,null,function*(){if(e[Symbol.asyncIterator]){yield*qm(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new zr(t.read());if(n)break;yield r}}finally{yield new zr(t.cancel())}})},rg=(e,t,n,r)=>{const o=BC(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return rt(this,null,function*(){try{const{done:m,value:E}=yield o.next();if(m){c(),f.close();return}let T=E.byteLength;if(n){let b=a+=T;n(b)}f.enqueue(new Uint8Array(E))}catch(m){throw c(m),m}})},cancel(f){return c(f),o.return()}},{highWaterMark:2})},ig=64*1024,{isFunction:Wu}=K,HC=(({Request:e,Response:t})=>({Request:e,Response:t}))(K.global),{ReadableStream:sg,TextEncoder:og}=K.global,ag=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},zC=e=>{e=K.merge.call({skipUndefined:!0},HC,e);const{fetch:t,Request:n,Response:r}=e,o=t?Wu(t):typeof fetch=="function",a=Wu(n),u=Wu(r);if(!o)return!1;const c=o&&Wu(sg),d=o&&(typeof og=="function"?(_=>w=>_.encode(w))(new og):_=>rt(null,null,function*(){return new Uint8Array(yield new n(_).arrayBuffer())})),f=a&&c&&ag(()=>{let _=!1;const w=new sg,v=new n(rn.origin,{body:w,method:"POST",get duplex(){return _=!0,"half"}}).headers.has("Content-Type");return w.cancel(),_&&!v}),m=u&&c&&ag(()=>K.isReadableStream(new r("").body)),E={stream:m&&(_=>_.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!E[_]&&(E[_]=(w,v)=>{let A=w&&w[_];if(A)return A.call(w);throw new He(`Response type '${_}' is not supported`,He.ERR_NOT_SUPPORT,v)})});const T=_=>rt(null,null,function*(){if(_==null)return 0;if(K.isBlob(_))return _.size;if(K.isSpecCompliantForm(_))return(yield new n(rn.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(K.isArrayBufferView(_)||K.isArrayBuffer(_))return _.byteLength;if(K.isURLSearchParams(_)&&(_=_+""),K.isString(_))return(yield d(_)).byteLength}),b=(_,w)=>rt(null,null,function*(){const v=K.toFiniteNumber(_.getContentLength());return v==null?T(w):v});return _=>rt(null,null,function*(){let{url:w,method:v,data:A,signal:M,cancelToken:L,timeout:W,onDownloadProgress:J,onUploadProgress:B,responseType:te,headers:ge,withCredentials:ye="same-origin",fetchOptions:F}=ng(_),se=t||fetch;te=te?(te+"").toLowerCase():"text";let he=MC([M,L&&L.toAbortSignal()],W),le=null;const fe=he&&he.unsubscribe&&(()=>{he.unsubscribe()});let be;try{if(B&&f&&v!=="get"&&v!=="head"&&(be=yield b(ge,A))!==0){let R=new n(w,{method:"POST",body:A,duplex:"half"}),Q;if(K.isFormData(A)&&(Q=R.headers.get("content-type"))&&ge.setContentType(Q),R.body){const[O,_e]=J0(be,Yu(Z0(B)));A=rg(R.body,ig,O,_e)}}K.isString(ye)||(ye=ye?"include":"omit");const Ae=a&&"credentials"in n.prototype,ue=Te(H({},F),{signal:he,method:v.toUpperCase(),headers:ge.normalize().toJSON(),body:A,duplex:"half",credentials:Ae?ye:void 0});le=a&&new n(w,ue);let q=yield a?se(le,F):se(w,ue);const ne=m&&(te==="stream"||te==="response");if(m&&(J||ne&&fe)){const R={};["status","statusText","headers"].forEach(Le=>{R[Le]=q[Le]});const Q=K.toFiniteNumber(q.headers.get("content-length")),[O,_e]=J&&J0(Q,Yu(Z0(J),!0))||[];q=new r(rg(q.body,ig,O,()=>{_e&&_e(),fe&&fe()}),R)}te=te||"text";let S=yield E[K.findKey(E,te)||"text"](q,_);return!ne&&fe&&fe(),yield new Promise((R,Q)=>{X0(R,Q,{data:S,headers:Tn.from(q.headers),status:q.status,statusText:q.statusText,config:_,request:le})})}catch(Ae){throw fe&&fe(),Ae&&Ae.name==="TypeError"&&/Load failed|fetch/i.test(Ae.message)?Object.assign(new He("Network Error",He.ERR_NETWORK,_,le,Ae&&Ae.response),{cause:Ae.cause||Ae}):He.from(Ae,Ae&&Ae.code,_,le,Ae&&Ae.response)}})},jC=new Map,ug=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,m=jC;for(;c--;)d=a[c],f=m.get(d),f===void 0&&m.set(d,f=c?new Map:zC(t)),m=f;return f};ug();const Xd={http:uC,xhr:DC,fetch:{get:ug}};K.forEach(Xd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const lg=e=>`- ${e}`,$C=e=>K.isFunction(e)||e===null||e===!1;function VC(e,t){e=K.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,!$C(r)&&(o=Xd[(c=String(r)).toLowerCase()],o===void 0))throw new He(`Unknown adapter '${c}'`);if(o&&(K.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
|
+
`+u.map(lg).join(`
|
|
6
|
+
`):" "+lg(u[0]):"as no adapter specified";throw new He("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const cg={getAdapter:VC,adapters:Xd};function Jd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Jo(null,e)}function dg(e){return Jd(e),e.headers=Tn.from(e.headers),e.data=Qd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),cg.getAdapter(e.adapter||Qo.adapter,e)(e).then(function(r){return Jd(e),r.data=Qd.call(e,e.transformResponse,r),r.headers=Tn.from(r.headers),r},function(r){return Q0(r)||(Jd(e),r&&r.response&&(r.response.data=Qd.call(e,e.transformResponse,r.response),r.response.headers=Tn.from(r.response.headers))),Promise.reject(r)})}const fg="1.15.0",Gu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Gu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const hg={};Gu.transitional=function(t,n,r){function o(a,u){return"[Axios v"+fg+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new He(o(u," has been removed"+(n?" in "+n:"")),He.ERR_DEPRECATED);return n&&!hg[u]&&(hg[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}},Gu.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function qC(e,t,n){if(typeof e!="object")throw new He("options must be an object",He.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],u=t[a];if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new He("option "+a+" must be "+d,He.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new He("Unknown option "+a,He.ERR_BAD_OPTION)}}const Ku={assertOptions:qC,validators:Gu},Vn=Ku.validators;let Gi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Y0,response:new Y0}}request(t,n){return rt(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
|
+
`);return u===-1?"":o.stack.slice(u+1)})();try{if(!r.stack)r.stack=a;else if(a){const u=a.indexOf(`
|
|
8
|
+
`),c=u===-1?-1:a.indexOf(`
|
|
9
|
+
`,u+1),d=c===-1?"":a.slice(c+1);String(r.stack).endsWith(d)||(r.stack+=`
|
|
10
|
+
`+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Wi(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Ku.assertOptions(r,{silentJSONParsing:Vn.transitional(Vn.boolean),forcedJSONParsing:Vn.transitional(Vn.boolean),clarifyTimeoutError:Vn.transitional(Vn.boolean),legacyInterceptorReqResOrdering:Vn.transitional(Vn.boolean)},!1),o!=null&&(K.isFunction(o)?n.paramsSerializer={serialize:o}:Ku.assertOptions(o,{encode:Vn.function,serialize:Vn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ku.assertOptions(n,{baseUrl:Vn.spelling("baseURL"),withXsrfToken:Vn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&K.merge(a.common,a[n.method]);a&&K.forEach(["delete","get","head","post","put","patch","common"],_=>{delete a[_]}),n.headers=Tn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(w){if(typeof w.runWhen=="function"&&w.runWhen(n)===!1)return;d=d&&w.synchronous;const v=n.transitional||Yd;v&&v.legacyInterceptorReqResOrdering?c.unshift(w.fulfilled,w.rejected):c.push(w.fulfilled,w.rejected)});const f=[];this.interceptors.response.forEach(function(w){f.push(w.fulfilled,w.rejected)});let m,E=0,T;if(!d){const _=[dg.bind(this),void 0];for(_.unshift(...c),_.push(...f),T=_.length,m=Promise.resolve(n);E<T;)m=m.then(_[E++],_[E++]);return m}T=c.length;let b=n;for(;E<T;){const _=c[E++],w=c[E++];try{b=_(b)}catch(v){w.call(this,v);break}}try{m=dg.call(this,b)}catch(_){return Promise.reject(_)}for(E=0,T=f.length;E<T;)m=m.then(f[E++],f[E++]);return m}getUri(t){t=Wi(this.defaults,t);const n=eg(t.baseURL,t.url,t.allowAbsoluteUrls);return q0(n,t.params,t.paramsSerializer)}};K.forEach(["delete","get","head","options"],function(t){Gi.prototype[t]=function(n,r){return this.request(Wi(r||{},{method:t,url:n,data:(r||{}).data}))}}),K.forEach(["post","put","patch"],function(t){function n(r){return function(a,u,c){return this.request(Wi(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Gi.prototype[t]=n(),Gi.prototype[t+"Form"]=n(!0)});let YC=class $x{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 Jo(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 $x(function(o){t=o}),cancel:t}}};function WC(e){return function(n){return e.apply(null,n)}}function GC(e){return K.isObject(e)&&e.isAxiosError===!0}const Zd={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(Zd).forEach(([e,t])=>{Zd[t]=e});function pg(e){const t=new Gi(e),n=I0(Gi.prototype.request,t);return K.extend(n,Gi.prototype,t,{allOwnKeys:!0}),K.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return pg(Wi(e,o))},n}const Pt=pg(Qo);Pt.Axios=Gi,Pt.CanceledError=Jo,Pt.CancelToken=YC,Pt.isCancel=Q0,Pt.VERSION=fg,Pt.toFormData=Vu,Pt.AxiosError=He,Pt.Cancel=Pt.CanceledError,Pt.all=function(t){return Promise.all(t)},Pt.spread=WC,Pt.isAxiosError=GC,Pt.mergeConfig=Wi,Pt.AxiosHeaders=Tn,Pt.formToJSON=e=>W0(K.isHTMLForm(e)?new FormData(e):e),Pt.getAdapter=cg.getAdapter,Pt.HttpStatusCode=Zd,Pt.default=Pt;const{Axios:gB,AxiosError:EB,CanceledError:yB,isCancel:bB,CancelToken:TB,VERSION:_B,all:xB,Cancel:wB,isAxiosError:SB,spread:CB,toFormData:AB,AxiosHeaders:vB,HttpStatusCode:kB,formToJSON:NB,getAdapter:OB,mergeConfig:IB}=Pt;class KC{constructor(t,n,r,o=!1){Ce(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Ce(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Ce(this,"CIMULATE_SEARCH_API_PATH","api/v1");Ce(this,"baseApiUrl");Ce(this,"headers",{});Ce(this,"fetchConfig",()=>rt(this,null,function*(){try{const t=yield Pt.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}}));Ce(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const o=new URL(t).hostname,[,a]=o.split(".");return`https://api.${a}.${this.CIMULATE_SEARCH_API_HOST}.io`}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}`),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,o)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class QC{constructor(t,n,r,o=!1){Ce(this,"apiService");Ce(this,"config",null);Ce(this,"getConfig",()=>rt(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}}));Ce(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Ce(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Ce(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Ce(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Ce(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Ce(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Ce(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Ce(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Ce(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Ce(this,"getProductField",t=>this.config?this.config[t]:"");Ce(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new KC(t,n,r,o)}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 Ms=(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 XC{constructor(t=!1){Ce(this,"isDevelopment");Ce(this,"_log",(t,n,...r)=>{Ms(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 mg=V.createContext(null),JC=({logoUrl:e,headerText:t="Your Search Assistant",globalClassName:n="",entryMessage:r,openLinksInNewTab:o=!1,disclaimerText:a,disclaimerMarkdown:u,searchPlaceholder:c,searchButtonLabel:d,searchConfig:f,componentConfig:m,conversationHistory:E,resetConversationMessage:T="What products would you like to explore today?",apiKey:b,apiToken:_,baseUrl:w,theme:v,isDevelopment:A,__features:M,children:L})=>{const W=V.useMemo(()=>new QC(w,b,_,A),[w,b,_,A]),J=V.useMemo(()=>new XC(A),[A]);V.useEffect(()=>{W.config||W.getConfig()},[W]);const B=V.useMemo(()=>TS(v),[v]),te=V.useMemo(()=>{const ye=(f==null?void 0:f.placeholder)||c,F=(f==null?void 0:f.buttonLabel)||d;let se="icon";return f!=null&&f.buttonType?se=f.buttonType:d&&(se="text"),Te(H({},f||{}),{placeholder:ye,buttonLabel:F,buttonType:se})},[f,c,d]),ge=V.useMemo(()=>({configModule:W,logoUrl:e,headerText:t,entryMessage:r,globalClassName:n,openLinksInNewTab:o,disclaimerText:a,disclaimerMarkdown:u,themeVariables:B,logger:J,searchConfig:te,enableMinimize:!!(m!=null&&m.enableMinimize),resetConversationMessage:T,conversationHistory:{sinceHours:typeof(E==null?void 0:E.sinceHours)=="number"?E.sinceHours:1,limit:E==null?void 0:E.limit},features:M}),[W,e,t,r,n,a,u,o,te,m,T,J,B,E,M]);return C.jsx(mg.Provider,{value:ge,children:L})},Rt=()=>{const e=V.useContext(mg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class ZC{constructor(){Ce(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left"},modal:{isFullscreen:!1}});Ce(this,"connectedProxy");Ce(this,"modeProxy");Ce(this,"entryTypeProxy");Ce(this,"statusProxy");Ce(this,"dialogProxy");Ce(this,"modalProxy",{isFullscreen:!1});Ce(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ce(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return nA(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},{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},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const ot=new ZC,Ki=()=>ot.connected,Zo=()=>ot.isOpen,eA=e=>{window.addEventListener(Ud,e)},tA=e=>{window.removeEventListener(Ud,e)},nA=(e,t)=>{const n=new CustomEvent(Ud,{detail:{property:e,value:t}});window.dispatchEvent(n)},rA=e=>{ot.connectedProxy.connected=e},ea=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);ot.entryTypeProxy.entryType=e},Qi=e=>{const t=ot.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;ot.statusProxy.isOpen=n,n&&(ot.statusProxy.isMinimized=!1)},Qu=e=>{const t=ot.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;ot.statusProxy.isMinimized=n,n&&(ot.statusProxy.isOpen=!1)},ef=e=>{ot.modalProxy.isFullscreen=e},Xu=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);ot.statusProxy.type=e,e==="dialog"||e==="chat"?ot.modeProxy.mode="embedded":ot.modeProxy.mode="standalone"},tf=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);ot.dialogProxy.position=e},iA=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=Rt(),o=V.useCallback(A=>{n({type:Tt.SET_COPILOT,payload:A})},[n]),a=V.useCallback(A=>{rA(A),n({type:Tt.SET_CONNECTED,payload:A})},[n]),u=V.useCallback(A=>{n({type:Tt.SET_ENTRY_TYPE,payload:A})},[n]),c=V.useCallback(()=>{n({type:Tt.RESET_COPILOT,payload:{}})},[n]),d=V.useCallback(()=>{n({type:Tt.RESET_STATE,payload:{}})},[n]),f=V.useCallback(A=>{r==null||r.log(`${A.name} event received`,A),n({type:Tt.ADD_MESSAGE,payload:A}),A.bypassHandlers||e==null||e(A)},[e,r,n]),m=V.useCallback(A=>{n({type:Tt.ADD_LOADING_MESSAGE,payload:A})},[n]),E=V.useCallback(A=>{n({type:Tt.REMOVE_LOADING_MESSAGE,payload:A})},[n]),T=V.useCallback(A=>{n({type:Tt.SET_ACTIVE_CONVERSATION_ID,payload:A})},[n]),b=V.useCallback(A=>{n({type:Tt.ADD_CONVERSATION_ID,payload:A})},[n]),_=V.useCallback(A=>{n({type:Tt.SET_CONVERSATION_IDS,payload:A})},[n]),w=V.useCallback(A=>{n({type:Tt.SET_IMAGE_FILE,payload:A})},[n]),v=V.useMemo(()=>({setCopilot:o,setConnected:a,setEntryType:u,resetCopilot:c,resetCopilotState:d,addCopilotEvent:f,addLoadingMessage:m,removeLoadingMessage:E,setActiveConversationId:T,addConversationId:b,setConversationIds:_,setImageFile:w}),[o,a,u,c,d,f,m,E,T,b,_,w]);return C.jsx(O0.Provider,{value:v,children:t})};hS();const sA=(e,t)=>{const{type:n,payload:r}=t;if(n===Tt.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 Tt.RESET_STATE:e.messages=Ps.messages,e.groupedMessages=Ps.groupedMessages,e.loadingMessages=Ps.loadingMessages,e.entryType=Ps.entryType;break;case Tt.RESET_COPILOT:e.copilot=null;break;case Tt.SET_COPILOT:e.copilot=r;break;case Tt.SET_CONNECTED:e.connected=r;break;case Tt.SET_ENTRY_TYPE:e.entryType=r;break;case Tt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case Tt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case Tt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case Tt.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case Tt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case Tt.SET_IMAGE_FILE:e.imageFile=r;break}},oA=({entryType:e,onCopilotEvent:t,children:n})=>{const r=e?Te(H({},Ps),{entryType:e}):Ps,[o,a]=mS(sA,r);return C.jsx(N0.Provider,{value:o,children:C.jsx(iA,{onCopilotEvent:t,dispatch:a,children:n})})};function aA(){var e=V.useRef(!0);return e.current?(e.current=!1,!0):e.current}var Ju=function(e){V.useEffect(e,[])},uA=function(e,t){return e===t};function lA(e,t){t===void 0&&(t=uA);var n=V.useRef(),r=V.useRef(e),o=aA();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}class cA{constructor(){Ce(this,"items",[]);Ce(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});Ce(this,"remove",()=>this.items.shift());Ce(this,"first",()=>this.items.length>0?this.items[0]:null);Ce(this,"clear",()=>{this.items.length=0});Ce(this,"processQueue",t=>{new Array(sn.size).fill(1).forEach(()=>{const r=sn.first();r&&(t(r),sn.remove())})})}get size(){return this.items.length}}const sn=new cA,gg=e=>{window.addEventListener(Bd,e)},Eg=e=>{window.removeEventListener(Bd,e)},dA=(e,t,n)=>{const r=new CustomEvent(Bd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},yg=e=>{window.addEventListener(Fd,e)},bg=e=>{window.removeEventListener(Fd,e)},fA=(e,t,n)=>{const r=new CustomEvent(Fd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Tg=e=>{window.addEventListener(Md,e)},_g=e=>{window.removeEventListener(Md,e)},xg=(e,t,n)=>{const r=new CustomEvent(Md,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},hA=e=>{window.addEventListener(Hd,e)},pA=e=>{window.removeEventListener(Hd,e)},Zu=(e,t,n)=>{const r=new CustomEvent(Hd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class mA{constructor(){Ce(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Ce(this,"categoryIdProxy");Ce(this,"facetFiltersProxy");Ce(this,"rangeFiltersProxy");Ce(this,"catalogSegmentProxy");Ce(this,"pricebooksProxy");Ce(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ce(this,"_fullSet",(t,n,r)=>{const o=yS[n];return fA(o,n,r),Reflect.set(t,n,r)});Ce(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Ce(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Ce(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId,categoryName:this.initialParams.categoryName},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get categoryId(){return this.categoryIdProxy.categoryId||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{categoryId:this.categoryId,categoryName:this.categoryIdProxy.categoryName,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const at=new mA,wg=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},Sg=(e,t,n)=>{var u,c;const r=H({},((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},Cg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},Ag=({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},vg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},kg=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},gA=e=>{if(!Ki()||!Zo()){Ki()&&sn.clear(),sn.add({context:"browse",payload:Te(H({},at.state),{categoryId:e})});return}at.categoryIdProxy.categoryId=e},Ng=e=>{wg(e,at)},EA=(e,t)=>{Sg(e,t,at)},Og=e=>{Cg(e,at)},yA=({field:e,value:t})=>{Ag({field:e,value:t},at)},bA=e=>{vg(e,at)},Ig=e=>{kg(e,at)},Pg=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=Ki(),n=Zo();if(!t||!n){t&&sn.clear(),sn.add({context:"browse",payload:H({},e)});return}"facetFilters"in e&&Ng(e.facetFilters||{}),"rangeFilters"in e&&Og(e.rangeFilters||[]),"catalogSegment"in e&&(at.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Ig(e.pricebooks||[]),"categoryName"in e&&(at.categoryIdProxy.categoryName=e.categoryName||""),at.categoryIdProxy.categoryId=e.categoryId},TA=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:Pg,updateBrowseCategoryId:gA,updateCatalogSegment:bA,updateFacetFilter:EA,updateFacetFilters:Ng,updatePricebooks:Ig,updateRangeFilter:yA,updateRangeFilters:Og},Symbol.toStringTag,{value:"Module"}));class _A{constructor(){Ce(this,"initialParams",{productId:"",productName:"",pdpLink:""});Ce(this,"proxy");Ce(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ce(this,"_fullSet",(t,n,r)=>(xg(n,r),Reflect.set(t,n,r)));Ce(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 ar=new _A,Rg=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=Ki(),n=Zo();if(!t||!n){t&&sn.clear(),sn.add({context:"pdp",payload:H({},e)});return}ar.updateProxy(e),xg("pdp-context",e)},xA=e=>{ar.proxy.productId=e,Ki()||sn.add({context:"pdp",payload:H({},ar.state)})},wA=e=>{ar.proxy.pdpLink=e},SA=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{Zu("getConversationMessages",{payload:e,callback:t},ci.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{Zu("getSessionInformation",{callback:e},ci.GET_SESSION_INFORMATION)},loadConversation:e=>{Zu("loadConversation",e,ci.LOAD_CONVERSATION)},resetConversation:()=>{Zu("resetConversation",!0,ci.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class CA{constructor(){Ce(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Ce(this,"queryProxy");Ce(this,"facetFiltersProxy");Ce(this,"rangeFiltersProxy");Ce(this,"catalogSegmentProxy");Ce(this,"pricebooksProxy");Ce(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ce(this,"_fullSet",(t,n,r)=>{const o=bS[n];return dA(o,n,r),Reflect.set(t,n,r)});Ce(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Ce(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Ce(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 mt=new CA,AA=e=>{const t=Zo(),n=Ki();if(!n||!t){n&&sn.clear(),sn.add({context:"search",payload:Te(H({},mt.state),{query:e})});return}mt.queryProxy.query=e},Lg=e=>{wg(e,mt)},vA=(e,t)=>{Sg(e,t,mt)},Dg=e=>{Cg(e,mt)},kA=({field:e,value:t})=>{Ag({field:e,value:t},mt)},NA=e=>{vg(e,mt)},Mg=e=>{kg(e,mt)},Fg=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=Zo(),n=Ki();if(!n||!t){n&&sn.clear(),sn.add({context:"search",payload:H({},e)});return}"facetFilters"in e&&Lg(e.facetFilters||{}),"rangeFilters"in e&&Dg(e.rangeFilters||[]),"catalogSegment"in e&&(mt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Mg(e.pricebooks||[]),mt.queryProxy.query=e.query},OA=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:Fg,updateCatalogSegment:NA,updateFacetFilter:vA,updateFacetFilters:Lg,updatePricebooks:Mg,updateRangeFilter:kA,updateRangeFilters:Dg,updateSearchQuery:AA},Symbol.toStringTag,{value:"Module"})),IA={categoryId:at.categoryId,categoryName:at.categoryIdProxy.categoryName||"",facetFilters:at.facetFilters,rangeFilters:at.rangeFilters,catalogSegment:at.catalogSegment,pricebooks:at.pricebooks},Bg=V.createContext(IA),PA=({children:e})=>{const[t,n]=V.useState(at.categoryId),[r,o]=V.useState(at.categoryIdProxy.categoryName||""),[a,u]=V.useState(at.facetFilters||{}),[c,d]=V.useState(at.rangeFilters||[]),[f,m]=V.useState(at.catalogSegment||null),[E,T]=V.useState(at.pricebooks||null);V.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"&&m(w.value),(w==null?void 0:w.property)==="pricebooks"&&T(w.value)};return yg(_),()=>{bg(_)}},[]);const b=V.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:E}),[t,r,a,c,f,E]);return C.jsx(Bg.Provider,{value:b,children:e})},RA=()=>{const e=V.useContext(Bg);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},LA={searchQuery:mt.query,facetFilters:mt.facetFilters,rangeFilters:mt.rangeFilters,catalogSegment:mt.catalogSegment,pricebooks:mt.pricebooks},Ug=V.createContext(LA),DA=({children:e})=>{const[t,n]=V.useState(mt.query),[r,o]=V.useState(mt.facetFilters),[a,u]=V.useState(mt.rangeFilters),[c,d]=V.useState(mt.catalogSegment),[f,m]=V.useState(mt.pricebooks);V.useEffect(()=>{const T=({detail:b})=>{(b==null?void 0:b.property)==="query"&&n(b.value),(b==null?void 0:b.property)==="facetFilters"&&o(b.value),(b==null?void 0:b.property)==="rangeFilters"&&u(b.value),(b==null?void 0:b.property)==="catalogSegment"&&d(b.value),(b==null?void 0:b.property)==="pricebooks"&&m(b.value)};return gg(T),()=>{Eg(T)}},[]);const E=V.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return C.jsx(Ug.Provider,{value:E,children:e})},MA=()=>{const e=V.useContext(Ug);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},FA={productId:ar.productId,pdpLink:ar.pdpLink},Hg=V.createContext(FA),BA=({children:e})=>{const[t,n]=V.useState(ar.productId),[r,o]=V.useState(ar.pdpLink);V.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 Tg(u),()=>{_g(u)}},[]);const a=V.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return C.jsx(Hg.Provider,{value:a,children:e})},UA=()=>{const e=V.useContext(Hg);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},ta=()=>{const e=V.useContext(O0);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Xi=()=>{const e=V.useContext(N0);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},Sr=()=>{const e=V.useContext(jg);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},nf=()=>{const{status:e}=di(),{entryType:t,messages:n}=Xi(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},zg=V.createContext({mode:ot.modeProxy.mode,status:ot.statusProxy,dialogPosition:ot.dialogProxy.position,isModalFullscreen:ot.modalProxy.isFullscreen,previousComponentType:ot.statusProxy.type}),HA=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const{setEntryType:o}=ta(),[a,u]=V.useState(ot.modeProxy.mode),[c,d]=V.useState({type:n||ot.statusProxy.type,isOpen:ot.statusProxy.isOpen,isMinimized:ot.statusProxy.isMinimized}),[f,m]=V.useState(ot.dialogProxy.position),[E,T]=V.useState(ot.modalProxy.isFullscreen),b=lA(c.type);V.useEffect(()=>{const w=v=>{const{property:A,value:M}=v.detail||{};if(!(!A||M===void 0)){if(A==="mode"){u(M);return}if(A==="entryType"){o(M);return}if(A==="isMinimized"){d(L=>Te(H({},L),{isMinimized:M}));return}if(A==="isOpen"){d(L=>Te(H({},L),{isOpen:M}));return}if(A==="type"){d(L=>Te(H({},L),{type:M}));return}if(A==="position"){m(M);return}if(A==="isFullscreen"){T(M);return}}};return eA(w),()=>{tA(w)}},[o]),Ju(()=>{e&&ea(e)}),Ju(()=>{const w=n||(t==null?void 0:t.type);w&&Xu(w),t&&"isOpen"in t&&Qi(!!t.isOpen),t&&"isMinimized"in t&&Qu(!!t.isMinimized)}),Ju(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:w}=t.options;w&&tf(w),"isModalFullscreen"in t.options&&ef(!!t.options.isModalFullscreen)});const _=V.useMemo(()=>({mode:a,status:c,previousComponentType:b||"dialog",dialogPosition:f,isModalFullscreen:E}),[a,c,b,f,E]);return C.jsx(zg.Provider,{value:_,children:r})},di=()=>{const e=V.useContext(zg);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},zA=({copilot:e})=>{const{logger:t,conversationHistory:n}=Rt(),{addCopilotEvent:r,setEntryType:o}=ta(),{activeConversationId:a}=Xi(),u=V.useCallback(d=>{e&&e.requestSessionInformation(f=>{t==null||t.log("Retrieved session information: ",f),d==null||d(f)})},[e,t]),c=V.useCallback((d,f)=>{e&&d.conversationId&&e.getConversationEvents(d,m=>{t==null||t.log("Retrieved conversation messages: ",m),f==null||f(m)})},[e,t]);return V.useEffect(()=>{if(!a||n.sinceHours===0||(n==null?void 0:n.limit)===0)return;const d=3600*1e3*n.sinceHours,f=new Date(Date.now()-d).toISOString(),m={conversationId:a,since:f,excludeEvents:["done","error","connection_error","refined_browse","refined_search"]};typeof n.limit=="number"&&(m.limit=n.limit),c(m,E=>{E.forEach(b=>{b.bypassHandlers=!0,r(b)});const T=gS(E);if(T!=null&&T.name){const b=ES(T.name);o(b)}})},[t,a,c,r,o,n]),{getSessionInformation:u,getConversationMessages:c}},jg=V.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),jA=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>{const{logger:d}=Rt(),xi=MA(),{searchQuery:f}=xi,m=nn(xi,["searchQuery"]),ei=RA(),{categoryId:E}=ei,T=nn(ei,["categoryId"]),{productId:b,pdpLink:_}=UA(),{setCopilot:w,setConnected:v,resetCopilot:A,resetCopilotState:M,addCopilotEvent:L,addLoadingMessage:W,removeLoadingMessage:J,setActiveConversationId:B,setConversationIds:te}=ta(),{connected:ge,entryType:ye,copilot:F,messages:se,groupedMessages:he,loadingMessages:le}=Xi(),{status:fe}=di(),be=V.useRef(!1),Ae=V.useRef(!1),{getConversationMessages:ue,getSessionInformation:q}=zA({copilot:F}),ne=V.useMemo(()=>le.size>0,[le]),S=V.useCallback(we=>le.has(we),[le]),R=V.useCallback(we=>{L(we),W(we.id)},[L,W]),Q=V.useCallback(({query:we,facetFilters:Be,rangeFilters:je,catalogSegment:Xe,pricebooks:ct,userPrompt:gt,imageFile:mn})=>{if(!F){d==null||d.error("Copilot is not initialized");return}if(!we)return;const Ct={searchParams:{query:we}};gt&&(Ct.userPrompt=gt),mn&&(Ct.attachments={image:mn}),Be&&Object.keys(Be).length>0&&(Ct.searchParams.facetFilters=Be),je&&je.length>0&&(Ct.searchParams.rangeFilters=je),Xe&&(Ct.searchParams.catalogSegment=Xe),ct&&(Ct.searchParams.pricebooks=ct),ea("search"),F.search(Ct,X=>{const oe=H({},X);be.current=!0,R(oe)})},[d,R,F]),O=V.useCallback(({categoryId:we,categoryName:Be,facetFilters:je,rangeFilters:Xe,catalogSegment:ct,pricebooks:gt,userPrompt:mn,imageFile:Ct})=>{if(!F){d==null||d.error("Copilot is not initialized");return}const X=je&&Object.keys(je).length>0;if(we===""&&!X){d==null||d.error("Browse event must include facetFilters when categoryId is empty");return}const oe={browseParams:{categoryId:we||""}};mn&&(oe.userPrompt=mn),Ct&&(oe.attachments={image:Ct}),X&&(oe.browseParams.facetFilters=je),Xe&&Xe.length>0&&(oe.browseParams.rangeFilters=Xe),ct&&(oe.browseParams.catalogSegment=ct),Array.isArray(gt)&>.length>0&&(oe.browseParams.pricebooks=gt),Be&&(oe.clientContext={label:Be}),ea("browse"),F.browse(oe,Re=>{var Qn;const $e=H({},Re),Je=((Qn=$e.request)==null?void 0:Qn.clientContext)||{},Ht=(Je==null?void 0:Je.label)||Be;Ht&&$e.request&&($e.request.label=Ht),Ae.current=!0,R($e)})},[d,R,F]),_e=V.useCallback(({productId:we,productName:Be,pdpLink:je,userPrompt:Xe,imageFile:ct})=>{if(!F){d==null||d.error("Copilot is not initialized");return}if(!we)return;const gt={productId:we};Xe&&(gt.userPrompt=Xe),je&&(gt.pdpLink=je),ct&&(gt.attachments={image:ct}),Be&&(gt.clientContext={label:Be}),ea("pdp"),F.productView(gt,mn=>{var Re;const Ct=H({},mn),X=((Re=Ct.request)==null?void 0:Re.clientContext)||{},oe=(X==null?void 0:X.label)||Be;oe&&Ct.request&&(Ct.request.label=oe),R(Ct)})},[d,F,R]),Le=V.useCallback(({userPrompt:we,imageFile:Be})=>{if(!F){d==null||d.error("Copilot is not initialized");return}if(!we)return;const je={userPrompt:we};Be&&(je.attachments={image:Be}),F.askCim(je,Xe=>{const ct=H({},Xe);R(ct)})},[d,F,R]),Oe=V.useCallback(we=>{const Be=Te(H({},we),{id:we.inquiryLinkId||we.id});L(Be)},[L]),Ge=V.useCallback(we=>{L(we),a==null||a(we)},[L,a]),Ye=V.useCallback(we=>{L(we),u==null||u(we)},[L,u]),tt=V.useCallback(we=>{o==null||o(we),v(!0)},[o,v]);V.useEffect(()=>{!F||!ge||!fe.isOpen||sn.size>0&&sn.processQueue(we=>{if(we.context==="search"){const Be=H({},we.payload);Fg(Be)}if(we.context==="browse"){const Be=H({},we.payload);Pg(Be)}if(we.context==="pdp"){const Be=H({},we.payload);Rg(Be)}})},[fe.isOpen,F,ge]);const Nt=V.useCallback(we=>{we.on("connect_ack",tt),we.on("follow_up",L),we.on("inquiry",Oe),we.on("partial_inquiry",Oe),we.on("display_products",L),we.on("progress",L),we.on("refined_search",Ge),we.on("refined_browse",Ye),we.on("done",Be=>{J(Be.eventSourceId)}),we.on("error",Be=>{L(Be),J(Be.eventSourceId)}),we.onDisconnect(Be=>{const je=["io server disconnect","transport error","server shutting down"];if(d==null||d.log("Connection disconnected with reason: ",Be),!je.includes(Be)){v(!1);return}d==null||d.log("De-registering event listeners");const Xe=new Date().toISOString();L({name:"error",message:"Connection was lost. Please try again.",createdAt:Xe,id:`error-${Xe}`,sessionId:"session"}),we.off()})},[d,v,J,Oe,Ge,Ye,L,tt]);Ju(()=>{let we;n?we=n:we=r?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Be={baseUrl:we};e?Be.apiKey=e:t&&(Be.apiToken=t);const je=new nS(Be);return w(je),Nt(je),je.connect(),je.requestSessionInformation(Xe=>{d==null||d.log("Session Information: ",Xe);const{activeConversationId:ct,conversationIds:gt}=Xe.data||{};ct&&B(ct),gt!=null&>.length&&te(gt)}),()=>{je.disconnect(),je.off(),A()}});const Kn=V.useCallback(we=>{if(!F)return;const Be={eventId:we,reason:"User cancelled the request"};F.cancelRequest(Be,je=>{L(je),J(we)})},[L,J,F]),ds=V.useCallback(()=>{F&&F.conversationReset({},we=>{M(),L(we),F.requestSessionInformation(Be=>{d==null||d.log("Session Information: ",Be);const{activeConversationId:je,conversationIds:Xe}=Be.data||{};je&&B(je),Xe!=null&&Xe.length&&te(Xe)})})},[F,d,L,M,B,te]),Zr=V.useCallback((we,Be)=>{if(!we)return;const je={userPrompt:we};switch(Be&&(je.imageFile=Be),ye){case"ask_cim":Le(je);return;case"search":Q(H(H({query:f},m),je));return;case"browse":O(H(H({categoryId:E},T),je));return;case"pdp":_e(H({productId:b,pdpLink:_||""},je));return}},[ye,f,m,Q,Le,E,T,O,_e,b,_]),_i=V.useCallback((we,Be)=>{var gt,mn,Ct;const Xe=we.params.userPrompt||"";if(!Xe)return;const ct=se.find(X=>X.id===Be);if(ct){if(ct.name==="ask_cim"){Le({userPrompt:Xe});return}if(ct.name==="copilot_search"){const X=((gt=ct.request)==null?void 0:gt.searchParams)||{};X.query&&Q(Te(H({},X),{userPrompt:Xe}));return}if(ct.name==="copilot_browse"){const X=ct.request,oe=X.browseParams||{},Re=((mn=X.clientContext)==null?void 0:mn.label)||"";O(Te(H({},oe),{categoryName:Re,userPrompt:Xe}));return}if(ct.name==="product_view"){const X=ct.request||{},oe=((Ct=X.clientContext)==null?void 0:Ct.label)||"";X.productId&&_e(Te(H({},X),{productName:oe,userPrompt:Xe}))}}},[se,Q,Le,O,_e]),fs=V.useMemo(()=>({copilot:F,messages:se,groupedMessages:he,isLoading:ne,isResponseLoading:S,handleAskCim:Le,handleSearch:Q,handleBrowse:O,handlePdp:_e,handleUserInput:Zr,handleSuggestion:_i,handleCancel:Kn,resetConversation:ds,getSessionInformation:q,getConversationMessages:ue}),[F,se,he,ne,S,Le,Q,O,_e,Zr,_i,Kn,ds,q,ue]);return C.jsx(jg.Provider,{value:fs,children:c})},$A=()=>{const{resetCopilotState:e,addCopilotEvent:t}=ta(),{copilot:n,handleSearch:r,handleBrowse:o,handlePdp:a,resetConversation:u,getSessionInformation:c,getConversationMessages:d}=Sr(),f=V.useCallback(({query:T})=>{if(!n||!T)return;const{facetFilters:b}=mt.facetFiltersProxy,{rangeFilters:_}=mt.rangeFiltersProxy,{catalogSegment:w}=mt.catalogSegmentProxy,{pricebooks:v}=mt.pricebooksProxy,A={query:T};A.facetFilters=b||{},A.rangeFilters=_||[],A.catalogSegment=w||"",A.pricebooks=v||[],r(H({},A))},[n,r]),m=V.useCallback(({categoryId:T})=>{if(!n)return;const b=at.categoryIdProxy.categoryName,{facetFilters:_}=at.facetFiltersProxy,{rangeFilters:w}=at.rangeFiltersProxy,{catalogSegment:v}=at.catalogSegmentProxy,{pricebooks:A}=at.pricebooksProxy,M={categoryId:T};M.categoryName=b||"",M.facetFilters=_||{},M.rangeFilters=w||[],M.catalogSegment=v||"",M.pricebooks=A||[],o(H({},M))},[n,o]),E=V.useCallback(({productId:T})=>{if(!n||!T)return;const b={productId:T,pdpLink:ar.pdpLink,productName:ar.proxy.productName||""};a(b)},[n,a]);return V.useEffect(()=>{const T=({detail:b})=>{(b==null?void 0:b.property)==="query"&&f({query:b.value})};return gg(T),()=>{Eg(T)}},[f]),V.useEffect(()=>{const T=({detail:b})=>{if((b==null?void 0:b.property)==="pdp-context"){const _=b.value;E({productId:_.productId});return}(b==null?void 0:b.property)==="productId"&&E({productId:b.value})};return Tg(T),()=>{_g(T)}},[E]),V.useEffect(()=>{const T=({detail:b})=>{(b==null?void 0:b.property)==="categoryId"&&m({categoryId:b.value})};return yg(T),()=>{bg(T)}},[m]),V.useEffect(()=>{const T=({detail:b})=>{if((b==null?void 0:b.event)==ci.RESET_CONVERSATION&&u(),(b==null?void 0:b.event)==ci.GET_SESSION_INFORMATION){const _=b.value.callback;c(_)}if((b==null?void 0:b.event)==ci.GET_CONVERSATION_MESSAGES){const{payload:_,callback:w}=b.value;if(!_.conversationId||typeof w!="function")return;d(_,w)}if((b==null?void 0:b.event)==ci.LOAD_CONVERSATION){const _=b.value;if(!_.conversationId)return;d(_,v=>{e(),v.forEach(A=>{t(A)})})}};return hA(T),()=>{pA(T)}},[u,c,d,e,t]),null},VA=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>C.jsxs(jA,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:[C.jsx($A,{}),c]}),$g=({apiKey:e,apiToken:t,baseUrl:n,logoUrl:r,headerText:o,theme:a,openLinksInNewTab:u,globalClassName:c,isDevelopment:d=!1,componentType:f,componentConfig:m,entryType:E,entryMessage:T,disclaimerText:b,disclaimerMarkdown:_,searchPlaceholder:w,searchButtonLabel:v,searchConfig:A,resetConversationMessage:M,conversationHistory:L,onConnect:W,onCopilotEvent:J,onRefinedSearch:B,onRefinedBrowse:te,__features:ge,children:ye})=>C.jsx(JC,{baseUrl:n,apiKey:e,apiToken:t,logoUrl:r,headerText:o,entryMessage:T,theme:a,globalClassName:c,openLinksInNewTab:u,searchPlaceholder:w,searchButtonLabel:v,searchConfig:A,componentConfig:m,disclaimerMarkdown:_,disclaimerText:b,resetConversationMessage:M,conversationHistory:L,isDevelopment:d,__features:ge,children:C.jsx(oA,{entryType:E,onCopilotEvent:J,children:C.jsx(BA,{children:C.jsx(PA,{children:C.jsx(DA,{children:C.jsx(HA,{entryType:E,componentConfig:m,componentType:f,children:C.jsx(VA,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:d,entryType:E,onConnect:W,onCopilotEvent:J,onRefinedSearch:B,onRefinedBrowse:te,children:ye})})})})})})});function Vg(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=Vg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Z(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Vg(e))&&(r&&(r+=" "),r+=t);return r}var qg={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Yg=$i.createContext&&$i.createContext(qg),qA=["attr","size","title"];function YA(e,t){if(e==null)return{};var n=WA(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 WA(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 el(){return el=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},el.apply(this,arguments)}function Wg(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?Wg(Object(n),!0).forEach(function(r){GA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GA(e,t,n){return t=KA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KA(e){var t=QA(e,"string");return typeof t=="symbol"?t:t+""}function QA(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 Gg(e){return e&&e.map((t,n)=>$i.createElement(t.tag,tl({key:n},t.attr),Gg(t.child)))}function Yt(e){return t=>$i.createElement(XA,el({attr:tl({},e.attr)},t),Gg(e.child))}function XA(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=YA(e,qA),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),$i.createElement("svg",el({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&&$i.createElement("title",null,a),e.children)};return Yg!==void 0?$i.createElement(Yg.Consumer,null,n=>t(n)):t(qg)}function Kg(e){return Yt({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 Qg(e){return Yt({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 na(e){return Yt({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 JA(e){return Yt({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 Xg(e){return Yt({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 ZA(e){return Yt({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 ev(e){return Yt({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 tv(e){return Yt({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 nv(e){return Yt({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 rv(e){return Yt({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 rf=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>C.jsx("button",{"aria-label":t,className:Z(e,`${Y}-close-button`),disabled:r,onClick:n,children:C.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:C.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"})})}),sf=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>C.jsx("button",{className:Z(`${Y}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),qr=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:C.jsx("button",{className:Z(e,`${Y}-icon-button`),type:r,"aria-label":o,title:a,onClick:c,disabled:u,children:t?C.jsx("img",{className:Z(`${Y}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),iv=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?C.jsx("img",{className:Z(`${Y}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):C.jsx(na,{size:"16px"})},sv=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return C.jsx(qr,{className:Z(e,n,r,`${Y}-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:C.jsx(na,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return C.jsxs(sf,{className:Z(e,n,r,`${Y}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&C.jsx(iv,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function ov(e){return Yt({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 av=()=>{const{messages:e}=Xi(),{handleCancel:t}=Sr();return{cancelRequest:V.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],o=r.eventSourceId||r.id;t(o)},[t,e])}},uv=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=Rt(),{cancelRequest:r}=av();return n!=null&&n.enableCancelSearch?C.jsx(qr,{className:Z(t,`${Y}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:C.jsx(ov,{}),disabled:!e,onClick:r}):null};function MB(){}function FB(){}function Jg(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 Zg(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const lv=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cv=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dv={};function e1(e,t){return(dv.jsx?cv:lv).test(e)}const fv=/[ \t\n\f\r]/g;function hv(e){return typeof e=="object"?e.type==="text"?t1(e.value):!1:t1(e)}function t1(e){return e.replace(fv,"")===""}let ra=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};ra.prototype.normal={},ra.prototype.property={},ra.prototype.space=void 0;function n1(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new ra(n,r,t)}function ia(e){return e.toLowerCase()}let _n=class{constructor(t,n){this.attribute=n,this.property=t}};_n.prototype.attribute="",_n.prototype.booleanish=!1,_n.prototype.boolean=!1,_n.prototype.commaOrSpaceSeparated=!1,_n.prototype.commaSeparated=!1,_n.prototype.defined=!1,_n.prototype.mustUseProperty=!1,_n.prototype.number=!1,_n.prototype.overloadedBoolean=!1,_n.prototype.property="",_n.prototype.spaceSeparated=!1,_n.prototype.space=void 0;let pv=0;const qe=Ji(),Bt=Ji(),of=Ji(),pe=Ji(),ft=Ji(),Fs=Ji(),Pn=Ji();function Ji(){return od(2,++pv)}const af=Object.freeze(Object.defineProperty({__proto__:null,boolean:qe,booleanish:Bt,commaOrSpaceSeparated:Pn,commaSeparated:Fs,number:pe,overloadedBoolean:of,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),uf=Object.keys(af);let lf=class extends _n{constructor(t,n,r,o){let a=-1;if(super(t,n),r1(this,"space",o),typeof r=="number")for(;++a<uf.length;){const u=uf[a];r1(this,uf[a],(r&af[u])===af[u])}}};lf.prototype.defined=!0;function r1(e,t,n){n&&(e[t]=n)}function Bs(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new lf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ia(r)]=r,n[ia(a.attribute)]=r}return new ra(t,n,e.space)}const i1=Bs({properties:{ariaActiveDescendant:null,ariaAtomic:Bt,ariaAutoComplete:null,ariaBusy:Bt,ariaChecked:Bt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:ft,ariaCurrent:null,ariaDescribedBy:ft,ariaDetails:null,ariaDisabled:Bt,ariaDropEffect:ft,ariaErrorMessage:null,ariaExpanded:Bt,ariaFlowTo:ft,ariaGrabbed:Bt,ariaHasPopup:null,ariaHidden:Bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ft,ariaLevel:pe,ariaLive:null,ariaModal:Bt,ariaMultiLine:Bt,ariaMultiSelectable:Bt,ariaOrientation:null,ariaOwns:ft,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:Bt,ariaReadOnly:Bt,ariaRelevant:null,ariaRequired:Bt,ariaRoleDescription:ft,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:Bt,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function s1(e,t){return t in e?e[t]:t}function o1(e,t){return s1(e,t.toLowerCase())}const mv=Bs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fs,acceptCharset:ft,accessKey:ft,action:null,allow:null,allowFullScreen:qe,allowPaymentRequest:qe,allowUserMedia:qe,alt:null,as:null,async:qe,autoCapitalize:null,autoComplete:ft,autoFocus:qe,autoPlay:qe,blocking:ft,capture:null,charSet:null,checked:qe,cite:null,className:ft,cols:pe,colSpan:null,content:null,contentEditable:Bt,controls:qe,controlsList:ft,coords:pe|Fs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:qe,defer:qe,dir:null,dirName:null,disabled:qe,download:of,draggable:Bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:qe,formTarget:null,headers:ft,height:pe,hidden:of,high:pe,href:null,hrefLang:null,htmlFor:ft,httpEquiv:ft,id:null,imageSizes:null,imageSrcSet:null,inert:qe,inputMode:null,integrity:null,is:null,isMap:qe,itemId:null,itemProp:ft,itemRef:ft,itemScope:qe,itemType:ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:qe,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:qe,muted:qe,name:null,nonce:null,noModule:qe,noValidate:qe,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:qe,optimum:pe,pattern:null,ping:ft,placeholder:null,playsInline:qe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:qe,referrerPolicy:null,rel:ft,required:qe,reversed:qe,rows:pe,rowSpan:pe,sandbox:ft,scope:null,scoped:qe,seamless:qe,selected:qe,shadowRootClonable:qe,shadowRootDelegatesFocus:qe,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:Bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:qe,useMap:null,value:Bt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ft,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:qe,declare:qe,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:qe,noHref:qe,noShade:qe,noWrap:qe,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:Bt,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:qe,disableRemotePlayback:qe,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:o1}),gv=Bs({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:Pn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:ft,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:qe,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,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:Fs,g2:Fs,glyphName:Fs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Pn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,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:pe,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:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pn,rev:Pn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pn,requiredFeatures:Pn,requiredFonts:Pn,requiredFormats:Pn,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:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Pn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pn,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:s1}),a1=Bs({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()}}),u1=Bs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:o1}),l1=Bs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ev={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"},yv=/[A-Z]/g,c1=/-[a-z]/g,bv=/^data[-\w.:]+$/i;function cf(e,t){const n=ia(t);let r=t,o=_n;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&bv.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(c1,_v);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!c1.test(a)){let u=a.replace(yv,Tv);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=lf}return new o(r,t)}function Tv(e){return"-"+e.toLowerCase()}function _v(e){return e.charAt(1).toUpperCase()}const nl=n1([i1,mv,a1,u1,l1],"html"),Us=n1([i1,gv,a1,u1,l1],"svg");function d1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function f1(e){return e.join(" ").trim()}var Hs={},df,h1;function xv(){if(h1)return df;h1=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=`
|
|
11
|
+
`,f="/",m="*",E="",T="comment",b="declaration";df=function(w,v){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];v=v||{};var A=1,M=1;function L(le){var fe=le.match(t);fe&&(A+=fe.length);var be=le.lastIndexOf(d);M=~be?le.length-be:M+le.length}function W(){var le={line:A,column:M};return function(fe){return fe.position=new J(le),ge(),fe}}function J(le){this.start=le,this.end={line:A,column:M},this.source=v.source}J.prototype.content=w;function B(le){var fe=new Error(v.source+":"+A+":"+M+": "+le);if(fe.reason=le,fe.filename=v.source,fe.line=A,fe.column=M,fe.source=w,!v.silent)throw fe}function te(le){var fe=le.exec(w);if(fe){var be=fe[0];return L(be),w=w.slice(be.length),fe}}function ge(){te(n)}function ye(le){var fe;for(le=le||[];fe=F();)fe!==!1&&le.push(fe);return le}function F(){var le=W();if(!(f!=w.charAt(0)||m!=w.charAt(1))){for(var fe=2;E!=w.charAt(fe)&&(m!=w.charAt(fe)||f!=w.charAt(fe+1));)++fe;if(fe+=2,E===w.charAt(fe-1))return B("End of comment missing");var be=w.slice(2,fe-2);return M+=2,L(be),w=w.slice(fe),M+=2,le({type:T,comment:be})}}function se(){var le=W(),fe=te(r);if(fe){if(F(),!te(o))return B("property missing ':'");var be=te(a),Ae=le({type:b,property:_(fe[0].replace(e,E)),value:be?_(be[0].replace(e,E)):E});return te(u),Ae}}function he(){var le=[];ye(le);for(var fe;fe=se();)fe!==!1&&(le.push(fe),ye(le));return le}return ge(),he()};function _(w){return w?w.replace(c,E):E}return df}var p1;function wv(){if(p1)return Hs;p1=1;var e=Hs&&Hs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.default=n;var t=e(xv());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,m=d.value;c?o(f,m,d):m&&(a=a||{},a[f]=m)}}),a}return Hs}var sa={},m1;function Sv(){if(m1)return sa;m1=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,m){return m.toUpperCase()},c=function(f,m){return"".concat(m,"-")},d=function(f,m){return m===void 0&&(m={}),a(f)?f:(f=f.toLowerCase(),m.reactCompat?f=f.replace(o,c):f=f.replace(r,c),f.replace(t,u))};return sa.camelCase=d,sa}var oa,g1;function Cv(){if(g1)return oa;g1=1;var e=oa&&oa.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(wv()),n=Sv();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,oa=r,oa}var Av=Cv();const vv=Ke(Av),rl=E1("end"),Cr=E1("start");function E1(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 y1(e){const t=Cr(e),n=rl(e);if(t&&n)return{start:t,end:n}}function aa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?b1(e.position):"start"in e||"end"in e?b1(e):"line"in e||"column"in e?ff(e):""}function ff(e){return T1(e&&e.line)+":"+T1(e&&e.column)}function b1(e){return ff(e&&e.start)+"-"+ff(e&&e.end)}function T1(e){return e&&typeof e=="number"?e:1}class on 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=H({},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=aa(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}}on.prototype.file="",on.prototype.name="",on.prototype.reason="",on.prototype.message="",on.prototype.stack="",on.prototype.column=void 0,on.prototype.line=void 0,on.prototype.ancestors=void 0,on.prototype.cause=void 0,on.prototype.fatal=void 0,on.prototype.place=void 0,on.prototype.ruleId=void 0,on.prototype.source=void 0;const hf={}.hasOwnProperty,kv=new Map,Nv=/[A-Z]/g,Ov=new Set(["table","tbody","thead","tfoot","tr"]),Iv=new Set(["td","th"]),_1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Pv(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=Hv(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=Uv(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"?Us:nl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=x1(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function x1(e,t,n){if(t.type==="element")return Rv(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Lv(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Mv(e,t,n);if(t.type==="mdxjsEsm")return Dv(e,t);if(t.type==="root")return Fv(e,t,n);if(t.type==="text")return Bv(e,t)}function Rv(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Us,e.schema=o),e.ancestors.push(t);const a=S1(e,t.tagName,!1),u=zv(e,t);let c=mf(e,t);return Ov.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!hv(d):!0})),w1(e,u,a,t),pf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function Lv(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)}ua(e,t.position)}function Dv(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ua(e,t.position)}function Mv(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Us,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:S1(e,t.name,!0),u=jv(e,t),c=mf(e,t);return w1(e,u,a,t),pf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function Fv(e,t,n){const r={};return pf(r,mf(e,t)),e.create(t,e.Fragment,r,n)}function Bv(e,t){return t.value}function w1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function pf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Uv(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 Hv(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=Cr(r);return t(o,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function zv(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&hf.call(t.properties,o)){const a=$v(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&Iv.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 jv(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 ua(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 ua(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function mf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:kv;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=x1(e,a,u);c!==void 0&&n.push(c)}return n}function $v(e,t,n){const r=cf(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Zg(n):f1(n)),r.property==="style"){let o=typeof n=="object"?n:Vv(e,String(n));return e.stylePropertyNameCase==="css"&&(o=qv(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?Ev[r.property]||r.property:r.attribute,n]}}function Vv(e,t){try{return vv(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new on("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=_1+"#cannot-parse-style-attribute",o}}function S1(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=e1(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=e1(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);ua(e)}function ua(e,t){const n=new on("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=_1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function qv(e){const t={};let n;for(n in e)hf.call(e,n)&&(t[Yv(n)]=e[n]);return t}function Yv(e){let t=e.replace(Nv,Wv);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Wv(e){return"-"+e.toLowerCase()}const gf={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"]},Gv={};function Ef(e,t){const n=Gv,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return C1(e,r,o)}function C1(e,t,n){if(Kv(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 A1(e.children,t,n)}return Array.isArray(e)?A1(e,t,n):""}function A1(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=C1(e[o],t,n);return r.join("")}function Kv(e){return!!(e&&typeof e=="object")}const v1=document.createElement("i");function yf(e){const t="&"+e+";";v1.innerHTML=t;const n=v1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Rn(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 qn(e,t){return e.length>0?(Rn(e,e.length,0,t),e):t}const k1={}.hasOwnProperty;function N1(e){const t={};let n=-1;for(;++n<e.length;)Qv(t,e[n]);return t}function Qv(e,t){let n;for(n in t){const o=(k1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){k1.call(o,u)||(o[u]=[]);const c=a[u];Xv(o[u],Array.isArray(c)?c:c?[c]:[])}}}function Xv(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Rn(e,0,0,r)}function O1(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 ur(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const pn=fi(/[A-Za-z]/),an=fi(/[\dA-Za-z]/),Jv=fi(/[#-'*+\--9=?A-Z^-~]/);function il(e){return e!==null&&(e<32||e===127)}const bf=fi(/\d/),Zv=fi(/[\dA-Fa-f]/),ek=fi(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function dt(e){return e!==null&&(e<0||e===32)}function Qe(e){return e===-2||e===-1||e===32}const sl=fi(new RegExp("\\p{P}|\\p{S}","u")),Zi=fi(/\s/);function fi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function zs(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&an(e.charCodeAt(n+1))&&an(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 et(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Qe(d)?(e.enter(n),c(d)):t(d)}function c(d){return Qe(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const tk={tokenize:nk};function nk(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"),et(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 De(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const rk={tokenize:ik},I1={tokenize:sk};function ik(e){const t=this,n=[];let r=0,o,a,u;return c;function c(L){if(r<n.length){const W=n[r];return t.containerState=W[1],e.attempt(W[0].continuation,d,f)(L)}return f(L)}function d(L){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&M();const W=t.events.length;let J=W,B;for(;J--;)if(t.events[J][0]==="exit"&&t.events[J][1].type==="chunkFlow"){B=t.events[J][1].end;break}A(r);let te=W;for(;te<t.events.length;)t.events[te][1].end=H({},B),te++;return Rn(t.events,J+1,0,t.events.slice(W)),t.events.length=te,f(L)}return c(L)}function f(L){if(r===n.length){if(!o)return T(L);if(o.currentConstruct&&o.currentConstruct.concrete)return _(L);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(I1,m,E)(L)}function m(L){return o&&M(),A(r),T(L)}function E(L){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(L)}function T(L){return t.containerState={},e.attempt(I1,b,_)(L)}function b(L){return r++,n.push([t.currentConstruct,t.containerState]),T(L)}function _(L){if(L===null){o&&M(),A(0),e.consume(L);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),w(L)}function w(L){if(L===null){v(e.exit("chunkFlow"),!0),A(0),e.consume(L);return}return De(L)?(e.consume(L),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(L),w)}function v(L,W){const J=t.sliceStream(L);if(W&&J.push(null),L.previous=a,a&&(a.next=L),a=L,o.defineSkip(L.start),o.write(J),t.parser.lazy[L.start.line]){let B=o.events.length;for(;B--;)if(o.events[B][1].start.offset<u&&(!o.events[B][1].end||o.events[B][1].end.offset>u))return;const te=t.events.length;let ge=te,ye,F;for(;ge--;)if(t.events[ge][0]==="exit"&&t.events[ge][1].type==="chunkFlow"){if(ye){F=t.events[ge][1].end;break}ye=!0}for(A(r),B=te;B<t.events.length;)t.events[B][1].end=H({},F),B++;Rn(t.events,ge+1,0,t.events.slice(te)),t.events.length=B}}function A(L){let W=n.length;for(;W-- >L;){const J=n[W];t.containerState=J[1],J[0].exit.call(t,e)}n.length=L}function M(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function sk(e,t,n){return et(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function js(e){if(e===null||dt(e)||Zi(e))return 1;if(sl(e))return 2}function ol(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 Tf={name:"attention",resolveAll:ok,tokenize:ak};function ok(e,t){let n=-1,r,o,a,u,c,d,f,m;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 E=H({},e[r][1].end),T=H({},e[n][1].start);P1(E,-d),P1(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:E,end:H({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:H({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:H({},e[r][1].end),end:H({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:H({},u.start),end:H({},c.end)},e[r][1].end=H({},u.start),e[n][1].start=H({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=qn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=qn(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=qn(f,ol(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=qn(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,f=qn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Rn(e,r-1,n-r+3,f),n=r+f.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function ak(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=js(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"),m=js(d),E=!m||m===2&&o||n.includes(d),T=!o||o===2&&m||n.includes(r);return f._open=!!(a===42?E:E&&(o||!T)),f._close=!!(a===42?T:T&&(m||!E)),t(d)}}function P1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const uk={name:"autolink",tokenize:lk};function lk(e,t,n){let r=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(b){return pn(b)?(e.consume(b),u):b===64?n(b):f(b)}function u(b){return b===43||b===45||b===46||an(b)?(r=1,c(b)):f(b)}function c(b){return b===58?(e.consume(b),r=0,d):(b===43||b===45||b===46||an(b))&&r++<32?(e.consume(b),c):(r=0,f(b))}function d(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||il(b)?n(b):(e.consume(b),d)}function f(b){return b===64?(e.consume(b),m):Jv(b)?(e.consume(b),f):n(b)}function m(b){return an(b)?E(b):n(b)}function E(b){return b===46?(e.consume(b),r=0,m):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):T(b)}function T(b){if((b===45||an(b))&&r++<63){const _=b===45?T:E;return e.consume(b),_}return n(b)}}const la={partial:!0,tokenize:ck};function ck(e,t,n){return r;function r(a){return Qe(a)?et(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||De(a)?t(a):n(a)}}const R1={continuation:{tokenize:fk},exit:hk,name:"blockQuote",tokenize:dk};function dk(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 Qe(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function fk(e,t,n){const r=this;return o;function o(u){return Qe(u)?et(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(R1,t,n)(u)}}function hk(e){e.exit("blockQuote")}const L1={name:"characterEscape",tokenize:pk};function pk(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 ek(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const D1={name:"characterReference",tokenize:mk};function mk(e,t,n){const r=this;let o=0,a,u;return c;function c(E){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),d}function d(E){return E===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(E),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=an,m(E))}function f(E){return E===88||E===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(E),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=Zv,m):(e.enter("characterReferenceValue"),a=7,u=bf,m(E))}function m(E){if(E===59&&o){const T=e.exit("characterReferenceValue");return u===an&&!yf(r.sliceSerialize(T))?n(E):(e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(E)&&o++<a?(e.consume(E),m):n(E)}}const M1={partial:!0,tokenize:Ek},F1={concrete:!0,name:"codeFenced",tokenize:gk};function gk(e,t,n){const r=this,o={partial:!0,tokenize:J};let a=0,u=0,c;return d;function d(B){return f(B)}function f(B){const te=r.events[r.events.length-1];return a=te&&te[1].type==="linePrefix"?te[2].sliceSerialize(te[1],!0).length:0,c=B,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(B)}function m(B){return B===c?(u++,e.consume(B),m):u<3?n(B):(e.exit("codeFencedFenceSequence"),Qe(B)?et(e,E,"whitespace")(B):E(B))}function E(B){return B===null||De(B)?(e.exit("codeFencedFence"),r.interrupt?t(B):e.check(M1,w,W)(B)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(B))}function T(B){return B===null||De(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),E(B)):Qe(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),et(e,b,"whitespace")(B)):B===96&&B===c?n(B):(e.consume(B),T)}function b(B){return B===null||De(B)?E(B):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(B))}function _(B){return B===null||De(B)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),E(B)):B===96&&B===c?n(B):(e.consume(B),_)}function w(B){return e.attempt(o,W,v)(B)}function v(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),A}function A(B){return a>0&&Qe(B)?et(e,M,"linePrefix",a+1)(B):M(B)}function M(B){return B===null||De(B)?e.check(M1,w,W)(B):(e.enter("codeFlowValue"),L(B))}function L(B){return B===null||De(B)?(e.exit("codeFlowValue"),M(B)):(e.consume(B),L)}function W(B){return e.exit("codeFenced"),t(B)}function J(B,te,ge){let ye=0;return F;function F(be){return B.enter("lineEnding"),B.consume(be),B.exit("lineEnding"),se}function se(be){return B.enter("codeFencedFence"),Qe(be)?et(B,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(be):he(be)}function he(be){return be===c?(B.enter("codeFencedFenceSequence"),le(be)):ge(be)}function le(be){return be===c?(ye++,B.consume(be),le):ye>=u?(B.exit("codeFencedFenceSequence"),Qe(be)?et(B,fe,"whitespace")(be):fe(be)):ge(be)}function fe(be){return be===null||De(be)?(B.exit("codeFencedFence"),te(be)):ge(be)}}}function Ek(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 _f={name:"codeIndented",tokenize:bk},yk={partial:!0,tokenize:Tk};function bk(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),et(e,a,"linePrefix",5)(f)}function a(f){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):De(f)?e.attempt(yk,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||De(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function Tk(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):De(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):et(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):De(u)?o(u):n(u)}}const _k={name:"codeText",previous:wk,resolve:xk,tokenize:Sk};function xk(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 wk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Sk(e,t,n){let r=0,o,a;return u;function u(E){return e.enter("codeText"),e.enter("codeTextSequence"),c(E)}function c(E){return E===96?(e.consume(E),r++,c):(e.exit("codeTextSequence"),d(E))}function d(E){return E===null?n(E):E===32?(e.enter("space"),e.consume(E),e.exit("space"),d):E===96?(a=e.enter("codeTextSequence"),o=0,m(E)):De(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(E))}function f(E){return E===null||E===32||E===96||De(E)?(e.exit("codeTextData"),d(E)):(e.consume(E),f)}function m(E){return E===96?(e.consume(E),o++,m):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(E)):(a.type="codeTextData",f(E))}}class Ck{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&&ca(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),ca(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ca(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);ca(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ca(this.left,n.reverse())}}}function ca(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 B1(e){const t={};let n=-1,r,o,a,u,c,d,f;const m=new Ck(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.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,Ak(m,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=m.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(m.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=H({},m.get(o)[1].start),c=m.slice(o,n),c.unshift(r),m.splice(o,n-o+1,c))}}return Rn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!f}function Ak(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 m,E,T=-1,b=n,_=0,w=0;const v=[w];for(;b;){for(;e.get(++o)[1]!==b;);a.push(o),b._tokenizer||(m=r.sliceStream(b),b.next||m.push(null),E&&u.defineSkip(b.start),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(m),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),E=b,b=b.next}for(b=n;++T<c.length;)c[T][0]==="exit"&&c[T-1][0]==="enter"&&c[T][1].type===c[T-1][1].type&&c[T][1].start.line!==c[T][1].end.line&&(w=T+1,v.push(w),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(u.events=[],b?(b._tokenizer=void 0,b.previous=void 0):v.pop(),T=v.length;T--;){const A=c.slice(v[T],v[T+1]),M=a.pop();d.push([M,M+A.length-1]),e.splice(M,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 vk={resolve:Nk,tokenize:Ok},kk={partial:!0,tokenize:Ik};function Nk(e){return B1(e),e}function Ok(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):De(c)?e.check(kk,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 Ik(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),et(e,a,"linePrefix")}function a(u){if(u===null||De(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 U1(e,t,n,r,o,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let m=0;return E;function E(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||il(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"}),b(A))}function b(A){return A===62?(e.exit("chunkString"),e.exit(c),T(A)):A===null||A===60||De(A)?n(A):(e.consume(A),A===92?_:b)}function _(A){return A===60||A===62||A===92?(e.consume(A),b):b(A)}function w(A){return!m&&(A===null||A===41||dt(A))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(A)):m<f&&A===40?(e.consume(A),m++,w):A===41?(e.consume(A),m--,w):A===null||A===32||A===40||il(A)?n(A):(e.consume(A),A===92?v:w)}function v(A){return A===40||A===41||A===92?(e.consume(A),w):w(A)}}function H1(e,t,n,r,o,a){const u=this;let c=0,d;return f;function f(b){return e.enter(r),e.enter(o),e.consume(b),e.exit(o),e.enter(a),m}function m(b){return c>999||b===null||b===91||b===93&&!d||b===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(b):b===93?(e.exit(a),e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):De(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),E(b))}function E(b){return b===null||b===91||b===93||De(b)||c++>999?(e.exit("chunkString"),m(b)):(e.consume(b),d||(d=!Qe(b)),b===92?T:E)}function T(b){return b===91||b===92||b===93?(e.consume(b),c++,E):E(b)}}function z1(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):De(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),et(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(T))}function m(T){return T===u||T===null||De(T)?(e.exit("chunkString"),f(T)):(e.consume(T),T===92?E:m)}function E(T){return T===u||T===92?(e.consume(T),m):m(T)}}function da(e,t){let n;return r;function r(o){return De(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Qe(o)?et(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Pk={name:"definition",tokenize:Lk},Rk={partial:!0,tokenize:Dk};function Lk(e,t,n){const r=this;let o;return a;function a(b){return e.enter("definition"),u(b)}function u(b){return H1.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function c(b){return o=ur(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),d):n(b)}function d(b){return dt(b)?da(e,f)(b):f(b)}function f(b){return U1(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function m(b){return e.attempt(Rk,E,E)(b)}function E(b){return Qe(b)?et(e,T,"whitespace")(b):T(b)}function T(b){return b===null||De(b)?(e.exit("definition"),r.parser.defined.push(o),t(b)):n(b)}}function Dk(e,t,n){return r;function r(c){return dt(c)?da(e,o)(c):n(c)}function o(c){return z1(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Qe(c)?et(e,u,"whitespace")(c):u(c)}function u(c){return c===null||De(c)?t(c):n(c)}}const Mk={name:"hardBreakEscape",tokenize:Fk};function Fk(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return De(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Bk={name:"headingAtx",resolve:Uk,tokenize:Hk};function Uk(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"},Rn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function Hk(e,t,n){let r=0;return o;function o(m){return e.enter("atxHeading"),a(m)}function a(m){return e.enter("atxHeadingSequence"),u(m)}function u(m){return m===35&&r++<6?(e.consume(m),u):m===null||dt(m)?(e.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||De(m)?(e.exit("atxHeading"),t(m)):Qe(m)?et(e,c,"whitespace")(m):(e.enter("atxHeadingText"),f(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),c(m))}function f(m){return m===null||m===35||dt(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),f)}}const zk=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],j1=["pre","script","style","textarea"],jk={concrete:!0,name:"htmlFlow",resolveTo:qk,tokenize:Yk},$k={partial:!0,tokenize:Gk},Vk={partial:!0,tokenize:Wk};function qk(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 Yk(e,t,n){const r=this;let o,a,u,c,d;return f;function f(O){return m(O)}function m(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),E}function E(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:S):pn(O)?(e.consume(O),u=String.fromCharCode(O),v):n(O)}function T(O){return O===45?(e.consume(O),o=2,b):O===91?(e.consume(O),o=5,c=0,_):pn(O)?(e.consume(O),o=4,r.interrupt?t:S):n(O)}function b(O){return O===45?(e.consume(O),r.interrupt?t:S):n(O)}function _(O){const _e="CDATA[";return O===_e.charCodeAt(c++)?(e.consume(O),c===_e.length?r.interrupt?t:he:_):n(O)}function w(O){return pn(O)?(e.consume(O),u=String.fromCharCode(O),v):n(O)}function v(O){if(O===null||O===47||O===62||dt(O)){const _e=O===47,Le=u.toLowerCase();return!_e&&!a&&j1.includes(Le)?(o=1,r.interrupt?t(O):he(O)):zk.includes(u.toLowerCase())?(o=6,_e?(e.consume(O),A):r.interrupt?t(O):he(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?M(O):L(O))}return O===45||an(O)?(e.consume(O),u+=String.fromCharCode(O),v):n(O)}function A(O){return O===62?(e.consume(O),r.interrupt?t:he):n(O)}function M(O){return Qe(O)?(e.consume(O),M):F(O)}function L(O){return O===47?(e.consume(O),F):O===58||O===95||pn(O)?(e.consume(O),W):Qe(O)?(e.consume(O),L):F(O)}function W(O){return O===45||O===46||O===58||O===95||an(O)?(e.consume(O),W):J(O)}function J(O){return O===61?(e.consume(O),B):Qe(O)?(e.consume(O),J):L(O)}function B(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,te):Qe(O)?(e.consume(O),B):ge(O)}function te(O){return O===d?(e.consume(O),d=null,ye):O===null||De(O)?n(O):(e.consume(O),te)}function ge(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||dt(O)?J(O):(e.consume(O),ge)}function ye(O){return O===47||O===62||Qe(O)?L(O):n(O)}function F(O){return O===62?(e.consume(O),se):n(O)}function se(O){return O===null||De(O)?he(O):Qe(O)?(e.consume(O),se):n(O)}function he(O){return O===45&&o===2?(e.consume(O),Ae):O===60&&o===1?(e.consume(O),ue):O===62&&o===4?(e.consume(O),R):O===63&&o===3?(e.consume(O),S):O===93&&o===5?(e.consume(O),ne):De(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check($k,Q,le)(O)):O===null||De(O)?(e.exit("htmlFlowData"),le(O)):(e.consume(O),he)}function le(O){return e.check(Vk,fe,Q)(O)}function fe(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),be}function be(O){return O===null||De(O)?le(O):(e.enter("htmlFlowData"),he(O))}function Ae(O){return O===45?(e.consume(O),S):he(O)}function ue(O){return O===47?(e.consume(O),u="",q):he(O)}function q(O){if(O===62){const _e=u.toLowerCase();return j1.includes(_e)?(e.consume(O),R):he(O)}return pn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),q):he(O)}function ne(O){return O===93?(e.consume(O),S):he(O)}function S(O){return O===62?(e.consume(O),R):O===45&&o===2?(e.consume(O),S):he(O)}function R(O){return O===null||De(O)?(e.exit("htmlFlowData"),Q(O)):(e.consume(O),R)}function Q(O){return e.exit("htmlFlow"),t(O)}}function Wk(e,t,n){const r=this;return o;function o(u){return De(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 Gk(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(la,t,n)}}const Kk={name:"htmlText",tokenize:Qk};function Qk(e,t,n){const r=this;let o,a,u;return c;function c(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),d}function d(S){return S===33?(e.consume(S),f):S===47?(e.consume(S),J):S===63?(e.consume(S),L):pn(S)?(e.consume(S),ge):n(S)}function f(S){return S===45?(e.consume(S),m):S===91?(e.consume(S),a=0,_):pn(S)?(e.consume(S),M):n(S)}function m(S){return S===45?(e.consume(S),b):n(S)}function E(S){return S===null?n(S):S===45?(e.consume(S),T):De(S)?(u=E,ue(S)):(e.consume(S),E)}function T(S){return S===45?(e.consume(S),b):E(S)}function b(S){return S===62?Ae(S):S===45?T(S):E(S)}function _(S){const R="CDATA[";return S===R.charCodeAt(a++)?(e.consume(S),a===R.length?w:_):n(S)}function w(S){return S===null?n(S):S===93?(e.consume(S),v):De(S)?(u=w,ue(S)):(e.consume(S),w)}function v(S){return S===93?(e.consume(S),A):w(S)}function A(S){return S===62?Ae(S):S===93?(e.consume(S),A):w(S)}function M(S){return S===null||S===62?Ae(S):De(S)?(u=M,ue(S)):(e.consume(S),M)}function L(S){return S===null?n(S):S===63?(e.consume(S),W):De(S)?(u=L,ue(S)):(e.consume(S),L)}function W(S){return S===62?Ae(S):L(S)}function J(S){return pn(S)?(e.consume(S),B):n(S)}function B(S){return S===45||an(S)?(e.consume(S),B):te(S)}function te(S){return De(S)?(u=te,ue(S)):Qe(S)?(e.consume(S),te):Ae(S)}function ge(S){return S===45||an(S)?(e.consume(S),ge):S===47||S===62||dt(S)?ye(S):n(S)}function ye(S){return S===47?(e.consume(S),Ae):S===58||S===95||pn(S)?(e.consume(S),F):De(S)?(u=ye,ue(S)):Qe(S)?(e.consume(S),ye):Ae(S)}function F(S){return S===45||S===46||S===58||S===95||an(S)?(e.consume(S),F):se(S)}function se(S){return S===61?(e.consume(S),he):De(S)?(u=se,ue(S)):Qe(S)?(e.consume(S),se):ye(S)}function he(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),o=S,le):De(S)?(u=he,ue(S)):Qe(S)?(e.consume(S),he):(e.consume(S),fe)}function le(S){return S===o?(e.consume(S),o=void 0,be):S===null?n(S):De(S)?(u=le,ue(S)):(e.consume(S),le)}function fe(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||dt(S)?ye(S):(e.consume(S),fe)}function be(S){return S===47||S===62||dt(S)?ye(S):n(S)}function Ae(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function ue(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),q}function q(S){return Qe(S)?et(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):ne(S)}function ne(S){return e.enter("htmlTextData"),u(S)}}const xf={name:"labelEnd",resolveAll:eN,resolveTo:tN,tokenize:nN},Xk={tokenize:rN},Jk={tokenize:iN},Zk={tokenize:sN};function eN(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&&Rn(e,0,e.length,n),e}function tN(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:H({},e[a][1].start),end:H({},e[e.length-1][1].end)},f={type:"label",start:H({},e[a][1].start),end:H({},e[u][1].end)},m={type:"labelText",start:H({},e[a+r+2][1].end),end:H({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=qn(c,e.slice(a+1,a+r+3)),c=qn(c,[["enter",m,t]]),c=qn(c,ol(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=qn(c,[["exit",m,t],e[u-2],e[u-1],["exit",f,t]]),c=qn(c,e.slice(u+1)),c=qn(c,[["exit",d,t]]),Rn(e,a,e.length,c),e}function nN(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?E(T):(u=r.parser.defined.includes(ur(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(Xk,m,u?m:E)(T):T===91?e.attempt(Jk,m,u?f:E)(T):u?m(T):E(T)}function f(T){return e.attempt(Zk,m,E)(T)}function m(T){return t(T)}function E(T){return a._balanced=!0,n(T)}}function rN(e,t,n){return r;function r(E){return e.enter("resource"),e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),o}function o(E){return dt(E)?da(e,a)(E):a(E)}function a(E){return E===41?m(E):U1(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(E)}function u(E){return dt(E)?da(e,d)(E):m(E)}function c(E){return n(E)}function d(E){return E===34||E===39||E===40?z1(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(E):m(E)}function f(E){return dt(E)?da(e,m)(E):m(E)}function m(E){return E===41?(e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),e.exit("resource"),t):n(E)}}function iN(e,t,n){const r=this;return o;function o(c){return H1.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(ur(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function sN(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 oN={name:"labelStartImage",resolveAll:xf.resolveAll,tokenize:aN};function aN(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 uN={name:"labelStartLink",resolveAll:xf.resolveAll,tokenize:lN};function lN(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 wf={name:"lineEnding",tokenize:cN};function cN(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),et(e,t,"linePrefix")}}const al={name:"thematicBreak",tokenize:dN};function dN(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||De(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Qe(f)?et(e,c,"whitespace")(f):c(f))}}const xn={continuation:{tokenize:mN},exit:EN,name:"list",tokenize:pN},fN={partial:!0,tokenize:yN},hN={partial:!0,tokenize:gN};function pN(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(b){const _=r.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||b===r.containerState.marker:bf(b)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(al,n,f)(b):f(b);if(!r.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(b)}return n(b)}function d(b){return bf(b)&&++u<10?(e.consume(b),d):(!r.interrupt||u<2)&&(r.containerState.marker?b===r.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),f(b)):n(b)}function f(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||b,e.check(la,r.interrupt?n:m,e.attempt(fN,T,E))}function m(b){return r.containerState.initialBlankLine=!0,a++,T(b)}function E(b){return Qe(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),T):n(b)}function T(b){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function mN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(la,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,et(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Qe(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(hN,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,et(e,e.attempt(xn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function gN(e,t,n){const r=this;return et(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 EN(e){e.exit(this.containerState.type)}function yN(e,t,n){const r=this;return et(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!Qe(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const $1={name:"setextUnderline",resolveTo:bN,tokenize:TN};function bN(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:H({},e[r][1].start),end:H({},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=H({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function TN(e,t,n){const r=this;let o;return a;function a(f){let m=r.events.length,E;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){E=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||E)?(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"),Qe(f)?et(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||De(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const _N={tokenize:xN};function xN(e){const t=this,n=e.attempt(la,r,e.attempt(this.parser.constructs.flowInitial,o,et(e,e.attempt(this.parser.constructs.flow,o,e.attempt(vk,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 wN={resolveAll:q1()},SN=V1("string"),CN=V1("text");function V1(e){return{resolveAll:q1(e==="text"?AN: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(m){return f(m)?a(m):c(m)}function c(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),d}function d(m){return f(m)?(n.exit("data"),a(m)):(n.consume(m),d)}function f(m){if(m===null)return!0;const E=o[m];let T=-1;if(E)for(;++T<E.length;){const b=E[T];if(!b.previous||b.previous.call(r,r.previous))return!0}return!1}}}function q1(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 AN(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:H({},r.end)};r.end=H({},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 vN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Pk},disable:{null:[]},document:{42:xn,43:xn,45:xn,48:xn,49:xn,50:xn,51:xn,52:xn,53:xn,54:xn,55:xn,56:xn,57:xn,62:R1},flow:{35:Bk,42:al,45:[$1,al],60:jk,61:$1,95:al,96:F1,126:F1},flowInitial:{[-2]:_f,[-1]:_f,32:_f},insideSpan:{null:[Tf,wN]},string:{38:D1,92:L1},text:{[-5]:wf,[-4]:wf,[-3]:wf,33:oN,38:D1,42:Tf,60:[uk,Kk],91:uN,92:[Mk,L1],93:xf,95:Tf,96:_k}},Symbol.toStringTag,{value:"Module"}));function kN(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let u=[],c=[];const d={attempt:te(J),check:te(B),consume:M,enter:L,exit:W,interrupt:te(B,{interrupt:!0})},f={code:null,containerState:{},defineSkip:w,events:[],now:_,parser:e,previous:null,sliceSerialize:T,sliceStream:b,write:E};let m=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function E(se){return u=qn(u,se),v(),u[u.length-1]!==null?[]:(ge(t,0),f.events=ol(a,f.events,f),f.events)}function T(se,he){return ON(b(se),he)}function b(se){return NN(u,se)}function _(){const{_bufferIndex:se,_index:he,line:le,column:fe,offset:be}=r;return{_bufferIndex:se,_index:he,line:le,column:fe,offset:be}}function w(se){o[se.line]=se.column,F()}function v(){let se;for(;r._index<u.length;){const he=u[r._index];if(typeof he=="string")for(se=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===se&&r._bufferIndex<he.length;)A(he.charCodeAt(r._bufferIndex));else A(he)}}function A(se){m=m(se)}function M(se){De(se)?(r.line++,r.column=1,r.offset+=se===-3?2:1,F()):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 L(se,he){const le=he||{};return le.type=se,le.start=_(),f.events.push(["enter",le,f]),c.push(le),le}function W(se){const he=c.pop();return he.end=_(),f.events.push(["exit",he,f]),he}function J(se,he){ge(se,he.from)}function B(se,he){he.restore()}function te(se,he){return le;function le(fe,be,Ae){let ue,q,ne,S;return Array.isArray(fe)?Q(fe):"tokenize"in fe?Q([fe]):R(fe);function R(Oe){return Ge;function Ge(Ye){const tt=Ye!==null&&Oe[Ye],Nt=Ye!==null&&Oe.null,Kn=[...Array.isArray(tt)?tt:tt?[tt]:[],...Array.isArray(Nt)?Nt:Nt?[Nt]:[]];return Q(Kn)(Ye)}}function Q(Oe){return ue=Oe,q=0,Oe.length===0?Ae:O(Oe[q])}function O(Oe){return Ge;function Ge(Ye){return S=ye(),ne=Oe,Oe.partial||(f.currentConstruct=Oe),Oe.name&&f.parser.constructs.disable.null.includes(Oe.name)?Le():Oe.tokenize.call(he?Object.assign(Object.create(f),he):f,d,_e,Le)(Ye)}}function _e(Oe){return se(ne,S),be}function Le(Oe){return S.restore(),++q<ue.length?O(ue[q]):Ae}}}function ge(se,he){se.resolveAll&&!a.includes(se)&&a.push(se),se.resolve&&Rn(f.events,he,f.events.length-he,se.resolve(f.events.slice(he),f)),se.resolveTo&&(f.events=se.resolveTo(f.events,f))}function ye(){const se=_(),he=f.previous,le=f.currentConstruct,fe=f.events.length,be=Array.from(c);return{from:fe,restore:Ae};function Ae(){r=se,f.previous=he,f.currentConstruct=le,f.events.length=fe,c=be,F()}}function F(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function NN(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 ON(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=`
|
|
9
12
|
`;break}case-3:{u=`\r
|
|
10
|
-
`;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 CN(e){const r={constructs:v1([_N,...(e||{}).extensions||[]]),content:o(Kv),defined:[],document:o(Xv),flow:o(mN),lazy:{},string:o(yN),text:o(bN)};return r;function o(a){return u;function u(c){return xN(r,a,c)}}}function AN(e){for(;!M1(e););return e}const V1=/[\0\t\n\r]/g;function vN(){let e=1,t="",n=!0,r;return o;function o(a,u,c){const d=[];let f,p,E,T,b;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),E=0,t="",n&&(a.charCodeAt(0)===65279&&E++,n=void 0);E<a.length;){if(V1.lastIndex=E,f=V1.exec(a),T=f&&f.index!==void 0?f.index:a.length,b=a.charCodeAt(T),!f){t=a.slice(E);break}if(b===10&&E===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),E<T&&(d.push(a.slice(E,T)),e+=T-E),b){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}E=T+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const kN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function NN(e){return e.replace(kN,ON)}function ON(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return k1(n.slice(a?2:1),a?16:10)}return Ef(n)||e}const q1={}.hasOwnProperty;function IN(e,t,n){return typeof t!="string"&&(n=t,t=void 0),PN(n)(AN(CN(n).document().write(vN()(e,t,!0))))}function PN(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ue),autolinkProtocol:ye,autolinkEmail:ye,atxHeading:a(ds),blockQuote:a(Nt),characterEscape:ye,characterReference:ye,codeFenced:a(Kn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Kn,u),codeText:a(cs,u),codeTextData:ye,data:ye,codeFlowValue:ye,definition:a(Jr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(_i),hardBreakEscape:a(xi),hardBreakTrailing:a(xi),htmlFlow:a(Zr,u),htmlFlowData:ye,htmlText:a(Zr,u),htmlTextData:ye,image:a(we),label:u,link:a(Ue),listItem:a(Xe),listItemValue:T,listOrdered:a(je,E),listUnordered:a(je),paragraph:a(dt),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(ds),strong:a(wt),thematicBreak:a(st)},exit:{atxHeading:d(),atxHeadingSequence:X,autolink:d(),autolinkEmail:et,autolinkProtocol:Ye,blockQuote:d(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:Re,characterReferenceMarkerNumeric:Re,characterReferenceValue:Oe,characterReference:Ge,codeFenced:d(k),codeFencedFence:w,codeFencedFenceInfo:b,codeFencedFenceMeta:_,codeFlowValue:M,codeIndented:d(v),codeText:d(be),codeTextData:M,data:M,definition:d(),definitionDestinationString:W,definitionLabelString:F,definitionTitleString:R,emphasis:d(),hardBreakEscape:d(he),hardBreakTrailing:d(he),htmlFlow:d(ue),htmlFlowData:M,htmlText:d(de),htmlTextData:M,image:d(oe),label:ne,labelText:q,lineEnding:ae,link:d(Ce),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:S,resourceTitleString:L,resource:K,setextHeading:d(ge),setextHeadingLineSequence:te,setextHeadingText:B,strong:d(),thematicBreak:d()}};Y1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ee){let fe={type:"root",children:[]};const Be={stack:[fe],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},Ve=[];let tt=-1;for(;++tt<ee.length;)if(ee[tt][1].type==="listOrdered"||ee[tt][1].type==="listUnordered")if(ee[tt][0]==="enter")Ve.push(tt);else{const Jt=Ve.pop();tt=o(ee,Jt,tt)}for(tt=-1;++tt<ee.length;){const Jt=t[ee[tt][0]];q1.call(Jt,ee[tt][1].type)&&Jt[ee[tt][1].type].call(Object.assign({sliceSerialize:ee[tt][2].sliceSerialize},Be),ee[tt][1])}if(Be.tokenStack.length>0){const Jt=Be.tokenStack[Be.tokenStack.length-1];(Jt[1]||W1).call(Be,void 0,Jt[0])}for(fe.position={start:hi(ee.length>0?ee[0][1].start:{line:1,column:1,offset:0}),end:hi(ee.length>0?ee[ee.length-2][1].end:{line:1,column:1,offset:0})},tt=-1;++tt<t.transforms.length;)fe=t.transforms[tt](fe)||fe;return fe}function o(ee,fe,Be){let Ve=fe-1,tt=-1,Jt=!1,ei,Qn,wi,fs;for(;++Ve<=Be;){const Zt=ee[Ve];switch(Zt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Zt[0]==="enter"?tt++:tt--,fs=void 0;break}case"lineEndingBlank":{Zt[0]==="enter"&&(ei&&!fs&&!tt&&!wi&&(wi=Ve),fs=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:fs=void 0}if(!tt&&Zt[0]==="enter"&&Zt[1].type==="listItemPrefix"||tt===-1&&Zt[0]==="exit"&&(Zt[1].type==="listUnordered"||Zt[1].type==="listOrdered")){if(ei){let Lr=Ve;for(Qn=void 0;Lr--;){const Fn=ee[Lr];if(Fn[1].type==="lineEnding"||Fn[1].type==="lineEndingBlank"){if(Fn[0]==="exit")continue;Qn&&(ee[Qn][1].type="lineEndingBlank",Jt=!0),Fn[1].type="lineEnding",Qn=Lr}else if(!(Fn[1].type==="linePrefix"||Fn[1].type==="blockQuotePrefix"||Fn[1].type==="blockQuotePrefixWhitespace"||Fn[1].type==="blockQuoteMarker"||Fn[1].type==="listItemIndent"))break}wi&&(!Qn||wi<Qn)&&(ei._spread=!0),ei.end=Object.assign({},Qn?ee[Qn][1].start:Zt[1].end),ee.splice(Qn||Ve,0,["exit",ei,Zt[2]]),Ve++,Be++}if(Zt[1].type==="listItemPrefix"){const Lr={type:"listItem",_spread:!1,start:Object.assign({},Zt[1].start),end:void 0};ei=Lr,ee.splice(Ve,0,["enter",Lr,Zt[2]]),Ve++,Be++,wi=void 0,fs=!0}}}return ee[fe][1]._spread=Jt,Be}function a(ee,fe){return Be;function Be(Ve){c.call(this,ee(Ve),Ve),fe&&fe.call(this,Ve)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(ee,fe,Be){this.stack[this.stack.length-1].children.push(ee),this.stack.push(ee),this.tokenStack.push([fe,Be||void 0]),ee.position={start:hi(fe.start),end:void 0}}function d(ee){return fe;function fe(Be){ee&&ee.call(this,Be),f.call(this,Be)}}function f(ee,fe){const Be=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==ee.type&&(fe?fe.call(this,ee,Ve[0]):(Ve[1]||W1).call(this,ee,Ve[0]));else throw new Error("Cannot close `"+ee.type+"` ("+aa({start:ee.start,end:ee.end})+"): it’s not open");Be.position.end=hi(ee.end)}function p(){return gf(this.stack.pop())}function E(){this.data.expectingFirstListItemValue=!0}function T(ee){if(this.data.expectingFirstListItemValue){const fe=this.stack[this.stack.length-2];fe.start=Number.parseInt(this.sliceSerialize(ee),10),this.data.expectingFirstListItemValue=void 0}}function b(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.lang=ee}function _(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.meta=ee}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee.replace(/(\r?\n|\r)$/g,"")}function F(ee){const fe=this.resume(),Be=this.stack[this.stack.length-1];Be.label=fe,Be.identifier=ar(this.sliceSerialize(ee)).toLowerCase()}function R(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ee}function W(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ee}function X(ee){const fe=this.stack[this.stack.length-1];if(!fe.depth){const Be=this.sliceSerialize(ee).length;fe.depth=Be}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function te(ee){const fe=this.stack[this.stack.length-1];fe.depth=this.sliceSerialize(ee).codePointAt(0)===61?1:2}function ge(){this.data.setextHeadingSlurpLineEnding=void 0}function ye(ee){const Be=this.stack[this.stack.length-1].children;let Ve=Be[Be.length-1];(!Ve||Ve.type!=="text")&&(Ve=mn(),Ve.position={start:hi(ee.start),end:void 0},Be.push(Ve)),this.stack.push(Ve)}function M(ee){const fe=this.stack.pop();fe.value+=this.sliceSerialize(ee),fe.position.end=hi(ee.end)}function ae(ee){const fe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Be=fe.children[fe.children.length-1];Be.position.end=hi(ee.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(fe.type)&&(ye.call(this,ee),M.call(this,ee))}function he(){this.data.atHardBreak=!0}function ue(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function de(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function be(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function Ce(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=fe,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function oe(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=fe,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function q(ee){const fe=this.sliceSerialize(ee),Be=this.stack[this.stack.length-2];Be.label=NN(fe),Be.identifier=ar(fe).toLowerCase()}function ne(){const ee=this.stack[this.stack.length-1],fe=this.resume(),Be=this.stack[this.stack.length-1];if(this.data.inReference=!0,Be.type==="link"){const Ve=ee.children;Be.children=Ve}else Be.alt=fe}function S(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ee}function L(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ee}function K(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function _e(ee){const fe=this.resume(),Be=this.stack[this.stack.length-1];Be.label=fe,Be.identifier=ar(this.sliceSerialize(ee)).toLowerCase(),this.data.referenceType="full"}function Re(ee){this.data.characterReferenceType=ee.type}function Oe(ee){const fe=this.sliceSerialize(ee),Be=this.data.characterReferenceType;let Ve;Be?(Ve=k1(fe,Be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=Ef(fe);const tt=this.stack[this.stack.length-1];tt.value+=Ve}function Ge(ee){const fe=this.stack.pop();fe.position.end=hi(ee.end)}function Ye(ee){M.call(this,ee);const fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(ee)}function et(ee){M.call(this,ee);const fe=this.stack[this.stack.length-1];fe.url="mailto:"+this.sliceSerialize(ee)}function Nt(){return{type:"blockquote",children:[]}}function Kn(){return{type:"code",lang:null,meta:null,value:""}}function cs(){return{type:"inlineCode",value:""}}function Jr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function _i(){return{type:"emphasis",children:[]}}function ds(){return{type:"heading",depth:0,children:[]}}function xi(){return{type:"break"}}function Zr(){return{type:"html",value:""}}function we(){return{type:"image",title:null,url:"",alt:null}}function Ue(){return{type:"link",title:null,url:"",children:[]}}function je(ee){return{type:"list",ordered:ee.type==="listOrdered",start:null,spread:ee._spread,children:[]}}function Xe(ee){return{type:"listItem",spread:ee._spread,checked:null,children:[]}}function dt(){return{type:"paragraph",children:[]}}function wt(){return{type:"strong",children:[]}}function mn(){return{type:"text",value:""}}function st(){return{type:"thematicBreak"}}}function hi(e){return{line:e.line,column:e.column,offset:e.offset}}function Y1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Y1(e,r):RN(e,r)}}function RN(e,t){let n;for(n in t)if(q1.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 W1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+aa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+aa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+aa({start:t.start,end:t.end})+") is still open")}function LN(e){const t=this;t.parser=n;function n(r){return IN(r,Te(H(H({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function DN(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 MN(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
11
|
-
`}]}function
|
|
12
|
-
`:"",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
|
|
13
|
-
`}),
|
|
14
|
-
`});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function
|
|
13
|
+
`;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 IN(e){const r={constructs:N1([vN,...(e||{}).extensions||[]]),content:o(tk),defined:[],document:o(rk),flow:o(_N),lazy:{},string:o(SN),text:o(CN)};return r;function o(a){return u;function u(c){return kN(r,a,c)}}}function PN(e){for(;!B1(e););return e}const Y1=/[\0\t\n\r]/g;function RN(){let e=1,t="",n=!0,r;return o;function o(a,u,c){const d=[];let f,m,E,T,b;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),E=0,t="",n&&(a.charCodeAt(0)===65279&&E++,n=void 0);E<a.length;){if(Y1.lastIndex=E,f=Y1.exec(a),T=f&&f.index!==void 0?f.index:a.length,b=a.charCodeAt(T),!f){t=a.slice(E);break}if(b===10&&E===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),E<T&&(d.push(a.slice(E,T)),e+=T-E),b){case 0:{d.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,d.push(-2);e++<m;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}E=T+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const LN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function DN(e){return e.replace(LN,MN)}function MN(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return O1(n.slice(a?2:1),a?16:10)}return yf(n)||e}const W1={}.hasOwnProperty;function FN(e,t,n){return typeof t!="string"&&(n=t,t=void 0),BN(n)(PN(IN(n).document().write(RN()(e,t,!0))))}function BN(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Be),autolinkProtocol:ye,autolinkEmail:ye,atxHeading:a(fs),blockQuote:a(Nt),characterEscape:ye,characterReference:ye,codeFenced:a(Kn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Kn,u),codeText:a(ds,u),codeTextData:ye,data:ye,codeFlowValue:ye,definition:a(Zr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(_i),hardBreakEscape:a(xi),hardBreakTrailing:a(xi),htmlFlow:a(ei,u),htmlFlowData:ye,htmlText:a(ei,u),htmlTextData:ye,image:a(we),label:u,link:a(Be),listItem:a(Xe),listItemValue:T,listOrdered:a(je,E),listUnordered:a(je),paragraph:a(ct),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(fs),strong:a(gt),thematicBreak:a(Ct)},exit:{atxHeading:d(),atxHeadingSequence:J,autolink:d(),autolinkEmail:tt,autolinkProtocol:Ye,blockQuote:d(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:Le,characterReferenceMarkerNumeric:Le,characterReferenceValue:Oe,characterReference:Ge,codeFenced:d(v),codeFencedFence:w,codeFencedFenceInfo:b,codeFencedFenceMeta:_,codeFlowValue:F,codeIndented:d(A),codeText:d(be),codeTextData:F,data:F,definition:d(),definitionDestinationString:W,definitionLabelString:M,definitionTitleString:L,emphasis:d(),hardBreakEscape:d(he),hardBreakTrailing:d(he),htmlFlow:d(le),htmlFlowData:F,htmlText:d(fe),htmlTextData:F,image:d(ue),label:ne,labelText:q,lineEnding:se,link:d(Ae),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:S,resourceTitleString:R,resource:Q,setextHeading:d(ge),setextHeadingLineSequence:te,setextHeadingText:B,strong:d(),thematicBreak:d()}};G1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(X){let oe={type:"root",children:[]};const Re={stack:[oe],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:m,data:n},$e=[];let Je=-1;for(;++Je<X.length;)if(X[Je][1].type==="listOrdered"||X[Je][1].type==="listUnordered")if(X[Je][0]==="enter")$e.push(Je);else{const Ht=$e.pop();Je=o(X,Ht,Je)}for(Je=-1;++Je<X.length;){const Ht=t[X[Je][0]];W1.call(Ht,X[Je][1].type)&&Ht[X[Je][1].type].call(Object.assign({sliceSerialize:X[Je][2].sliceSerialize},Re),X[Je][1])}if(Re.tokenStack.length>0){const Ht=Re.tokenStack[Re.tokenStack.length-1];(Ht[1]||K1).call(Re,void 0,Ht[0])}for(oe.position={start:hi(X.length>0?X[0][1].start:{line:1,column:1,offset:0}),end:hi(X.length>0?X[X.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<t.transforms.length;)oe=t.transforms[Je](oe)||oe;return oe}function o(X,oe,Re){let $e=oe-1,Je=-1,Ht=!1,Qn,Xn,wi,hs;for(;++$e<=Re;){const Zt=X[$e];switch(Zt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Zt[0]==="enter"?Je++:Je--,hs=void 0;break}case"lineEndingBlank":{Zt[0]==="enter"&&(Qn&&!hs&&!Je&&!wi&&(wi=$e),hs=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:hs=void 0}if(!Je&&Zt[0]==="enter"&&Zt[1].type==="listItemPrefix"||Je===-1&&Zt[0]==="exit"&&(Zt[1].type==="listUnordered"||Zt[1].type==="listOrdered")){if(Qn){let Dr=$e;for(Xn=void 0;Dr--;){const Fn=X[Dr];if(Fn[1].type==="lineEnding"||Fn[1].type==="lineEndingBlank"){if(Fn[0]==="exit")continue;Xn&&(X[Xn][1].type="lineEndingBlank",Ht=!0),Fn[1].type="lineEnding",Xn=Dr}else if(!(Fn[1].type==="linePrefix"||Fn[1].type==="blockQuotePrefix"||Fn[1].type==="blockQuotePrefixWhitespace"||Fn[1].type==="blockQuoteMarker"||Fn[1].type==="listItemIndent"))break}wi&&(!Xn||wi<Xn)&&(Qn._spread=!0),Qn.end=Object.assign({},Xn?X[Xn][1].start:Zt[1].end),X.splice(Xn||$e,0,["exit",Qn,Zt[2]]),$e++,Re++}if(Zt[1].type==="listItemPrefix"){const Dr={type:"listItem",_spread:!1,start:Object.assign({},Zt[1].start),end:void 0};Qn=Dr,X.splice($e,0,["enter",Dr,Zt[2]]),$e++,Re++,wi=void 0,hs=!0}}}return X[oe][1]._spread=Ht,Re}function a(X,oe){return Re;function Re($e){c.call(this,X($e),$e),oe&&oe.call(this,$e)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(X,oe,Re){this.stack[this.stack.length-1].children.push(X),this.stack.push(X),this.tokenStack.push([oe,Re||void 0]),X.position={start:hi(oe.start),end:void 0}}function d(X){return oe;function oe(Re){X&&X.call(this,Re),f.call(this,Re)}}function f(X,oe){const Re=this.stack.pop(),$e=this.tokenStack.pop();if($e)$e[0].type!==X.type&&(oe?oe.call(this,X,$e[0]):($e[1]||K1).call(this,X,$e[0]));else throw new Error("Cannot close `"+X.type+"` ("+aa({start:X.start,end:X.end})+"): it’s not open");Re.position.end=hi(X.end)}function m(){return Ef(this.stack.pop())}function E(){this.data.expectingFirstListItemValue=!0}function T(X){if(this.data.expectingFirstListItemValue){const oe=this.stack[this.stack.length-2];oe.start=Number.parseInt(this.sliceSerialize(X),10),this.data.expectingFirstListItemValue=void 0}}function b(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.lang=X}function _(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.meta=X}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.value=X.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.value=X.replace(/(\r?\n|\r)$/g,"")}function M(X){const oe=this.resume(),Re=this.stack[this.stack.length-1];Re.label=oe,Re.identifier=ur(this.sliceSerialize(X)).toLowerCase()}function L(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.title=X}function W(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.url=X}function J(X){const oe=this.stack[this.stack.length-1];if(!oe.depth){const Re=this.sliceSerialize(X).length;oe.depth=Re}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function te(X){const oe=this.stack[this.stack.length-1];oe.depth=this.sliceSerialize(X).codePointAt(0)===61?1:2}function ge(){this.data.setextHeadingSlurpLineEnding=void 0}function ye(X){const Re=this.stack[this.stack.length-1].children;let $e=Re[Re.length-1];(!$e||$e.type!=="text")&&($e=mn(),$e.position={start:hi(X.start),end:void 0},Re.push($e)),this.stack.push($e)}function F(X){const oe=this.stack.pop();oe.value+=this.sliceSerialize(X),oe.position.end=hi(X.end)}function se(X){const oe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Re=oe.children[oe.children.length-1];Re.position.end=hi(X.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(oe.type)&&(ye.call(this,X),F.call(this,X))}function he(){this.data.atHardBreak=!0}function le(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.value=X}function fe(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.value=X}function be(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.value=X}function Ae(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=oe,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function ue(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=oe,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function q(X){const oe=this.sliceSerialize(X),Re=this.stack[this.stack.length-2];Re.label=DN(oe),Re.identifier=ur(oe).toLowerCase()}function ne(){const X=this.stack[this.stack.length-1],oe=this.resume(),Re=this.stack[this.stack.length-1];if(this.data.inReference=!0,Re.type==="link"){const $e=X.children;Re.children=$e}else Re.alt=oe}function S(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.url=X}function R(){const X=this.resume(),oe=this.stack[this.stack.length-1];oe.title=X}function Q(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function _e(X){const oe=this.resume(),Re=this.stack[this.stack.length-1];Re.label=oe,Re.identifier=ur(this.sliceSerialize(X)).toLowerCase(),this.data.referenceType="full"}function Le(X){this.data.characterReferenceType=X.type}function Oe(X){const oe=this.sliceSerialize(X),Re=this.data.characterReferenceType;let $e;Re?($e=O1(oe,Re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$e=yf(oe);const Je=this.stack[this.stack.length-1];Je.value+=$e}function Ge(X){const oe=this.stack.pop();oe.position.end=hi(X.end)}function Ye(X){F.call(this,X);const oe=this.stack[this.stack.length-1];oe.url=this.sliceSerialize(X)}function tt(X){F.call(this,X);const oe=this.stack[this.stack.length-1];oe.url="mailto:"+this.sliceSerialize(X)}function Nt(){return{type:"blockquote",children:[]}}function Kn(){return{type:"code",lang:null,meta:null,value:""}}function ds(){return{type:"inlineCode",value:""}}function Zr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function _i(){return{type:"emphasis",children:[]}}function fs(){return{type:"heading",depth:0,children:[]}}function xi(){return{type:"break"}}function ei(){return{type:"html",value:""}}function we(){return{type:"image",title:null,url:"",alt:null}}function Be(){return{type:"link",title:null,url:"",children:[]}}function je(X){return{type:"list",ordered:X.type==="listOrdered",start:null,spread:X._spread,children:[]}}function Xe(X){return{type:"listItem",spread:X._spread,checked:null,children:[]}}function ct(){return{type:"paragraph",children:[]}}function gt(){return{type:"strong",children:[]}}function mn(){return{type:"text",value:""}}function Ct(){return{type:"thematicBreak"}}}function hi(e){return{line:e.line,column:e.column,offset:e.offset}}function G1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?G1(e,r):UN(e,r)}}function UN(e,t){let n;for(n in t)if(W1.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 K1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+aa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+aa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+aa({start:t.start,end:t.end})+") is still open")}function HN(e){const t=this;t.parser=n;function n(r){return FN(r,Te(H(H({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function zN(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function jN(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
14
|
+
`}]}function $N(e,t){const n=t.value?t.value+`
|
|
15
|
+
`:"",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 VN(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qN(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function YN(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=zs(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+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 WN(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 GN(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Q1(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=r:o.push({type:"text",value:r}),o}function KN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Q1(e,t);const o={src:zs(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 QN(e,t){const n={src:zs(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function XN(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 JN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Q1(e,t);const o={href:zs(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 ZN(e,t){const n={href:zs(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function e3(e,t,n){const r=e.all(t),o=n?t3(n):X1(t),a={},u=[];if(typeof t.checked=="boolean"){const m=r[0];let E;m&&m.type==="element"&&m.tagName==="p"?E=m:(E={type:"element",tagName:"p",properties:{},children:[]},r.unshift(E)),E.children.length>0&&E.children.unshift({type:"text",value:" "}),E.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 m=r[c];(o||c!==0||m.type!=="element"||m.tagName!=="p")&&u.push({type:"text",value:`
|
|
16
|
+
`}),m.type==="element"&&m.tagName==="p"&&!o?u.push(...m.children):u.push(m)}const d=r[r.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
|
|
17
|
+
`});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function t3(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=X1(n[r])}return t}function X1(e){const t=e.spread;return t==null?e.children.length>1:t}function n3(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const u=r[o];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function r3(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function i3(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function s3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function o3(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),o.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Cr(t.children[1]),d=rl(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),o.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function a3(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,c=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const E=t.children[d],T={},b=u?u[d]:void 0;b&&(T.align=b);let _={type:"element",tagName:a,properties:T,children:[]};E&&(_.children=e.all(E),e.patch(E,_),_=e.applyData(E,_)),f.push(_)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,m),e.applyData(t,m)}function u3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const J1=9,Z1=32;function l3(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(eE(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(eE(t.slice(o),o>0,!1)),a.join("")}function eE(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===J1||a===Z1;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===J1||a===Z1;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function c3(e,t){const n={type:"text",value:l3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function d3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const f3={blockquote:zN,break:jN,code:$N,delete:VN,emphasis:qN,footnoteReference:YN,heading:WN,html:GN,imageReference:KN,image:QN,inlineCode:XN,linkReference:JN,link:ZN,listItem:e3,list:n3,paragraph:r3,root:i3,strong:s3,table:o3,tableCell:u3,tableRow:a3,text:c3,thematicBreak:d3,toml:ul,yaml:ul,definition:ul,footnoteDefinition:ul};function ul(){}const tE=-1,ll=0,fa=1,cl=2,Sf=3,Cf=4,Af=5,vf=6,nE=7,rE=8,iE=typeof self=="object"?self:globalThis,h3=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,u]=t[o];switch(a){case ll:case tE:return n(u,o);case fa:{const c=n([],o);for(const d of u)c.push(r(d));return c}case cl:{const c=n({},o);for(const[d,f]of u)c[r(d)]=r(f);return c}case Sf:return n(new Date(u),o);case Cf:{const{source:c,flags:d}=u;return n(new RegExp(c,d),o)}case Af:{const c=n(new Map,o);for(const[d,f]of u)c.set(r(d),r(f));return c}case vf:{const c=n(new Set,o);for(const d of u)c.add(r(d));return c}case nE:{const{name:c,message:d}=u;return n(new iE[c](d),o)}case rE:return n(BigInt(u),o);case"BigInt":return n(Object(BigInt(u)),o);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}}return n(new iE[a](u),o)};return r},sE=e=>h3(new Map,e)(0),$s="",{toString:p3}={},{keys:m3}=Object,ha=e=>{const t=typeof e;if(t!=="object"||!e)return[ll,t];const n=p3.call(e).slice(8,-1);switch(n){case"Array":return[fa,$s];case"Object":return[cl,$s];case"Date":return[Sf,$s];case"RegExp":return[Cf,$s];case"Map":return[Af,$s];case"Set":return[vf,$s];case"DataView":return[fa,n]}return n.includes("Array")?[fa,n]:n.includes("Error")?[nE,n]:[cl,n]},dl=([e,t])=>e===ll&&(t==="function"||t==="symbol"),g3=(e,t,n,r)=>{const o=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},a=u=>{if(n.has(u))return n.get(u);let[c,d]=ha(u);switch(c){case ll:{let m=u;switch(d){case"bigint":c=rE,m=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);m=null;break;case"undefined":return o([tE],u)}return o([c,m],u)}case fa:{if(d){let T=u;return d==="DataView"?T=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(T=new Uint8Array(u)),o([d,[...T]],u)}const m=[],E=o([c,m],u);for(const T of u)m.push(a(T));return E}case cl:{if(d)switch(d){case"BigInt":return o([d,u.toString()],u);case"Boolean":case"Number":case"String":return o([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const m=[],E=o([c,m],u);for(const T of m3(u))(e||!dl(ha(u[T])))&&m.push([a(T),a(u[T])]);return E}case Sf:return o([c,u.toISOString()],u);case Cf:{const{source:m,flags:E}=u;return o([c,{source:m,flags:E}],u)}case Af:{const m=[],E=o([c,m],u);for(const[T,b]of u)(e||!(dl(ha(T))||dl(ha(b))))&&m.push([a(T),a(b)]);return E}case vf:{const m=[],E=o([c,m],u);for(const T of u)(e||!dl(ha(T)))&&m.push(a(T));return E}}const{message:f}=u;return o([c,{name:d,message:f}],u)};return a},oE=(e,{json:t,lossy:n}={})=>{const r=[];return g3(!(t||n),!!t,new Map,r)(e),r},es=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?sE(oE(e,t)):structuredClone(e):(e,t)=>sE(oE(e,t));function E3(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function y3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function b3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||E3,r=e.options.footnoteBackLabel||y3,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const m=e.all(f),E=String(f.identifier).toUpperCase(),T=zs(E.toLowerCase());let b=0;const _=[],w=e.footnoteCounts.get(E);for(;w!==void 0&&++b<=w;){_.length>0&&_.push({type:"text",value:" "});let M=typeof n=="string"?n:n(d,b);typeof M=="string"&&(M={type:"text",value:M}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+T+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,b),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const v=m[m.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const M=v.children[v.children.length-1];M&&M.type==="text"?M.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(..._)}else m.push(..._);const A={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(m,!0)};e.patch(f,A),c.push(A)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:Te(H({},es(u)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
|
|
15
18
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
16
|
-
`}]}}const
|
|
19
|
+
`}]}}const fl=(function(e){if(e==null)return w3;if(typeof e=="function")return hl(e);if(typeof e=="object")return Array.isArray(e)?T3(e):_3(e);if(typeof e=="string")return x3(e);throw new Error("Expected function, string, or object as test")});function T3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=fl(e[n]);return hl(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function _3(e){const t=e;return hl(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function x3(e){return hl(t);function t(n){return n&&n.type===e}}function hl(e){return t;function t(n,r,o){return!!(S3(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function w3(){return!0}function S3(e){return e!==null&&typeof e=="object"&&"type"in e}function WB(e){return e}const aE=[],C3=!0,kf=!1,A3="skip";function uE(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=fl(o),u=r?-1:1;c(e,void 0,[])();function c(d,f,m){const E=d&&typeof d=="object"?d:{};if(typeof E.type=="string"){const b=typeof E.tagName=="string"?E.tagName:typeof E.name=="string"?E.name:void 0;Object.defineProperty(T,"name",{value:"node ("+(d.type+(b?"<"+b+">":""))+")"})}return T;function T(){let b=aE,_,w,v;if((!t||a(d,f,m[m.length-1]||void 0))&&(b=v3(n(d,m)),b[0]===kf))return b;if("children"in d&&d.children){const A=d;if(A.children&&b[0]!==A3)for(w=(r?A.children.length:-1)+u,v=m.concat(A);w>-1&&w<A.children.length;){const M=A.children[w];if(_=c(M,w,v)(),_[0]===kf)return _;w=typeof _[1]=="number"?_[1]:w+u}}return b}}}function v3(e){return Array.isArray(e)?e:typeof e=="number"?[C3,e]:e==null?aE:[e]}function pl(e,t,n,r){let o,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,o=n):(a=t,u=n,o=r),uE(e,a,c,o);function c(d,f){const m=f[f.length-1],E=m?m.children.indexOf(d):void 0;return u(d,E,m)}}const Nf={}.hasOwnProperty,k3={};function N3(e,t){const n=t||k3,r=new Map,o=new Map,a=new Map,u=H(H({},f3),n.handlers),c={all:f,applyData:I3,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:O3,wrap:R3};return pl(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const E=m.type==="definition"?r:o,T=String(m.identifier).toUpperCase();E.has(T)||E.set(T,m)}}),c;function d(m,E){const T=m.type,b=c.handlers[T];if(Nf.call(c.handlers,T)&&b)return b(c,m,E);if(c.options.passThrough&&c.options.passThrough.includes(T)){if("children"in m){const w=m,{children:v}=w,A=nn(w,["children"]),M=es(A);return M.children=c.all(m),M}return es(m)}return(c.options.unknownHandler||P3)(c,m,E)}function f(m){const E=[];if("children"in m){const T=m.children;let b=-1;for(;++b<T.length;){const _=c.one(T[b],m);if(_){if(b&&T[b-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=lE(_.value)),!Array.isArray(_)&&_.type==="element")){const w=_.children[0];w&&w.type==="text"&&(w.value=lE(w.value))}Array.isArray(_)?E.push(..._):E.push(_)}}}return E}}function O3(e,t){e.position&&(t.position=y1(e))}function I3(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,es(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function P3(e,t){const n=t.data||{},r="value"in t&&!(Nf.call(n,"hProperties")||Nf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function R3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
17
20
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
18
21
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
19
|
-
`}),n}function
|
|
20
|
-
`},o),a}function k3(e,t){return e&&"run"in e?function(n,r){return rt(this,null,function*(){const o=uE(n,H({file:r},t));yield e.run(o,r)})}:function(n,r){return uE(n,H({file:r},e||t))}}function lE(e){if(e)throw e}var Nf,cE;function N3(){if(cE)return Nf;cE=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"),E=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!E)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 Nf=function d(){var f,p,E,T,b,_,w=arguments[0],k=1,v=arguments.length,F=!1;for(typeof w=="boolean"&&(F=w,w=arguments[1]||{},k=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});k<v;++k)if(f=arguments[k],f!=null)for(p in f)E=c(w,p),T=c(f,p),w!==T&&(F&&T&&(a(T)||(b=o(T)))?(b?(b=!1,_=E&&o(E)?E:[]):_=E&&a(E)?E:{},u(w,{name:p,newValue:d(F,_,T)})):typeof T!="undefined"&&u(w,{name:p,newValue:T}));return w},Nf}var O3=N3();const Of=Ke(O3);function If(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 I3(){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 E=-1;if(d){u(d);return}for(;++E<o.length;)(f[E]===null||f[E]===void 0)&&(f[E]=o[E]);o=f,p?P3(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 P3(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 Cr={basename:R3,dirname:L3,extname:D3,join:M3,sep:"/"};function R3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');pa(e);let n=0,r=-1,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 L3(e){if(pa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function D3(e){pa(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 M3(...e){let t=-1,n;for(;++t<e.length;)pa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":F3(n)}function F3(e){pa(e);const t=e.codePointAt(0)===47;let n=B3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function B3(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 pa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const U3={cwd:H3};function H3(){return"/"}function Pf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function z3(e){if(typeof e=="string")e=new URL(e);else if(!Pf(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 j3(e)}function j3(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 Rf=["history","path","basename","stem","extname","dirname"];class dE{constructor(t){let n;t?Pf(t)?n={path:t}:typeof t=="string"||$3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":U3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Rf.length;){const a=Rf[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)Rf.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Cr.basename(this.path):void 0}set basename(t){Df(t,"basename"),Lf(t,"basename"),this.path=Cr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Cr.dirname(this.path):void 0}set dirname(t){fE(this.basename,"dirname"),this.path=Cr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Cr.extname(this.path):void 0}set extname(t){if(Lf(t,"extname"),fE(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=Cr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Pf(t)&&(t=z3(t)),Df(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Cr.basename(this.path,this.extname):void 0}set stem(t){Df(t,"stem"),Lf(t,"stem"),this.path=Cr.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 on(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 Lf(e,t){if(e&&e.includes(Cr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Cr.sep+"`")}function Df(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function fE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function $3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const V3=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),q3={}.hasOwnProperty;class Mf extends V3{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=I3()}copy(){const t=new Mf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Of(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Uf("data",this.frozen),this.namespace[t]=n,this):q3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Uf("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=pl(t),r=this.parser||this.Parser;return Ff("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ff("process",this.parser||this.Parser),Bf("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=pl(t),d=r.parse(c);r.run(d,c,function(p,E,T){if(p||!E||!T)return f(p);const b=E,_=r.stringify(b,T);G3(_)?T.value=_:T.result=_,f(p,T)});function f(p,E){p||!E?u(p):a?a(E):n(void 0,E)}}}processSync(t){let n=!1,r;return this.freeze(),Ff("processSync",this.parser||this.Parser),Bf("processSync",this.compiler||this.Compiler),this.process(t,o),pE("processSync","process",n),r;function o(a,u){n=!0,lE(a),r=u}}run(t,n,r){hE(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=pl(n);o.run(t,d,f);function f(p,E,T){const b=E||t;p?c(p):u?u(b):r(void 0,b,T)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),pE("runSync","run",r),o;function a(u,c){lE(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=pl(n),o=this.compiler||this.Compiler;return Bf("stringify",o),hE(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Uf("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,...E]=f;d(p,E)}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=Of(!0,o.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const E=f[p];a(E)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let E=-1,T=-1;for(;++E<r.length;)if(r[E][0]===f){T=E;break}if(T===-1)r.push([f,...p]);else if(p.length>0){let[b,..._]=p;const w=r[T][1];If(w)&&If(b)&&(b=Of(!0,w,b)),r[T]=[f,b,..._]}}}}const Y3=new Mf().freeze();function Ff(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Bf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Uf(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 hE(e){if(!If(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function pE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function pl(e){return W3(e)?e:new dE(e)}function W3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function G3(e){return typeof e=="string"||K3(e)}function K3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Q3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",mE=[],gE={allowDangerousHtml:!0},X3=/^(https?|ircs?|mailto|xmpp)$/i,J3=[{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 EE(e){const t=Z3(e),n=eO(e);return tO(t.runSync(t.parse(n),n),e)}function Z3(e){const t=e.rehypePlugins||mE,n=e.remarkPlugins||mE,r=e.remarkRehypeOptions?H(H({},e.remarkRehypeOptions),gE):gE;return Y3().use(LN).use(n).use(k3,r).use(t)}function eO(e){const t=e.children||"",n=new dE;return typeof t=="string"&&(n.value=t),n}function tO(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||nO;for(const p of J3)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+Q3+p.id,void 0);return hl(e,f),Av(e,{Fragment:C.Fragment,components:o,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function f(p,E,T){if(p.type==="raw"&&T&&typeof E=="number")return u?T.children.splice(E,1):T.children[E]={type:"text",value:p.value},E;if(p.type==="element"){let b;for(b in mf)if(Object.hasOwn(mf,b)&&Object.hasOwn(p.properties,b)){const _=p.properties[b],w=mf[b];(w===null||w.includes(p.tagName))&&(p.properties[b]=d(String(_||""),b,p))}}if(p.type==="element"){let b=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!b&&r&&typeof E=="number"&&(b=!r(p,E,T)),b&&T&&typeof E=="number")return c&&p.children?T.children.splice(E,1,...p.children):T.children.splice(E,1),E}}}function nO(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||X3.test(e.slice(0,t))?e:""}const yE=/[#.]/g;function rO(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){yE.lastIndex=o;const c=yE.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 bE(e,t,n){const r=n?aO(n):void 0;function o(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const f=u;c.unshift(f)}else{d=rO(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,iO(u))c.unshift(u);else for(const[E,T]of Object.entries(u))sO(e,d.properties,E,T)}for(const f of c)Hf(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function iO(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const a=o;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function sO(e,t,n,r){const o=lf(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=l1(r):o.commaSeparated?a=Qg(r):o.commaOrSpaceSeparated?a=l1(Qg(r).join(" ")):a=TE(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?oO(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(TE(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function Hf(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)Hf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Hf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function TE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ia(n)===ia(t)))return!0}return n}function oO(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function aO(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const uO=["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"],lO=bE(tl,"div"),cO=bE(Us,"g",uO);function dO(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=_E(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=_E(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 _E(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
21
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const es={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/"},xE={}.hasOwnProperty,fO=Object.prototype;function hO(e,t){const n=t||{};return zf({file:n.file||void 0,location:!1,schema:n.space==="svg"?Us:tl,verbose:n.verbose||!1},e)}function zf(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:wE(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=dO(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=pO(e,t),n}}function wE(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=zf(e,t[n]);r.push(o)}return r}function pO(e,t){const n=e.schema;e.schema=t.namespaceURI===es.svg?Us:tl;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;xE.call(fO,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?cO:lO)(t.tagName,o,wE(e,t.childNodes));if(ml(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&Vs(d.startTag),p=d&&d.endTag&&Vs(d.endTag),E=zf(e,c.content);f&&p&&e.file&&(E.position={start:f.end,end:p.start}),u.content=E}return e.schema=n,u}function ml(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=mO(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function mO(e,t,n){const r=Vs(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)xE.call(n.attrs,u)&&(a[lf(e.schema,u).property]=Vs(n.attrs[u]));n.startTag;const c=Vs(n.startTag),d=n.endTag?Vs(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function Vs(e){const t=SE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=SE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function SE(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 CE(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 jf(e){return e.toLowerCase()}class Yn{constructor(t,n){this.property=t,this.attribute=n}}Yn.prototype.space=null,Yn.prototype.boolean=!1,Yn.prototype.booleanish=!1,Yn.prototype.overloadedBoolean=!1,Yn.prototype.number=!1,Yn.prototype.commaSeparated=!1,Yn.prototype.spaceSeparated=!1,Yn.prototype.commaOrSpaceSeparated=!1,Yn.prototype.mustUseProperty=!1,Yn.prototype.defined=!1;let gO=0;const $e=ts(),Ut=ts(),AE=ts(),me=ts(),pt=ts(),qs=ts(),Ln=ts();function ts(){return sd(2,++gO)}const $f=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:Ut,commaOrSpaceSeparated:Ln,commaSeparated:qs,number:me,overloadedBoolean:AE,spaceSeparated:pt},Symbol.toStringTag,{value:"Module"})),Vf=Object.keys($f);class qf extends Yn{constructor(t,n,r,o){let a=-1;if(super(t,n),vE(this,"space",o),typeof r=="number")for(;++a<Vf.length;){const u=Vf[a];vE(this,Vf[a],(r&$f[u])===$f[u])}}}qf.prototype.defined=!0;function vE(e,t,n){n&&(e[t]=n)}const EO={}.hasOwnProperty;function Ys(e){const t={},n={};let r;for(r in e.properties)if(EO.call(e.properties,r)){const o=e.properties[r],a=new qf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[jf(r)]=r,n[jf(a.attribute)]=r}return new ma(t,n,e.space)}const kE=Ys({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}}),NE=Ys({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function OE(e,t){return t in e?e[t]:t}function IE(e,t){return OE(e,t.toLowerCase())}const PE=Ys({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:IE,properties:{xmlns:null,xmlnsXLink:null}}),RE=Ys({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ut,ariaAutoComplete:null,ariaBusy:Ut,ariaChecked:Ut,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:Ut,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:Ut,ariaFlowTo:pt,ariaGrabbed:Ut,ariaHasPopup:null,ariaHidden:Ut,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:me,ariaLive:null,ariaModal:Ut,ariaMultiLine:Ut,ariaMultiSelectable:Ut,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:Ut,ariaReadOnly:Ut,ariaRelevant:null,ariaRequired:Ut,ariaRoleDescription:pt,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:Ut,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null}}),yO=Ys({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:IE,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qs,acceptCharset:pt,accessKey:pt,action:null,allow:null,allowFullScreen:$e,allowPaymentRequest:$e,allowUserMedia:$e,alt:null,as:null,async:$e,autoCapitalize:null,autoComplete:pt,autoFocus:$e,autoPlay:$e,blocking:pt,capture:null,charSet:null,checked:$e,cite:null,className:pt,cols:me,colSpan:null,content:null,contentEditable:Ut,controls:$e,controlsList:pt,coords:me|qs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:AE,draggable:Ut,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$e,formTarget:null,headers:pt,height:me,hidden:$e,high:me,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:$e,inputMode:null,integrity:null,is:null,isMap:$e,itemId:null,itemProp:pt,itemRef:pt,itemScope:$e,itemType:pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$e,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:$e,muted:$e,name:null,nonce:null,noModule:$e,noValidate:$e,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:$e,optimum:me,pattern:null,ping:pt,placeholder:null,playsInline:$e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$e,referrerPolicy:null,rel:pt,required:$e,reversed:$e,rows:me,rowSpan:me,sandbox:pt,scope:null,scoped:$e,seamless:$e,selected:$e,shadowRootClonable:$e,shadowRootDelegatesFocus:$e,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:Ut,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:$e,useMap:null,value:Ut,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pt,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$e,declare:$e,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:$e,noHref:$e,noShade:$e,noWrap:$e,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:Ut,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$e,disableRemotePlayback:$e,prefix:null,property:null,results:me,security:null,unselectable:null}}),bO=Ys({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:OE,properties:{about:Ln,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:pt,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:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:$e,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,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:qs,g2:qs,glyphName:qs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:Ln,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,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:me,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:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ln,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ln,rev:Ln,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ln,requiredFeatures:Ln,requiredFonts:Ln,requiredFormats:Ln,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:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:Ln,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ln,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ln,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),TO=/^data[-\w.:]+$/i,LE=/-[a-z]/g,_O=/[A-Z]/g;function xO(e,t){const n=jf(t);let r=t,o=Yn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&TO.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(LE,SO);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!LE.test(a)){let u=a.replace(_O,wO);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=qf}return new o(r,t)}function wO(e){return"-"+e.toLowerCase()}function SO(e){return e.charAt(1).toUpperCase()}const CO=CE([NE,kE,PE,RE,yO],"html"),DE=CE([NE,kE,PE,RE,bO],"svg"),ME={}.hasOwnProperty;function FE(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&ME.call(o,e)){const d=String(o[e]);u=ME.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 AO={},vO={}.hasOwnProperty,BE=FE("type",{handlers:{root:NO,element:LO,text:PO,comment:RO,doctype:IO}});function kO(e,t){const r=(t||AO).space;return BE(e,r==="svg"?DE:CO)}function NO(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Yf(e.children,n,t),Ws(e,n),n}function OO(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Yf(e.children,n,t),Ws(e,n),n}function IO(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ws(e,t),t}function PO(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ws(e,t),t}function RO(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ws(e,t),t}function LO(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=DE);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&vO.call(e.properties,a)){const d=DO(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:es[u],childNodes:[],parentNode:null};return c.childNodes=Yf(e.children,c,r),Ws(e,c),e.tagName==="template"&&e.content&&(c.content=OO(e.content,r)),c}function DO(e,t,n){const r=xO(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Xg(n):c1(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=es[r.space]}return o}function Yf(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=BE(e[r],n);a.parentNode=t,o.push(a)}return o}function Ws(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 MO=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],FO=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]),_t="�";var A;(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"})(A||(A={}));const wn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function UE(e){return e>=55296&&e<=57343}function BO(e){return e>=56320&&e<=57343}function UO(e,t){return(e-55296)*1024+9216+t}function HE(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function zE(e){return e>=64976&&e<=65007||FO.has(e)}var Z;(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"})(Z||(Z={}));const HO=65536;class zO{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=HO,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(BO(n))return this.pos++,this._addGap(),UO(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,A.EOF;return this._err(Z.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,A.EOF;const r=this.html.charCodeAt(n);return r===A.CARRIAGE_RETURN?A.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,A.EOF;let t=this.html.charCodeAt(this.pos);return t===A.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,A.LINE_FEED):t===A.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,UE(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===A.LINE_FEED||t===A.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){HE(t)?this._err(Z.controlCharacterInInputStream):zE(t)&&this._err(Z.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var We;(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"})(We||(We={}));function jE(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 jO=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))),$O=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 VO(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=$O.get(e))!==null&&t!==void 0?t:e}var Yt;(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"})(Yt||(Yt={}));const qO=32;var pi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(pi||(pi={}));function Wf(e){return e>=Yt.ZERO&&e<=Yt.NINE}function YO(e){return e>=Yt.UPPER_A&&e<=Yt.UPPER_F||e>=Yt.LOWER_A&&e<=Yt.LOWER_F}function WO(e){return e>=Yt.UPPER_A&&e<=Yt.UPPER_Z||e>=Yt.LOWER_A&&e<=Yt.LOWER_Z||Wf(e)}function GO(e){return e===Yt.EQUALS||WO(e)}var Wt;(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"})(Wt||(Wt={}));var qr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(qr||(qr={}));class KO{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Wt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=qr.Strict}startEntity(t){this.decodeMode=t,this.state=Wt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Wt.EntityStart:return t.charCodeAt(n)===Yt.NUM?(this.state=Wt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Wt.NamedEntity,this.stateNamedEntity(t,n));case Wt.NumericStart:return this.stateNumericStart(t,n);case Wt.NumericDecimal:return this.stateNumericDecimal(t,n);case Wt.NumericHex:return this.stateNumericHex(t,n);case Wt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|qO)===Yt.LOWER_X?(this.state=Wt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Wt.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(Wf(o)||YO(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(Wf(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===Yt.SEMI)this.consumed+=1;else if(this.decodeMode===qr.Strict)return 0;return this.emitCodePoint(VO(this.result),this.consumed),this.errors&&(t!==Yt.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&pi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=QO(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===qr.Attribute&&(a===0||GO(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&pi.VALUE_LENGTH)>>14,a!==0){if(u===Yt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==qr.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]&pi.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]&~pi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Wt.NamedEntity:return this.result!==0&&(this.decodeMode!==qr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Wt.NumericDecimal:return this.emitNumericEntity(0,2);case Wt.NumericHex:return this.emitNumericEntity(0,3);case Wt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Wt.EntityStart:return 0}}}function QO(e,t,n,r){const o=(t&pi.BRANCH_LENGTH)>>7,a=t&pi.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 ie;(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/"})(ie||(ie={}));var ns;(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"})(ns||(ns={}));var Wn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Wn||(Wn={}));var j;(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"})(j||(j={}));var m;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(m||(m={}));const XO=new Map([[j.A,m.A],[j.ADDRESS,m.ADDRESS],[j.ANNOTATION_XML,m.ANNOTATION_XML],[j.APPLET,m.APPLET],[j.AREA,m.AREA],[j.ARTICLE,m.ARTICLE],[j.ASIDE,m.ASIDE],[j.B,m.B],[j.BASE,m.BASE],[j.BASEFONT,m.BASEFONT],[j.BGSOUND,m.BGSOUND],[j.BIG,m.BIG],[j.BLOCKQUOTE,m.BLOCKQUOTE],[j.BODY,m.BODY],[j.BR,m.BR],[j.BUTTON,m.BUTTON],[j.CAPTION,m.CAPTION],[j.CENTER,m.CENTER],[j.CODE,m.CODE],[j.COL,m.COL],[j.COLGROUP,m.COLGROUP],[j.DD,m.DD],[j.DESC,m.DESC],[j.DETAILS,m.DETAILS],[j.DIALOG,m.DIALOG],[j.DIR,m.DIR],[j.DIV,m.DIV],[j.DL,m.DL],[j.DT,m.DT],[j.EM,m.EM],[j.EMBED,m.EMBED],[j.FIELDSET,m.FIELDSET],[j.FIGCAPTION,m.FIGCAPTION],[j.FIGURE,m.FIGURE],[j.FONT,m.FONT],[j.FOOTER,m.FOOTER],[j.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[j.FORM,m.FORM],[j.FRAME,m.FRAME],[j.FRAMESET,m.FRAMESET],[j.H1,m.H1],[j.H2,m.H2],[j.H3,m.H3],[j.H4,m.H4],[j.H5,m.H5],[j.H6,m.H6],[j.HEAD,m.HEAD],[j.HEADER,m.HEADER],[j.HGROUP,m.HGROUP],[j.HR,m.HR],[j.HTML,m.HTML],[j.I,m.I],[j.IMG,m.IMG],[j.IMAGE,m.IMAGE],[j.INPUT,m.INPUT],[j.IFRAME,m.IFRAME],[j.KEYGEN,m.KEYGEN],[j.LABEL,m.LABEL],[j.LI,m.LI],[j.LINK,m.LINK],[j.LISTING,m.LISTING],[j.MAIN,m.MAIN],[j.MALIGNMARK,m.MALIGNMARK],[j.MARQUEE,m.MARQUEE],[j.MATH,m.MATH],[j.MENU,m.MENU],[j.META,m.META],[j.MGLYPH,m.MGLYPH],[j.MI,m.MI],[j.MO,m.MO],[j.MN,m.MN],[j.MS,m.MS],[j.MTEXT,m.MTEXT],[j.NAV,m.NAV],[j.NOBR,m.NOBR],[j.NOFRAMES,m.NOFRAMES],[j.NOEMBED,m.NOEMBED],[j.NOSCRIPT,m.NOSCRIPT],[j.OBJECT,m.OBJECT],[j.OL,m.OL],[j.OPTGROUP,m.OPTGROUP],[j.OPTION,m.OPTION],[j.P,m.P],[j.PARAM,m.PARAM],[j.PLAINTEXT,m.PLAINTEXT],[j.PRE,m.PRE],[j.RB,m.RB],[j.RP,m.RP],[j.RT,m.RT],[j.RTC,m.RTC],[j.RUBY,m.RUBY],[j.S,m.S],[j.SCRIPT,m.SCRIPT],[j.SEARCH,m.SEARCH],[j.SECTION,m.SECTION],[j.SELECT,m.SELECT],[j.SOURCE,m.SOURCE],[j.SMALL,m.SMALL],[j.SPAN,m.SPAN],[j.STRIKE,m.STRIKE],[j.STRONG,m.STRONG],[j.STYLE,m.STYLE],[j.SUB,m.SUB],[j.SUMMARY,m.SUMMARY],[j.SUP,m.SUP],[j.TABLE,m.TABLE],[j.TBODY,m.TBODY],[j.TEMPLATE,m.TEMPLATE],[j.TEXTAREA,m.TEXTAREA],[j.TFOOT,m.TFOOT],[j.TD,m.TD],[j.TH,m.TH],[j.THEAD,m.THEAD],[j.TITLE,m.TITLE],[j.TR,m.TR],[j.TRACK,m.TRACK],[j.TT,m.TT],[j.U,m.U],[j.UL,m.UL],[j.SVG,m.SVG],[j.VAR,m.VAR],[j.WBR,m.WBR],[j.XMP,m.XMP]]);function Gs(e){var t;return(t=XO.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const le=m,JO={[ie.HTML]:new Set([le.ADDRESS,le.APPLET,le.AREA,le.ARTICLE,le.ASIDE,le.BASE,le.BASEFONT,le.BGSOUND,le.BLOCKQUOTE,le.BODY,le.BR,le.BUTTON,le.CAPTION,le.CENTER,le.COL,le.COLGROUP,le.DD,le.DETAILS,le.DIR,le.DIV,le.DL,le.DT,le.EMBED,le.FIELDSET,le.FIGCAPTION,le.FIGURE,le.FOOTER,le.FORM,le.FRAME,le.FRAMESET,le.H1,le.H2,le.H3,le.H4,le.H5,le.H6,le.HEAD,le.HEADER,le.HGROUP,le.HR,le.HTML,le.IFRAME,le.IMG,le.INPUT,le.LI,le.LINK,le.LISTING,le.MAIN,le.MARQUEE,le.MENU,le.META,le.NAV,le.NOEMBED,le.NOFRAMES,le.NOSCRIPT,le.OBJECT,le.OL,le.P,le.PARAM,le.PLAINTEXT,le.PRE,le.SCRIPT,le.SECTION,le.SELECT,le.SOURCE,le.STYLE,le.SUMMARY,le.TABLE,le.TBODY,le.TD,le.TEMPLATE,le.TEXTAREA,le.TFOOT,le.TH,le.THEAD,le.TITLE,le.TR,le.TRACK,le.UL,le.WBR,le.XMP]),[ie.MATHML]:new Set([le.MI,le.MO,le.MN,le.MS,le.MTEXT,le.ANNOTATION_XML]),[ie.SVG]:new Set([le.TITLE,le.FOREIGN_OBJECT,le.DESC]),[ie.XLINK]:new Set,[ie.XML]:new Set,[ie.XMLNS]:new Set},Gf=new Set([le.H1,le.H2,le.H3,le.H4,le.H5,le.H6]);j.STYLE,j.SCRIPT,j.XMP,j.IFRAME,j.NOEMBED,j.NOFRAMES,j.PLAINTEXT;var N;(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"})(N||(N={}));const Lt={DATA:N.DATA,RCDATA:N.RCDATA,RAWTEXT:N.RAWTEXT,SCRIPT_DATA:N.SCRIPT_DATA,PLAINTEXT:N.PLAINTEXT,CDATA_SECTION:N.CDATA_SECTION};function ZO(e){return e>=A.DIGIT_0&&e<=A.DIGIT_9}function ga(e){return e>=A.LATIN_CAPITAL_A&&e<=A.LATIN_CAPITAL_Z}function eI(e){return e>=A.LATIN_SMALL_A&&e<=A.LATIN_SMALL_Z}function mi(e){return eI(e)||ga(e)}function $E(e){return mi(e)||ZO(e)}function gl(e){return e+32}function VE(e){return e===A.SPACE||e===A.LINE_FEED||e===A.TABULATION||e===A.FORM_FEED}function qE(e){return VE(e)||e===A.SOLIDUS||e===A.GREATER_THAN_SIGN}function tI(e){return e===A.NULL?Z.nullCharacterReference:e>1114111?Z.characterReferenceOutsideUnicodeRange:UE(e)?Z.surrogateCharacterReference:zE(e)?Z.noncharacterCharacterReference:HE(e)||e===A.CARRIAGE_RETURN?Z.controlCharacterReference:null}class nI{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=N.DATA,this.returnState=N.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new zO(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new KO(jO,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Z.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(Z.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=tI(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:We.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:We.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:We.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:We.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(jE(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(Z.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=Gs(t.tagName),t.type===We.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(Z.endTagWithAttributes),t.selfClosing&&this._err(Z.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 We.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case We.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case We.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:We.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=VE(t)?We.WHITESPACE_CHARACTER:t===A.NULL?We.NULL_CHARACTER:We.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(We.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=N.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?qr.Attribute:qr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===N.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case N.DATA:{this._stateData(t);break}case N.RCDATA:{this._stateRcdata(t);break}case N.RAWTEXT:{this._stateRawtext(t);break}case N.SCRIPT_DATA:{this._stateScriptData(t);break}case N.PLAINTEXT:{this._statePlaintext(t);break}case N.TAG_OPEN:{this._stateTagOpen(t);break}case N.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case N.TAG_NAME:{this._stateTagName(t);break}case N.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case N.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case N.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case N.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case N.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case N.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case N.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case N.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case N.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case N.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case N.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case N.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case N.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case N.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case N.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case N.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case N.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case N.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case N.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case N.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case N.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case N.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case N.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case N.BOGUS_COMMENT:{this._stateBogusComment(t);break}case N.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case N.COMMENT_START:{this._stateCommentStart(t);break}case N.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case N.COMMENT:{this._stateComment(t);break}case N.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case N.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case N.COMMENT_END:{this._stateCommentEnd(t);break}case N.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case N.DOCTYPE:{this._stateDoctype(t);break}case N.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case N.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case N.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case N.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case N.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case N.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case N.CDATA_SECTION:{this._stateCdataSection(t);break}case N.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case N.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case N.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case N.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=N.TAG_OPEN;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this._emitCodePoint(t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case A.AMPERSAND:{this._startCharacterReference();break}case A.LESS_THAN_SIGN:{this.state=N.RCDATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(_t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case A.LESS_THAN_SIGN:{this.state=N.RAWTEXT_LESS_THAN_SIGN;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(_t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(_t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case A.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(_t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(mi(t))this._createStartTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case A.EXCLAMATION_MARK:{this.state=N.MARKUP_DECLARATION_OPEN;break}case A.SOLIDUS:{this.state=N.END_TAG_OPEN;break}case A.QUESTION_MARK:{this._err(Z.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t);break}case A.EOF:{this._err(Z.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Z.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=N.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(mi(t))this._createEndTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case A.GREATER_THAN_SIGN:{this._err(Z.missingEndTagName),this.state=N.DATA;break}case A.EOF:{this._err(Z.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(Z.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=N.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(Z.unexpectedNullCharacter),n.tagName+=_t;break}case A.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(ga(t)?gl(t):t)}}_stateRcdataLessThanSign(t){t===A.SOLIDUS?this.state=N.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){mi(t)?(this.state=N.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=N.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 A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=N.BEFORE_ATTRIBUTE_NAME,!1;case A.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=N.SELF_CLOSING_START_TAG,!1;case A.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=N.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===A.SOLIDUS?this.state=N.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){mi(t)?(this.state=N.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case A.SOLIDUS:{this.state=N.SCRIPT_DATA_END_TAG_OPEN;break}case A.EXCLAMATION_MARK:{this.state=N.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=N.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){mi(t)?(this.state=N.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===A.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===A.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(_t);break}case A.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(_t);break}case A.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(_t);break}case A.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===A.SOLIDUS?this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:mi(t)?(this._emitChars("<"),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){mi(t)?(this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(wn.SCRIPT,!1)&&qE(this.preprocessor.peek(wn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<wn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this._emitChars(_t);break}case A.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_t);break}case A.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_t);break}case A.EOF:{this._err(Z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===A.SOLIDUS?(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(wn.SCRIPT,!1)&&qE(this.preprocessor.peek(wn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<wn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._err(Z.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=N.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this._leaveAttrName(),this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._leaveAttrName(),this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:{this._err(Z.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.name+=_t;break}default:this.currentAttr.name+=String.fromCodePoint(ga(t)?gl(t):t)}}_stateAfterAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case A.EQUALS_SIGN:{this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{this.state=N.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this.state=N.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Z.missingAttributeValue),this.state=N.DATA,this.emitCurrentTagToken();break}default:this.state=N.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case A.QUOTATION_MARK:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case A.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case A.APOSTROPHE:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case A.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(Z.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:case A.EQUALS_SIGN:case A.GRAVE_ACCENT:{this._err(Z.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case A.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this._leaveAttrValue(),this.state=N.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this._err(Z.missingWhitespaceBetweenAttributes),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case A.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=N.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(Z.eofInTag),this._emitEOFToken();break}default:this._err(Z.unexpectedSolidusInTag),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case A.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case A.NULL:{this._err(Z.unexpectedNullCharacter),n.data+=_t;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(wn.DASH_DASH,!0)?(this._createCommentToken(wn.DASH_DASH.length+1),this.state=N.COMMENT_START):this._consumeSequenceIfMatch(wn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(wn.DOCTYPE.length+1),this.state=N.DOCTYPE):this._consumeSequenceIfMatch(wn.CDATA_START,!0)?this.inForeignNode?this.state=N.CDATA_SECTION:(this._err(Z.cdataInHtmlContent),this._createCommentToken(wn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=N.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Z.incorrectlyOpenedComment),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case A.HYPHEN_MINUS:{this.state=N.COMMENT_START_DASH;break}case A.GREATER_THAN_SIGN:{this._err(Z.abruptClosingOfEmptyComment),this.state=N.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case A.GREATER_THAN_SIGN:{this._err(Z.abruptClosingOfEmptyComment),this.state=N.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=N.COMMENT_END_DASH;break}case A.LESS_THAN_SIGN:{n.data+="<",this.state=N.COMMENT_LESS_THAN_SIGN;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),n.data+=_t;break}case A.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case A.EXCLAMATION_MARK:{n.data+="!",this.state=N.COMMENT_LESS_THAN_SIGN_BANG;break}case A.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===A.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=N.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===A.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=N.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==A.GREATER_THAN_SIGN&&t!==A.EOF&&this._err(Z.nestedComment),this.state=N.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case A.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case A.EXCLAMATION_MARK:{this.state=N.COMMENT_END_BANG;break}case A.HYPHEN_MINUS:{n.data+="-";break}case A.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{n.data+="--!",this.state=N.COMMENT_END_DASH;break}case A.GREATER_THAN_SIGN:{this._err(Z.incorrectlyClosedComment),this.state=N.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(Z.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=N.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case A.EOF:{this._err(Z.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingWhitespaceBeforeDoctypeName),this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(ga(t))this._createDoctypeToken(String.fromCharCode(gl(t))),this.state=N.DOCTYPE_NAME;else switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.NULL:{this._err(Z.unexpectedNullCharacter),this._createDoctypeToken(_t),this.state=N.DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this._err(Z.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.EOF:{this._err(Z.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=N.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=N.AFTER_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.NULL:{this._err(Z.unexpectedNullCharacter),n.name+=_t;break}case A.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(ga(t)?gl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(wn.PUBLIC,!1)?this.state=N.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(wn.SYSTEM,!1)?this.state=N.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Z.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(Z.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(Z.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Z.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Z.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),n.publicId+=_t;break}case A.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.EOF:{this._err(Z.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 A.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),n.publicId+=_t;break}case A.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.EOF:{this._err(Z.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 A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.QUOTATION_MARK:{this._err(Z.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(Z.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(Z.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(Z.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Z.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(Z.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),n.systemId+=_t;break}case A.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.EOF:{this._err(Z.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 A.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(Z.unexpectedNullCharacter),n.systemId+=_t;break}case A.GREATER_THAN_SIGN:{this._err(Z.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.EOF:{this._err(Z.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 A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.EOF:{this._err(Z.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Z.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.NULL:{this._err(Z.unexpectedNullCharacter);break}case A.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case A.RIGHT_SQUARE_BRACKET:{this.state=N.CDATA_SECTION_BRACKET;break}case A.EOF:{this._err(Z.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===A.RIGHT_SQUARE_BRACKET?this.state=N.CDATA_SECTION_END:(this._emitChars("]"),this.state=N.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case A.GREATER_THAN_SIGN:{this.state=N.DATA;break}case A.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=N.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(A.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&$E(this.preprocessor.peek(1))?N.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){$E(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===A.SEMICOLON&&this._err(Z.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const YE=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),WE=new Set([...YE,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),El=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),rI=new Set([...El,m.OL,m.UL]),iI=new Set([...El,m.BUTTON]),GE=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),KE=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),sI=new Set([m.TR,m.TEMPLATE,m.HTML]),oI=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),aI=new Set([m.TABLE,m.TEMPLATE,m.HTML]),uI=new Set([m.TD,m.TH]);class lI{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=m.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===m.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ie.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])!==ie.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(Gf,ie.HTML)}popUntilTableCellPopped(){this.popUntilPopped(uI,ie.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(aI,ie.HTML)}clearBackToTableBodyContext(){this.clearBackTo(oI,ie.HTML)}clearBackToTableRowContext(){this.clearBackTo(sI,ie.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===m.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===m.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ie.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case ie.SVG:{if(KE.has(o))return!1;break}case ie.MATHML:{if(GE.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,El)}hasInListItemScope(t){return this.hasInDynamicScope(t,rI)}hasInButtonScope(t){return this.hasInDynamicScope(t,iI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ie.HTML:{if(Gf.has(n))return!0;if(El.has(n))return!1;break}case ie.SVG:{if(KE.has(n))return!1;break}case ie.MATHML:{if(GE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ie.HTML)switch(this.tagIDs[n]){case t:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ie.HTML)switch(this.tagIDs[t]){case m.TBODY:case m.THEAD:case m.TFOOT:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ie.HTML)switch(this.tagIDs[n]){case t:return!0;case m.OPTION:case m.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&YE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&WE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&WE.has(this.currentTagId);)this.pop()}}const Kf=3;var Ar;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ar||(Ar={}));const QE={type:Ar.Marker};class cI{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===Ar.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<Kf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Kf)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>=Kf&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(QE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ar.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ar.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(QE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Ar.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Ar.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Ar.Element&&n.element===t)}}const gi={createDocument(){return{nodeName:"#document",mode:Wn.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};gi.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(gi.isTextNode(n)){n.value+=t;return}}gi.appendChild(e,gi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&gi.isTextNode(r)?r.value+=t:gi.insertBefore(e,gi.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=H(H({},e.sourceCodeLocation),t)}},XE="html",dI="about:legacy-compat",fI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",JE=["+//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//"],hI=[...JE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],pI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),ZE=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],mI=[...ZE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ey(e,t){return t.some(n=>e.startsWith(n))}function gI(e){return e.name===XE&&e.publicId===null&&(e.systemId===null||e.systemId===dI)}function EI(e){if(e.name!==XE)return Wn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===fI)return Wn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),pI.has(n))return Wn.QUIRKS;let r=t===null?hI:JE;if(ey(n,r))return Wn.QUIRKS;if(r=t===null?ZE:mI,ey(n,r))return Wn.LIMITED_QUIRKS}return Wn.NO_QUIRKS}const ty={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},yI="definitionurl",bI="definitionURL",TI=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])),_I=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ie.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ie.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ie.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ie.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ie.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ie.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ie.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ie.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ie.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ie.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ie.XMLNS}]]),xI=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])),wI=new Set([m.B,m.BIG,m.BLOCKQUOTE,m.BODY,m.BR,m.CENTER,m.CODE,m.DD,m.DIV,m.DL,m.DT,m.EM,m.EMBED,m.H1,m.H2,m.H3,m.H4,m.H5,m.H6,m.HEAD,m.HR,m.I,m.IMG,m.LI,m.LISTING,m.MENU,m.META,m.NOBR,m.OL,m.P,m.PRE,m.RUBY,m.S,m.SMALL,m.SPAN,m.STRONG,m.STRIKE,m.SUB,m.SUP,m.TABLE,m.TT,m.U,m.UL,m.VAR]);function SI(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===ns.COLOR||r===ns.SIZE||r===ns.FACE)||wI.has(t)}function ny(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===yI){e.attrs[t].name=bI;break}}function ry(e){for(let t=0;t<e.attrs.length;t++){const n=TI.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Qf(e){for(let t=0;t<e.attrs.length;t++){const n=_I.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 CI(e){const t=xI.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Gs(e.tagName))}function AI(e,t){return t===ie.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function vI(e,t,n){if(t===ie.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ns.ENCODING){const o=n[r].value.toLowerCase();return o===ty.TEXT_HTML||o===ty.APPLICATION_XML}}return t===ie.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function kI(e,t,n,r){return(!r||r===ie.HTML)&&vI(e,t,n)||(!r||r===ie.MATHML)&&AI(e,t)}const NI="hidden",OI=8,II=3;var P;(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"})(P||(P={}));const PI={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},iy=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),sy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:gi,onParseError:null};class oy{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=P.INITIAL,this.originalInsertionMode=P.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=H(H({},sy),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 nI(this.options,this),this.activeFormattingElements=new cI(this.treeAdapter),this.fragmentContextID=r?Gs(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new lI(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=H(H({},sy),n);t!=null||(t=r.treeAdapter.createElement(j.TEMPLATE,ie.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ie.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===m.TEMPLATE&&a.tmplInsertionModeStack.unshift(P.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:PI,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)===ie.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ie.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=P.TEXT}switchToPlaintextParsing(){this.insertionMode=P.TEXT,this.originalInsertionMode=P.IN_BODY,this.tokenizer.state=Lt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===j.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ie.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=Lt.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=Lt.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=Lt.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=Lt.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&&Te(H({},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,ie.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ie.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(j.HTML,ie.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,m.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol: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===We.END_TAG&&o===n.tagName?{endTag:H({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===m.SVG&&this.treeAdapter.getTagName(n)===j.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ie.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ie.HTML)}_processToken(t){switch(t.type){case We.CHARACTER:{this.onCharacter(t);break}case We.NULL_CHARACTER:{this.onNullCharacter(t);break}case We.COMMENT:{this.onComment(t);break}case We.DOCTYPE:{this.onDoctype(t);break}case We.START_TAG:{this._processStartTag(t);break}case We.END_TAG:{this.onEndTag(t);break}case We.EOF:{this.onEof(t);break}case We.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return kI(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Ar.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=P.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(m.P),this.openElements.popUntilTagNamePopped(m.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case m.TR:{this.insertionMode=P.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=P.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=P.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=P.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=P.IN_TABLE;return}case m.BODY:{this.insertionMode=P.IN_BODY;return}case m.FRAMESET:{this.insertionMode=P.IN_FRAMESET;return}case m.SELECT:{this._resetInsertionModeForSelect(t);return}case m.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case m.HTML:{this.insertionMode=this.headElement?P.AFTER_HEAD:P.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=P.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=P.IN_HEAD;return}break}}this.insertionMode=P.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===m.TEMPLATE)break;if(r===m.TABLE){this.insertionMode=P.IN_SELECT_IN_TABLE;return}}this.insertionMode=P.IN_SELECT}_isElementCausesFosterParenting(t){return iy.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case m.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ie.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case m.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return JO[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){uR(this,t);return}switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{ya(this,t);break}case P.BEFORE_HEAD:{ba(this,t);break}case P.IN_HEAD:{Ta(this,t);break}case P.IN_HEAD_NO_SCRIPT:{_a(this,t);break}case P.AFTER_HEAD:{xa(this,t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:{uy(this,t);break}case P.TEXT:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{eh(this,t);break}case P.IN_TABLE_TEXT:{gy(this,t);break}case P.IN_COLUMN_GROUP:{Tl(this,t);break}case P.AFTER_BODY:{wl(this,t);break}case P.AFTER_AFTER_BODY:{Sl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){aR(this,t);return}switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{ya(this,t);break}case P.BEFORE_HEAD:{ba(this,t);break}case P.IN_HEAD:{Ta(this,t);break}case P.IN_HEAD_NO_SCRIPT:{_a(this,t);break}case P.AFTER_HEAD:{xa(this,t);break}case P.TEXT:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{eh(this,t);break}case P.IN_COLUMN_GROUP:{Tl(this,t);break}case P.AFTER_BODY:{wl(this,t);break}case P.AFTER_AFTER_BODY:{Sl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Jf(this,t);return}switch(this.insertionMode){case P.INITIAL:case P.BEFORE_HTML:case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_TEMPLATE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{Jf(this,t);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}case P.AFTER_BODY:{UI(this,t);break}case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{HI(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case P.INITIAL:{zI(this,t);break}case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:{this._err(t,Z.misplacedDoctype);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Z.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?lR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{jI(this,t);break}case P.BEFORE_HEAD:{VI(this,t);break}case P.IN_HEAD:{ur(this,t);break}case P.IN_HEAD_NO_SCRIPT:{WI(this,t);break}case P.AFTER_HEAD:{KI(this,t);break}case P.IN_BODY:{un(this,t);break}case P.IN_TABLE:{Ks(this,t);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}case P.IN_CAPTION:{qP(this,t);break}case P.IN_COLUMN_GROUP:{th(this,t);break}case P.IN_TABLE_BODY:{_l(this,t);break}case P.IN_ROW:{xl(this,t);break}case P.IN_CELL:{GP(this,t);break}case P.IN_SELECT:{by(this,t);break}case P.IN_SELECT_IN_TABLE:{QP(this,t);break}case P.IN_TEMPLATE:{JP(this,t);break}case P.AFTER_BODY:{eR(this,t);break}case P.IN_FRAMESET:{tR(this,t);break}case P.AFTER_FRAMESET:{rR(this,t);break}case P.AFTER_AFTER_BODY:{sR(this,t);break}case P.AFTER_AFTER_FRAMESET:{oR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?cR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{$I(this,t);break}case P.BEFORE_HEAD:{qI(this,t);break}case P.IN_HEAD:{YI(this,t);break}case P.IN_HEAD_NO_SCRIPT:{GI(this,t);break}case P.AFTER_HEAD:{QI(this,t);break}case P.IN_BODY:{bl(this,t);break}case P.TEXT:{DP(this,t);break}case P.IN_TABLE:{wa(this,t);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}case P.IN_CAPTION:{YP(this,t);break}case P.IN_COLUMN_GROUP:{WP(this,t);break}case P.IN_TABLE_BODY:{nh(this,t);break}case P.IN_ROW:{yy(this,t);break}case P.IN_CELL:{KP(this,t);break}case P.IN_SELECT:{Ty(this,t);break}case P.IN_SELECT_IN_TABLE:{XP(this,t);break}case P.IN_TEMPLATE:{ZP(this,t);break}case P.AFTER_BODY:{xy(this,t);break}case P.IN_FRAMESET:{nR(this,t);break}case P.AFTER_FRAMESET:{iR(this,t);break}case P.AFTER_AFTER_BODY:{Sl(this,t);break}}}onEof(t){switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{ya(this,t);break}case P.BEFORE_HEAD:{ba(this,t);break}case P.IN_HEAD:{Ta(this,t);break}case P.IN_HEAD_NO_SCRIPT:{_a(this,t);break}case P.AFTER_HEAD:{xa(this,t);break}case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{py(this,t);break}case P.TEXT:{MP(this,t);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}case P.IN_TEMPLATE:{_y(this,t);break}case P.AFTER_BODY:case P.IN_FRAMESET:case P.AFTER_FRAMESET:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{Zf(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===A.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 P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.TEXT:case P.IN_COLUMN_GROUP:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{this._insertCharacters(t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:case P.AFTER_BODY:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{ay(this,t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{eh(this,t);break}case P.IN_TABLE_TEXT:{my(this,t);break}}}}function RI(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):hy(e,t),n}function LI(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 DI(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>=II;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=MI(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function MI(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 FI(e,t,n){const r=e.treeAdapter.getTagName(t),o=Gs(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===m.TEMPLATE&&a===ie.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function BI(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 Xf(e,t){for(let n=0;n<OI;n++){const r=RI(e,t);if(!r)break;const o=LI(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=DI(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&FI(e,u,a),BI(e,o,r)}}function Jf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function UI(e,t){e._appendCommentNode(t,e.openElements.items[0])}function HI(e,t){e._appendCommentNode(t,e.document)}function Zf(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 zI(e,t){e._setDocumentType(t);const n=t.forceQuirks?Wn.QUIRKS:EI(t);gI(t)||e._err(t,Z.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=P.BEFORE_HTML}function Ea(e,t){e._err(t,Z.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Wn.QUIRKS),e.insertionMode=P.BEFORE_HTML,e._processToken(t)}function jI(e,t){t.tagID===m.HTML?(e._insertElement(t,ie.HTML),e.insertionMode=P.BEFORE_HEAD):ya(e,t)}function $I(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&ya(e,t)}function ya(e,t){e._insertFakeRootElement(),e.insertionMode=P.BEFORE_HEAD,e._processToken(t)}function VI(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.HEAD:{e._insertElement(t,ie.HTML),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD;break}default:ba(e,t)}}function qI(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?ba(e,t):e._err(t,Z.endTagWithoutMatchingOpenElement)}function ba(e,t){e._insertFakeElement(j.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD,e._processToken(t)}function ur(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,Lt.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Lt.RAWTEXT):(e._insertElement(t,ie.HTML),e.insertionMode=P.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,Lt.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,Lt.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=P.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(P.IN_TEMPLATE);break}case m.HEAD:{e._err(t,Z.misplacedStartTagForHeadElement);break}default:Ta(e,t)}}function YI(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=P.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Ta(e,t);break}case m.TEMPLATE:{rs(e,t);break}default:e._err(t,Z.endTagWithoutMatchingOpenElement)}}function rs(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,Z.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Z.endTagWithoutMatchingOpenElement)}function Ta(e,t){e.openElements.pop(),e.insertionMode=P.AFTER_HEAD,e._processToken(t)}function WI(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{ur(e,t);break}case m.NOSCRIPT:{e._err(t,Z.nestedNoscriptInHead);break}default:_a(e,t)}}function GI(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=P.IN_HEAD;break}case m.BR:{_a(e,t);break}default:e._err(t,Z.endTagWithoutMatchingOpenElement)}}function _a(e,t){const n=t.type===We.EOF?Z.openElementsLeftAfterEof:Z.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=P.IN_HEAD,e._processToken(t)}function KI(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.BODY:{e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=P.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,ie.HTML),e.insertionMode=P.IN_FRAMESET;break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{e._err(t,Z.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),ur(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,Z.misplacedStartTagForHeadElement);break}default:xa(e,t)}}function QI(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{xa(e,t);break}case m.TEMPLATE:{rs(e,t);break}default:e._err(t,Z.endTagWithoutMatchingOpenElement)}}function xa(e,t){e._insertFakeElement(j.BODY,m.BODY),e.insertionMode=P.IN_BODY,yl(e,t)}function yl(e,t){switch(t.type){case We.CHARACTER:{uy(e,t);break}case We.WHITESPACE_CHARACTER:{ay(e,t);break}case We.COMMENT:{Jf(e,t);break}case We.START_TAG:{un(e,t);break}case We.END_TAG:{bl(e,t);break}case We.EOF:{py(e,t);break}}}function ay(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function uy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function XI(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function JI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function ZI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_FRAMESET)}function eP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML)}function tP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Gf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ie.HTML)}function nP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function rP(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),n||(e.formElement=e.openElements.current))}function iP(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===m.LI&&o===m.LI||(n===m.DD||n===m.DT)&&(o===m.DD||o===m.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==m.ADDRESS&&o!==m.DIV&&o!==m.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML)}function sP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.tokenizer.state=Lt.PLAINTEXT}function oP(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.framesetOk=!1}function aP(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(j.A);n&&(Xf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function uP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function lP(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(Xf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function cP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function dP(e,t){e.treeAdapter.getDocumentMode(e.document)!==Wn.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=P.IN_TABLE}function ly(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ie.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function cy(e){const t=jE(e,ns.TYPE);return t!=null&&t.toLowerCase()===NI}function fP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ie.HTML),cy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function hP(e,t){e._appendElement(t,ie.HTML),t.ackSelfClosing=!0}function pP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,ie.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function mP(e,t){t.tagName=j.IMG,t.tagID=m.IMG,ly(e,t)}function gP(e,t){e._insertElement(t,ie.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Lt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=P.TEXT}function EP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function yP(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function dy(e,t){e._switchToTextParsing(t,Lt.RAWTEXT)}function bP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===P.IN_TABLE||e.insertionMode===P.IN_CAPTION||e.insertionMode===P.IN_TABLE_BODY||e.insertionMode===P.IN_ROW||e.insertionMode===P.IN_CELL?P.IN_SELECT_IN_TABLE:P.IN_SELECT}function TP(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML)}function _P(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ie.HTML)}function xP(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,ie.HTML)}function wP(e,t){e._reconstructActiveFormattingElements(),ny(t),Qf(t),t.selfClosing?e._appendElement(t,ie.MATHML):e._insertElement(t,ie.MATHML),t.ackSelfClosing=!0}function SP(e,t){e._reconstructActiveFormattingElements(),ry(t),Qf(t),t.selfClosing?e._appendElement(t,ie.SVG):e._insertElement(t,ie.SVG),t.ackSelfClosing=!0}function fy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML)}function un(e,t){switch(t.tagID){case m.I:case m.S:case m.B:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.SMALL:case m.STRIKE:case m.STRONG:{uP(e,t);break}case m.A:{aP(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{tP(e,t);break}case m.P:case m.DL:case m.OL:case m.UL:case m.DIV:case m.DIR:case m.NAV:case m.MAIN:case m.MENU:case m.ASIDE:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.DETAILS:case m.ADDRESS:case m.ARTICLE:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{eP(e,t);break}case m.LI:case m.DD:case m.DT:{iP(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{ly(e,t);break}case m.HR:{pP(e,t);break}case m.RB:case m.RTC:{_P(e,t);break}case m.RT:case m.RP:{xP(e,t);break}case m.PRE:case m.LISTING:{nP(e,t);break}case m.XMP:{EP(e,t);break}case m.SVG:{SP(e,t);break}case m.HTML:{XI(e,t);break}case m.BASE:case m.LINK:case m.META:case m.STYLE:case m.TITLE:case m.SCRIPT:case m.BGSOUND:case m.BASEFONT:case m.TEMPLATE:{ur(e,t);break}case m.BODY:{JI(e,t);break}case m.FORM:{rP(e,t);break}case m.NOBR:{lP(e,t);break}case m.MATH:{wP(e,t);break}case m.TABLE:{dP(e,t);break}case m.INPUT:{fP(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{hP(e,t);break}case m.IMAGE:{mP(e,t);break}case m.BUTTON:{oP(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{cP(e,t);break}case m.IFRAME:{yP(e,t);break}case m.SELECT:{bP(e,t);break}case m.OPTION:case m.OPTGROUP:{TP(e,t);break}case m.NOEMBED:case m.NOFRAMES:{dy(e,t);break}case m.FRAMESET:{ZI(e,t);break}case m.TEXTAREA:{gP(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?dy(e,t):fy(e,t);break}case m.PLAINTEXT:{sP(e,t);break}case m.COL:case m.TH:case m.TD:case m.TR:case m.HEAD:case m.FRAME:case m.TBODY:case m.TFOOT:case m.THEAD:case m.CAPTION:case m.COLGROUP:break;default:fy(e,t)}}function CP(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=P.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function AP(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=P.AFTER_BODY,xy(e,t))}function vP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function kP(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(m.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(m.FORM):n&&e.openElements.remove(n))}function NP(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(j.P,m.P),e._closePElement()}function OP(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function IP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function PP(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function RP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function LP(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(j.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function hy(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==m.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function bl(e,t){switch(t.tagID){case m.A:case m.B:case m.I:case m.S:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.NOBR:case m.SMALL:case m.STRIKE:case m.STRONG:{Xf(e,t);break}case m.P:{NP(e);break}case m.DL:case m.UL:case m.OL:case m.DIR:case m.DIV:case m.NAV:case m.PRE:case m.MAIN:case m.MENU:case m.ASIDE:case m.BUTTON:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.ADDRESS:case m.ARTICLE:case m.DETAILS:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.LISTING:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{vP(e,t);break}case m.LI:{OP(e);break}case m.DD:case m.DT:{IP(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{PP(e);break}case m.BR:{LP(e);break}case m.BODY:{CP(e,t);break}case m.HTML:{AP(e,t);break}case m.FORM:{kP(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{RP(e,t);break}case m.TEMPLATE:{rs(e,t);break}default:hy(e,t)}}function py(e,t){e.tmplInsertionModeStack.length>0?_y(e,t):Zf(e,t)}function DP(e,t){var n;t.tagID===m.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function MP(e,t){e._err(t,Z.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function eh(e,t){if(e.openElements.currentTagId!==void 0&&iy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=P.IN_TABLE_TEXT,t.type){case We.CHARACTER:{gy(e,t);break}case We.WHITESPACE_CHARACTER:{my(e,t);break}}else Sa(e,t)}function FP(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_CAPTION}function BP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_COLUMN_GROUP}function UP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.COLGROUP,m.COLGROUP),e.insertionMode=P.IN_COLUMN_GROUP,th(e,t)}function HP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_TABLE_BODY}function zP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.TBODY,m.TBODY),e.insertionMode=P.IN_TABLE_BODY,_l(e,t)}function jP(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function $P(e,t){cy(t)?e._appendElement(t,ie.HTML):Sa(e,t),t.ackSelfClosing=!0}function VP(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ie.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ks(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{zP(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{ur(e,t);break}case m.COL:{UP(e,t);break}case m.FORM:{VP(e,t);break}case m.TABLE:{jP(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{HP(e,t);break}case m.INPUT:{$P(e,t);break}case m.CAPTION:{FP(e,t);break}case m.COLGROUP:{BP(e,t);break}default:Sa(e,t)}}function wa(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{rs(e,t);break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:Sa(e,t)}}function Sa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,yl(e,t),e.fosterParentingEnabled=n}function my(e,t){e.pendingCharacterTokens.push(t)}function gy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ca(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Sa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Ey=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function qP(e,t){const n=t.tagID;Ey.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,Ks(e,t)):un(e,t)}function YP(e,t){const n=t.tagID;switch(n){case m.CAPTION:case m.TABLE:{e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,n===m.TABLE&&wa(e,t));break}case m.BODY:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:bl(e,t)}}function th(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.COL:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{ur(e,t);break}default:Tl(e,t)}}function WP(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case m.TEMPLATE:{rs(e,t);break}case m.COL:break;default:Tl(e,t)}}function Tl(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE,e._processToken(t))}function _l(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(j.TR,m.TR),e.insertionMode=P.IN_ROW,xl(e,t);break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,Ks(e,t));break}default:Ks(e,t)}}function nh(e,t){const n=t.tagID;switch(t.tagID){case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,wa(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:case m.TR:break;default:wa(e,t)}}function xl(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_CELL,e.activeFormattingElements.insertMarker();break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,_l(e,t));break}default:Ks(e,t)}}function yy(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,nh(e,t));break}case m.TBODY:case m.TFOOT:case m.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(m.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,nh(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:break;default:wa(e,t)}}function GP(e,t){const n=t.tagID;Ey.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),xl(e,t)):un(e,t)}function KP(e,t){const n=t.tagID;switch(n){case m.TD:case m.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),yy(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:bl(e,t)}}function by(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,ie.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ie.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case m.INPUT:case m.KEYGEN:case m.TEXTAREA:case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),t.tagID!==m.SELECT&&e._processStartTag(t));break}case m.SCRIPT:case m.TEMPLATE:{ur(e,t);break}}}function Ty(e,t){switch(t.tagID){case m.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===m.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===m.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop();break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop();break}case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode());break}case m.TEMPLATE:{rs(e,t);break}}}function QP(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e._processStartTag(t)):by(e,t)}function XP(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Ty(e,t)}function JP(e,t){switch(t.tagID){case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{ur(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=P.IN_TABLE,e.insertionMode=P.IN_TABLE,Ks(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=P.IN_COLUMN_GROUP,e.insertionMode=P.IN_COLUMN_GROUP,th(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=P.IN_TABLE_BODY,e.insertionMode=P.IN_TABLE_BODY,_l(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=P.IN_ROW,e.insertionMode=P.IN_ROW,xl(e,t);break}default:e.tmplInsertionModeStack[0]=P.IN_BODY,e.insertionMode=P.IN_BODY,un(e,t)}}function ZP(e,t){t.tagID===m.TEMPLATE&&rs(e,t)}function _y(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Zf(e,t)}function eR(e,t){t.tagID===m.HTML?un(e,t):wl(e,t)}function xy(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=P.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===m.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else wl(e,t)}function wl(e,t){e.insertionMode=P.IN_BODY,yl(e,t)}function tR(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.FRAMESET:{e._insertElement(t,ie.HTML);break}case m.FRAME:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{ur(e,t);break}}}function nR(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=P.AFTER_FRAMESET))}function rR(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.NOFRAMES:{ur(e,t);break}}}function iR(e,t){t.tagID===m.HTML&&(e.insertionMode=P.AFTER_AFTER_FRAMESET)}function sR(e,t){t.tagID===m.HTML?un(e,t):Sl(e,t)}function Sl(e,t){e.insertionMode=P.IN_BODY,yl(e,t)}function oR(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.NOFRAMES:{ur(e,t);break}}}function aR(e,t){t.chars=_t,e._insertCharacters(t)}function uR(e,t){e._insertCharacters(t),e.framesetOk=!1}function wy(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ie.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function lR(e,t){if(SI(t))wy(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ie.MATHML?ny(t):r===ie.SVG&&(CI(t),ry(t)),Qf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function cR(e,t){if(t.tagID===m.P||t.tagID===m.BR){wy(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)===ie.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}j.AREA,j.BASE,j.BASEFONT,j.BGSOUND,j.BR,j.COL,j.EMBED,j.FRAME,j.HR,j.IMG,j.INPUT,j.KEYGEN,j.LINK,j.META,j.PARAM,j.SOURCE,j.TRACK,j.WBR;const dR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,fR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Sy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Cy(e,t){const n=xR(e),r=FE("type",{handlers:{root:hR,element:pR,text:mR,comment:vy,doctype:gR,raw:yR},unknown:bR}),o={parser:n?new oy(Sy):oy.getFragmentParser(void 0,Sy),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),Qs(o,Sr());const a=n?o.parser.document:o.parser.getFragment(),u=hO(a,{file:o.options.file});return o.stitches&&hl(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const E=f.children;return E[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Ay(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function hR(e,t){Ay(e.children,t)}function pR(e,t){TR(e,t),Ay(e.children,t),_R(e,t)}function mR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:We.CHARACTER,chars:e.value,location:Aa(e)};Qs(t,Sr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function gR(e,t){const n={type:We.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Aa(e)};Qs(t,Sr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ER(e,t){t.stitches=!0;const n=wR(e);if("children"in e&&"children"in n){const r=Cy({type:"root",children:e.children},t.options);n.children=r.children}vy({type:"comment",value:{stitch:n}},t)}function vy(e,t){const n=e.value,r={type:We.COMMENT,data:n,location:Aa(e)};Qs(t,Sr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function yR(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,ky(t,Sr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(dR,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function bR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))ER(n,t);else{let r="";throw fR.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 Qs(e,t){ky(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Lt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function ky(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 TR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Lt.PLAINTEXT)return;Qs(t,Sr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:es.html;o===es.html&&n==="svg"&&(o=es.svg);const a=kO(Te(H({},e),{children:[]}),{space:o===es.svg?"svg":"html"}),u={type:We.START_TAG,tagName:n,tagID:Gs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Aa(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function _R(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&MO.includes(n)||t.parser.tokenizer.state===Lt.PLAINTEXT)return;Qs(t,nl(e));const r={type:We.END_TAG,tagName:n,tagID:Gs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Aa(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Lt.RCDATA||t.parser.tokenizer.state===Lt.RAWTEXT||t.parser.tokenizer.state===Lt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Lt.DATA)}function xR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Aa(e){const t=Sr(e)||{line:void 0,column:void 0,offset:void 0},n=nl(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 wR(e){return"children"in e?Zi(Te(H({},e),{children:[]})):Zi(e)}function Ny(e){return function(t,n){return Cy(t,Te(H({},e),{file:n}))}}const is=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Oy={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...is,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...is],h2:[["className","sr-only"]],img:[...is,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...is,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...is],table:[...is],ul:[...is,["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"]},Ei={}.hasOwnProperty;function SR(e,t){let n={type:"root",children:[]};const r={schema:t?H(H({},Oy),t):Oy,stack:[]},o=Iy(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function Iy(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return CR(e,n);case"doctype":return AR(e,n);case"element":return vR(e,n);case"root":return kR(e,n);case"text":return NR(e,n)}}}function CR(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 va(a,t),a}}function AR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return va(n,t),n}}function vR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Py(e,t.children),o=OR(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&&Ei.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 va(u,t),u}function kR(e,t){const r={type:"root",children:Py(e,t.children)};return va(r,t),r}function NR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return va(r,t),r}function Py(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=Iy(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function OR(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Ei.call(r,n)?r[n]:void 0,u=r&&Ei.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(Ei.call(c,f)){const p=c[f];let E=Ry(e,Dy(a,f),f,p);E==null&&(E=Ry(e,Dy(u,f),f,p)),E!=null&&(d[f]=E)}if(o&&Ei.call(o,n)){const p=o[n];for(f in p)Ei.call(p,f)&&!Ei.call(d,f)&&(d[f]=p[f])}return d}function Ry(e,t,n,r){return t?Array.isArray(r)?IR(e,t,n,r):Ly(e,t,n,r):void 0}function IR(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Ly(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Ly(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&PR(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 PR(e,t,n){const r=e.schema.protocols&&Ei.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 va(e,t){const n=g1(t);t.data&&(e.data=Zi(t.data)),n&&(e.position=n)}function Dy(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 RR(e){return function(t){return SR(t,e)}}const My=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return C.jsx("a",Te(H(H({className:J(e,`${Y}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},LR=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n,openLinksInNewTab:r}=Rt();return!e&&!t?null:C.jsx("div",{className:J(n,`${Y}-disclaimer`),children:t?C.jsx(EE,{rehypePlugins:[Ny,RR],components:{ul:({children:o})=>C.jsx("ul",{className:J(n,`${Y}-ul`),children:o}),ol:({children:o})=>C.jsx("ol",{className:J(n,`${Y}-ol`),children:o}),li:({children:o})=>C.jsx("li",{className:J(n,`${Y}-li`),children:o}),a:({href:o,title:a,children:u})=>C.jsx(My,{globalClassName:n,openLinksInNewTab:r,href:o,title:a,children:u}),img:({src:o,alt:a})=>C.jsx("img",{className:J(n,`${Y}-disclaimer-image`),src:o,alt:a}),p:({children:o})=>C.jsx("p",{className:J(n,`${Y}-disclaimer-text`),children:o}),span:({children:o})=>C.jsx("span",{className:J(n,`${Y}-disclaimer-text-span`),children:o})},children:t}):C.jsx("p",{className:J(n,`${Y}-disclaimer-text`),children:e})})},rh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=Ms(),{setImageFile:u}=ta(),{logger:c,globalClassName:d,searchConfig:f,features:p}=Rt(),E=$.useRef(null),T=$.useRef(null),b=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",w=!!o||!1,k=w?"connected":"disconnected",v=t||!w,F=()=>a?new Promise((B,te)=>{const ge=new FileReader;ge.readAsDataURL(a),ge.onload=()=>B(ge.result),ge.onerror=ye=>te(ye)}):Promise.resolve(""),R=B=>rt(null,null,function*(){var ye;if(v)return;const te=10*1024*1024,ge=(ye=B.target.files)==null?void 0:ye[0];if(ge){if(ge.size>te){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(ge)}}),W=()=>{u(null),T.current&&(T.current.value="")},X=B=>rt(null,null,function*(){var ye;B.preventDefault();const te=(((ye=E.current)==null?void 0:ye.value)||"").trim();let ge="";try{ge=yield F()}catch(M){c==null||c.error("Error converting file to base64:",M),alert("There was an error processing the file. Please try again.");return}te&&(W(),E.current.value="",r(te,ge))});return C.jsxs("div",{className:J(d,e,n,a&&"with-attachments",`${Y}-search-bar-wrapper`),children:[a&&C.jsxs("div",{className:J(d,n,`${Y}-image-file-preview`),children:[C.jsx("img",{className:J(d,n,`${Y}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),C.jsx("span",{className:J(d,n,`${Y}-image-file-name`),title:_,children:_}),C.jsx(nf,{className:J(n,"clear-attachment"),label:"Remove image",onClick:W})]}),C.jsxs("form",{className:J(d,e,n,`${Y}-search-bar`),name:`${Y}-search-form`,onSubmit:X,children:[C.jsx("span",{role:"status",className:J(`${Y}-connection-status-icon`,k)}),b&&C.jsxs("div",{role:"button",className:J(d,e,n,v&&"disabled",`${Y}-image-upload-button`),"aria-disabled":v,tabIndex:0,children:[C.jsx("label",{className:J(d,e,n,v&&"disabled",`${Y}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:C.jsx(XA,{})}),C.jsx("input",{className:J(d,e,n,`${Y}-file-input`),type:"file",ref:T,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${Y}-file-input`,disabled:v,onInput:R})]}),C.jsx("input",{className:J(d,e,n,`${Y}-search-input`),type:"text",ref:E,placeholder:f==null?void 0:f.placeholder,name:`${Y}-user-input`}),C.jsx(nv,{isLoading:v}),C.jsx(ZA,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:v})]}),C.jsx(LR,{})]})};function DR(e){return e==null?[]:Array.isArray(e)?e:[e]}var MR=e=>e!=null&&typeof e=="object",Cl=e=>typeof e=="string",Xs=e=>typeof e=="function",FR=e=>e==null,BR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),UR=e=>Object.prototype.toString.call(e),Fy=Function.prototype.toString,HR=Fy.call(Object),zR=e=>{if(!MR(e)||UR(e)!="[object Object]"||VR(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=BR(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Fy.call(n)==HR},jR=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,$R=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,VR=e=>jR(e)||$R(e),qR=e=>e(),YR=()=>{},ih=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function sh(e){if(!zR(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=sh(o))}return n}function oh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function WR(e,t){if(e==null)throw new Error(t())}var GR=Object.defineProperty,KR=(e,t,n)=>t in e?GR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ah=(e,t,n)=>KR(e,typeof t!="symbol"?t+"":t,n),By=()=>{},Al=e=>typeof e=="object"&&e!==null,QR=e=>e?"":void 0,XR=e=>e?"true":void 0,JR=1,ZR=9,eL=11,Gt=e=>Al(e)&&e.nodeType===JR&&typeof e.nodeName=="string",vl=e=>Al(e)&&e.nodeType===ZR,tL=e=>Al(e)&&e===e.window,Uy=e=>Gt(e)?e.localName||"":"#document";function nL(e){return["html","body","#document"].includes(Uy(e))}var rL=e=>Al(e)&&e.nodeType!==void 0,ss=e=>rL(e)&&e.nodeType===eL&&"host"in e,iL=e=>Gt(e)&&e.localName==="input",sL=e=>Gt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function ka(e){if(!e)return!1;const t=e.getRootNode();return Zs(t)===e}var oL=/(textarea|select)/;function aL(e){if(e==null||!Gt(e))return!1;try{return iL(e)&&e.selectionStart!=null||oL.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function kl(e,t){var r;if(!e||!t||!Gt(e)||!Gt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&ss(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function vr(e){var t;return vl(e)?e:tL(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function uL(e){return vr(e).documentElement}function Js(e){var t,n,r;return ss(e)?Js(e.host):vl(e)?(t=e.defaultView)!=null?t:window:Gt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Zs(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 lL(e){if(Uy(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ss(e)&&e.host||uL(e);return ss(t)?t.host:t}function uh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),vl(t)||ss(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var lh=new WeakMap;function Nl(e){return lh.has(e)||lh.set(e,Js(e).getComputedStyle(e)),lh.get(e)}var ch=new Set(["menu","listbox","dialog","grid","tree","region"]),cL=e=>ch.has(e),Hy=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function zy(e,t){const n=new Set,r=uh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Hy(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const E=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(E&&cL(E)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function jy(e,t){const n=uh(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=Hy(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const E=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";E&&ch.has(E)&&!T&&(t(p),o(p))}}}};o(e)}function dL(e){const t=new Set;return jy(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function fL(e){const t=e.getAttribute("role");return!!(t&&ch.has(t))}function hL(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function pL(e){var t;return hL(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function mL(e){if(!e.id)return!1;const t=uh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&fL(e))}var dh=()=>typeof document!="undefined";function gL(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var fh=e=>dh()&&e.test(gL()),EL=e=>dh()&&e.test(navigator.vendor),$y=()=>dh()&&!!navigator.maxTouchPoints,yL=()=>fh(/^iPhone/i),bL=()=>fh(/^iPad/i)||hh()&&navigator.maxTouchPoints>1,Vy=()=>yL()||bL(),TL=()=>hh()||Vy(),hh=()=>fh(/^Mac/i),_L=()=>TL()&&EL(/apple/i);function xL(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 Yr(e){var n;const t=xL(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var wL=e=>e.button===0,SL=e=>e.button===2||hh()&&e.ctrlKey&&e.button===0,lr=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},qy=e=>Gt(e)&&e.tagName==="IFRAME",CL=/^(audio|video|details)$/;function Yy(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var AL=e=>!Number.isNaN(Yy(e)),vL=e=>Yy(e)<0;function kL(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 Wy(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=kL(d,t);if(f){const p=Array.from(f.querySelectorAll(Ol)).filter(n),E=u.get(d);if(E!==void 0){const T=E+1;r.splice(T,0,...p),p.forEach((b,_)=>{u.set(b,T+_)});for(let b=T+p.length;b<r.length;b++)u.set(r[b],b)}else{const T=r.length;r.push(...p),p.forEach((b,_)=>{u.set(b,T+_)})}o.push(...p)}}return r}var Ol="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",Gy=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Ol));(n==!0||n=="if-empty"&&o.length===0)&&Gt(e)&&Wr(e)&&o.unshift(e);const u=[];for(const c of o)if(Wr(c)){if(qy(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...Gy(d,{getShadowRoot:r}));continue}u.push(c)}return r?Wy(u,r,Wr):u};function Wr(e){return!Gt(e)||e.closest("[inert]")?!1:e.matches(Ol)&&sL(e)}function Na(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Ol));n&&os(e)&&o.unshift(e);const a=[];for(const u of o)if(os(u)){if(qy(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Na(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Wy(a,r,os);return!u.length&&n?o:u}return!a.length&&n?o:a}function os(e){return Gt(e)&&e.tabIndex>0?!0:Wr(e)&&!vL(e)}function NL(e,t={}){const n=Na(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function OL(e,t={}){const{current:n,getShadowRoot:r}=t,o=Na(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Zs(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Oa(e){return e.tabIndex<0&&(CL.test(e.localName)||aL(e))&&!AL(e)?0:e.tabIndex}function Ky(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=Na(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var IL=class jx{constructor(){ah(this,"id",null),ah(this,"fn_cleanup"),ah(this,"cleanup",()=>{this.cancel()})}static create(){return new jx}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 Sn(e){const t=IL.create();return t.request(e),t.cleanup}function PL(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 ph(e){const t=lL(e);return nL(t)?vr(t).body:Gt(t)&&DL(t)?t:ph(t)}var RL=/auto|scroll|overlay|hidden|clip/,LL=new Set(["inline","contents"]);function DL(e){const t=Js(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return RL.test(n+o+r)&&!LL.has(a)}function ML(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[E,T]=NL(e,{includeContainer:!0,getShadowRoot:a}),b=OL(c,{current:n,getShadowRoot:a}),_=!E&&!T;f.shiftKey&&ka(b)?(o==null||o(),p=T):f.shiftKey&&(ka(E)||_)?p=n:!f.shiftKey&&ka(n)?(o==null||o(),p=E):!f.shiftKey&&(ka(T)||_)&&(p=b),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return lr(u,"keydown",d,!0)}function FL(e,t){const c=t,{defer:n,triggerElement:r}=c,o=nn(c,["defer","triggerElement"]),a=n?Sn:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(ML(d,H({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function Il(e,t){if(!e)return By;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 BL(e,t,n){if(!e)return By;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 UL(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 HL(e,t){const{timeout:n,rootNode:r}=t,o=Js(r),a=vr(r),u=new o.AbortController;return UL(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 zL=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),jL=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Qy=e=>{const t={};let n;for(;n=jL.exec(e);)t[n[1]]=n[2];return t},$L=(e,t)=>{if(Cl(e)){if(Cl(t))return`${e};${t}`;e=Qy(e)}else Cl(t)&&(t=Qy(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function cr(...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]=ih(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=zL(t[o],n[o]);continue}if(o==="style"){t[o]=$L(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 jB(e){return e}var eo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(eo||{}),mh="__init__";function VL(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>vr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Zs(t()),a=u=>t().getElementById(u);return Te(H({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:ka,getById:a})}var gh={exports:{}},Cn={},Eh={exports:{}},yh={};var Xy;function qL(){return Xy||(Xy=1,(function(e){function t(q,ne){var S=q.length;q.push(ne);e:for(;0<S;){var L=S-1>>>1,K=q[L];if(0<o(K,ne))q[L]=ne,q[S]=K,S=L;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var ne=q[0],S=q.pop();if(S!==ne){q[0]=S;e:for(var L=0,K=q.length,O=K>>>1;L<O;){var _e=2*(L+1)-1,Re=q[_e],Oe=_e+1,Ge=q[Oe];if(0>o(Re,S))Oe<K&&0>o(Ge,Re)?(q[L]=Ge,q[Oe]=S,L=Oe):(q[L]=Re,q[_e]=S,L=_e);else if(Oe<K&&0>o(Ge,S))q[L]=Ge,q[Oe]=S,L=Oe;else break e}}return ne}function o(q,ne){var S=q.sortIndex-ne.sortIndex;return S!==0?S:q.id-ne.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,E=null,T=3,b=!1,_=!1,w=!1,k=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,F=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(q){for(var ne=n(f);ne!==null;){if(ne.callback===null)r(f);else if(ne.startTime<=q)r(f),ne.sortIndex=ne.expirationTime,t(d,ne);else break;ne=n(f)}}function W(q){if(w=!1,R(q),!_)if(n(d)!==null)_=!0,Ce(X);else{var ne=n(f);ne!==null&&oe(W,ne.startTime-q)}}function X(q,ne){_=!1,w&&(w=!1,v(ge),ge=-1),b=!0;var S=T;try{for(R(ne),E=n(d);E!==null&&(!(E.expirationTime>ne)||q&&!ae());){var L=E.callback;if(typeof L=="function"){E.callback=null,T=E.priorityLevel;var K=L(E.expirationTime<=ne);ne=e.unstable_now(),typeof K=="function"?E.callback=K:E===n(d)&&r(d),R(ne)}else r(d);E=n(d)}if(E!==null)var O=!0;else{var _e=n(f);_e!==null&&oe(W,_e.startTime-ne),O=!1}return O}finally{E=null,T=S,b=!1}}var B=!1,te=null,ge=-1,ye=5,M=-1;function ae(){return!(e.unstable_now()-M<ye)}function he(){if(te!==null){var q=e.unstable_now();M=q;var ne=!0;try{ne=te(!0,q)}finally{ne?ue():(B=!1,te=null)}}else B=!1}var ue;if(typeof F=="function")ue=function(){F(he)};else if(typeof MessageChannel!="undefined"){var de=new MessageChannel,be=de.port2;de.port1.onmessage=he,ue=function(){be.postMessage(null)}}else ue=function(){k(he,0)};function Ce(q){te=q,B||(B=!0,ue())}function oe(q,ne){ge=k(function(){q(e.unstable_now())},ne)}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(){_||b||(_=!0,Ce(X))},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"):ye=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 ne=3;break;default:ne=T}var S=T;T=ne;try{return q()}finally{T=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(q,ne){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var S=T;T=q;try{return ne()}finally{T=S}},e.unstable_scheduleCallback=function(q,ne,S){var L=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?L+S:L):S=L,q){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=S+K,q={id:p++,callback:ne,priorityLevel:q,startTime:S,expirationTime:K,sortIndex:-1},S>L?(q.sortIndex=S,t(f,q),n(d)===null&&q===n(f)&&(w?(v(ge),ge=-1):w=!0,oe(W,S-L))):(q.sortIndex=K,t(d,q),_||b||(_=!0,Ce(X))),q},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(q){var ne=T;return function(){var S=T;T=ne;try{return q.apply(this,arguments)}finally{T=S}}}})(yh)),yh}var Jy;function YL(){return Jy||(Jy=1,Eh.exports=qL()),Eh.exports}var Zy;function WL(){if(Zy)return Cn;Zy=1;var e=As(),t=YL();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={},E={};function T(i){return d.call(E,i)?!0:d.call(p,i)?!1:f.test(i)?E[i]=!0:(p[i]=!0,!1)}function b(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"||b(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,g,y,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=h,this.attributeNamespace=g,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=y,this.removeEmptyString=x}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){k[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];k[s]=new w(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){k[i]=new w(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){k[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){k[i]=new w(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){k[i]=new w(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){k[i]=new w(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){k[i]=new w(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){k[i]=new w(i,5,!1,i.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function F(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(v,F);k[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(v,F);k[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(v,F);k[s]=new w(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){k[i]=new w(i,1,!1,i.toLowerCase(),null,!1,!1)}),k.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){k[i]=new w(i,1,!1,i.toLowerCase(),null,!0,!0)});function R(i,s,l,h){var g=k.hasOwnProperty(s)?k[s]:null;(g!==null?g.type!==0:h||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(_(s,l,g,h)&&(l=null),h||g===null?T(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):g.mustUseProperty?i[g.propertyName]=l===null?g.type===3?!1:"":l:(s=g.attributeName,h=g.attributeNamespace,l===null?i.removeAttribute(s):(g=g.type,l=g===3||g===4&&l===!0?"":""+l,h?i.setAttributeNS(h,s,l):i.setAttribute(s,l))))}var W=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,X=Symbol.for("react.element"),B=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),ge=Symbol.for("react.strict_mode"),ye=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),ae=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),Ce=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),q=Symbol.iterator;function ne(i){return i===null||typeof i!="object"?null:(i=q&&i[q]||i["@@iterator"],typeof i=="function"?i:null)}var S=Object.assign,L;function K(i){if(L===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);L=s&&s[1]||""}return`
|
|
22
|
-
`+
|
|
22
|
+
`}),n}function lE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function cE(e,t){const n=N3(e,t),r=n.one(e,void 0),o=b3(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
|
|
23
|
+
`},o),a}function L3(e,t){return e&&"run"in e?function(n,r){return rt(this,null,function*(){const o=cE(n,H({file:r},t));yield e.run(o,r)})}:function(n,r){return cE(n,H({file:r},e||t))}}function dE(e){if(e)throw e}var Of,fE;function D3(){if(fE)return Of;fE=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 m=e.call(f,"constructor"),E=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!m&&!E)return!1;var T;for(T in f);return typeof T=="undefined"||e.call(f,T)},u=function(f,m){n&&m.name==="__proto__"?n(f,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):f[m.name]=m.newValue},c=function(f,m){if(m==="__proto__")if(e.call(f,m)){if(r)return r(f,m).value}else return;return f[m]};return Of=function d(){var f,m,E,T,b,_,w=arguments[0],v=1,A=arguments.length,M=!1;for(typeof w=="boolean"&&(M=w,w=arguments[1]||{},v=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});v<A;++v)if(f=arguments[v],f!=null)for(m in f)E=c(w,m),T=c(f,m),w!==T&&(M&&T&&(a(T)||(b=o(T)))?(b?(b=!1,_=E&&o(E)?E:[]):_=E&&a(E)?E:{},u(w,{name:m,newValue:d(M,_,T)})):typeof T!="undefined"&&u(w,{name:m,newValue:T}));return w},Of}var M3=D3();const If=Ke(M3);function Pf(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function F3(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...o);function c(d,...f){const m=e[++a];let E=-1;if(d){u(d);return}for(;++E<o.length;)(f[E]===null||f[E]===void 0)&&(f[E]=o[E]);o=f,m?B3(m,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 B3(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(o);try{d=e.apply(this,u)}catch(f){const m=f;if(c&&n)throw m;return o(m)}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 Ar={basename:U3,dirname:H3,extname:z3,join:j3,sep:"/"};function U3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');pa(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function H3(e){if(pa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function z3(e){pa(e);let t=e.length,n=-1,r=0,o=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function j3(...e){let t=-1,n;for(;++t<e.length;)pa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":$3(n)}function $3(e){pa(e);const t=e.codePointAt(0)===47;let n=V3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function V3(e,t){let n="",r=0,o=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(o===u-1||a===1))if(o!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),o=u,a=0;continue}}else if(n.length>0){n="",r=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),r=u-o-1;o=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function pa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const q3={cwd:Y3};function Y3(){return"/"}function Rf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function W3(e){if(typeof e=="string")e=new URL(e);else if(!Rf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return G3(e)}function G3(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Lf=["history","path","basename","stem","extname","dirname"];class hE{constructor(t){let n;t?Rf(t)?n={path:t}:typeof t=="string"||K3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":q3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Lf.length;){const a=Lf[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)Lf.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Ar.basename(this.path):void 0}set basename(t){Mf(t,"basename"),Df(t,"basename"),this.path=Ar.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ar.dirname(this.path):void 0}set dirname(t){pE(this.basename,"dirname"),this.path=Ar.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ar.extname(this.path):void 0}set extname(t){if(Df(t,"extname"),pE(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=Ar.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Rf(t)&&(t=W3(t)),Mf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ar.basename(this.path,this.extname):void 0}set stem(t){Mf(t,"stem"),Df(t,"stem"),this.path=Ar.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 on(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 Df(e,t){if(e&&e.includes(Ar.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ar.sep+"`")}function Mf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function pE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function K3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Q3=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),X3={}.hasOwnProperty;class Ff extends Q3{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=F3()}copy(){const t=new Ff;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(If(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Hf("data",this.frozen),this.namespace[t]=n,this):X3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Hf("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=ml(t),r=this.parser||this.Parser;return Bf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Bf("process",this.parser||this.Parser),Uf("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=ml(t),d=r.parse(c);r.run(d,c,function(m,E,T){if(m||!E||!T)return f(m);const b=E,_=r.stringify(b,T);eO(_)?T.value=_:T.result=_,f(m,T)});function f(m,E){m||!E?u(m):a?a(E):n(void 0,E)}}}processSync(t){let n=!1,r;return this.freeze(),Bf("processSync",this.parser||this.Parser),Uf("processSync",this.compiler||this.Compiler),this.process(t,o),gE("processSync","process",n),r;function o(a,u){n=!0,dE(a),r=u}}run(t,n,r){mE(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=ml(n);o.run(t,d,f);function f(m,E,T){const b=E||t;m?c(m):u?u(b):r(void 0,b,T)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),gE("runSync","run",r),o;function a(u,c){dE(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=ml(n),o=this.compiler||this.Compiler;return Uf("stringify",o),mE(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Hf("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[m,...E]=f;d(m,E)}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=If(!0,o.settings,f.settings))}function c(f){let m=-1;if(f!=null)if(Array.isArray(f))for(;++m<f.length;){const E=f[m];a(E)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,m){let E=-1,T=-1;for(;++E<r.length;)if(r[E][0]===f){T=E;break}if(T===-1)r.push([f,...m]);else if(m.length>0){let[b,..._]=m;const w=r[T][1];Pf(w)&&Pf(b)&&(b=If(!0,w,b)),r[T]=[f,b,..._]}}}}const J3=new Ff().freeze();function Bf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Uf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Hf(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 mE(e){if(!Pf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function gE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ml(e){return Z3(e)?e:new hE(e)}function Z3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function eO(e){return typeof e=="string"||tO(e)}function tO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const nO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",EE=[],yE={allowDangerousHtml:!0},rO=/^(https?|ircs?|mailto|xmpp)$/i,iO=[{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 bE(e){const t=sO(e),n=oO(e);return aO(t.runSync(t.parse(n),n),e)}function sO(e){const t=e.rehypePlugins||EE,n=e.remarkPlugins||EE,r=e.remarkRehypeOptions?H(H({},e.remarkRehypeOptions),yE):yE;return J3().use(HN).use(n).use(L3,r).use(t)}function oO(e){const t=e.children||"",n=new hE;return typeof t=="string"&&(n.value=t),n}function aO(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||uO;for(const m of iO)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+nO+m.id,void 0);return pl(e,f),Pv(e,{Fragment:C.Fragment,components:o,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function f(m,E,T){if(m.type==="raw"&&T&&typeof E=="number")return u?T.children.splice(E,1):T.children[E]={type:"text",value:m.value},E;if(m.type==="element"){let b;for(b in gf)if(Object.hasOwn(gf,b)&&Object.hasOwn(m.properties,b)){const _=m.properties[b],w=gf[b];(w===null||w.includes(m.tagName))&&(m.properties[b]=d(String(_||""),b,m))}}if(m.type==="element"){let b=n?!n.includes(m.tagName):a?a.includes(m.tagName):!1;if(!b&&r&&typeof E=="number"&&(b=!r(m,E,T)),b&&T&&typeof E=="number")return c&&m.children?T.children.splice(E,1,...m.children):T.children.splice(E,1),E}}}function uO(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||rO.test(e.slice(0,t))?e:""}const TE=/[#.]/g;function lO(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){TE.lastIndex=o;const c=TE.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 _E(e,t,n){const r=n?hO(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=lO(a,t);const f=d.tagName.toLowerCase(),m=r?r.get(f):void 0;if(d.tagName=m||f,cO(u))c.unshift(u);else for(const[E,T]of Object.entries(u))dO(e,d.properties,E,T)}for(const f of c)zf(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function cO(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 dO(e,t,n,r){const o=cf(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=d1(r):o.commaSeparated?a=Jg(r):o.commaOrSpaceSeparated?a=d1(Jg(r).join(" ")):a=xE(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?fO(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(xE(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function zf(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)zf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?zf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function xE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ia(n)===ia(t)))return!0}return n}function fO(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function hO(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const pO=["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"],mO=_E(nl,"div"),gO=_E(Us,"g",pO);function EO(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=wE(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=wE(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 wE(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
24
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const ts={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/"},SE={}.hasOwnProperty,yO=Object.prototype;function bO(e,t){const n=t||{};return jf({file:n.file||void 0,location:!1,schema:n.space==="svg"?Us:nl,verbose:n.verbose||!1},e)}function jf(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},gl(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:CE(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=EO(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"},gl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},gl(e,r,n),n}default:return n=TO(e,t),n}}function CE(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=jf(e,t[n]);r.push(o)}return r}function TO(e,t){const n=e.schema;e.schema=t.namespaceURI===ts.svg?Us:nl;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;SE.call(yO,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?gO:mO)(t.tagName,o,CE(e,t.childNodes));if(gl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&Vs(d.startTag),m=d&&d.endTag&&Vs(d.endTag),E=jf(e,c.content);f&&m&&e.file&&(E.position={start:f.end,end:m.start}),u.content=E}return e.schema=n,u}function gl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=_O(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function _O(e,t,n){const r=Vs(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)SE.call(n.attrs,u)&&(a[cf(e.schema,u).property]=Vs(n.attrs[u]));n.startTag;const c=Vs(n.startTag),d=n.endTag?Vs(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function Vs(e){const t=AE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=AE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function AE(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 vE(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 $f(e){return e.toLowerCase()}class Yn{constructor(t,n){this.property=t,this.attribute=n}}Yn.prototype.space=null,Yn.prototype.boolean=!1,Yn.prototype.booleanish=!1,Yn.prototype.overloadedBoolean=!1,Yn.prototype.number=!1,Yn.prototype.commaSeparated=!1,Yn.prototype.spaceSeparated=!1,Yn.prototype.commaOrSpaceSeparated=!1,Yn.prototype.mustUseProperty=!1,Yn.prototype.defined=!1;let xO=0;const Ve=ns(),Ut=ns(),kE=ns(),me=ns(),ht=ns(),qs=ns(),Ln=ns();function ns(){return od(2,++xO)}const Vf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ve,booleanish:Ut,commaOrSpaceSeparated:Ln,commaSeparated:qs,number:me,overloadedBoolean:kE,spaceSeparated:ht},Symbol.toStringTag,{value:"Module"})),qf=Object.keys(Vf);class Yf extends Yn{constructor(t,n,r,o){let a=-1;if(super(t,n),NE(this,"space",o),typeof r=="number")for(;++a<qf.length;){const u=qf[a];NE(this,qf[a],(r&Vf[u])===Vf[u])}}}Yf.prototype.defined=!0;function NE(e,t,n){n&&(e[t]=n)}const wO={}.hasOwnProperty;function Ys(e){const t={},n={};let r;for(r in e.properties)if(wO.call(e.properties,r)){const o=e.properties[r],a=new Yf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[$f(r)]=r,n[$f(a.attribute)]=r}return new ma(t,n,e.space)}const OE=Ys({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}}),IE=Ys({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function PE(e,t){return t in e?e[t]:t}function RE(e,t){return PE(e,t.toLowerCase())}const LE=Ys({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:RE,properties:{xmlns:null,xmlnsXLink:null}}),DE=Ys({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ut,ariaAutoComplete:null,ariaBusy:Ut,ariaChecked:Ut,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:ht,ariaCurrent:null,ariaDescribedBy:ht,ariaDetails:null,ariaDisabled:Ut,ariaDropEffect:ht,ariaErrorMessage:null,ariaExpanded:Ut,ariaFlowTo:ht,ariaGrabbed:Ut,ariaHasPopup:null,ariaHidden:Ut,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ht,ariaLevel:me,ariaLive:null,ariaModal:Ut,ariaMultiLine:Ut,ariaMultiSelectable:Ut,ariaOrientation:null,ariaOwns:ht,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:Ut,ariaReadOnly:Ut,ariaRelevant:null,ariaRequired:Ut,ariaRoleDescription:ht,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:Ut,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null}}),SO=Ys({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:RE,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qs,acceptCharset:ht,accessKey:ht,action:null,allow:null,allowFullScreen:Ve,allowPaymentRequest:Ve,allowUserMedia:Ve,alt:null,as:null,async:Ve,autoCapitalize:null,autoComplete:ht,autoFocus:Ve,autoPlay:Ve,blocking:ht,capture:null,charSet:null,checked:Ve,cite:null,className:ht,cols:me,colSpan:null,content:null,contentEditable:Ut,controls:Ve,controlsList:ht,coords:me|qs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ve,defer:Ve,dir:null,dirName:null,disabled:Ve,download:kE,draggable:Ut,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ve,formTarget:null,headers:ht,height:me,hidden:Ve,high:me,href:null,hrefLang:null,htmlFor:ht,httpEquiv:ht,id:null,imageSizes:null,imageSrcSet:null,inert:Ve,inputMode:null,integrity:null,is:null,isMap:Ve,itemId:null,itemProp:ht,itemRef:ht,itemScope:Ve,itemType:ht,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ve,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:Ve,muted:Ve,name:null,nonce:null,noModule:Ve,noValidate:Ve,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:Ve,optimum:me,pattern:null,ping:ht,placeholder:null,playsInline:Ve,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ve,referrerPolicy:null,rel:ht,required:Ve,reversed:Ve,rows:me,rowSpan:me,sandbox:ht,scope:null,scoped:Ve,seamless:Ve,selected:Ve,shadowRootClonable:Ve,shadowRootDelegatesFocus:Ve,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:Ut,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:Ve,useMap:null,value:Ut,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ht,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ve,declare:Ve,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:Ve,noHref:Ve,noShade:Ve,noWrap:Ve,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:Ut,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ve,disableRemotePlayback:Ve,prefix:null,property:null,results:me,security:null,unselectable:null}}),CO=Ys({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:PE,properties:{about:Ln,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:ht,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:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:Ve,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,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:qs,g2:qs,glyphName:qs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:Ln,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,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:me,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:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ht,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ln,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ln,rev:Ln,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ln,requiredFeatures:Ln,requiredFonts:Ln,requiredFormats:Ln,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:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:Ln,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ln,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ln,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),AO=/^data[-\w.:]+$/i,ME=/-[a-z]/g,vO=/[A-Z]/g;function kO(e,t){const n=$f(t);let r=t,o=Yn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&AO.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(ME,OO);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!ME.test(a)){let u=a.replace(vO,NO);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Yf}return new o(r,t)}function NO(e){return"-"+e.toLowerCase()}function OO(e){return e.charAt(1).toUpperCase()}const IO=vE([IE,OE,LE,DE,SO],"html"),FE=vE([IE,OE,LE,DE,CO],"svg"),BE={}.hasOwnProperty;function UE(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&BE.call(o,e)){const d=String(o[e]);u=BE.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 PO={},RO={}.hasOwnProperty,HE=UE("type",{handlers:{root:DO,element:HO,text:BO,comment:UO,doctype:FO}});function LO(e,t){const r=(t||PO).space;return HE(e,r==="svg"?FE:IO)}function DO(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Wf(e.children,n,t),Ws(e,n),n}function MO(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Wf(e.children,n,t),Ws(e,n),n}function FO(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ws(e,t),t}function BO(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ws(e,t),t}function UO(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ws(e,t),t}function HO(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=FE);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&RO.call(e.properties,a)){const d=zO(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:ts[u],childNodes:[],parentNode:null};return c.childNodes=Wf(e.children,c,r),Ws(e,c),e.tagName==="template"&&e.content&&(c.content=MO(e.content,r)),c}function zO(e,t,n){const r=kO(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?Zg(n):f1(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=ts[r.space]}return o}function Wf(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=HE(e[r],n);a.parentNode=t,o.push(a)}return o}function Ws(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 jO=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],$O=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]),_t="�";var k;(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"})(k||(k={}));const wn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function zE(e){return e>=55296&&e<=57343}function VO(e){return e>=56320&&e<=57343}function qO(e,t){return(e-55296)*1024+9216+t}function jE(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function $E(e){return e>=64976&&e<=65007||$O.has(e)}var ee;(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"})(ee||(ee={}));const YO=65536;class WO{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=YO,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(VO(n))return this.pos++,this._addGap(),qO(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,k.EOF;return this._err(ee.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,k.EOF;const r=this.html.charCodeAt(n);return r===k.CARRIAGE_RETURN?k.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,k.EOF;let t=this.html.charCodeAt(this.pos);return t===k.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,k.LINE_FEED):t===k.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,zE(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===k.LINE_FEED||t===k.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){jE(t)?this._err(ee.controlCharacterInInputStream):$E(t)&&this._err(ee.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var We;(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"})(We||(We={}));function VE(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 GO=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))),KO=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 QO(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=KO.get(e))!==null&&t!==void 0?t:e}var Wt;(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"})(Wt||(Wt={}));const XO=32;var pi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(pi||(pi={}));function Gf(e){return e>=Wt.ZERO&&e<=Wt.NINE}function JO(e){return e>=Wt.UPPER_A&&e<=Wt.UPPER_F||e>=Wt.LOWER_A&&e<=Wt.LOWER_F}function ZO(e){return e>=Wt.UPPER_A&&e<=Wt.UPPER_Z||e>=Wt.LOWER_A&&e<=Wt.LOWER_Z||Gf(e)}function eI(e){return e===Wt.EQUALS||ZO(e)}var Gt;(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"})(Gt||(Gt={}));var Yr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Yr||(Yr={}));class tI{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Gt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Yr.Strict}startEntity(t){this.decodeMode=t,this.state=Gt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Gt.EntityStart:return t.charCodeAt(n)===Wt.NUM?(this.state=Gt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Gt.NamedEntity,this.stateNamedEntity(t,n));case Gt.NumericStart:return this.stateNumericStart(t,n);case Gt.NumericDecimal:return this.stateNumericDecimal(t,n);case Gt.NumericHex:return this.stateNumericHex(t,n);case Gt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|XO)===Wt.LOWER_X?(this.state=Gt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Gt.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(Gf(o)||JO(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(Gf(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===Wt.SEMI)this.consumed+=1;else if(this.decodeMode===Yr.Strict)return 0;return this.emitCodePoint(QO(this.result),this.consumed),this.errors&&(t!==Wt.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&pi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=nI(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Yr.Attribute&&(a===0||eI(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&pi.VALUE_LENGTH)>>14,a!==0){if(u===Wt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Yr.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]&pi.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]&~pi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Gt.NamedEntity:return this.result!==0&&(this.decodeMode!==Yr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Gt.NumericDecimal:return this.emitNumericEntity(0,2);case Gt.NumericHex:return this.emitNumericEntity(0,3);case Gt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Gt.EntityStart:return 0}}}function nI(e,t,n,r){const o=(t&pi.BRANCH_LENGTH)>>7,a=t&pi.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 ie;(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/"})(ie||(ie={}));var rs;(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"})(rs||(rs={}));var Wn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Wn||(Wn={}));var j;(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"})(j||(j={}));var p;(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"})(p||(p={}));const rI=new Map([[j.A,p.A],[j.ADDRESS,p.ADDRESS],[j.ANNOTATION_XML,p.ANNOTATION_XML],[j.APPLET,p.APPLET],[j.AREA,p.AREA],[j.ARTICLE,p.ARTICLE],[j.ASIDE,p.ASIDE],[j.B,p.B],[j.BASE,p.BASE],[j.BASEFONT,p.BASEFONT],[j.BGSOUND,p.BGSOUND],[j.BIG,p.BIG],[j.BLOCKQUOTE,p.BLOCKQUOTE],[j.BODY,p.BODY],[j.BR,p.BR],[j.BUTTON,p.BUTTON],[j.CAPTION,p.CAPTION],[j.CENTER,p.CENTER],[j.CODE,p.CODE],[j.COL,p.COL],[j.COLGROUP,p.COLGROUP],[j.DD,p.DD],[j.DESC,p.DESC],[j.DETAILS,p.DETAILS],[j.DIALOG,p.DIALOG],[j.DIR,p.DIR],[j.DIV,p.DIV],[j.DL,p.DL],[j.DT,p.DT],[j.EM,p.EM],[j.EMBED,p.EMBED],[j.FIELDSET,p.FIELDSET],[j.FIGCAPTION,p.FIGCAPTION],[j.FIGURE,p.FIGURE],[j.FONT,p.FONT],[j.FOOTER,p.FOOTER],[j.FOREIGN_OBJECT,p.FOREIGN_OBJECT],[j.FORM,p.FORM],[j.FRAME,p.FRAME],[j.FRAMESET,p.FRAMESET],[j.H1,p.H1],[j.H2,p.H2],[j.H3,p.H3],[j.H4,p.H4],[j.H5,p.H5],[j.H6,p.H6],[j.HEAD,p.HEAD],[j.HEADER,p.HEADER],[j.HGROUP,p.HGROUP],[j.HR,p.HR],[j.HTML,p.HTML],[j.I,p.I],[j.IMG,p.IMG],[j.IMAGE,p.IMAGE],[j.INPUT,p.INPUT],[j.IFRAME,p.IFRAME],[j.KEYGEN,p.KEYGEN],[j.LABEL,p.LABEL],[j.LI,p.LI],[j.LINK,p.LINK],[j.LISTING,p.LISTING],[j.MAIN,p.MAIN],[j.MALIGNMARK,p.MALIGNMARK],[j.MARQUEE,p.MARQUEE],[j.MATH,p.MATH],[j.MENU,p.MENU],[j.META,p.META],[j.MGLYPH,p.MGLYPH],[j.MI,p.MI],[j.MO,p.MO],[j.MN,p.MN],[j.MS,p.MS],[j.MTEXT,p.MTEXT],[j.NAV,p.NAV],[j.NOBR,p.NOBR],[j.NOFRAMES,p.NOFRAMES],[j.NOEMBED,p.NOEMBED],[j.NOSCRIPT,p.NOSCRIPT],[j.OBJECT,p.OBJECT],[j.OL,p.OL],[j.OPTGROUP,p.OPTGROUP],[j.OPTION,p.OPTION],[j.P,p.P],[j.PARAM,p.PARAM],[j.PLAINTEXT,p.PLAINTEXT],[j.PRE,p.PRE],[j.RB,p.RB],[j.RP,p.RP],[j.RT,p.RT],[j.RTC,p.RTC],[j.RUBY,p.RUBY],[j.S,p.S],[j.SCRIPT,p.SCRIPT],[j.SEARCH,p.SEARCH],[j.SECTION,p.SECTION],[j.SELECT,p.SELECT],[j.SOURCE,p.SOURCE],[j.SMALL,p.SMALL],[j.SPAN,p.SPAN],[j.STRIKE,p.STRIKE],[j.STRONG,p.STRONG],[j.STYLE,p.STYLE],[j.SUB,p.SUB],[j.SUMMARY,p.SUMMARY],[j.SUP,p.SUP],[j.TABLE,p.TABLE],[j.TBODY,p.TBODY],[j.TEMPLATE,p.TEMPLATE],[j.TEXTAREA,p.TEXTAREA],[j.TFOOT,p.TFOOT],[j.TD,p.TD],[j.TH,p.TH],[j.THEAD,p.THEAD],[j.TITLE,p.TITLE],[j.TR,p.TR],[j.TRACK,p.TRACK],[j.TT,p.TT],[j.U,p.U],[j.UL,p.UL],[j.SVG,p.SVG],[j.VAR,p.VAR],[j.WBR,p.WBR],[j.XMP,p.XMP]]);function Gs(e){var t;return(t=rI.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const ce=p,iI={[ie.HTML]:new Set([ce.ADDRESS,ce.APPLET,ce.AREA,ce.ARTICLE,ce.ASIDE,ce.BASE,ce.BASEFONT,ce.BGSOUND,ce.BLOCKQUOTE,ce.BODY,ce.BR,ce.BUTTON,ce.CAPTION,ce.CENTER,ce.COL,ce.COLGROUP,ce.DD,ce.DETAILS,ce.DIR,ce.DIV,ce.DL,ce.DT,ce.EMBED,ce.FIELDSET,ce.FIGCAPTION,ce.FIGURE,ce.FOOTER,ce.FORM,ce.FRAME,ce.FRAMESET,ce.H1,ce.H2,ce.H3,ce.H4,ce.H5,ce.H6,ce.HEAD,ce.HEADER,ce.HGROUP,ce.HR,ce.HTML,ce.IFRAME,ce.IMG,ce.INPUT,ce.LI,ce.LINK,ce.LISTING,ce.MAIN,ce.MARQUEE,ce.MENU,ce.META,ce.NAV,ce.NOEMBED,ce.NOFRAMES,ce.NOSCRIPT,ce.OBJECT,ce.OL,ce.P,ce.PARAM,ce.PLAINTEXT,ce.PRE,ce.SCRIPT,ce.SECTION,ce.SELECT,ce.SOURCE,ce.STYLE,ce.SUMMARY,ce.TABLE,ce.TBODY,ce.TD,ce.TEMPLATE,ce.TEXTAREA,ce.TFOOT,ce.TH,ce.THEAD,ce.TITLE,ce.TR,ce.TRACK,ce.UL,ce.WBR,ce.XMP]),[ie.MATHML]:new Set([ce.MI,ce.MO,ce.MN,ce.MS,ce.MTEXT,ce.ANNOTATION_XML]),[ie.SVG]:new Set([ce.TITLE,ce.FOREIGN_OBJECT,ce.DESC]),[ie.XLINK]:new Set,[ie.XML]:new Set,[ie.XMLNS]:new Set},Kf=new Set([ce.H1,ce.H2,ce.H3,ce.H4,ce.H5,ce.H6]);j.STYLE,j.SCRIPT,j.XMP,j.IFRAME,j.NOEMBED,j.NOFRAMES,j.PLAINTEXT;var N;(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"})(N||(N={}));const Lt={DATA:N.DATA,RCDATA:N.RCDATA,RAWTEXT:N.RAWTEXT,SCRIPT_DATA:N.SCRIPT_DATA,PLAINTEXT:N.PLAINTEXT,CDATA_SECTION:N.CDATA_SECTION};function sI(e){return e>=k.DIGIT_0&&e<=k.DIGIT_9}function ga(e){return e>=k.LATIN_CAPITAL_A&&e<=k.LATIN_CAPITAL_Z}function oI(e){return e>=k.LATIN_SMALL_A&&e<=k.LATIN_SMALL_Z}function mi(e){return oI(e)||ga(e)}function qE(e){return mi(e)||sI(e)}function El(e){return e+32}function YE(e){return e===k.SPACE||e===k.LINE_FEED||e===k.TABULATION||e===k.FORM_FEED}function WE(e){return YE(e)||e===k.SOLIDUS||e===k.GREATER_THAN_SIGN}function aI(e){return e===k.NULL?ee.nullCharacterReference:e>1114111?ee.characterReferenceOutsideUnicodeRange:zE(e)?ee.surrogateCharacterReference:$E(e)?ee.noncharacterCharacterReference:jE(e)||e===k.CARRIAGE_RETURN?ee.controlCharacterReference:null}class uI{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=N.DATA,this.returnState=N.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new WO(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new tI(GO,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ee.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ee.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=aI(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:We.START_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:We.END_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:We.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:We.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(VE(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(ee.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=Gs(t.tagName),t.type===We.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ee.endTagWithAttributes),t.selfClosing&&this._err(ee.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 We.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case We.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case We.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:We.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=YE(t)?We.WHITESPACE_CHARACTER:t===k.NULL?We.NULL_CHARACTER:We.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(We.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=N.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Yr.Attribute:Yr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===N.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case N.DATA:{this._stateData(t);break}case N.RCDATA:{this._stateRcdata(t);break}case N.RAWTEXT:{this._stateRawtext(t);break}case N.SCRIPT_DATA:{this._stateScriptData(t);break}case N.PLAINTEXT:{this._statePlaintext(t);break}case N.TAG_OPEN:{this._stateTagOpen(t);break}case N.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case N.TAG_NAME:{this._stateTagName(t);break}case N.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case N.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case N.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case N.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case N.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case N.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case N.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case N.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case N.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case N.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case N.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case N.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case N.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case N.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case N.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case N.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case N.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case N.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case N.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case N.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case N.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case N.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case N.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case N.BOGUS_COMMENT:{this._stateBogusComment(t);break}case N.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case N.COMMENT_START:{this._stateCommentStart(t);break}case N.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case N.COMMENT:{this._stateComment(t);break}case N.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case N.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case N.COMMENT_END:{this._stateCommentEnd(t);break}case N.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case N.DOCTYPE:{this._stateDoctype(t);break}case N.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case N.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case N.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case N.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case N.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case N.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case N.CDATA_SECTION:{this._stateCdataSection(t);break}case N.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case N.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case N.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case N.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case k.LESS_THAN_SIGN:{this.state=N.TAG_OPEN;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this._emitCodePoint(t);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case k.AMPERSAND:{this._startCharacterReference();break}case k.LESS_THAN_SIGN:{this.state=N.RCDATA_LESS_THAN_SIGN;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(_t);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case k.LESS_THAN_SIGN:{this.state=N.RAWTEXT_LESS_THAN_SIGN;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(_t);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case k.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_LESS_THAN_SIGN;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(_t);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case k.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(_t);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(mi(t))this._createStartTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case k.EXCLAMATION_MARK:{this.state=N.MARKUP_DECLARATION_OPEN;break}case k.SOLIDUS:{this.state=N.END_TAG_OPEN;break}case k.QUESTION_MARK:{this._err(ee.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t);break}case k.EOF:{this._err(ee.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ee.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=N.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(mi(t))this._createEndTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case k.GREATER_THAN_SIGN:{this._err(ee.missingEndTagName),this.state=N.DATA;break}case k.EOF:{this._err(ee.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ee.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=N.BEFORE_ATTRIBUTE_NAME;break}case k.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case k.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case k.NULL:{this._err(ee.unexpectedNullCharacter),n.tagName+=_t;break}case k.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(ga(t)?El(t):t)}}_stateRcdataLessThanSign(t){t===k.SOLIDUS?this.state=N.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){mi(t)?(this.state=N.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=N.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 k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=N.BEFORE_ATTRIBUTE_NAME,!1;case k.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=N.SELF_CLOSING_START_TAG,!1;case k.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=N.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===k.SOLIDUS?this.state=N.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){mi(t)?(this.state=N.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case k.SOLIDUS:{this.state=N.SCRIPT_DATA_END_TAG_OPEN;break}case k.EXCLAMATION_MARK:{this.state=N.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=N.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){mi(t)?(this.state=N.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===k.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===k.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case k.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(_t);break}case k.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case k.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(_t);break}case k.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case k.HYPHEN_MINUS:{this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(_t);break}case k.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===k.SOLIDUS?this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:mi(t)?(this._emitChars("<"),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){mi(t)?(this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(wn.SCRIPT,!1)&&WE(this.preprocessor.peek(wn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<wn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case k.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(_t);break}case k.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case k.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_t);break}case k.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case k.HYPHEN_MINUS:{this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_t);break}case k.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===k.SOLIDUS?(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(wn.SCRIPT,!1)&&WE(this.preprocessor.peek(wn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<wn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.SOLIDUS:case k.GREATER_THAN_SIGN:case k.EOF:{this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case k.EQUALS_SIGN:{this._err(ee.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=N.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:case k.SOLIDUS:case k.GREATER_THAN_SIGN:case k.EOF:{this._leaveAttrName(),this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case k.EQUALS_SIGN:{this._leaveAttrName(),this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case k.QUOTATION_MARK:case k.APOSTROPHE:case k.LESS_THAN_SIGN:{this._err(ee.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.name+=_t;break}default:this.currentAttr.name+=String.fromCodePoint(ga(t)?El(t):t)}}_stateAfterAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case k.EQUALS_SIGN:{this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case k.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{this.state=N.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this.state=N.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ee.missingAttributeValue),this.state=N.DATA,this.emitCurrentTagToken();break}default:this.state=N.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case k.QUOTATION_MARK:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case k.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case k.APOSTROPHE:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case k.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case k.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case k.QUOTATION_MARK:case k.APOSTROPHE:case k.LESS_THAN_SIGN:case k.EQUALS_SIGN:case k.GRAVE_ACCENT:{this._err(ee.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case k.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case k.SOLIDUS:{this._leaveAttrValue(),this.state=N.SELF_CLOSING_START_TAG;break}case k.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this._err(ee.missingWhitespaceBetweenAttributes),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case k.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=N.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this._err(ee.unexpectedSolidusInTag),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case k.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case k.NULL:{this._err(ee.unexpectedNullCharacter),n.data+=_t;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(wn.DASH_DASH,!0)?(this._createCommentToken(wn.DASH_DASH.length+1),this.state=N.COMMENT_START):this._consumeSequenceIfMatch(wn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(wn.DOCTYPE.length+1),this.state=N.DOCTYPE):this._consumeSequenceIfMatch(wn.CDATA_START,!0)?this.inForeignNode?this.state=N.CDATA_SECTION:(this._err(ee.cdataInHtmlContent),this._createCommentToken(wn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=N.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ee.incorrectlyOpenedComment),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case k.HYPHEN_MINUS:{this.state=N.COMMENT_START_DASH;break}case k.GREATER_THAN_SIGN:{this._err(ee.abruptClosingOfEmptyComment),this.state=N.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case k.GREATER_THAN_SIGN:{this._err(ee.abruptClosingOfEmptyComment),this.state=N.DATA,this.emitCurrentComment(n);break}case k.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=N.COMMENT_END_DASH;break}case k.LESS_THAN_SIGN:{n.data+="<",this.state=N.COMMENT_LESS_THAN_SIGN;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),n.data+=_t;break}case k.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case k.EXCLAMATION_MARK:{n.data+="!",this.state=N.COMMENT_LESS_THAN_SIGN_BANG;break}case k.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===k.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=N.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===k.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=N.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==k.GREATER_THAN_SIGN&&t!==k.EOF&&this._err(ee.nestedComment),this.state=N.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case k.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case k.EXCLAMATION_MARK:{this.state=N.COMMENT_END_BANG;break}case k.HYPHEN_MINUS:{n.data+="-";break}case k.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{n.data+="--!",this.state=N.COMMENT_END_DASH;break}case k.GREATER_THAN_SIGN:{this._err(ee.incorrectlyClosedComment),this.state=N.DATA,this.emitCurrentComment(n);break}case k.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=N.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case k.EOF:{this._err(ee.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingWhitespaceBeforeDoctypeName),this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(ga(t))this._createDoctypeToken(String.fromCharCode(El(t))),this.state=N.DOCTYPE_NAME;else switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.NULL:{this._err(ee.unexpectedNullCharacter),this._createDoctypeToken(_t),this.state=N.DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case k.EOF:{this._err(ee.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=N.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=N.AFTER_DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case k.NULL:{this._err(ee.unexpectedNullCharacter),n.name+=_t;break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(ga(t)?El(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(wn.PUBLIC,!1)?this.state=N.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(wn.SYSTEM,!1)?this.state=N.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ee.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.QUOTATION_MARK:{this._err(ee.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(ee.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ee.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ee.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case k.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),n.publicId+=_t;break}case k.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case k.EOF:{this._err(ee.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 k.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),n.publicId+=_t;break}case k.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case k.EOF:{this._err(ee.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 k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case k.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case k.QUOTATION_MARK:{this._err(ee.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(ee.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case k.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.QUOTATION_MARK:{this._err(ee.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(ee.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case k.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),n.systemId+=_t;break}case k.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case k.EOF:{this._err(ee.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 k.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.NULL:{this._err(ee.unexpectedNullCharacter),n.systemId+=_t;break}case k.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case k.EOF:{this._err(ee.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 k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case k.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case k.NULL:{this._err(ee.unexpectedNullCharacter);break}case k.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case k.RIGHT_SQUARE_BRACKET:{this.state=N.CDATA_SECTION_BRACKET;break}case k.EOF:{this._err(ee.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===k.RIGHT_SQUARE_BRACKET?this.state=N.CDATA_SECTION_END:(this._emitChars("]"),this.state=N.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case k.GREATER_THAN_SIGN:{this.state=N.DATA;break}case k.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=N.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(k.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&qE(this.preprocessor.peek(1))?N.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){qE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===k.SEMICOLON&&this._err(ee.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const GE=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),KE=new Set([...GE,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),yl=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),lI=new Set([...yl,p.OL,p.UL]),cI=new Set([...yl,p.BUTTON]),QE=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),XE=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),dI=new Set([p.TR,p.TEMPLATE,p.HTML]),fI=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),hI=new Set([p.TABLE,p.TEMPLATE,p.HTML]),pI=new Set([p.TD,p.TH]);class mI{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=p.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===p.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ie.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])!==ie.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(Kf,ie.HTML)}popUntilTableCellPopped(){this.popUntilPopped(pI,ie.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(hI,ie.HTML)}clearBackToTableBodyContext(){this.clearBackTo(fI,ie.HTML)}clearBackToTableRowContext(){this.clearBackTo(dI,ie.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]===p.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]===p.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 ie.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case ie.SVG:{if(XE.has(o))return!1;break}case ie.MATHML:{if(QE.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,yl)}hasInListItemScope(t){return this.hasInDynamicScope(t,lI)}hasInButtonScope(t){return this.hasInDynamicScope(t,cI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ie.HTML:{if(Kf.has(n))return!0;if(yl.has(n))return!1;break}case ie.SVG:{if(XE.has(n))return!1;break}case ie.MATHML:{if(QE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ie.HTML)switch(this.tagIDs[n]){case t:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ie.HTML)switch(this.tagIDs[t]){case p.TBODY:case p.THEAD:case p.TFOOT:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ie.HTML)switch(this.tagIDs[n]){case t:return!0;case p.OPTION:case p.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&GE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&KE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&KE.has(this.currentTagId);)this.pop()}}const Qf=3;var vr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(vr||(vr={}));const JE={type:vr.Marker};class gI{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===vr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const m=this.treeAdapter.getAttrList(f);m.length===o&&r.push({idx:c,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Qf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Qf)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>=Qf&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(JE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:vr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:vr.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(JE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===vr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===vr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===vr.Element&&n.element===t)}}const gi={createDocument(){return{nodeName:"#document",mode:Wn.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};gi.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(gi.isTextNode(n)){n.value+=t;return}}gi.appendChild(e,gi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&gi.isTextNode(r)?r.value+=t:gi.insertBefore(e,gi.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=H(H({},e.sourceCodeLocation),t)}},ZE="html",EI="about:legacy-compat",yI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",ey=["+//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//"],bI=[...ey,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],TI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),ty=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],_I=[...ty,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ny(e,t){return t.some(n=>e.startsWith(n))}function xI(e){return e.name===ZE&&e.publicId===null&&(e.systemId===null||e.systemId===EI)}function wI(e){if(e.name!==ZE)return Wn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===yI)return Wn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),TI.has(n))return Wn.QUIRKS;let r=t===null?bI:ey;if(ny(n,r))return Wn.QUIRKS;if(r=t===null?ty:_I,ny(n,r))return Wn.LIMITED_QUIRKS}return Wn.NO_QUIRKS}const ry={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},SI="definitionurl",CI="definitionURL",AI=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])),vI=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ie.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ie.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ie.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ie.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ie.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ie.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ie.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ie.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ie.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ie.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ie.XMLNS}]]),kI=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])),NI=new Set([p.B,p.BIG,p.BLOCKQUOTE,p.BODY,p.BR,p.CENTER,p.CODE,p.DD,p.DIV,p.DL,p.DT,p.EM,p.EMBED,p.H1,p.H2,p.H3,p.H4,p.H5,p.H6,p.HEAD,p.HR,p.I,p.IMG,p.LI,p.LISTING,p.MENU,p.META,p.NOBR,p.OL,p.P,p.PRE,p.RUBY,p.S,p.SMALL,p.SPAN,p.STRONG,p.STRIKE,p.SUB,p.SUP,p.TABLE,p.TT,p.U,p.UL,p.VAR]);function OI(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:r})=>r===rs.COLOR||r===rs.SIZE||r===rs.FACE)||NI.has(t)}function iy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===SI){e.attrs[t].name=CI;break}}function sy(e){for(let t=0;t<e.attrs.length;t++){const n=AI.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Xf(e){for(let t=0;t<e.attrs.length;t++){const n=vI.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 II(e){const t=kI.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Gs(e.tagName))}function PI(e,t){return t===ie.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function RI(e,t,n){if(t===ie.MATHML&&e===p.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===rs.ENCODING){const o=n[r].value.toLowerCase();return o===ry.TEXT_HTML||o===ry.APPLICATION_XML}}return t===ie.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function LI(e,t,n,r){return(!r||r===ie.HTML)&&RI(e,t,n)||(!r||r===ie.MATHML)&&PI(e,t)}const DI="hidden",MI=8,FI=3;var P;(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"})(P||(P={}));const BI={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},oy=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),ay={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:gi,onParseError:null};class uy{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=P.INITIAL,this.originalInsertionMode=P.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=H(H({},ay),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 uI(this.options,this),this.activeFormattingElements=new gI(this.treeAdapter),this.fragmentContextID=r?Gs(this.treeAdapter.getTagName(r)):p.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new mI(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=H(H({},ay),n);t!=null||(t=r.treeAdapter.createElement(j.TEMPLATE,ie.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ie.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===p.TEMPLATE&&a.tmplInsertionModeStack.unshift(P.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:BI,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)===ie.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ie.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=P.TEXT}switchToPlaintextParsing(){this.insertionMode=P.TEXT,this.originalInsertionMode=P.IN_BODY,this.tokenizer.state=Lt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===j.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ie.HTML))switch(this.fragmentContextID){case p.TITLE:case p.TEXTAREA:{this.tokenizer.state=Lt.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=Lt.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=Lt.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=Lt.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&&Te(H({},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,ie.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ie.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(j.HTML,ie.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,p.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:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:m})}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===We.END_TAG&&o===n.tagName?{endTag:H({},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===p.SVG&&this.treeAdapter.getTagName(n)===j.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ie.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===p.MGLYPH||t.tagID===p.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ie.HTML)}_processToken(t){switch(t.type){case We.CHARACTER:{this.onCharacter(t);break}case We.NULL_CHARACTER:{this.onNullCharacter(t);break}case We.COMMENT:{this.onComment(t);break}case We.DOCTYPE:{this.onDoctype(t);break}case We.START_TAG:{this._processStartTag(t);break}case We.END_TAG:{this.onEndTag(t);break}case We.EOF:{this.onEof(t);break}case We.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return LI(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===vr.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=P.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(p.P),this.openElements.popUntilTagNamePopped(p.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case p.TR:{this.insertionMode=P.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=P.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=P.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=P.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=P.IN_TABLE;return}case p.BODY:{this.insertionMode=P.IN_BODY;return}case p.FRAMESET:{this.insertionMode=P.IN_FRAMESET;return}case p.SELECT:{this._resetInsertionModeForSelect(t);return}case p.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case p.HTML:{this.insertionMode=this.headElement?P.AFTER_HEAD:P.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=P.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=P.IN_HEAD;return}break}}this.insertionMode=P.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===p.TEMPLATE)break;if(r===p.TABLE){this.insertionMode=P.IN_SELECT_IN_TABLE;return}}this.insertionMode=P.IN_SELECT}_isElementCausesFosterParenting(t){return oy.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 p.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ie.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case p.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 iI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){pR(this,t);return}switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{ya(this,t);break}case P.BEFORE_HEAD:{ba(this,t);break}case P.IN_HEAD:{Ta(this,t);break}case P.IN_HEAD_NO_SCRIPT:{_a(this,t);break}case P.AFTER_HEAD:{xa(this,t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:{cy(this,t);break}case P.TEXT:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{th(this,t);break}case P.IN_TABLE_TEXT:{yy(this,t);break}case P.IN_COLUMN_GROUP:{_l(this,t);break}case P.AFTER_BODY:{Sl(this,t);break}case P.AFTER_AFTER_BODY:{Cl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){hR(this,t);return}switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{ya(this,t);break}case P.BEFORE_HEAD:{ba(this,t);break}case P.IN_HEAD:{Ta(this,t);break}case P.IN_HEAD_NO_SCRIPT:{_a(this,t);break}case P.AFTER_HEAD:{xa(this,t);break}case P.TEXT:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{th(this,t);break}case P.IN_COLUMN_GROUP:{_l(this,t);break}case P.AFTER_BODY:{Sl(this,t);break}case P.AFTER_AFTER_BODY:{Cl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Zf(this,t);return}switch(this.insertionMode){case P.INITIAL:case P.BEFORE_HTML:case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_TEMPLATE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{Zf(this,t);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}case P.AFTER_BODY:{qI(this,t);break}case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{YI(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case P.INITIAL:{WI(this,t);break}case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:{this._err(t,ee.misplacedDoctype);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ee.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?mR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{GI(this,t);break}case P.BEFORE_HEAD:{QI(this,t);break}case P.IN_HEAD:{lr(this,t);break}case P.IN_HEAD_NO_SCRIPT:{ZI(this,t);break}case P.AFTER_HEAD:{tP(this,t);break}case P.IN_BODY:{un(this,t);break}case P.IN_TABLE:{Ks(this,t);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}case P.IN_CAPTION:{XP(this,t);break}case P.IN_COLUMN_GROUP:{nh(this,t);break}case P.IN_TABLE_BODY:{xl(this,t);break}case P.IN_ROW:{wl(this,t);break}case P.IN_CELL:{eR(this,t);break}case P.IN_SELECT:{_y(this,t);break}case P.IN_SELECT_IN_TABLE:{nR(this,t);break}case P.IN_TEMPLATE:{iR(this,t);break}case P.AFTER_BODY:{oR(this,t);break}case P.IN_FRAMESET:{aR(this,t);break}case P.AFTER_FRAMESET:{lR(this,t);break}case P.AFTER_AFTER_BODY:{dR(this,t);break}case P.AFTER_AFTER_FRAMESET:{fR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?gR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{KI(this,t);break}case P.BEFORE_HEAD:{XI(this,t);break}case P.IN_HEAD:{JI(this,t);break}case P.IN_HEAD_NO_SCRIPT:{eP(this,t);break}case P.AFTER_HEAD:{nP(this,t);break}case P.IN_BODY:{Tl(this,t);break}case P.TEXT:{zP(this,t);break}case P.IN_TABLE:{wa(this,t);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}case P.IN_CAPTION:{JP(this,t);break}case P.IN_COLUMN_GROUP:{ZP(this,t);break}case P.IN_TABLE_BODY:{rh(this,t);break}case P.IN_ROW:{Ty(this,t);break}case P.IN_CELL:{tR(this,t);break}case P.IN_SELECT:{xy(this,t);break}case P.IN_SELECT_IN_TABLE:{rR(this,t);break}case P.IN_TEMPLATE:{sR(this,t);break}case P.AFTER_BODY:{Sy(this,t);break}case P.IN_FRAMESET:{uR(this,t);break}case P.AFTER_FRAMESET:{cR(this,t);break}case P.AFTER_AFTER_BODY:{Cl(this,t);break}}}onEof(t){switch(this.insertionMode){case P.INITIAL:{Ea(this,t);break}case P.BEFORE_HTML:{ya(this,t);break}case P.BEFORE_HEAD:{ba(this,t);break}case P.IN_HEAD:{Ta(this,t);break}case P.IN_HEAD_NO_SCRIPT:{_a(this,t);break}case P.AFTER_HEAD:{xa(this,t);break}case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{gy(this,t);break}case P.TEXT:{jP(this,t);break}case P.IN_TABLE_TEXT:{Ca(this,t);break}case P.IN_TEMPLATE:{wy(this,t);break}case P.AFTER_BODY:case P.IN_FRAMESET:case P.AFTER_FRAMESET:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{eh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===k.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 P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.TEXT:case P.IN_COLUMN_GROUP:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{this._insertCharacters(t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:case P.AFTER_BODY:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{ly(this,t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{th(this,t);break}case P.IN_TABLE_TEXT:{Ey(this,t);break}}}}function UI(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):my(e,t),n}function HI(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 zI(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>=FI;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=jI(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function jI(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 $I(e,t,n){const r=e.treeAdapter.getTagName(t),o=Gs(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===p.TEMPLATE&&a===ie.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function VI(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 Jf(e,t){for(let n=0;n<MI;n++){const r=UI(e,t);if(!r)break;const o=HI(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=zI(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&$I(e,u,a),VI(e,o,r)}}function Zf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function qI(e,t){e._appendCommentNode(t,e.openElements.items[0])}function YI(e,t){e._appendCommentNode(t,e.document)}function eh(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],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 WI(e,t){e._setDocumentType(t);const n=t.forceQuirks?Wn.QUIRKS:wI(t);xI(t)||e._err(t,ee.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=P.BEFORE_HTML}function Ea(e,t){e._err(t,ee.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Wn.QUIRKS),e.insertionMode=P.BEFORE_HTML,e._processToken(t)}function GI(e,t){t.tagID===p.HTML?(e._insertElement(t,ie.HTML),e.insertionMode=P.BEFORE_HEAD):ya(e,t)}function KI(e,t){const n=t.tagID;(n===p.HTML||n===p.HEAD||n===p.BODY||n===p.BR)&&ya(e,t)}function ya(e,t){e._insertFakeRootElement(),e.insertionMode=P.BEFORE_HEAD,e._processToken(t)}function QI(e,t){switch(t.tagID){case p.HTML:{un(e,t);break}case p.HEAD:{e._insertElement(t,ie.HTML),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD;break}default:ba(e,t)}}function XI(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?ba(e,t):e._err(t,ee.endTagWithoutMatchingOpenElement)}function ba(e,t){e._insertFakeElement(j.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD,e._processToken(t)}function lr(e,t){switch(t.tagID){case p.HTML:{un(e,t);break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case p.TITLE:{e._switchToTextParsing(t,Lt.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Lt.RAWTEXT):(e._insertElement(t,ie.HTML),e.insertionMode=P.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,Lt.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,Lt.SCRIPT_DATA);break}case p.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=P.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(P.IN_TEMPLATE);break}case p.HEAD:{e._err(t,ee.misplacedStartTagForHeadElement);break}default:Ta(e,t)}}function JI(e,t){switch(t.tagID){case p.HEAD:{e.openElements.pop(),e.insertionMode=P.AFTER_HEAD;break}case p.BODY:case p.BR:case p.HTML:{Ta(e,t);break}case p.TEMPLATE:{is(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function is(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,ee.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ee.endTagWithoutMatchingOpenElement)}function Ta(e,t){e.openElements.pop(),e.insertionMode=P.AFTER_HEAD,e._processToken(t)}function ZI(e,t){switch(t.tagID){case p.HTML:{un(e,t);break}case p.BASEFONT:case p.BGSOUND:case p.HEAD:case p.LINK:case p.META:case p.NOFRAMES:case p.STYLE:{lr(e,t);break}case p.NOSCRIPT:{e._err(t,ee.nestedNoscriptInHead);break}default:_a(e,t)}}function eP(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=P.IN_HEAD;break}case p.BR:{_a(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function _a(e,t){const n=t.type===We.EOF?ee.openElementsLeftAfterEof:ee.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=P.IN_HEAD,e._processToken(t)}function tP(e,t){switch(t.tagID){case p.HTML:{un(e,t);break}case p.BODY:{e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=P.IN_BODY;break}case p.FRAMESET:{e._insertElement(t,ie.HTML),e.insertionMode=P.IN_FRAMESET;break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{e._err(t,ee.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),lr(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,ee.misplacedStartTagForHeadElement);break}default:xa(e,t)}}function nP(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{xa(e,t);break}case p.TEMPLATE:{is(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function xa(e,t){e._insertFakeElement(j.BODY,p.BODY),e.insertionMode=P.IN_BODY,bl(e,t)}function bl(e,t){switch(t.type){case We.CHARACTER:{cy(e,t);break}case We.WHITESPACE_CHARACTER:{ly(e,t);break}case We.COMMENT:{Zf(e,t);break}case We.START_TAG:{un(e,t);break}case We.END_TAG:{Tl(e,t);break}case We.EOF:{gy(e,t);break}}}function ly(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function cy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function rP(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function iP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function sP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_FRAMESET)}function oP(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,ie.HTML)}function aP(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Kf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ie.HTML)}function uP(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function lP(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,ie.HTML),n||(e.formElement=e.openElements.current))}function cP(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===p.LI&&o===p.LI||(n===p.DD||n===p.DT)&&(o===p.DD||o===p.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==p.ADDRESS&&o!==p.DIV&&o!==p.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,ie.HTML)}function dP(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.tokenizer.state=Lt.PLAINTEXT}function fP(e,t){e.openElements.hasInScope(p.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.framesetOk=!1}function hP(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(j.A);n&&(Jf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function pP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mP(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(Jf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function gP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function EP(e,t){e.treeAdapter.getDocumentMode(e.document)!==Wn.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=P.IN_TABLE}function dy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ie.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function fy(e){const t=VE(e,rs.TYPE);return t!=null&&t.toLowerCase()===DI}function yP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ie.HTML),fy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function bP(e,t){e._appendElement(t,ie.HTML),t.ackSelfClosing=!0}function TP(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,ie.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function _P(e,t){t.tagName=j.IMG,t.tagID=p.IMG,dy(e,t)}function xP(e,t){e._insertElement(t,ie.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Lt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=P.TEXT}function wP(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function SP(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function hy(e,t){e._switchToTextParsing(t,Lt.RAWTEXT)}function CP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===P.IN_TABLE||e.insertionMode===P.IN_CAPTION||e.insertionMode===P.IN_TABLE_BODY||e.insertionMode===P.IN_ROW||e.insertionMode===P.IN_CELL?P.IN_SELECT_IN_TABLE:P.IN_SELECT}function AP(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML)}function vP(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ie.HTML)}function kP(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,ie.HTML)}function NP(e,t){e._reconstructActiveFormattingElements(),iy(t),Xf(t),t.selfClosing?e._appendElement(t,ie.MATHML):e._insertElement(t,ie.MATHML),t.ackSelfClosing=!0}function OP(e,t){e._reconstructActiveFormattingElements(),sy(t),Xf(t),t.selfClosing?e._appendElement(t,ie.SVG):e._insertElement(t,ie.SVG),t.ackSelfClosing=!0}function py(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML)}function un(e,t){switch(t.tagID){case p.I:case p.S:case p.B:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.SMALL:case p.STRIKE:case p.STRONG:{pP(e,t);break}case p.A:{hP(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{aP(e,t);break}case p.P:case p.DL:case p.OL:case p.UL:case p.DIV:case p.DIR:case p.NAV:case p.MAIN:case p.MENU:case p.ASIDE:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.DETAILS:case p.ADDRESS:case p.ARTICLE:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{oP(e,t);break}case p.LI:case p.DD:case p.DT:{cP(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{dy(e,t);break}case p.HR:{TP(e,t);break}case p.RB:case p.RTC:{vP(e,t);break}case p.RT:case p.RP:{kP(e,t);break}case p.PRE:case p.LISTING:{uP(e,t);break}case p.XMP:{wP(e,t);break}case p.SVG:{OP(e,t);break}case p.HTML:{rP(e,t);break}case p.BASE:case p.LINK:case p.META:case p.STYLE:case p.TITLE:case p.SCRIPT:case p.BGSOUND:case p.BASEFONT:case p.TEMPLATE:{lr(e,t);break}case p.BODY:{iP(e,t);break}case p.FORM:{lP(e,t);break}case p.NOBR:{mP(e,t);break}case p.MATH:{NP(e,t);break}case p.TABLE:{EP(e,t);break}case p.INPUT:{yP(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{bP(e,t);break}case p.IMAGE:{_P(e,t);break}case p.BUTTON:{fP(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{gP(e,t);break}case p.IFRAME:{SP(e,t);break}case p.SELECT:{CP(e,t);break}case p.OPTION:case p.OPTGROUP:{AP(e,t);break}case p.NOEMBED:case p.NOFRAMES:{hy(e,t);break}case p.FRAMESET:{sP(e,t);break}case p.TEXTAREA:{xP(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?hy(e,t):py(e,t);break}case p.PLAINTEXT:{dP(e,t);break}case p.COL:case p.TH:case p.TD:case p.TR:case p.HEAD:case p.FRAME:case p.TBODY:case p.TFOOT:case p.THEAD:case p.CAPTION:case p.COLGROUP:break;default:py(e,t)}}function IP(e,t){if(e.openElements.hasInScope(p.BODY)&&(e.insertionMode=P.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function PP(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=P.AFTER_BODY,Sy(e,t))}function RP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function LP(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(p.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(p.FORM):n&&e.openElements.remove(n))}function DP(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(j.P,p.P),e._closePElement()}function MP(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function FP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function BP(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function UP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function HP(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(j.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function my(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!==p.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 Tl(e,t){switch(t.tagID){case p.A:case p.B:case p.I:case p.S:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.NOBR:case p.SMALL:case p.STRIKE:case p.STRONG:{Jf(e,t);break}case p.P:{DP(e);break}case p.DL:case p.UL:case p.OL:case p.DIR:case p.DIV:case p.NAV:case p.PRE:case p.MAIN:case p.MENU:case p.ASIDE:case p.BUTTON:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.ADDRESS:case p.ARTICLE:case p.DETAILS:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.LISTING:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{RP(e,t);break}case p.LI:{MP(e);break}case p.DD:case p.DT:{FP(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{BP(e);break}case p.BR:{HP(e);break}case p.BODY:{IP(e,t);break}case p.HTML:{PP(e,t);break}case p.FORM:{LP(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{UP(e,t);break}case p.TEMPLATE:{is(e,t);break}default:my(e,t)}}function gy(e,t){e.tmplInsertionModeStack.length>0?wy(e,t):eh(e,t)}function zP(e,t){var n;t.tagID===p.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function jP(e,t){e._err(t,ee.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function th(e,t){if(e.openElements.currentTagId!==void 0&&oy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=P.IN_TABLE_TEXT,t.type){case We.CHARACTER:{yy(e,t);break}case We.WHITESPACE_CHARACTER:{Ey(e,t);break}}else Sa(e,t)}function $P(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_CAPTION}function VP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_COLUMN_GROUP}function qP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.COLGROUP,p.COLGROUP),e.insertionMode=P.IN_COLUMN_GROUP,nh(e,t)}function YP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_TABLE_BODY}function WP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.TBODY,p.TBODY),e.insertionMode=P.IN_TABLE_BODY,xl(e,t)}function GP(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function KP(e,t){fy(t)?e._appendElement(t,ie.HTML):Sa(e,t),t.ackSelfClosing=!0}function QP(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ie.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ks(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{WP(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{lr(e,t);break}case p.COL:{qP(e,t);break}case p.FORM:{QP(e,t);break}case p.TABLE:{GP(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{YP(e,t);break}case p.INPUT:{KP(e,t);break}case p.CAPTION:{$P(e,t);break}case p.COLGROUP:{VP(e,t);break}default:Sa(e,t)}}function wa(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{is(e,t);break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:Sa(e,t)}}function Sa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,bl(e,t),e.fosterParentingEnabled=n}function Ey(e,t){e.pendingCharacterTokens.push(t)}function yy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ca(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Sa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const by=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function XP(e,t){const n=t.tagID;by.has(n)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,Ks(e,t)):un(e,t)}function JP(e,t){const n=t.tagID;switch(n){case p.CAPTION:case p.TABLE:{e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,n===p.TABLE&&wa(e,t));break}case p.BODY:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:Tl(e,t)}}function nh(e,t){switch(t.tagID){case p.HTML:{un(e,t);break}case p.COL:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{lr(e,t);break}default:_l(e,t)}}function ZP(e,t){switch(t.tagID){case p.COLGROUP:{e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case p.TEMPLATE:{is(e,t);break}case p.COL:break;default:_l(e,t)}}function _l(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE,e._processToken(t))}function xl(e,t){switch(t.tagID){case p.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_ROW;break}case p.TH:case p.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(j.TR,p.TR),e.insertionMode=P.IN_ROW,wl(e,t);break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,Ks(e,t));break}default:Ks(e,t)}}function rh(e,t){const n=t.tagID;switch(t.tagID){case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case p.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,wa(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:case p.TR:break;default:wa(e,t)}}function wl(e,t){switch(t.tagID){case p.TH:case p.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_CELL,e.activeFormattingElements.insertMarker();break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,xl(e,t));break}default:Ks(e,t)}}function Ty(e,t){switch(t.tagID){case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY);break}case p.TABLE:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,rh(e,t));break}case p.TBODY:case p.TFOOT:case p.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(p.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,rh(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:break;default:wa(e,t)}}function eR(e,t){const n=t.tagID;by.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),wl(e,t)):un(e,t)}function tR(e,t){const n=t.tagID;switch(n){case p.TD:case p.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_ROW);break}case p.TABLE:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Ty(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:Tl(e,t)}}function _y(e,t){switch(t.tagID){case p.HTML:{un(e,t);break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._insertElement(t,ie.HTML);break}case p.OPTGROUP:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ie.HTML);break}case p.HR:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case p.INPUT:case p.KEYGEN:case p.TEXTAREA:case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),t.tagID!==p.SELECT&&e._processStartTag(t));break}case p.SCRIPT:case p.TEMPLATE:{lr(e,t);break}}}function xy(e,t){switch(t.tagID){case p.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===p.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===p.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop();break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop();break}case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode());break}case p.TEMPLATE:{is(e,t);break}}}function nR(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e._processStartTag(t)):_y(e,t)}function rR(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e.onEndTag(t)):xy(e,t)}function iR(e,t){switch(t.tagID){case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{lr(e,t);break}case p.CAPTION:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.tmplInsertionModeStack[0]=P.IN_TABLE,e.insertionMode=P.IN_TABLE,Ks(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=P.IN_COLUMN_GROUP,e.insertionMode=P.IN_COLUMN_GROUP,nh(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=P.IN_TABLE_BODY,e.insertionMode=P.IN_TABLE_BODY,xl(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=P.IN_ROW,e.insertionMode=P.IN_ROW,wl(e,t);break}default:e.tmplInsertionModeStack[0]=P.IN_BODY,e.insertionMode=P.IN_BODY,un(e,t)}}function sR(e,t){t.tagID===p.TEMPLATE&&is(e,t)}function wy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):eh(e,t)}function oR(e,t){t.tagID===p.HTML?un(e,t):Sl(e,t)}function Sy(e,t){var n;if(t.tagID===p.HTML){if(e.fragmentContext||(e.insertionMode=P.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===p.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 Sl(e,t)}function Sl(e,t){e.insertionMode=P.IN_BODY,bl(e,t)}function aR(e,t){switch(t.tagID){case p.HTML:{un(e,t);break}case p.FRAMESET:{e._insertElement(t,ie.HTML);break}case p.FRAME:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case p.NOFRAMES:{lr(e,t);break}}}function uR(e,t){t.tagID===p.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==p.FRAMESET&&(e.insertionMode=P.AFTER_FRAMESET))}function lR(e,t){switch(t.tagID){case p.HTML:{un(e,t);break}case p.NOFRAMES:{lr(e,t);break}}}function cR(e,t){t.tagID===p.HTML&&(e.insertionMode=P.AFTER_AFTER_FRAMESET)}function dR(e,t){t.tagID===p.HTML?un(e,t):Cl(e,t)}function Cl(e,t){e.insertionMode=P.IN_BODY,bl(e,t)}function fR(e,t){switch(t.tagID){case p.HTML:{un(e,t);break}case p.NOFRAMES:{lr(e,t);break}}}function hR(e,t){t.chars=_t,e._insertCharacters(t)}function pR(e,t){e._insertCharacters(t),e.framesetOk=!1}function Cy(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ie.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function mR(e,t){if(OI(t))Cy(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ie.MATHML?iy(t):r===ie.SVG&&(II(t),sy(t)),Xf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function gR(e,t){if(t.tagID===p.P||t.tagID===p.BR){Cy(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)===ie.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}j.AREA,j.BASE,j.BASEFONT,j.BGSOUND,j.BR,j.COL,j.EMBED,j.FRAME,j.HR,j.IMG,j.INPUT,j.KEYGEN,j.LINK,j.META,j.PARAM,j.SOURCE,j.TRACK,j.WBR;const ER=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,yR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Ay={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function vy(e,t){const n=kR(e),r=UE("type",{handlers:{root:bR,element:TR,text:_R,comment:Ny,doctype:xR,raw:SR},unknown:CR}),o={parser:n?new uy(Ay):uy.getFragmentParser(void 0,Ay),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),Qs(o,Cr());const a=n?o.parser.document:o.parser.getFragment(),u=bO(a,{file:o.options.file});return o.stitches&&pl(u,"comment",function(c,d,f){const m=c;if(m.value.stitch&&f&&d!==void 0){const E=f.children;return E[d]=m.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function ky(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function bR(e,t){ky(e.children,t)}function TR(e,t){AR(e,t),ky(e.children,t),vR(e,t)}function _R(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:We.CHARACTER,chars:e.value,location:Aa(e)};Qs(t,Cr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function xR(e,t){const n={type:We.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Aa(e)};Qs(t,Cr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function wR(e,t){t.stitches=!0;const n=NR(e);if("children"in e&&"children"in n){const r=vy({type:"root",children:e.children},t.options);n.children=r.children}Ny({type:"comment",value:{stitch:n}},t)}function Ny(e,t){const n=e.value,r={type:We.COMMENT,data:n,location:Aa(e)};Qs(t,Cr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function SR(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,Oy(t,Cr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(ER,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function CR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))wR(n,t);else{let r="";throw yR.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Qs(e,t){Oy(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Lt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Oy(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function AR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Lt.PLAINTEXT)return;Qs(t,Cr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:ts.html;o===ts.html&&n==="svg"&&(o=ts.svg);const a=LO(Te(H({},e),{children:[]}),{space:o===ts.svg?"svg":"html"}),u={type:We.START_TAG,tagName:n,tagID:Gs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Aa(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function vR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&jO.includes(n)||t.parser.tokenizer.state===Lt.PLAINTEXT)return;Qs(t,rl(e));const r={type:We.END_TAG,tagName:n,tagID:Gs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Aa(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Lt.RCDATA||t.parser.tokenizer.state===Lt.RAWTEXT||t.parser.tokenizer.state===Lt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Lt.DATA)}function kR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Aa(e){const t=Cr(e)||{line:void 0,column:void 0,offset:void 0},n=rl(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function NR(e){return"children"in e?es(Te(H({},e),{children:[]})):es(e)}function Iy(e){return function(t,n){return vy(t,Te(H({},e),{file:n}))}}const ss=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Py={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...ss,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...ss],h2:[["className","sr-only"]],img:[...ss,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...ss,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...ss],table:[...ss],ul:[...ss,["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"]},Ei={}.hasOwnProperty;function OR(e,t){let n={type:"root",children:[]};const r={schema:t?H(H({},Py),t):Py,stack:[]},o=Ry(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function Ry(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return IR(e,n);case"doctype":return PR(e,n);case"element":return RR(e,n);case"root":return LR(e,n);case"text":return DR(e,n)}}}function IR(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return va(a,t),a}}function PR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return va(n,t),n}}function RR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Ly(e,t.children),o=MR(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Ei.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 va(u,t),u}function LR(e,t){const r={type:"root",children:Ly(e,t.children)};return va(r,t),r}function DR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return va(r,t),r}function Ly(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=Ry(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function MR(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Ei.call(r,n)?r[n]:void 0,u=r&&Ei.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(Ei.call(c,f)){const m=c[f];let E=Dy(e,Fy(a,f),f,m);E==null&&(E=Dy(e,Fy(u,f),f,m)),E!=null&&(d[f]=E)}if(o&&Ei.call(o,n)){const m=o[n];for(f in m)Ei.call(m,f)&&!Ei.call(d,f)&&(d[f]=m[f])}return d}function Dy(e,t,n,r){return t?Array.isArray(r)?FR(e,t,n,r):My(e,t,n,r):void 0}function FR(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=My(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function My(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&BR(e,n,r)){if(typeof t=="object"&&t.length>1){let o=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){o=!0;break}}else if(u===r){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function BR(e,t,n){const r=e.schema.protocols&&Ei.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 m=r[f];if(a===m.length&&o.slice(0,m.length)===m)return!0}return!1}function va(e,t){const n=y1(t);t.data&&(e.data=es(t.data)),n&&(e.position=n)}function Fy(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],a=typeof o=="string"?o:o[0];if(a===t)return o;a==="data*"&&(n=o)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function UR(e){return function(t){return OR(t,e)}}const By=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return C.jsx("a",Te(H(H({className:Z(e,`${Y}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},HR=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n,openLinksInNewTab:r}=Rt();return!e&&!t?null:C.jsx("div",{className:Z(n,`${Y}-disclaimer`),children:t?C.jsx(bE,{rehypePlugins:[Iy,UR],components:{ul:({children:o})=>C.jsx("ul",{className:Z(n,`${Y}-ul`),children:o}),ol:({children:o})=>C.jsx("ol",{className:Z(n,`${Y}-ol`),children:o}),li:({children:o})=>C.jsx("li",{className:Z(n,`${Y}-li`),children:o}),a:({href:o,title:a,children:u})=>C.jsx(By,{globalClassName:n,openLinksInNewTab:r,href:o,title:a,children:u}),img:({src:o,alt:a})=>C.jsx("img",{className:Z(n,`${Y}-disclaimer-image`),src:o,alt:a}),p:({children:o})=>C.jsx("p",{className:Z(n,`${Y}-disclaimer-text`),children:o}),span:({children:o})=>C.jsx("span",{className:Z(n,`${Y}-disclaimer-text-span`),children:o})},children:t}):C.jsx("p",{className:Z(n,`${Y}-disclaimer-text`),children:e})})},ih=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=Xi(),{setImageFile:u}=ta(),{logger:c,globalClassName:d,searchConfig:f,features:m}=Rt(),E=V.useRef(null),T=V.useRef(null),b=!!(m!=null&&m.enableImageUpload),_=(a==null?void 0:a.name)||"",w=!!o||!1,v=w?"connected":"disconnected",A=t||!w,M=()=>a?new Promise((B,te)=>{const ge=new FileReader;ge.readAsDataURL(a),ge.onload=()=>B(ge.result),ge.onerror=ye=>te(ye)}):Promise.resolve(""),L=B=>rt(null,null,function*(){var ye;if(A)return;const te=10*1024*1024,ge=(ye=B.target.files)==null?void 0:ye[0];if(ge){if(ge.size>te){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(ge)}}),W=()=>{u(null),T.current&&(T.current.value="")},J=B=>rt(null,null,function*(){var ye;B.preventDefault();const te=(((ye=E.current)==null?void 0:ye.value)||"").trim();let ge="";try{ge=yield M()}catch(F){c==null||c.error("Error converting file to base64:",F),alert("There was an error processing the file. Please try again.");return}te&&(W(),E.current.value="",r(te,ge))});return C.jsxs("div",{className:Z(d,e,n,a&&"with-attachments",`${Y}-search-bar-wrapper`),children:[a&&C.jsxs("div",{className:Z(d,n,`${Y}-image-file-preview`),children:[C.jsx("img",{className:Z(d,n,`${Y}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),C.jsx("span",{className:Z(d,n,`${Y}-image-file-name`),title:_,children:_}),C.jsx(rf,{className:Z(n,"clear-attachment"),label:"Remove image",onClick:W})]}),C.jsxs("form",{className:Z(d,e,n,`${Y}-search-bar`),name:`${Y}-search-form`,onSubmit:J,children:[C.jsx("span",{role:"status",className:Z(`${Y}-connection-status-icon`,v)}),b&&C.jsxs("div",{role:"button",className:Z(d,e,n,A&&"disabled",`${Y}-image-upload-button`),"aria-disabled":A,tabIndex:0,children:[C.jsx("label",{className:Z(d,e,n,A&&"disabled",`${Y}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:C.jsx(rv,{})}),C.jsx("input",{className:Z(d,e,n,`${Y}-file-input`),type:"file",ref:T,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${Y}-file-input`,disabled:A,onInput:L})]}),C.jsx("input",{className:Z(d,e,n,`${Y}-search-input`),type:"text",ref:E,placeholder:f==null?void 0:f.placeholder,name:`${Y}-user-input`}),C.jsx(uv,{isLoading:A}),C.jsx(sv,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:A})]}),C.jsx(HR,{})]})};function zR(e){return e==null?[]:Array.isArray(e)?e:[e]}var jR=e=>e!=null&&typeof e=="object",Al=e=>typeof e=="string",Xs=e=>typeof e=="function",$R=e=>e==null,VR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),qR=e=>Object.prototype.toString.call(e),Uy=Function.prototype.toString,YR=Uy.call(Object),WR=e=>{if(!jR(e)||qR(e)!="[object Object]"||QR(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=VR(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Uy.call(n)==YR},GR=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,KR=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,QR=e=>GR(e)||KR(e),XR=e=>e(),JR=()=>{},sh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function oh(e){if(!WR(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]=oh(o))}return n}function ah(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function ZR(e,t){if(e==null)throw new Error(t())}var eL=Object.defineProperty,tL=(e,t,n)=>t in e?eL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uh=(e,t,n)=>tL(e,typeof t!="symbol"?t+"":t,n),Hy=()=>{},vl=e=>typeof e=="object"&&e!==null,nL=e=>e?"":void 0,rL=e=>e?"true":void 0,iL=1,sL=9,oL=11,Kt=e=>vl(e)&&e.nodeType===iL&&typeof e.nodeName=="string",kl=e=>vl(e)&&e.nodeType===sL,aL=e=>vl(e)&&e===e.window,zy=e=>Kt(e)?e.localName||"":"#document";function uL(e){return["html","body","#document"].includes(zy(e))}var lL=e=>vl(e)&&e.nodeType!==void 0,os=e=>lL(e)&&e.nodeType===oL&&"host"in e,cL=e=>Kt(e)&&e.localName==="input",dL=e=>Kt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function ka(e){if(!e)return!1;const t=e.getRootNode();return Zs(t)===e}var fL=/(textarea|select)/;function hL(e){if(e==null||!Kt(e))return!1;try{return cL(e)&&e.selectionStart!=null||fL.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Nl(e,t){var r;if(!e||!t||!Kt(e)||!Kt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&os(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function kr(e){var t;return kl(e)?e:aL(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function pL(e){return kr(e).documentElement}function Js(e){var t,n,r;return os(e)?Js(e.host):kl(e)?(t=e.defaultView)!=null?t:window:Kt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Zs(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 mL(e){if(zy(e)==="html")return e;const t=e.assignedSlot||e.parentNode||os(e)&&e.host||pL(e);return os(t)?t.host:t}function lh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),kl(t)||os(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var ch=new WeakMap;function Ol(e){return ch.has(e)||ch.set(e,Js(e).getComputedStyle(e)),ch.get(e)}var dh=new Set(["menu","listbox","dialog","grid","tree","region"]),gL=e=>dh.has(e),jy=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function $y(e,t){const n=new Set,r=lh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=jy(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const m=r.getElementById(f);if(m){const E=m.getAttribute("role"),T=m.getAttribute("aria-modal")==="true";if(E&&gL(E)&&!T&&(m===t||m.contains(t)||o(m)))return!0}}}return!1};return o(e)}function Vy(e,t){const n=lh(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=jy(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const m=n.getElementById(f);if(m){const E=m.getAttribute("role"),T=m.getAttribute("aria-modal")==="true";E&&dh.has(E)&&!T&&(t(m),o(m))}}}};o(e)}function EL(e){const t=new Set;return Vy(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function yL(e){const t=e.getAttribute("role");return!!(t&&dh.has(t))}function bL(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function TL(e){var t;return bL(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function _L(e){if(!e.id)return!1;const t=lh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&yL(e))}var fh=()=>typeof document!="undefined";function xL(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var hh=e=>fh()&&e.test(xL()),wL=e=>fh()&&e.test(navigator.vendor),qy=()=>fh()&&!!navigator.maxTouchPoints,SL=()=>hh(/^iPhone/i),CL=()=>hh(/^iPad/i)||ph()&&navigator.maxTouchPoints>1,Yy=()=>SL()||CL(),AL=()=>ph()||Yy(),ph=()=>hh(/^Mac/i),vL=()=>AL()&&wL(/apple/i);function kL(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 Wr(e){var n;const t=kL(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var NL=e=>e.button===0,OL=e=>e.button===2||ph()&&e.ctrlKey&&e.button===0,cr=(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)}},Wy=e=>Kt(e)&&e.tagName==="IFRAME",IL=/^(audio|video|details)$/;function Gy(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var PL=e=>!Number.isNaN(Gy(e)),RL=e=>Gy(e)<0;function LL(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 Ky(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=LL(d,t);if(f){const m=Array.from(f.querySelectorAll(Il)).filter(n),E=u.get(d);if(E!==void 0){const T=E+1;r.splice(T,0,...m),m.forEach((b,_)=>{u.set(b,T+_)});for(let b=T+m.length;b<r.length;b++)u.set(r[b],b)}else{const T=r.length;r.push(...m),m.forEach((b,_)=>{u.set(b,T+_)})}o.push(...m)}}return r}var Il="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",Qy=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Il));(n==!0||n=="if-empty"&&o.length===0)&&Kt(e)&&Gr(e)&&o.unshift(e);const u=[];for(const c of o)if(Gr(c)){if(Wy(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...Qy(d,{getShadowRoot:r}));continue}u.push(c)}return r?Ky(u,r,Gr):u};function Gr(e){return!Kt(e)||e.closest("[inert]")?!1:e.matches(Il)&&dL(e)}function Na(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Il));n&&as(e)&&o.unshift(e);const a=[];for(const u of o)if(as(u)){if(Wy(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Na(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Ky(a,r,as);return!u.length&&n?o:u}return!a.length&&n?o:a}function as(e){return Kt(e)&&e.tabIndex>0?!0:Gr(e)&&!RL(e)}function DL(e,t={}){const n=Na(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function ML(e,t={}){const{current:n,getShadowRoot:r}=t,o=Na(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Zs(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Oa(e){return e.tabIndex<0&&(IL.test(e.localName)||hL(e))&&!PL(e)?0:e.tabIndex}function Xy(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=Na(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var FL=class Vx{constructor(){uh(this,"id",null),uh(this,"fn_cleanup"),uh(this,"cleanup",()=>{this.cancel()})}static create(){return new Vx}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 Sn(e){const t=FL.create();return t.request(e),t.cleanup}function BL(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 mh(e){const t=mL(e);return uL(t)?kr(t).body:Kt(t)&&zL(t)?t:mh(t)}var UL=/auto|scroll|overlay|hidden|clip/,HL=new Set(["inline","contents"]);function zL(e){const t=Js(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return UL.test(n+o+r)&&!HL.has(a)}function jL(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 m=null;const[E,T]=DL(e,{includeContainer:!0,getShadowRoot:a}),b=ML(c,{current:n,getShadowRoot:a}),_=!E&&!T;f.shiftKey&&ka(b)?(o==null||o(),m=T):f.shiftKey&&(ka(E)||_)?m=n:!f.shiftKey&&ka(n)?(o==null||o(),m=E):!f.shiftKey&&(ka(T)||_)&&(m=b),m&&(f.preventDefault(),typeof r=="function"?r(m):m.focus())}return cr(u,"keydown",d,!0)}function $L(e,t){const c=t,{defer:n,triggerElement:r}=c,o=nn(c,["defer","triggerElement"]),a=n?Sn:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(jL(d,H({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function Pl(e,t){if(!e)return Hy;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 VL(e,t,n){if(!e)return Hy;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 qL(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 YL(e,t){const{timeout:n,rootNode:r}=t,o=Js(r),a=kr(r),u=new o.AbortController;return qL(new Promise(c=>{const d=e();if(d){c(d);return}const f=new o.MutationObserver(()=>{const m=e();m&&m.isConnected&&(f.disconnect(),c(m))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var WL=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),GL=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Jy=e=>{const t={};let n;for(;n=GL.exec(e);)t[n[1]]=n[2];return t},KL=(e,t)=>{if(Al(e)){if(Al(t))return`${e};${t}`;e=Jy(e)}else Al(t)&&(t=Jy(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function dr(...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]=sh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=WL(t[o],n[o]);continue}if(o==="style"){t[o]=KL(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 GB(e){return e}var eo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(eo||{}),gh="__init__";function QL(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>kr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Zs(t()),a=u=>t().getElementById(u);return Te(H({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:ka,getById:a})}var Eh={exports:{}},Cn={},yh={exports:{}},bh={};var Zy;function XL(){return Zy||(Zy=1,(function(e){function t(q,ne){var S=q.length;q.push(ne);e:for(;0<S;){var R=S-1>>>1,Q=q[R];if(0<o(Q,ne))q[R]=ne,q[S]=Q,S=R;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var ne=q[0],S=q.pop();if(S!==ne){q[0]=S;e:for(var R=0,Q=q.length,O=Q>>>1;R<O;){var _e=2*(R+1)-1,Le=q[_e],Oe=_e+1,Ge=q[Oe];if(0>o(Le,S))Oe<Q&&0>o(Ge,Le)?(q[R]=Ge,q[Oe]=S,R=Oe):(q[R]=Le,q[_e]=S,R=_e);else if(Oe<Q&&0>o(Ge,S))q[R]=Ge,q[Oe]=S,R=Oe;else break e}}return ne}function o(q,ne){var S=q.sortIndex-ne.sortIndex;return S!==0?S:q.id-ne.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=[],m=1,E=null,T=3,b=!1,_=!1,w=!1,v=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function L(q){for(var ne=n(f);ne!==null;){if(ne.callback===null)r(f);else if(ne.startTime<=q)r(f),ne.sortIndex=ne.expirationTime,t(d,ne);else break;ne=n(f)}}function W(q){if(w=!1,L(q),!_)if(n(d)!==null)_=!0,Ae(J);else{var ne=n(f);ne!==null&&ue(W,ne.startTime-q)}}function J(q,ne){_=!1,w&&(w=!1,A(ge),ge=-1),b=!0;var S=T;try{for(L(ne),E=n(d);E!==null&&(!(E.expirationTime>ne)||q&&!se());){var R=E.callback;if(typeof R=="function"){E.callback=null,T=E.priorityLevel;var Q=R(E.expirationTime<=ne);ne=e.unstable_now(),typeof Q=="function"?E.callback=Q:E===n(d)&&r(d),L(ne)}else r(d);E=n(d)}if(E!==null)var O=!0;else{var _e=n(f);_e!==null&&ue(W,_e.startTime-ne),O=!1}return O}finally{E=null,T=S,b=!1}}var B=!1,te=null,ge=-1,ye=5,F=-1;function se(){return!(e.unstable_now()-F<ye)}function he(){if(te!==null){var q=e.unstable_now();F=q;var ne=!0;try{ne=te(!0,q)}finally{ne?le():(B=!1,te=null)}}else B=!1}var le;if(typeof M=="function")le=function(){M(he)};else if(typeof MessageChannel!="undefined"){var fe=new MessageChannel,be=fe.port2;fe.port1.onmessage=he,le=function(){be.postMessage(null)}}else le=function(){v(he,0)};function Ae(q){te=q,B||(B=!0,le())}function ue(q,ne){ge=v(function(){q(e.unstable_now())},ne)}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(){_||b||(_=!0,Ae(J))},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"):ye=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 ne=3;break;default:ne=T}var S=T;T=ne;try{return q()}finally{T=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(q,ne){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var S=T;T=q;try{return ne()}finally{T=S}},e.unstable_scheduleCallback=function(q,ne,S){var R=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?R+S:R):S=R,q){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=S+Q,q={id:m++,callback:ne,priorityLevel:q,startTime:S,expirationTime:Q,sortIndex:-1},S>R?(q.sortIndex=S,t(f,q),n(d)===null&&q===n(f)&&(w?(A(ge),ge=-1):w=!0,ue(W,S-R))):(q.sortIndex=Q,t(d,q),_||b||(_=!0,Ae(J))),q},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(q){var ne=T;return function(){var S=T;T=ne;try{return q.apply(this,arguments)}finally{T=S}}}})(bh)),bh}var eb;function JL(){return eb||(eb=1,yh.exports=XL()),yh.exports}var tb;function ZL(){if(tb)return Cn;tb=1;var e=vs(),t=JL();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]*$/,m={},E={};function T(i){return d.call(E,i)?!0:d.call(m,i)?!1:f.test(i)?E[i]=!0:(m[i]=!0,!1)}function b(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"||b(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,g,y,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=h,this.attributeNamespace=g,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=y,this.removeEmptyString=x}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){v[i]=new w(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];v[s]=new w(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){v[i]=new w(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){v[i]=new w(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){v[i]=new w(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){v[i]=new w(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){v[i]=new w(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){v[i]=new w(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){v[i]=new w(i,5,!1,i.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function M(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,M);v[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,M);v[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,M);v[s]=new w(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){v[i]=new w(i,1,!1,i.toLowerCase(),null,!1,!1)}),v.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){v[i]=new w(i,1,!1,i.toLowerCase(),null,!0,!0)});function L(i,s,l,h){var g=v.hasOwnProperty(s)?v[s]:null;(g!==null?g.type!==0:h||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(_(s,l,g,h)&&(l=null),h||g===null?T(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):g.mustUseProperty?i[g.propertyName]=l===null?g.type===3?!1:"":l:(s=g.attributeName,h=g.attributeNamespace,l===null?i.removeAttribute(s):(g=g.type,l=g===3||g===4&&l===!0?"":""+l,h?i.setAttributeNS(h,s,l):i.setAttribute(s,l))))}var W=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,J=Symbol.for("react.element"),B=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),ge=Symbol.for("react.strict_mode"),ye=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),se=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),Ae=Symbol.for("react.lazy"),ue=Symbol.for("react.offscreen"),q=Symbol.iterator;function ne(i){return i===null||typeof i!="object"?null:(i=q&&i[q]||i["@@iterator"],typeof i=="function"?i:null)}var S=Object.assign,R;function Q(i){if(R===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);R=s&&s[1]||""}return`
|
|
25
|
+
`+R+i}var O=!1;function _e(i,s){if(!i||O)return"";O=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(G){var h=G}Reflect.construct(i,[],s)}else{try{s.call()}catch(G){h=G}i.call(s.prototype)}else{try{throw Error()}catch(G){h=G}i()}}catch(G){if(G&&h&&typeof G.stack=="string"){for(var g=G.stack.split(`
|
|
23
26
|
`),y=h.stack.split(`
|
|
24
27
|
`),x=g.length-1,I=y.length-1;1<=x&&0<=I&&g[x]!==y[I];)I--;for(;1<=x&&0<=I;x--,I--)if(g[x]!==y[I]){if(x!==1||I!==1)do if(x--,I--,0>I||g[x]!==y[I]){var D=`
|
|
25
|
-
`+g[x].replace(" at new "," at ");return i.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",i.displayName)),D}while(1<=x&&0<=I);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?K(i):""}function Re(i){switch(i.tag){case 5:return K(i.type);case 16:return K("Lazy");case 13:return K("Suspense");case 19:return K("SuspenseList");case 0:case 2:case 15:return i=_e(i.type,!1),i;case 11:return i=_e(i.type.render,!1),i;case 1:return i=_e(i.type,!0),i;default:return""}}function Oe(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case te:return"Fragment";case B:return"Portal";case ye:return"Profiler";case ge:return"StrictMode";case ue:return"Suspense";case de:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ae:return(i.displayName||"Context")+".Consumer";case M:return(i._context.displayName||"Context")+".Provider";case he:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case be:return s=i.displayName||null,s!==null?s:Oe(i.type)||"Memo";case Ce:s=i._payload,i=i._init;try{return Oe(i(s))}catch(l){}}return null}function Ge(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 Oe(s);case 8:return s===ge?"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 Ye(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function et(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Nt(i){var s=et(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 g=l.get,y=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return g.call(this)},set:function(x){h=""+x,y.call(this,x)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(x){h=""+x},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Kn(i){i._valueTracker||(i._valueTracker=Nt(i))}function cs(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),h="";return i&&(h=et(i)?i.checked?"true":"false":i.value),i=h,i!==l?(s.setValue(i),!0):!1}function Jr(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 _i(i,s){var l=s.checked;return S({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function ds(i,s){var l=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;l=Ye(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 xi(i,s){s=s.checked,s!=null&&R(i,"checked",s,!1)}function Zr(i,s){xi(i,s);var l=Ye(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")?Ue(i,s.type,l):s.hasOwnProperty("defaultValue")&&Ue(i,s.type,Ye(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function we(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 Ue(i,s,l){(s!=="number"||Jr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var je=Array.isArray;function Xe(i,s,l,h){if(i=i.options,s){s={};for(var g=0;g<l.length;g++)s["$"+l[g]]=!0;for(l=0;l<i.length;l++)g=s.hasOwnProperty("$"+i[l].value),i[l].selected!==g&&(i[l].selected=g),g&&h&&(i[l].defaultSelected=!0)}else{for(l=""+Ye(l),s=null,g=0;g<i.length;g++){if(i[g].value===l){i[g].selected=!0,h&&(i[g].defaultSelected=!0);return}s!==null||i[g].disabled||(s=i[g])}s!==null&&(s.selected=!0)}}function dt(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return S({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function wt(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(je(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:Ye(l)}}function mn(i,s){var l=Ye(s.value),h=Ye(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 st(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function ee(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 fe(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?ee(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Be,Ve=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,h,g){MSApp.execUnsafeLocalFunction(function(){return i(s,l,h,g)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Be=Be||document.createElement("div"),Be.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Be.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function tt(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var Jt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ei=["Webkit","ms","Moz","O"];Object.keys(Jt).forEach(function(i){ei.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Jt[s]=Jt[i]})});function Qn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||Jt.hasOwnProperty(i)&&Jt[i]?(""+s).trim():s+"px"}function wi(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var h=l.indexOf("--")===0,g=Qn(l,s[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,g):i[l]=g}}var fs=S({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Zt(i,s){if(s){if(fs[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 Lr(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 Fn=null;function ip(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var sp=null,ho=null,po=null;function e2(i){if(i=lu(i)){if(typeof sp!="function")throw Error(n(280));var s=i.stateNode;s&&(s=bc(s),sp(i.stateNode,i.type,s))}}function t2(i){ho?po?po.push(i):po=[i]:ho=i}function n2(){if(ho){var i=ho,s=po;if(po=ho=null,e2(i),s)for(i=0;i<s.length;i++)e2(s[i])}}function r2(i,s){return i(s)}function i2(){}var op=!1;function s2(i,s,l){if(op)return i(s,l);op=!0;try{return r2(i,s,l)}finally{op=!1,(ho!==null||po!==null)&&(i2(),n2())}}function ja(i,s){var l=i.stateNode;if(l===null)return null;var h=bc(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 ap=!1;if(c)try{var $a={};Object.defineProperty($a,"passive",{get:function(){ap=!0}}),window.addEventListener("test",$a,$a),window.removeEventListener("test",$a,$a)}catch(i){ap=!1}function sM(i,s,l,h,g,y,x,I,D){var G=Array.prototype.slice.call(arguments,3);try{s.apply(l,G)}catch(se){this.onError(se)}}var Va=!1,Xl=null,Jl=!1,up=null,oM={onError:function(i){Va=!0,Xl=i}};function aM(i,s,l,h,g,y,x,I,D){Va=!1,Xl=null,sM.apply(oM,arguments)}function uM(i,s,l,h,g,y,x,I,D){if(aM.apply(this,arguments),Va){if(Va){var G=Xl;Va=!1,Xl=null}else throw Error(n(198));Jl||(Jl=!0,up=G)}}function hs(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 o2(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 a2(i){if(hs(i)!==i)throw Error(n(188))}function lM(i){var s=i.alternate;if(!s){if(s=hs(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,h=s;;){var g=l.return;if(g===null)break;var y=g.alternate;if(y===null){if(h=g.return,h!==null){l=h;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===l)return a2(g),i;if(y===h)return a2(g),s;y=y.sibling}throw Error(n(188))}if(l.return!==h.return)l=g,h=y;else{for(var x=!1,I=g.child;I;){if(I===l){x=!0,l=g,h=y;break}if(I===h){x=!0,h=g,l=y;break}I=I.sibling}if(!x){for(I=y.child;I;){if(I===l){x=!0,l=y,h=g;break}if(I===h){x=!0,h=y,l=g;break}I=I.sibling}if(!x)throw Error(n(189))}}if(l.alternate!==h)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:s}function u2(i){return i=lM(i),i!==null?l2(i):null}function l2(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=l2(i);if(s!==null)return s;i=i.sibling}return null}var c2=t.unstable_scheduleCallback,d2=t.unstable_cancelCallback,cM=t.unstable_shouldYield,dM=t.unstable_requestPaint,Dt=t.unstable_now,fM=t.unstable_getCurrentPriorityLevel,lp=t.unstable_ImmediatePriority,f2=t.unstable_UserBlockingPriority,Zl=t.unstable_NormalPriority,hM=t.unstable_LowPriority,h2=t.unstable_IdlePriority,ec=null,Dr=null;function pM(i){if(Dr&&typeof Dr.onCommitFiberRoot=="function")try{Dr.onCommitFiberRoot(ec,i,void 0,(i.current.flags&128)===128)}catch(s){}}var hr=Math.clz32?Math.clz32:EM,mM=Math.log,gM=Math.LN2;function EM(i){return i>>>=0,i===0?32:31-(mM(i)/gM|0)|0}var tc=64,nc=4194304;function qa(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 rc(i,s){var l=i.pendingLanes;if(l===0)return 0;var h=0,g=i.suspendedLanes,y=i.pingedLanes,x=l&268435455;if(x!==0){var I=x&~g;I!==0?h=qa(I):(y&=x,y!==0&&(h=qa(y)))}else x=l&~g,x!==0?h=qa(x):y!==0&&(h=qa(y));if(h===0)return 0;if(s!==0&&s!==h&&(s&g)===0&&(g=h&-h,y=s&-s,g>=y||g===16&&(y&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-hr(s),g=1<<l,h|=i[l],s&=~g;return h}function yM(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function bM(i,s){for(var l=i.suspendedLanes,h=i.pingedLanes,g=i.expirationTimes,y=i.pendingLanes;0<y;){var x=31-hr(y),I=1<<x,D=g[x];D===-1?((I&l)===0||(I&h)!==0)&&(g[x]=yM(I,s)):D<=s&&(i.expiredLanes|=I),y&=~I}}function cp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function p2(){var i=tc;return tc<<=1,(tc&4194240)===0&&(tc=64),i}function dp(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function Ya(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-hr(s),i[s]=l}function TM(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var g=31-hr(l),y=1<<g;s[g]=0,h[g]=-1,i[g]=-1,l&=~y}}function fp(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var h=31-hr(l),g=1<<h;g&s|i[h]&s&&(i[h]|=s),l&=~g}}var lt=0;function m2(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var g2,hp,E2,y2,b2,pp=!1,ic=[],Si=null,Ci=null,Ai=null,Wa=new Map,Ga=new Map,vi=[],_M="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 T2(i,s){switch(i){case"focusin":case"focusout":Si=null;break;case"dragenter":case"dragleave":Ci=null;break;case"mouseover":case"mouseout":Ai=null;break;case"pointerover":case"pointerout":Wa.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ga.delete(s.pointerId)}}function Ka(i,s,l,h,g,y){return i===null||i.nativeEvent!==y?(i={blockedOn:s,domEventName:l,eventSystemFlags:h,nativeEvent:y,targetContainers:[g]},s!==null&&(s=lu(s),s!==null&&hp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),i)}function xM(i,s,l,h,g){switch(s){case"focusin":return Si=Ka(Si,i,s,l,h,g),!0;case"dragenter":return Ci=Ka(Ci,i,s,l,h,g),!0;case"mouseover":return Ai=Ka(Ai,i,s,l,h,g),!0;case"pointerover":var y=g.pointerId;return Wa.set(y,Ka(Wa.get(y)||null,i,s,l,h,g)),!0;case"gotpointercapture":return y=g.pointerId,Ga.set(y,Ka(Ga.get(y)||null,i,s,l,h,g)),!0}return!1}function _2(i){var s=ps(i.target);if(s!==null){var l=hs(s);if(l!==null){if(s=l.tag,s===13){if(s=o2(l),s!==null){i.blockedOn=s,b2(i.priority,function(){E2(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 sc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=gp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Fn=h,l.target.dispatchEvent(h),Fn=null}else return s=lu(l),s!==null&&hp(s),i.blockedOn=l,!1;s.shift()}return!0}function x2(i,s,l){sc(i)&&l.delete(s)}function wM(){pp=!1,Si!==null&&sc(Si)&&(Si=null),Ci!==null&&sc(Ci)&&(Ci=null),Ai!==null&&sc(Ai)&&(Ai=null),Wa.forEach(x2),Ga.forEach(x2)}function Qa(i,s){i.blockedOn===s&&(i.blockedOn=null,pp||(pp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,wM)))}function Xa(i){function s(g){return Qa(g,i)}if(0<ic.length){Qa(ic[0],i);for(var l=1;l<ic.length;l++){var h=ic[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Si!==null&&Qa(Si,i),Ci!==null&&Qa(Ci,i),Ai!==null&&Qa(Ai,i),Wa.forEach(s),Ga.forEach(s),l=0;l<vi.length;l++)h=vi[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<vi.length&&(l=vi[0],l.blockedOn===null);)_2(l),l.blockedOn===null&&vi.shift()}var mo=W.ReactCurrentBatchConfig,oc=!0;function SM(i,s,l,h){var g=lt,y=mo.transition;mo.transition=null;try{lt=1,mp(i,s,l,h)}finally{lt=g,mo.transition=y}}function CM(i,s,l,h){var g=lt,y=mo.transition;mo.transition=null;try{lt=4,mp(i,s,l,h)}finally{lt=g,mo.transition=y}}function mp(i,s,l,h){if(oc){var g=gp(i,s,l,h);if(g===null)Rp(i,s,h,ac,l),T2(i,h);else if(xM(g,i,s,l,h))h.stopPropagation();else if(T2(i,h),s&4&&-1<_M.indexOf(i)){for(;g!==null;){var y=lu(g);if(y!==null&&g2(y),y=gp(i,s,l,h),y===null&&Rp(i,s,h,ac,l),y===g)break;g=y}g!==null&&h.stopPropagation()}else Rp(i,s,h,null,l)}}var ac=null;function gp(i,s,l,h){if(ac=null,i=ip(h),i=ps(i),i!==null)if(s=hs(i),s===null)i=null;else if(l=s.tag,l===13){if(i=o2(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 ac=i,null}function w2(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(fM()){case lp:return 1;case f2:return 4;case Zl:case hM:return 16;case h2:return 536870912;default:return 16}default:return 16}}var ki=null,Ep=null,uc=null;function S2(){if(uc)return uc;var i,s=Ep,l=s.length,h,g="value"in ki?ki.value:ki.textContent,y=g.length;for(i=0;i<l&&s[i]===g[i];i++);var x=l-i;for(h=1;h<=x&&s[l-h]===g[y-h];h++);return uc=g.slice(i,1<h?1-h:void 0)}function lc(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 cc(){return!0}function C2(){return!1}function Bn(i){function s(l,h,g,y,x){this._reactName=l,this._targetInst=g,this.type=h,this.nativeEvent=y,this.target=x,this.currentTarget=null;for(var I in i)i.hasOwnProperty(I)&&(l=i[I],this[I]=l?l(y):y[I]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?cc:C2,this.isPropagationStopped=C2,this}return S(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=cc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=cc)},persist:function(){},isPersistent:cc}),s}var go={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yp=Bn(go),Ja=S({},go,{view:0,detail:0}),AM=Bn(Ja),bp,Tp,Za,dc=S({},Ja,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xp,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!==Za&&(Za&&i.type==="mousemove"?(bp=i.screenX-Za.screenX,Tp=i.screenY-Za.screenY):Tp=bp=0,Za=i),bp)},movementY:function(i){return"movementY"in i?i.movementY:Tp}}),A2=Bn(dc),vM=S({},dc,{dataTransfer:0}),kM=Bn(vM),NM=S({},Ja,{relatedTarget:0}),_p=Bn(NM),OM=S({},go,{animationName:0,elapsedTime:0,pseudoElement:0}),IM=Bn(OM),PM=S({},go,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),RM=Bn(PM),LM=S({},go,{data:0}),v2=Bn(LM),DM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},MM={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},FM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function BM(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=FM[i])?!!s[i]:!1}function xp(){return BM}var UM=S({},Ja,{key:function(i){if(i.key){var s=DM[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=lc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?MM[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xp,charCode:function(i){return i.type==="keypress"?lc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?lc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),HM=Bn(UM),zM=S({},dc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),k2=Bn(zM),jM=S({},Ja,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xp}),$M=Bn(jM),VM=S({},go,{propertyName:0,elapsedTime:0,pseudoElement:0}),qM=Bn(VM),YM=S({},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}),WM=Bn(YM),GM=[9,13,27,32],wp=c&&"CompositionEvent"in window,eu=null;c&&"documentMode"in document&&(eu=document.documentMode);var KM=c&&"TextEvent"in window&&!eu,N2=c&&(!wp||eu&&8<eu&&11>=eu),O2=" ",I2=!1;function P2(i,s){switch(i){case"keyup":return GM.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function R2(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Eo=!1;function QM(i,s){switch(i){case"compositionend":return R2(s);case"keypress":return s.which!==32?null:(I2=!0,O2);case"textInput":return i=s.data,i===O2&&I2?null:i;default:return null}}function XM(i,s){if(Eo)return i==="compositionend"||!wp&&P2(i,s)?(i=S2(),uc=Ep=ki=null,Eo=!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 N2&&s.locale!=="ko"?null:s.data;default:return null}}var JM={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function L2(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!JM[i.type]:s==="textarea"}function D2(i,s,l,h){t2(h),s=gc(s,"onChange"),0<s.length&&(l=new yp("onChange","change",null,l,h),i.push({event:l,listeners:s}))}var tu=null,nu=null;function ZM(i){Z2(i,0)}function fc(i){var s=xo(i);if(cs(s))return i}function eF(i,s){if(i==="change")return s}var M2=!1;if(c){var Sp;if(c){var Cp="oninput"in document;if(!Cp){var F2=document.createElement("div");F2.setAttribute("oninput","return;"),Cp=typeof F2.oninput=="function"}Sp=Cp}else Sp=!1;M2=Sp&&(!document.documentMode||9<document.documentMode)}function B2(){tu&&(tu.detachEvent("onpropertychange",U2),nu=tu=null)}function U2(i){if(i.propertyName==="value"&&fc(nu)){var s=[];D2(s,nu,i,ip(i)),s2(ZM,s)}}function tF(i,s,l){i==="focusin"?(B2(),tu=s,nu=l,tu.attachEvent("onpropertychange",U2)):i==="focusout"&&B2()}function nF(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return fc(nu)}function rF(i,s){if(i==="click")return fc(s)}function iF(i,s){if(i==="input"||i==="change")return fc(s)}function sF(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var pr=typeof Object.is=="function"?Object.is:sF;function ru(i,s){if(pr(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 g=l[h];if(!d.call(s,g)||!pr(i[g],s[g]))return!1}return!0}function H2(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function z2(i,s){var l=H2(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=H2(l)}}function j2(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?j2(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function $2(){for(var i=window,s=Jr();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=Jr(i.document)}return s}function Ap(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 oF(i){var s=$2(),l=i.focusedElem,h=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&j2(l.ownerDocument.documentElement,l)){if(h!==null&&Ap(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 g=l.textContent.length,y=Math.min(h.start,g);h=h.end===void 0?y:Math.min(h.end,g),!i.extend&&y>h&&(g=h,h=y,y=g),g=z2(l,y);var x=z2(l,h);g&&x&&(i.rangeCount!==1||i.anchorNode!==g.node||i.anchorOffset!==g.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),i.removeAllRanges(),y>h?(i.addRange(s),i.extend(x.node,x.offset)):(s.setEnd(x.node,x.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 aF=c&&"documentMode"in document&&11>=document.documentMode,yo=null,vp=null,iu=null,kp=!1;function V2(i,s,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;kp||yo==null||yo!==Jr(h)||(h=yo,"selectionStart"in h&&Ap(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}),iu&&ru(iu,h)||(iu=h,h=gc(vp,"onSelect"),0<h.length&&(s=new yp("onSelect","select",null,s,l),i.push({event:s,listeners:h}),s.target=yo)))}function hc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var bo={animationend:hc("Animation","AnimationEnd"),animationiteration:hc("Animation","AnimationIteration"),animationstart:hc("Animation","AnimationStart"),transitionend:hc("Transition","TransitionEnd")},Np={},q2={};c&&(q2=document.createElement("div").style,"AnimationEvent"in window||(delete bo.animationend.animation,delete bo.animationiteration.animation,delete bo.animationstart.animation),"TransitionEvent"in window||delete bo.transitionend.transition);function pc(i){if(Np[i])return Np[i];if(!bo[i])return i;var s=bo[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in q2)return Np[i]=s[l];return i}var Y2=pc("animationend"),W2=pc("animationiteration"),G2=pc("animationstart"),K2=pc("transitionend"),Q2=new Map,X2="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 Ni(i,s){Q2.set(i,s),a(s,[i])}for(var Op=0;Op<X2.length;Op++){var Ip=X2[Op],uF=Ip.toLowerCase(),lF=Ip[0].toUpperCase()+Ip.slice(1);Ni(uF,"on"+lF)}Ni(Y2,"onAnimationEnd"),Ni(W2,"onAnimationIteration"),Ni(G2,"onAnimationStart"),Ni("dblclick","onDoubleClick"),Ni("focusin","onFocus"),Ni("focusout","onBlur"),Ni(K2,"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 su="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(" "),cF=new Set("cancel close invalid load scroll toggle".split(" ").concat(su));function J2(i,s,l){var h=i.type||"unknown-event";i.currentTarget=l,uM(h,s,void 0,i),i.currentTarget=null}function Z2(i,s){s=(s&4)!==0;for(var l=0;l<i.length;l++){var h=i[l],g=h.event;h=h.listeners;e:{var y=void 0;if(s)for(var x=h.length-1;0<=x;x--){var I=h[x],D=I.instance,G=I.currentTarget;if(I=I.listener,D!==y&&g.isPropagationStopped())break e;J2(g,I,G),y=D}else for(x=0;x<h.length;x++){if(I=h[x],D=I.instance,G=I.currentTarget,I=I.listener,D!==y&&g.isPropagationStopped())break e;J2(g,I,G),y=D}}}if(Jl)throw i=up,Jl=!1,up=null,i}function Et(i,s){var l=s[Up];l===void 0&&(l=s[Up]=new Set);var h=i+"__bubble";l.has(h)||(e_(s,i,2,!1),l.add(h))}function Pp(i,s,l){var h=0;s&&(h|=4),e_(l,i,h,s)}var mc="_reactListening"+Math.random().toString(36).slice(2);function ou(i){if(!i[mc]){i[mc]=!0,r.forEach(function(l){l!=="selectionchange"&&(cF.has(l)||Pp(l,!1,i),Pp(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[mc]||(s[mc]=!0,Pp("selectionchange",!1,s))}}function e_(i,s,l,h){switch(w2(s)){case 1:var g=SM;break;case 4:g=CM;break;default:g=mp}l=g.bind(null,s,l,i),g=void 0,!ap||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),h?g!==void 0?i.addEventListener(s,l,{capture:!0,passive:g}):i.addEventListener(s,l,!0):g!==void 0?i.addEventListener(s,l,{passive:g}):i.addEventListener(s,l,!1)}function Rp(i,s,l,h,g){var y=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var x=h.tag;if(x===3||x===4){var I=h.stateNode.containerInfo;if(I===g||I.nodeType===8&&I.parentNode===g)break;if(x===4)for(x=h.return;x!==null;){var D=x.tag;if((D===3||D===4)&&(D=x.stateNode.containerInfo,D===g||D.nodeType===8&&D.parentNode===g))return;x=x.return}for(;I!==null;){if(x=ps(I),x===null)return;if(D=x.tag,D===5||D===6){h=y=x;continue e}I=I.parentNode}}h=h.return}s2(function(){var G=y,se=ip(l),ce=[];e:{var re=Q2.get(i);if(re!==void 0){var xe=yp,Ae=i;switch(i){case"keypress":if(lc(l)===0)break e;case"keydown":case"keyup":xe=HM;break;case"focusin":Ae="focus",xe=_p;break;case"focusout":Ae="blur",xe=_p;break;case"beforeblur":case"afterblur":xe=_p;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":xe=A2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=kM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=$M;break;case Y2:case W2:case G2:xe=IM;break;case K2:xe=qM;break;case"scroll":xe=AM;break;case"wheel":xe=WM;break;case"copy":case"cut":case"paste":xe=RM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=k2}var ke=(s&4)!==0,Mt=!ke&&i==="scroll",z=ke?re!==null?re+"Capture":null:re;ke=[];for(var U=G,V;U!==null;){V=U;var Ee=V.stateNode;if(V.tag===5&&Ee!==null&&(V=Ee,z!==null&&(Ee=ja(U,z),Ee!=null&&ke.push(au(U,Ee,V)))),Mt)break;U=U.return}0<ke.length&&(re=new xe(re,Ae,null,l,se),ce.push({event:re,listeners:ke}))}}if((s&7)===0){e:{if(re=i==="mouseover"||i==="pointerover",xe=i==="mouseout"||i==="pointerout",re&&l!==Fn&&(Ae=l.relatedTarget||l.fromElement)&&(ps(Ae)||Ae[ti]))break e;if((xe||re)&&(re=se.window===se?se:(re=se.ownerDocument)?re.defaultView||re.parentWindow:window,xe?(Ae=l.relatedTarget||l.toElement,xe=G,Ae=Ae?ps(Ae):null,Ae!==null&&(Mt=hs(Ae),Ae!==Mt||Ae.tag!==5&&Ae.tag!==6)&&(Ae=null)):(xe=null,Ae=G),xe!==Ae)){if(ke=A2,Ee="onMouseLeave",z="onMouseEnter",U="mouse",(i==="pointerout"||i==="pointerover")&&(ke=k2,Ee="onPointerLeave",z="onPointerEnter",U="pointer"),Mt=xe==null?re:xo(xe),V=Ae==null?re:xo(Ae),re=new ke(Ee,U+"leave",xe,l,se),re.target=Mt,re.relatedTarget=V,Ee=null,ps(se)===G&&(ke=new ke(z,U+"enter",Ae,l,se),ke.target=V,ke.relatedTarget=Mt,Ee=ke),Mt=Ee,xe&&Ae)t:{for(ke=xe,z=Ae,U=0,V=ke;V;V=To(V))U++;for(V=0,Ee=z;Ee;Ee=To(Ee))V++;for(;0<U-V;)ke=To(ke),U--;for(;0<V-U;)z=To(z),V--;for(;U--;){if(ke===z||z!==null&&ke===z.alternate)break t;ke=To(ke),z=To(z)}ke=null}else ke=null;xe!==null&&t_(ce,re,xe,ke,!1),Ae!==null&&Mt!==null&&t_(ce,Mt,Ae,ke,!0)}}e:{if(re=G?xo(G):window,xe=re.nodeName&&re.nodeName.toLowerCase(),xe==="select"||xe==="input"&&re.type==="file")var Ne=eF;else if(L2(re))if(M2)Ne=iF;else{Ne=nF;var De=tF}else(xe=re.nodeName)&&xe.toLowerCase()==="input"&&(re.type==="checkbox"||re.type==="radio")&&(Ne=rF);if(Ne&&(Ne=Ne(i,G))){D2(ce,Ne,l,se);break e}De&&De(i,re,G),i==="focusout"&&(De=re._wrapperState)&&De.controlled&&re.type==="number"&&Ue(re,"number",re.value)}switch(De=G?xo(G):window,i){case"focusin":(L2(De)||De.contentEditable==="true")&&(yo=De,vp=G,iu=null);break;case"focusout":iu=vp=yo=null;break;case"mousedown":kp=!0;break;case"contextmenu":case"mouseup":case"dragend":kp=!1,V2(ce,l,se);break;case"selectionchange":if(aF)break;case"keydown":case"keyup":V2(ce,l,se)}var Me;if(wp)e:{switch(i){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else Eo?P2(i,l)&&(ze="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(ze="onCompositionStart");ze&&(N2&&l.locale!=="ko"&&(Eo||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&Eo&&(Me=S2()):(ki=se,Ep="value"in ki?ki.value:ki.textContent,Eo=!0)),De=gc(G,ze),0<De.length&&(ze=new v2(ze,i,null,l,se),ce.push({event:ze,listeners:De}),Me?ze.data=Me:(Me=R2(l),Me!==null&&(ze.data=Me)))),(Me=KM?QM(i,l):XM(i,l))&&(G=gc(G,"onBeforeInput"),0<G.length&&(se=new v2("onBeforeInput","beforeinput",null,l,se),ce.push({event:se,listeners:G}),se.data=Me))}Z2(ce,s)})}function au(i,s,l){return{instance:i,listener:s,currentTarget:l}}function gc(i,s){for(var l=s+"Capture",h=[];i!==null;){var g=i,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=ja(i,l),y!=null&&h.unshift(au(i,y,g)),y=ja(i,s),y!=null&&h.push(au(i,y,g))),i=i.return}return h}function To(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function t_(i,s,l,h,g){for(var y=s._reactName,x=[];l!==null&&l!==h;){var I=l,D=I.alternate,G=I.stateNode;if(D!==null&&D===h)break;I.tag===5&&G!==null&&(I=G,g?(D=ja(l,y),D!=null&&x.unshift(au(l,D,I))):g||(D=ja(l,y),D!=null&&x.push(au(l,D,I)))),l=l.return}x.length!==0&&i.push({event:s,listeners:x})}var dF=/\r\n?/g,fF=/\u0000|\uFFFD/g;function n_(i){return(typeof i=="string"?i:""+i).replace(dF,`
|
|
26
|
-
`).replace(fF,"")}function Ec(i,s,l){if(s=n_(s),n_(i)!==s&&l)throw Error(n(425))}function yc(){}var Lp=null,Dp=null;function Mp(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 Fp=typeof setTimeout=="function"?setTimeout:void 0,hF=typeof clearTimeout=="function"?clearTimeout:void 0,r_=typeof Promise=="function"?Promise:void 0,pF=typeof queueMicrotask=="function"?queueMicrotask:typeof r_!="undefined"?function(i){return r_.resolve(null).then(i).catch(mF)}:Fp;function mF(i){setTimeout(function(){throw i})}function Bp(i,s){var l=s,h=0;do{var g=l.nextSibling;if(i.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"){if(h===0){i.removeChild(g),Xa(s);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=g}while(l);Xa(s)}function Oi(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 i_(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 _o=Math.random().toString(36).slice(2),Mr="__reactFiber$"+_o,uu="__reactProps$"+_o,ti="__reactContainer$"+_o,Up="__reactEvents$"+_o,gF="__reactListeners$"+_o,EF="__reactHandles$"+_o;function ps(i){var s=i[Mr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[ti]||l[Mr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=i_(i);i!==null;){if(l=i[Mr])return l;i=i_(i)}return s}i=l,l=i.parentNode}return null}function lu(i){return i=i[Mr]||i[ti],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function xo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function bc(i){return i[uu]||null}var Hp=[],wo=-1;function Ii(i){return{current:i}}function yt(i){0>wo||(i.current=Hp[wo],Hp[wo]=null,wo--)}function mt(i,s){wo++,Hp[wo]=i.current,i.current=s}var Pi={},ln=Ii(Pi),An=Ii(!1),ms=Pi;function So(i,s){var l=i.type.contextTypes;if(!l)return Pi;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===s)return h.__reactInternalMemoizedMaskedChildContext;var g={},y;for(y in l)g[y]=s[y];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=g),g}function vn(i){return i=i.childContextTypes,i!=null}function Tc(){yt(An),yt(ln)}function s_(i,s,l){if(ln.current!==Pi)throw Error(n(168));mt(ln,s),mt(An,l)}function o_(i,s,l){var h=i.stateNode;if(s=s.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var g in h)if(!(g in s))throw Error(n(108,Ge(i)||"Unknown",g));return S({},l,h)}function _c(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Pi,ms=ln.current,mt(ln,i),mt(An,An.current),!0}function a_(i,s,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=o_(i,s,ms),h.__reactInternalMemoizedMergedChildContext=i,yt(An),yt(ln),mt(ln,i)):yt(An),mt(An,l)}var ni=null,xc=!1,zp=!1;function u_(i){ni===null?ni=[i]:ni.push(i)}function yF(i){xc=!0,u_(i)}function Ri(){if(!zp&&ni!==null){zp=!0;var i=0,s=lt;try{var l=ni;for(lt=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}ni=null,xc=!1}catch(g){throw ni!==null&&(ni=ni.slice(i+1)),c2(lp,Ri),g}finally{lt=s,zp=!1}}return null}var Co=[],Ao=0,wc=null,Sc=0,Xn=[],Jn=0,gs=null,ri=1,ii="";function Es(i,s){Co[Ao++]=Sc,Co[Ao++]=wc,wc=i,Sc=s}function l_(i,s,l){Xn[Jn++]=ri,Xn[Jn++]=ii,Xn[Jn++]=gs,gs=i;var h=ri;i=ii;var g=32-hr(h)-1;h&=~(1<<g),l+=1;var y=32-hr(s)+g;if(30<y){var x=g-g%5;y=(h&(1<<x)-1).toString(32),h>>=x,g-=x,ri=1<<32-hr(s)+g|l<<g|h,ii=y+i}else ri=1<<y|l<<g|h,ii=i}function jp(i){i.return!==null&&(Es(i,1),l_(i,1,0))}function $p(i){for(;i===wc;)wc=Co[--Ao],Co[Ao]=null,Sc=Co[--Ao],Co[Ao]=null;for(;i===gs;)gs=Xn[--Jn],Xn[Jn]=null,ii=Xn[--Jn],Xn[Jn]=null,ri=Xn[--Jn],Xn[Jn]=null}var Un=null,Hn=null,St=!1,mr=null;function c_(i,s){var l=nr(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 d_(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,Un=i,Hn=Oi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Un=i,Hn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=gs!==null?{id:ri,overflow:ii}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=nr(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Un=i,Hn=null,!0):!1;default:return!1}}function Vp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function qp(i){if(St){var s=Hn;if(s){var l=s;if(!d_(i,s)){if(Vp(i))throw Error(n(418));s=Oi(l.nextSibling);var h=Un;s&&d_(i,s)?c_(h,l):(i.flags=i.flags&-4097|2,St=!1,Un=i)}}else{if(Vp(i))throw Error(n(418));i.flags=i.flags&-4097|2,St=!1,Un=i}}}function f_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Un=i}function Cc(i){if(i!==Un)return!1;if(!St)return f_(i),St=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Mp(i.type,i.memoizedProps)),s&&(s=Hn)){if(Vp(i))throw h_(),Error(n(418));for(;s;)c_(i,s),s=Oi(s.nextSibling)}if(f_(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){Hn=Oi(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}Hn=null}}else Hn=Un?Oi(i.stateNode.nextSibling):null;return!0}function h_(){for(var i=Hn;i;)i=Oi(i.nextSibling)}function vo(){Hn=Un=null,St=!1}function Yp(i){mr===null?mr=[i]:mr.push(i)}var bF=W.ReactCurrentBatchConfig;function cu(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 g=h,y=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===y?s.ref:(s=function(x){var I=g.refs;x===null?delete I[y]:I[y]=x},s._stringRef=y,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Ac(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function p_(i){var s=i._init;return s(i._payload)}function m_(i){function s(z,U){if(i){var V=z.deletions;V===null?(z.deletions=[U],z.flags|=16):V.push(U)}}function l(z,U){if(!i)return null;for(;U!==null;)s(z,U),U=U.sibling;return null}function h(z,U){for(z=new Map;U!==null;)U.key!==null?z.set(U.key,U):z.set(U.index,U),U=U.sibling;return z}function g(z,U){return z=zi(z,U),z.index=0,z.sibling=null,z}function y(z,U,V){return z.index=V,i?(V=z.alternate,V!==null?(V=V.index,V<U?(z.flags|=2,U):V):(z.flags|=2,U)):(z.flags|=1048576,U)}function x(z){return i&&z.alternate===null&&(z.flags|=2),z}function I(z,U,V,Ee){return U===null||U.tag!==6?(U=Fm(V,z.mode,Ee),U.return=z,U):(U=g(U,V),U.return=z,U)}function D(z,U,V,Ee){var Ne=V.type;return Ne===te?se(z,U,V.props.children,Ee,V.key):U!==null&&(U.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ce&&p_(Ne)===U.type)?(Ee=g(U,V.props),Ee.ref=cu(z,U,V),Ee.return=z,Ee):(Ee=Qc(V.type,V.key,V.props,null,z.mode,Ee),Ee.ref=cu(z,U,V),Ee.return=z,Ee)}function G(z,U,V,Ee){return U===null||U.tag!==4||U.stateNode.containerInfo!==V.containerInfo||U.stateNode.implementation!==V.implementation?(U=Bm(V,z.mode,Ee),U.return=z,U):(U=g(U,V.children||[]),U.return=z,U)}function se(z,U,V,Ee,Ne){return U===null||U.tag!==7?(U=Cs(V,z.mode,Ee,Ne),U.return=z,U):(U=g(U,V),U.return=z,U)}function ce(z,U,V){if(typeof U=="string"&&U!==""||typeof U=="number")return U=Fm(""+U,z.mode,V),U.return=z,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case X:return V=Qc(U.type,U.key,U.props,null,z.mode,V),V.ref=cu(z,null,U),V.return=z,V;case B:return U=Bm(U,z.mode,V),U.return=z,U;case Ce:var Ee=U._init;return ce(z,Ee(U._payload),V)}if(je(U)||ne(U))return U=Cs(U,z.mode,V,null),U.return=z,U;Ac(z,U)}return null}function re(z,U,V,Ee){var Ne=U!==null?U.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return Ne!==null?null:I(z,U,""+V,Ee);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case X:return V.key===Ne?D(z,U,V,Ee):null;case B:return V.key===Ne?G(z,U,V,Ee):null;case Ce:return Ne=V._init,re(z,U,Ne(V._payload),Ee)}if(je(V)||ne(V))return Ne!==null?null:se(z,U,V,Ee,null);Ac(z,V)}return null}function xe(z,U,V,Ee,Ne){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number")return z=z.get(V)||null,I(U,z,""+Ee,Ne);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case X:return z=z.get(Ee.key===null?V:Ee.key)||null,D(U,z,Ee,Ne);case B:return z=z.get(Ee.key===null?V:Ee.key)||null,G(U,z,Ee,Ne);case Ce:var De=Ee._init;return xe(z,U,V,De(Ee._payload),Ne)}if(je(Ee)||ne(Ee))return z=z.get(V)||null,se(U,z,Ee,Ne,null);Ac(U,Ee)}return null}function Ae(z,U,V,Ee){for(var Ne=null,De=null,Me=U,ze=U=0,Xt=null;Me!==null&&ze<V.length;ze++){Me.index>ze?(Xt=Me,Me=null):Xt=Me.sibling;var it=re(z,Me,V[ze],Ee);if(it===null){Me===null&&(Me=Xt);break}i&&Me&&it.alternate===null&&s(z,Me),U=y(it,U,ze),De===null?Ne=it:De.sibling=it,De=it,Me=Xt}if(ze===V.length)return l(z,Me),St&&Es(z,ze),Ne;if(Me===null){for(;ze<V.length;ze++)Me=ce(z,V[ze],Ee),Me!==null&&(U=y(Me,U,ze),De===null?Ne=Me:De.sibling=Me,De=Me);return St&&Es(z,ze),Ne}for(Me=h(z,Me);ze<V.length;ze++)Xt=xe(Me,z,ze,V[ze],Ee),Xt!==null&&(i&&Xt.alternate!==null&&Me.delete(Xt.key===null?ze:Xt.key),U=y(Xt,U,ze),De===null?Ne=Xt:De.sibling=Xt,De=Xt);return i&&Me.forEach(function(ji){return s(z,ji)}),St&&Es(z,ze),Ne}function ke(z,U,V,Ee){var Ne=ne(V);if(typeof Ne!="function")throw Error(n(150));if(V=Ne.call(V),V==null)throw Error(n(151));for(var De=Ne=null,Me=U,ze=U=0,Xt=null,it=V.next();Me!==null&&!it.done;ze++,it=V.next()){Me.index>ze?(Xt=Me,Me=null):Xt=Me.sibling;var ji=re(z,Me,it.value,Ee);if(ji===null){Me===null&&(Me=Xt);break}i&&Me&&ji.alternate===null&&s(z,Me),U=y(ji,U,ze),De===null?Ne=ji:De.sibling=ji,De=ji,Me=Xt}if(it.done)return l(z,Me),St&&Es(z,ze),Ne;if(Me===null){for(;!it.done;ze++,it=V.next())it=ce(z,it.value,Ee),it!==null&&(U=y(it,U,ze),De===null?Ne=it:De.sibling=it,De=it);return St&&Es(z,ze),Ne}for(Me=h(z,Me);!it.done;ze++,it=V.next())it=xe(Me,z,ze,it.value,Ee),it!==null&&(i&&it.alternate!==null&&Me.delete(it.key===null?ze:it.key),U=y(it,U,ze),De===null?Ne=it:De.sibling=it,De=it);return i&&Me.forEach(function(JF){return s(z,JF)}),St&&Es(z,ze),Ne}function Mt(z,U,V,Ee){if(typeof V=="object"&&V!==null&&V.type===te&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case X:e:{for(var Ne=V.key,De=U;De!==null;){if(De.key===Ne){if(Ne=V.type,Ne===te){if(De.tag===7){l(z,De.sibling),U=g(De,V.props.children),U.return=z,z=U;break e}}else if(De.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ce&&p_(Ne)===De.type){l(z,De.sibling),U=g(De,V.props),U.ref=cu(z,De,V),U.return=z,z=U;break e}l(z,De);break}else s(z,De);De=De.sibling}V.type===te?(U=Cs(V.props.children,z.mode,Ee,V.key),U.return=z,z=U):(Ee=Qc(V.type,V.key,V.props,null,z.mode,Ee),Ee.ref=cu(z,U,V),Ee.return=z,z=Ee)}return x(z);case B:e:{for(De=V.key;U!==null;){if(U.key===De)if(U.tag===4&&U.stateNode.containerInfo===V.containerInfo&&U.stateNode.implementation===V.implementation){l(z,U.sibling),U=g(U,V.children||[]),U.return=z,z=U;break e}else{l(z,U);break}else s(z,U);U=U.sibling}U=Bm(V,z.mode,Ee),U.return=z,z=U}return x(z);case Ce:return De=V._init,Mt(z,U,De(V._payload),Ee)}if(je(V))return Ae(z,U,V,Ee);if(ne(V))return ke(z,U,V,Ee);Ac(z,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,U!==null&&U.tag===6?(l(z,U.sibling),U=g(U,V),U.return=z,z=U):(l(z,U),U=Fm(V,z.mode,Ee),U.return=z,z=U),x(z)):l(z,U)}return Mt}var ko=m_(!0),g_=m_(!1),vc=Ii(null),kc=null,No=null,Wp=null;function Gp(){Wp=No=kc=null}function Kp(i){var s=vc.current;yt(vc),i._currentValue=s}function Qp(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 Oo(i,s){kc=i,Wp=No=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(kn=!0),i.firstContext=null)}function Zn(i){var s=i._currentValue;if(Wp!==i)if(i={context:i,memoizedValue:s,next:null},No===null){if(kc===null)throw Error(n(308));No=i,kc.dependencies={lanes:0,firstContext:i}}else No=No.next=i;return s}var ys=null;function Xp(i){ys===null?ys=[i]:ys.push(i)}function E_(i,s,l,h){var g=s.interleaved;return g===null?(l.next=l,Xp(s)):(l.next=g.next,g.next=l),s.interleaved=l,si(i,h)}function si(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 Li=!1;function Jp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function y_(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 oi(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Di(i,s,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(nt&2)!==0){var g=h.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),h.pending=s,si(i,l)}return g=h.interleaved,g===null?(s.next=s,Xp(h)):(s.next=g.next,g.next=s),h.interleaved=s,si(i,l)}function Nc(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,fp(i,l)}}function b_(i,s){var l=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var g=null,y=null;if(l=l.firstBaseUpdate,l!==null){do{var x={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};y===null?g=y=x:y=y.next=x,l=l.next}while(l!==null);y===null?g=y=s:y=y.next=s}else g=y=s;l={baseState:h.baseState,firstBaseUpdate:g,lastBaseUpdate:y,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 Oc(i,s,l,h){var g=i.updateQueue;Li=!1;var y=g.firstBaseUpdate,x=g.lastBaseUpdate,I=g.shared.pending;if(I!==null){g.shared.pending=null;var D=I,G=D.next;D.next=null,x===null?y=G:x.next=G,x=D;var se=i.alternate;se!==null&&(se=se.updateQueue,I=se.lastBaseUpdate,I!==x&&(I===null?se.firstBaseUpdate=G:I.next=G,se.lastBaseUpdate=D))}if(y!==null){var ce=g.baseState;x=0,se=G=D=null,I=y;do{var re=I.lane,xe=I.eventTime;if((h&re)===re){se!==null&&(se=se.next={eventTime:xe,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var Ae=i,ke=I;switch(re=s,xe=l,ke.tag){case 1:if(Ae=ke.payload,typeof Ae=="function"){ce=Ae.call(xe,ce,re);break e}ce=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=ke.payload,re=typeof Ae=="function"?Ae.call(xe,ce,re):Ae,re==null)break e;ce=S({},ce,re);break e;case 2:Li=!0}}I.callback!==null&&I.lane!==0&&(i.flags|=64,re=g.effects,re===null?g.effects=[I]:re.push(I))}else xe={eventTime:xe,lane:re,tag:I.tag,payload:I.payload,callback:I.callback,next:null},se===null?(G=se=xe,D=ce):se=se.next=xe,x|=re;if(I=I.next,I===null){if(I=g.shared.pending,I===null)break;re=I,I=re.next,re.next=null,g.lastBaseUpdate=re,g.shared.pending=null}}while(!0);if(se===null&&(D=ce),g.baseState=D,g.firstBaseUpdate=G,g.lastBaseUpdate=se,s=g.shared.interleaved,s!==null){g=s;do x|=g.lane,g=g.next;while(g!==s)}else y===null&&(g.shared.lanes=0);_s|=x,i.lanes=x,i.memoizedState=ce}}function T_(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var h=i[s],g=h.callback;if(g!==null){if(h.callback=null,h=l,typeof g!="function")throw Error(n(191,g));g.call(h)}}}var du={},Fr=Ii(du),fu=Ii(du),hu=Ii(du);function bs(i){if(i===du)throw Error(n(174));return i}function Zp(i,s){switch(mt(hu,s),mt(fu,i),mt(Fr,du),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:fe(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=fe(s,i)}yt(Fr),mt(Fr,s)}function Io(){yt(Fr),yt(fu),yt(hu)}function __(i){bs(hu.current);var s=bs(Fr.current),l=fe(s,i.type);s!==l&&(mt(fu,i),mt(Fr,l))}function em(i){fu.current===i&&(yt(Fr),yt(fu))}var At=Ii(0);function Ic(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 tm=[];function nm(){for(var i=0;i<tm.length;i++)tm[i]._workInProgressVersionPrimary=null;tm.length=0}var Pc=W.ReactCurrentDispatcher,rm=W.ReactCurrentBatchConfig,Ts=0,vt=null,zt=null,Kt=null,Rc=!1,pu=!1,mu=0,TF=0;function cn(){throw Error(n(321))}function im(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!pr(i[l],s[l]))return!1;return!0}function sm(i,s,l,h,g,y){if(Ts=y,vt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Pc.current=i===null||i.memoizedState===null?SF:CF,i=l(h,g),pu){y=0;do{if(pu=!1,mu=0,25<=y)throw Error(n(301));y+=1,Kt=zt=null,s.updateQueue=null,Pc.current=AF,i=l(h,g)}while(pu)}if(Pc.current=Mc,s=zt!==null&&zt.next!==null,Ts=0,Kt=zt=vt=null,Rc=!1,s)throw Error(n(300));return i}function om(){var i=mu!==0;return mu=0,i}function Br(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Kt===null?vt.memoizedState=Kt=i:Kt=Kt.next=i,Kt}function er(){if(zt===null){var i=vt.alternate;i=i!==null?i.memoizedState:null}else i=zt.next;var s=Kt===null?vt.memoizedState:Kt.next;if(s!==null)Kt=s,zt=i;else{if(i===null)throw Error(n(310));zt=i,i={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},Kt===null?vt.memoizedState=Kt=i:Kt=Kt.next=i}return Kt}function gu(i,s){return typeof s=="function"?s(i):s}function am(i){var s=er(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=zt,g=h.baseQueue,y=l.pending;if(y!==null){if(g!==null){var x=g.next;g.next=y.next,y.next=x}h.baseQueue=g=y,l.pending=null}if(g!==null){y=g.next,h=h.baseState;var I=x=null,D=null,G=y;do{var se=G.lane;if((Ts&se)===se)D!==null&&(D=D.next={lane:0,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),h=G.hasEagerState?G.eagerState:i(h,G.action);else{var ce={lane:se,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null};D===null?(I=D=ce,x=h):D=D.next=ce,vt.lanes|=se,_s|=se}G=G.next}while(G!==null&&G!==y);D===null?x=h:D.next=I,pr(h,s.memoizedState)||(kn=!0),s.memoizedState=h,s.baseState=x,s.baseQueue=D,l.lastRenderedState=h}if(i=l.interleaved,i!==null){g=i;do y=g.lane,vt.lanes|=y,_s|=y,g=g.next;while(g!==i)}else g===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function um(i){var s=er(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,g=l.pending,y=s.memoizedState;if(g!==null){l.pending=null;var x=g=g.next;do y=i(y,x.action),x=x.next;while(x!==g);pr(y,s.memoizedState)||(kn=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),l.lastRenderedState=y}return[y,h]}function x_(){}function w_(i,s){var l=vt,h=er(),g=s(),y=!pr(h.memoizedState,g);if(y&&(h.memoizedState=g,kn=!0),h=h.queue,lm(A_.bind(null,l,h,i),[i]),h.getSnapshot!==s||y||Kt!==null&&Kt.memoizedState.tag&1){if(l.flags|=2048,Eu(9,C_.bind(null,l,h,g,s),void 0,null),Qt===null)throw Error(n(349));(Ts&30)!==0||S_(l,s,g)}return g}function S_(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=vt.updateQueue,s===null?(s={lastEffect:null,stores:null},vt.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function C_(i,s,l,h){s.value=l,s.getSnapshot=h,v_(s)&&k_(i)}function A_(i,s,l){return l(function(){v_(s)&&k_(i)})}function v_(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!pr(i,l)}catch(h){return!0}}function k_(i){var s=si(i,1);s!==null&&br(s,i,1,-1)}function N_(i){var s=Br();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gu,lastRenderedState:i},s.queue=i,i=i.dispatch=wF.bind(null,vt,i),[s.memoizedState,i]}function Eu(i,s,l,h){return i={tag:i,create:s,destroy:l,deps:h,next:null},s=vt.updateQueue,s===null?(s={lastEffect:null,stores:null},vt.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 O_(){return er().memoizedState}function Lc(i,s,l,h){var g=Br();vt.flags|=i,g.memoizedState=Eu(1|s,l,void 0,h===void 0?null:h)}function Dc(i,s,l,h){var g=er();h=h===void 0?null:h;var y=void 0;if(zt!==null){var x=zt.memoizedState;if(y=x.destroy,h!==null&&im(h,x.deps)){g.memoizedState=Eu(s,l,y,h);return}}vt.flags|=i,g.memoizedState=Eu(1|s,l,y,h)}function I_(i,s){return Lc(8390656,8,i,s)}function lm(i,s){return Dc(2048,8,i,s)}function P_(i,s){return Dc(4,2,i,s)}function R_(i,s){return Dc(4,4,i,s)}function L_(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 D_(i,s,l){return l=l!=null?l.concat([i]):null,Dc(4,4,L_.bind(null,s,i),l)}function cm(){}function M_(i,s){var l=er();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&im(s,h[1])?h[0]:(l.memoizedState=[i,s],i)}function F_(i,s){var l=er();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&im(s,h[1])?h[0]:(i=i(),l.memoizedState=[i,s],i)}function B_(i,s,l){return(Ts&21)===0?(i.baseState&&(i.baseState=!1,kn=!0),i.memoizedState=l):(pr(l,s)||(l=p2(),vt.lanes|=l,_s|=l,i.baseState=!0),s)}function _F(i,s){var l=lt;lt=l!==0&&4>l?l:4,i(!0);var h=rm.transition;rm.transition={};try{i(!1),s()}finally{lt=l,rm.transition=h}}function U_(){return er().memoizedState}function xF(i,s,l){var h=Ui(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},H_(i))z_(s,l);else if(l=E_(i,s,l,h),l!==null){var g=En();br(l,i,h,g),j_(l,s,h)}}function wF(i,s,l){var h=Ui(i),g={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(H_(i))z_(s,g);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=s.lastRenderedReducer,y!==null))try{var x=s.lastRenderedState,I=y(x,l);if(g.hasEagerState=!0,g.eagerState=I,pr(I,x)){var D=s.interleaved;D===null?(g.next=g,Xp(s)):(g.next=D.next,D.next=g),s.interleaved=g;return}}catch(G){}l=E_(i,s,g,h),l!==null&&(g=En(),br(l,i,h,g),j_(l,s,h))}}function H_(i){var s=i.alternate;return i===vt||s!==null&&s===vt}function z_(i,s){pu=Rc=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function j_(i,s,l){if((l&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,l|=h,s.lanes=l,fp(i,l)}}var Mc={readContext:Zn,useCallback:cn,useContext:cn,useEffect:cn,useImperativeHandle:cn,useInsertionEffect:cn,useLayoutEffect:cn,useMemo:cn,useReducer:cn,useRef:cn,useState:cn,useDebugValue:cn,useDeferredValue:cn,useTransition:cn,useMutableSource:cn,useSyncExternalStore:cn,useId:cn,unstable_isNewReconciler:!1},SF={readContext:Zn,useCallback:function(i,s){return Br().memoizedState=[i,s===void 0?null:s],i},useContext:Zn,useEffect:I_,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,Lc(4194308,4,L_.bind(null,s,i),l)},useLayoutEffect:function(i,s){return Lc(4194308,4,i,s)},useInsertionEffect:function(i,s){return Lc(4,2,i,s)},useMemo:function(i,s){var l=Br();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var h=Br();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=xF.bind(null,vt,i),[h.memoizedState,i]},useRef:function(i){var s=Br();return i={current:i},s.memoizedState=i},useState:N_,useDebugValue:cm,useDeferredValue:function(i){return Br().memoizedState=i},useTransition:function(){var i=N_(!1),s=i[0];return i=_F.bind(null,i[1]),Br().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var h=vt,g=Br();if(St){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),Qt===null)throw Error(n(349));(Ts&30)!==0||S_(h,s,l)}g.memoizedState=l;var y={value:l,getSnapshot:s};return g.queue=y,I_(A_.bind(null,h,y,i),[i]),h.flags|=2048,Eu(9,C_.bind(null,h,y,l,s),void 0,null),l},useId:function(){var i=Br(),s=Qt.identifierPrefix;if(St){var l=ii,h=ri;l=(h&~(1<<32-hr(h)-1)).toString(32)+l,s=":"+s+"R"+l,l=mu++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=TF++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},CF={readContext:Zn,useCallback:M_,useContext:Zn,useEffect:lm,useImperativeHandle:D_,useInsertionEffect:P_,useLayoutEffect:R_,useMemo:F_,useReducer:am,useRef:O_,useState:function(){return am(gu)},useDebugValue:cm,useDeferredValue:function(i){var s=er();return B_(s,zt.memoizedState,i)},useTransition:function(){var i=am(gu)[0],s=er().memoizedState;return[i,s]},useMutableSource:x_,useSyncExternalStore:w_,useId:U_,unstable_isNewReconciler:!1},AF={readContext:Zn,useCallback:M_,useContext:Zn,useEffect:lm,useImperativeHandle:D_,useInsertionEffect:P_,useLayoutEffect:R_,useMemo:F_,useReducer:um,useRef:O_,useState:function(){return um(gu)},useDebugValue:cm,useDeferredValue:function(i){var s=er();return zt===null?s.memoizedState=i:B_(s,zt.memoizedState,i)},useTransition:function(){var i=um(gu)[0],s=er().memoizedState;return[i,s]},useMutableSource:x_,useSyncExternalStore:w_,useId:U_,unstable_isNewReconciler:!1};function gr(i,s){if(i&&i.defaultProps){s=S({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function dm(i,s,l,h){s=i.memoizedState,l=l(h,s),l=l==null?s:S({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Fc={isMounted:function(i){return(i=i._reactInternals)?hs(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var h=En(),g=Ui(i),y=oi(h,g);y.payload=s,l!=null&&(y.callback=l),s=Di(i,y,g),s!==null&&(br(s,i,g,h),Nc(s,i,g))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var h=En(),g=Ui(i),y=oi(h,g);y.tag=1,y.payload=s,l!=null&&(y.callback=l),s=Di(i,y,g),s!==null&&(br(s,i,g,h),Nc(s,i,g))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=En(),h=Ui(i),g=oi(l,h);g.tag=2,s!=null&&(g.callback=s),s=Di(i,g,h),s!==null&&(br(s,i,h,l),Nc(s,i,h))}};function $_(i,s,l,h,g,y,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,y,x):s.prototype&&s.prototype.isPureReactComponent?!ru(l,h)||!ru(g,y):!0}function V_(i,s,l){var h=!1,g=Pi,y=s.contextType;return typeof y=="object"&&y!==null?y=Zn(y):(g=vn(s)?ms:ln.current,h=s.contextTypes,y=(h=h!=null)?So(i,g):Pi),s=new s(l,y),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Fc,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=g,i.__reactInternalMemoizedMaskedChildContext=y),s}function q_(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&&Fc.enqueueReplaceState(s,s.state,null)}function fm(i,s,l,h){var g=i.stateNode;g.props=l,g.state=i.memoizedState,g.refs={},Jp(i);var y=s.contextType;typeof y=="object"&&y!==null?g.context=Zn(y):(y=vn(s)?ms:ln.current,g.context=So(i,y)),g.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(dm(i,s,y,l),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&Fc.enqueueReplaceState(g,g.state,null),Oc(i,l,g,h),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308)}function Po(i,s){try{var l="",h=s;do l+=Re(h),h=h.return;while(h);var g=l}catch(y){g=`
|
|
28
|
+
`+g[x].replace(" at new "," at ");return i.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",i.displayName)),D}while(1<=x&&0<=I);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?Q(i):""}function Le(i){switch(i.tag){case 5:return Q(i.type);case 16:return Q("Lazy");case 13:return Q("Suspense");case 19:return Q("SuspenseList");case 0:case 2:case 15:return i=_e(i.type,!1),i;case 11:return i=_e(i.type.render,!1),i;case 1:return i=_e(i.type,!0),i;default:return""}}function Oe(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case te:return"Fragment";case B:return"Portal";case ye:return"Profiler";case ge:return"StrictMode";case le:return"Suspense";case fe:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case se:return(i.displayName||"Context")+".Consumer";case F:return(i._context.displayName||"Context")+".Provider";case he:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case be:return s=i.displayName||null,s!==null?s:Oe(i.type)||"Memo";case Ae:s=i._payload,i=i._init;try{return Oe(i(s))}catch(l){}}return null}function Ge(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 Oe(s);case 8:return s===ge?"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 Ye(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function tt(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Nt(i){var s=tt(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 g=l.get,y=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return g.call(this)},set:function(x){h=""+x,y.call(this,x)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(x){h=""+x},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Kn(i){i._valueTracker||(i._valueTracker=Nt(i))}function ds(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),h="";return i&&(h=tt(i)?i.checked?"true":"false":i.value),i=h,i!==l?(s.setValue(i),!0):!1}function Zr(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 _i(i,s){var l=s.checked;return S({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function fs(i,s){var l=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;l=Ye(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 xi(i,s){s=s.checked,s!=null&&L(i,"checked",s,!1)}function ei(i,s){xi(i,s);var l=Ye(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")?Be(i,s.type,l):s.hasOwnProperty("defaultValue")&&Be(i,s.type,Ye(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function we(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 Be(i,s,l){(s!=="number"||Zr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var je=Array.isArray;function Xe(i,s,l,h){if(i=i.options,s){s={};for(var g=0;g<l.length;g++)s["$"+l[g]]=!0;for(l=0;l<i.length;l++)g=s.hasOwnProperty("$"+i[l].value),i[l].selected!==g&&(i[l].selected=g),g&&h&&(i[l].defaultSelected=!0)}else{for(l=""+Ye(l),s=null,g=0;g<i.length;g++){if(i[g].value===l){i[g].selected=!0,h&&(i[g].defaultSelected=!0);return}s!==null||i[g].disabled||(s=i[g])}s!==null&&(s.selected=!0)}}function ct(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return S({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function gt(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(je(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:Ye(l)}}function mn(i,s){var l=Ye(s.value),h=Ye(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 Ct(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function X(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 oe(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?X(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Re,$e=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,h,g){MSApp.execUnsafeLocalFunction(function(){return i(s,l,h,g)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Re=Re||document.createElement("div"),Re.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Re.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Je(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var Ht={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},Qn=["Webkit","ms","Moz","O"];Object.keys(Ht).forEach(function(i){Qn.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Ht[s]=Ht[i]})});function Xn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||Ht.hasOwnProperty(i)&&Ht[i]?(""+s).trim():s+"px"}function wi(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var h=l.indexOf("--")===0,g=Xn(l,s[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,g):i[l]=g}}var hs=S({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Zt(i,s){if(s){if(hs[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 Dr(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 Fn=null;function sp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var op=null,ho=null,po=null;function n2(i){if(i=lu(i)){if(typeof op!="function")throw Error(n(280));var s=i.stateNode;s&&(s=Tc(s),op(i.stateNode,i.type,s))}}function r2(i){ho?po?po.push(i):po=[i]:ho=i}function i2(){if(ho){var i=ho,s=po;if(po=ho=null,n2(i),s)for(i=0;i<s.length;i++)n2(s[i])}}function s2(i,s){return i(s)}function o2(){}var ap=!1;function a2(i,s,l){if(ap)return i(s,l);ap=!0;try{return s2(i,s,l)}finally{ap=!1,(ho!==null||po!==null)&&(o2(),i2())}}function ja(i,s){var l=i.stateNode;if(l===null)return null;var h=Tc(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 up=!1;if(c)try{var $a={};Object.defineProperty($a,"passive",{get:function(){up=!0}}),window.addEventListener("test",$a,$a),window.removeEventListener("test",$a,$a)}catch(i){up=!1}function dM(i,s,l,h,g,y,x,I,D){var G=Array.prototype.slice.call(arguments,3);try{s.apply(l,G)}catch(ae){this.onError(ae)}}var Va=!1,Jl=null,Zl=!1,lp=null,fM={onError:function(i){Va=!0,Jl=i}};function hM(i,s,l,h,g,y,x,I,D){Va=!1,Jl=null,dM.apply(fM,arguments)}function pM(i,s,l,h,g,y,x,I,D){if(hM.apply(this,arguments),Va){if(Va){var G=Jl;Va=!1,Jl=null}else throw Error(n(198));Zl||(Zl=!0,lp=G)}}function ps(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 u2(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 l2(i){if(ps(i)!==i)throw Error(n(188))}function mM(i){var s=i.alternate;if(!s){if(s=ps(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,h=s;;){var g=l.return;if(g===null)break;var y=g.alternate;if(y===null){if(h=g.return,h!==null){l=h;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===l)return l2(g),i;if(y===h)return l2(g),s;y=y.sibling}throw Error(n(188))}if(l.return!==h.return)l=g,h=y;else{for(var x=!1,I=g.child;I;){if(I===l){x=!0,l=g,h=y;break}if(I===h){x=!0,h=g,l=y;break}I=I.sibling}if(!x){for(I=y.child;I;){if(I===l){x=!0,l=y,h=g;break}if(I===h){x=!0,h=y,l=g;break}I=I.sibling}if(!x)throw Error(n(189))}}if(l.alternate!==h)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:s}function c2(i){return i=mM(i),i!==null?d2(i):null}function d2(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=d2(i);if(s!==null)return s;i=i.sibling}return null}var f2=t.unstable_scheduleCallback,h2=t.unstable_cancelCallback,gM=t.unstable_shouldYield,EM=t.unstable_requestPaint,Dt=t.unstable_now,yM=t.unstable_getCurrentPriorityLevel,cp=t.unstable_ImmediatePriority,p2=t.unstable_UserBlockingPriority,ec=t.unstable_NormalPriority,bM=t.unstable_LowPriority,m2=t.unstable_IdlePriority,tc=null,Mr=null;function TM(i){if(Mr&&typeof Mr.onCommitFiberRoot=="function")try{Mr.onCommitFiberRoot(tc,i,void 0,(i.current.flags&128)===128)}catch(s){}}var pr=Math.clz32?Math.clz32:wM,_M=Math.log,xM=Math.LN2;function wM(i){return i>>>=0,i===0?32:31-(_M(i)/xM|0)|0}var nc=64,rc=4194304;function qa(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 ic(i,s){var l=i.pendingLanes;if(l===0)return 0;var h=0,g=i.suspendedLanes,y=i.pingedLanes,x=l&268435455;if(x!==0){var I=x&~g;I!==0?h=qa(I):(y&=x,y!==0&&(h=qa(y)))}else x=l&~g,x!==0?h=qa(x):y!==0&&(h=qa(y));if(h===0)return 0;if(s!==0&&s!==h&&(s&g)===0&&(g=h&-h,y=s&-s,g>=y||g===16&&(y&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),g=1<<l,h|=i[l],s&=~g;return h}function SM(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 CM(i,s){for(var l=i.suspendedLanes,h=i.pingedLanes,g=i.expirationTimes,y=i.pendingLanes;0<y;){var x=31-pr(y),I=1<<x,D=g[x];D===-1?((I&l)===0||(I&h)!==0)&&(g[x]=SM(I,s)):D<=s&&(i.expiredLanes|=I),y&=~I}}function dp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function g2(){var i=nc;return nc<<=1,(nc&4194240)===0&&(nc=64),i}function fp(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function Ya(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 AM(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 g=31-pr(l),y=1<<g;s[g]=0,h[g]=-1,i[g]=-1,l&=~y}}function hp(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var h=31-pr(l),g=1<<h;g&s|i[h]&s&&(i[h]|=s),l&=~g}}var ut=0;function E2(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var y2,pp,b2,T2,_2,mp=!1,sc=[],Si=null,Ci=null,Ai=null,Wa=new Map,Ga=new Map,vi=[],vM="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 x2(i,s){switch(i){case"focusin":case"focusout":Si=null;break;case"dragenter":case"dragleave":Ci=null;break;case"mouseover":case"mouseout":Ai=null;break;case"pointerover":case"pointerout":Wa.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ga.delete(s.pointerId)}}function Ka(i,s,l,h,g,y){return i===null||i.nativeEvent!==y?(i={blockedOn:s,domEventName:l,eventSystemFlags:h,nativeEvent:y,targetContainers:[g]},s!==null&&(s=lu(s),s!==null&&pp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),i)}function kM(i,s,l,h,g){switch(s){case"focusin":return Si=Ka(Si,i,s,l,h,g),!0;case"dragenter":return Ci=Ka(Ci,i,s,l,h,g),!0;case"mouseover":return Ai=Ka(Ai,i,s,l,h,g),!0;case"pointerover":var y=g.pointerId;return Wa.set(y,Ka(Wa.get(y)||null,i,s,l,h,g)),!0;case"gotpointercapture":return y=g.pointerId,Ga.set(y,Ka(Ga.get(y)||null,i,s,l,h,g)),!0}return!1}function w2(i){var s=ms(i.target);if(s!==null){var l=ps(s);if(l!==null){if(s=l.tag,s===13){if(s=u2(l),s!==null){i.blockedOn=s,_2(i.priority,function(){b2(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 oc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=Ep(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Fn=h,l.target.dispatchEvent(h),Fn=null}else return s=lu(l),s!==null&&pp(s),i.blockedOn=l,!1;s.shift()}return!0}function S2(i,s,l){oc(i)&&l.delete(s)}function NM(){mp=!1,Si!==null&&oc(Si)&&(Si=null),Ci!==null&&oc(Ci)&&(Ci=null),Ai!==null&&oc(Ai)&&(Ai=null),Wa.forEach(S2),Ga.forEach(S2)}function Qa(i,s){i.blockedOn===s&&(i.blockedOn=null,mp||(mp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,NM)))}function Xa(i){function s(g){return Qa(g,i)}if(0<sc.length){Qa(sc[0],i);for(var l=1;l<sc.length;l++){var h=sc[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Si!==null&&Qa(Si,i),Ci!==null&&Qa(Ci,i),Ai!==null&&Qa(Ai,i),Wa.forEach(s),Ga.forEach(s),l=0;l<vi.length;l++)h=vi[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<vi.length&&(l=vi[0],l.blockedOn===null);)w2(l),l.blockedOn===null&&vi.shift()}var mo=W.ReactCurrentBatchConfig,ac=!0;function OM(i,s,l,h){var g=ut,y=mo.transition;mo.transition=null;try{ut=1,gp(i,s,l,h)}finally{ut=g,mo.transition=y}}function IM(i,s,l,h){var g=ut,y=mo.transition;mo.transition=null;try{ut=4,gp(i,s,l,h)}finally{ut=g,mo.transition=y}}function gp(i,s,l,h){if(ac){var g=Ep(i,s,l,h);if(g===null)Lp(i,s,h,uc,l),x2(i,h);else if(kM(g,i,s,l,h))h.stopPropagation();else if(x2(i,h),s&4&&-1<vM.indexOf(i)){for(;g!==null;){var y=lu(g);if(y!==null&&y2(y),y=Ep(i,s,l,h),y===null&&Lp(i,s,h,uc,l),y===g)break;g=y}g!==null&&h.stopPropagation()}else Lp(i,s,h,null,l)}}var uc=null;function Ep(i,s,l,h){if(uc=null,i=sp(h),i=ms(i),i!==null)if(s=ps(i),s===null)i=null;else if(l=s.tag,l===13){if(i=u2(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 uc=i,null}function C2(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(yM()){case cp:return 1;case p2:return 4;case ec:case bM:return 16;case m2:return 536870912;default:return 16}default:return 16}}var ki=null,yp=null,lc=null;function A2(){if(lc)return lc;var i,s=yp,l=s.length,h,g="value"in ki?ki.value:ki.textContent,y=g.length;for(i=0;i<l&&s[i]===g[i];i++);var x=l-i;for(h=1;h<=x&&s[l-h]===g[y-h];h++);return lc=g.slice(i,1<h?1-h:void 0)}function cc(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 dc(){return!0}function v2(){return!1}function Bn(i){function s(l,h,g,y,x){this._reactName=l,this._targetInst=g,this.type=h,this.nativeEvent=y,this.target=x,this.currentTarget=null;for(var I in i)i.hasOwnProperty(I)&&(l=i[I],this[I]=l?l(y):y[I]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?dc:v2,this.isPropagationStopped=v2,this}return S(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=dc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=dc)},persist:function(){},isPersistent:dc}),s}var go={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bp=Bn(go),Ja=S({},go,{view:0,detail:0}),PM=Bn(Ja),Tp,_p,Za,fc=S({},Ja,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wp,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!==Za&&(Za&&i.type==="mousemove"?(Tp=i.screenX-Za.screenX,_p=i.screenY-Za.screenY):_p=Tp=0,Za=i),Tp)},movementY:function(i){return"movementY"in i?i.movementY:_p}}),k2=Bn(fc),RM=S({},fc,{dataTransfer:0}),LM=Bn(RM),DM=S({},Ja,{relatedTarget:0}),xp=Bn(DM),MM=S({},go,{animationName:0,elapsedTime:0,pseudoElement:0}),FM=Bn(MM),BM=S({},go,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),UM=Bn(BM),HM=S({},go,{data:0}),N2=Bn(HM),zM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jM={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"},$M={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function VM(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=$M[i])?!!s[i]:!1}function wp(){return VM}var qM=S({},Ja,{key:function(i){if(i.key){var s=zM[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=cc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?jM[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wp,charCode:function(i){return i.type==="keypress"?cc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?cc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),YM=Bn(qM),WM=S({},fc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),O2=Bn(WM),GM=S({},Ja,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wp}),KM=Bn(GM),QM=S({},go,{propertyName:0,elapsedTime:0,pseudoElement:0}),XM=Bn(QM),JM=S({},fc,{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}),ZM=Bn(JM),eF=[9,13,27,32],Sp=c&&"CompositionEvent"in window,eu=null;c&&"documentMode"in document&&(eu=document.documentMode);var tF=c&&"TextEvent"in window&&!eu,I2=c&&(!Sp||eu&&8<eu&&11>=eu),P2=" ",R2=!1;function L2(i,s){switch(i){case"keyup":return eF.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function D2(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Eo=!1;function nF(i,s){switch(i){case"compositionend":return D2(s);case"keypress":return s.which!==32?null:(R2=!0,P2);case"textInput":return i=s.data,i===P2&&R2?null:i;default:return null}}function rF(i,s){if(Eo)return i==="compositionend"||!Sp&&L2(i,s)?(i=A2(),lc=yp=ki=null,Eo=!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 I2&&s.locale!=="ko"?null:s.data;default:return null}}var iF={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function M2(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!iF[i.type]:s==="textarea"}function F2(i,s,l,h){r2(h),s=Ec(s,"onChange"),0<s.length&&(l=new bp("onChange","change",null,l,h),i.push({event:l,listeners:s}))}var tu=null,nu=null;function sF(i){t_(i,0)}function hc(i){var s=xo(i);if(ds(s))return i}function oF(i,s){if(i==="change")return s}var B2=!1;if(c){var Cp;if(c){var Ap="oninput"in document;if(!Ap){var U2=document.createElement("div");U2.setAttribute("oninput","return;"),Ap=typeof U2.oninput=="function"}Cp=Ap}else Cp=!1;B2=Cp&&(!document.documentMode||9<document.documentMode)}function H2(){tu&&(tu.detachEvent("onpropertychange",z2),nu=tu=null)}function z2(i){if(i.propertyName==="value"&&hc(nu)){var s=[];F2(s,nu,i,sp(i)),a2(sF,s)}}function aF(i,s,l){i==="focusin"?(H2(),tu=s,nu=l,tu.attachEvent("onpropertychange",z2)):i==="focusout"&&H2()}function uF(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return hc(nu)}function lF(i,s){if(i==="click")return hc(s)}function cF(i,s){if(i==="input"||i==="change")return hc(s)}function dF(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var mr=typeof Object.is=="function"?Object.is:dF;function ru(i,s){if(mr(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 g=l[h];if(!d.call(s,g)||!mr(i[g],s[g]))return!1}return!0}function j2(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function $2(i,s){var l=j2(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=j2(l)}}function V2(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?V2(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function q2(){for(var i=window,s=Zr();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=Zr(i.document)}return s}function vp(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 fF(i){var s=q2(),l=i.focusedElem,h=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&V2(l.ownerDocument.documentElement,l)){if(h!==null&&vp(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 g=l.textContent.length,y=Math.min(h.start,g);h=h.end===void 0?y:Math.min(h.end,g),!i.extend&&y>h&&(g=h,h=y,y=g),g=$2(l,y);var x=$2(l,h);g&&x&&(i.rangeCount!==1||i.anchorNode!==g.node||i.anchorOffset!==g.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),i.removeAllRanges(),y>h?(i.addRange(s),i.extend(x.node,x.offset)):(s.setEnd(x.node,x.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 hF=c&&"documentMode"in document&&11>=document.documentMode,yo=null,kp=null,iu=null,Np=!1;function Y2(i,s,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Np||yo==null||yo!==Zr(h)||(h=yo,"selectionStart"in h&&vp(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}),iu&&ru(iu,h)||(iu=h,h=Ec(kp,"onSelect"),0<h.length&&(s=new bp("onSelect","select",null,s,l),i.push({event:s,listeners:h}),s.target=yo)))}function pc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var bo={animationend:pc("Animation","AnimationEnd"),animationiteration:pc("Animation","AnimationIteration"),animationstart:pc("Animation","AnimationStart"),transitionend:pc("Transition","TransitionEnd")},Op={},W2={};c&&(W2=document.createElement("div").style,"AnimationEvent"in window||(delete bo.animationend.animation,delete bo.animationiteration.animation,delete bo.animationstart.animation),"TransitionEvent"in window||delete bo.transitionend.transition);function mc(i){if(Op[i])return Op[i];if(!bo[i])return i;var s=bo[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in W2)return Op[i]=s[l];return i}var G2=mc("animationend"),K2=mc("animationiteration"),Q2=mc("animationstart"),X2=mc("transitionend"),J2=new Map,Z2="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 Ni(i,s){J2.set(i,s),a(s,[i])}for(var Ip=0;Ip<Z2.length;Ip++){var Pp=Z2[Ip],pF=Pp.toLowerCase(),mF=Pp[0].toUpperCase()+Pp.slice(1);Ni(pF,"on"+mF)}Ni(G2,"onAnimationEnd"),Ni(K2,"onAnimationIteration"),Ni(Q2,"onAnimationStart"),Ni("dblclick","onDoubleClick"),Ni("focusin","onFocus"),Ni("focusout","onBlur"),Ni(X2,"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 su="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(" "),gF=new Set("cancel close invalid load scroll toggle".split(" ").concat(su));function e_(i,s,l){var h=i.type||"unknown-event";i.currentTarget=l,pM(h,s,void 0,i),i.currentTarget=null}function t_(i,s){s=(s&4)!==0;for(var l=0;l<i.length;l++){var h=i[l],g=h.event;h=h.listeners;e:{var y=void 0;if(s)for(var x=h.length-1;0<=x;x--){var I=h[x],D=I.instance,G=I.currentTarget;if(I=I.listener,D!==y&&g.isPropagationStopped())break e;e_(g,I,G),y=D}else for(x=0;x<h.length;x++){if(I=h[x],D=I.instance,G=I.currentTarget,I=I.listener,D!==y&&g.isPropagationStopped())break e;e_(g,I,G),y=D}}}if(Zl)throw i=lp,Zl=!1,lp=null,i}function Et(i,s){var l=s[Hp];l===void 0&&(l=s[Hp]=new Set);var h=i+"__bubble";l.has(h)||(n_(s,i,2,!1),l.add(h))}function Rp(i,s,l){var h=0;s&&(h|=4),n_(l,i,h,s)}var gc="_reactListening"+Math.random().toString(36).slice(2);function ou(i){if(!i[gc]){i[gc]=!0,r.forEach(function(l){l!=="selectionchange"&&(gF.has(l)||Rp(l,!1,i),Rp(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[gc]||(s[gc]=!0,Rp("selectionchange",!1,s))}}function n_(i,s,l,h){switch(C2(s)){case 1:var g=OM;break;case 4:g=IM;break;default:g=gp}l=g.bind(null,s,l,i),g=void 0,!up||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),h?g!==void 0?i.addEventListener(s,l,{capture:!0,passive:g}):i.addEventListener(s,l,!0):g!==void 0?i.addEventListener(s,l,{passive:g}):i.addEventListener(s,l,!1)}function Lp(i,s,l,h,g){var y=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var x=h.tag;if(x===3||x===4){var I=h.stateNode.containerInfo;if(I===g||I.nodeType===8&&I.parentNode===g)break;if(x===4)for(x=h.return;x!==null;){var D=x.tag;if((D===3||D===4)&&(D=x.stateNode.containerInfo,D===g||D.nodeType===8&&D.parentNode===g))return;x=x.return}for(;I!==null;){if(x=ms(I),x===null)return;if(D=x.tag,D===5||D===6){h=y=x;continue e}I=I.parentNode}}h=h.return}a2(function(){var G=y,ae=sp(l),de=[];e:{var re=J2.get(i);if(re!==void 0){var xe=bp,ve=i;switch(i){case"keypress":if(cc(l)===0)break e;case"keydown":case"keyup":xe=YM;break;case"focusin":ve="focus",xe=xp;break;case"focusout":ve="blur",xe=xp;break;case"beforeblur":case"afterblur":xe=xp;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":xe=k2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=LM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=KM;break;case G2:case K2:case Q2:xe=FM;break;case X2:xe=XM;break;case"scroll":xe=PM;break;case"wheel":xe=ZM;break;case"copy":case"cut":case"paste":xe=UM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=O2}var ke=(s&4)!==0,Mt=!ke&&i==="scroll",z=ke?re!==null?re+"Capture":null:re;ke=[];for(var U=G,$;U!==null;){$=U;var Ee=$.stateNode;if($.tag===5&&Ee!==null&&($=Ee,z!==null&&(Ee=ja(U,z),Ee!=null&&ke.push(au(U,Ee,$)))),Mt)break;U=U.return}0<ke.length&&(re=new xe(re,ve,null,l,ae),de.push({event:re,listeners:ke}))}}if((s&7)===0){e:{if(re=i==="mouseover"||i==="pointerover",xe=i==="mouseout"||i==="pointerout",re&&l!==Fn&&(ve=l.relatedTarget||l.fromElement)&&(ms(ve)||ve[ti]))break e;if((xe||re)&&(re=ae.window===ae?ae:(re=ae.ownerDocument)?re.defaultView||re.parentWindow:window,xe?(ve=l.relatedTarget||l.toElement,xe=G,ve=ve?ms(ve):null,ve!==null&&(Mt=ps(ve),ve!==Mt||ve.tag!==5&&ve.tag!==6)&&(ve=null)):(xe=null,ve=G),xe!==ve)){if(ke=k2,Ee="onMouseLeave",z="onMouseEnter",U="mouse",(i==="pointerout"||i==="pointerover")&&(ke=O2,Ee="onPointerLeave",z="onPointerEnter",U="pointer"),Mt=xe==null?re:xo(xe),$=ve==null?re:xo(ve),re=new ke(Ee,U+"leave",xe,l,ae),re.target=Mt,re.relatedTarget=$,Ee=null,ms(ae)===G&&(ke=new ke(z,U+"enter",ve,l,ae),ke.target=$,ke.relatedTarget=Mt,Ee=ke),Mt=Ee,xe&&ve)t:{for(ke=xe,z=ve,U=0,$=ke;$;$=To($))U++;for($=0,Ee=z;Ee;Ee=To(Ee))$++;for(;0<U-$;)ke=To(ke),U--;for(;0<$-U;)z=To(z),$--;for(;U--;){if(ke===z||z!==null&&ke===z.alternate)break t;ke=To(ke),z=To(z)}ke=null}else ke=null;xe!==null&&r_(de,re,xe,ke,!1),ve!==null&&Mt!==null&&r_(de,Mt,ve,ke,!0)}}e:{if(re=G?xo(G):window,xe=re.nodeName&&re.nodeName.toLowerCase(),xe==="select"||xe==="input"&&re.type==="file")var Ne=oF;else if(M2(re))if(B2)Ne=cF;else{Ne=uF;var Me=aF}else(xe=re.nodeName)&&xe.toLowerCase()==="input"&&(re.type==="checkbox"||re.type==="radio")&&(Ne=lF);if(Ne&&(Ne=Ne(i,G))){F2(de,Ne,l,ae);break e}Me&&Me(i,re,G),i==="focusout"&&(Me=re._wrapperState)&&Me.controlled&&re.type==="number"&&Be(re,"number",re.value)}switch(Me=G?xo(G):window,i){case"focusin":(M2(Me)||Me.contentEditable==="true")&&(yo=Me,kp=G,iu=null);break;case"focusout":iu=kp=yo=null;break;case"mousedown":Np=!0;break;case"contextmenu":case"mouseup":case"dragend":Np=!1,Y2(de,l,ae);break;case"selectionchange":if(hF)break;case"keydown":case"keyup":Y2(de,l,ae)}var Fe;if(Sp)e:{switch(i){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else Eo?L2(i,l)&&(ze="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(ze="onCompositionStart");ze&&(I2&&l.locale!=="ko"&&(Eo||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&Eo&&(Fe=A2()):(ki=ae,yp="value"in ki?ki.value:ki.textContent,Eo=!0)),Me=Ec(G,ze),0<Me.length&&(ze=new N2(ze,i,null,l,ae),de.push({event:ze,listeners:Me}),Fe?ze.data=Fe:(Fe=D2(l),Fe!==null&&(ze.data=Fe)))),(Fe=tF?nF(i,l):rF(i,l))&&(G=Ec(G,"onBeforeInput"),0<G.length&&(ae=new N2("onBeforeInput","beforeinput",null,l,ae),de.push({event:ae,listeners:G}),ae.data=Fe))}t_(de,s)})}function au(i,s,l){return{instance:i,listener:s,currentTarget:l}}function Ec(i,s){for(var l=s+"Capture",h=[];i!==null;){var g=i,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=ja(i,l),y!=null&&h.unshift(au(i,y,g)),y=ja(i,s),y!=null&&h.push(au(i,y,g))),i=i.return}return h}function To(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function r_(i,s,l,h,g){for(var y=s._reactName,x=[];l!==null&&l!==h;){var I=l,D=I.alternate,G=I.stateNode;if(D!==null&&D===h)break;I.tag===5&&G!==null&&(I=G,g?(D=ja(l,y),D!=null&&x.unshift(au(l,D,I))):g||(D=ja(l,y),D!=null&&x.push(au(l,D,I)))),l=l.return}x.length!==0&&i.push({event:s,listeners:x})}var EF=/\r\n?/g,yF=/\u0000|\uFFFD/g;function i_(i){return(typeof i=="string"?i:""+i).replace(EF,`
|
|
29
|
+
`).replace(yF,"")}function yc(i,s,l){if(s=i_(s),i_(i)!==s&&l)throw Error(n(425))}function bc(){}var Dp=null,Mp=null;function Fp(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Bp=typeof setTimeout=="function"?setTimeout:void 0,bF=typeof clearTimeout=="function"?clearTimeout:void 0,s_=typeof Promise=="function"?Promise:void 0,TF=typeof queueMicrotask=="function"?queueMicrotask:typeof s_!="undefined"?function(i){return s_.resolve(null).then(i).catch(_F)}:Bp;function _F(i){setTimeout(function(){throw i})}function Up(i,s){var l=s,h=0;do{var g=l.nextSibling;if(i.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"){if(h===0){i.removeChild(g),Xa(s);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=g}while(l);Xa(s)}function Oi(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 o_(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 _o=Math.random().toString(36).slice(2),Fr="__reactFiber$"+_o,uu="__reactProps$"+_o,ti="__reactContainer$"+_o,Hp="__reactEvents$"+_o,xF="__reactListeners$"+_o,wF="__reactHandles$"+_o;function ms(i){var s=i[Fr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[ti]||l[Fr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=o_(i);i!==null;){if(l=i[Fr])return l;i=o_(i)}return s}i=l,l=i.parentNode}return null}function lu(i){return i=i[Fr]||i[ti],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function xo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Tc(i){return i[uu]||null}var zp=[],wo=-1;function Ii(i){return{current:i}}function yt(i){0>wo||(i.current=zp[wo],zp[wo]=null,wo--)}function pt(i,s){wo++,zp[wo]=i.current,i.current=s}var Pi={},ln=Ii(Pi),An=Ii(!1),gs=Pi;function So(i,s){var l=i.type.contextTypes;if(!l)return Pi;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===s)return h.__reactInternalMemoizedMaskedChildContext;var g={},y;for(y in l)g[y]=s[y];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=g),g}function vn(i){return i=i.childContextTypes,i!=null}function _c(){yt(An),yt(ln)}function a_(i,s,l){if(ln.current!==Pi)throw Error(n(168));pt(ln,s),pt(An,l)}function u_(i,s,l){var h=i.stateNode;if(s=s.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var g in h)if(!(g in s))throw Error(n(108,Ge(i)||"Unknown",g));return S({},l,h)}function xc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Pi,gs=ln.current,pt(ln,i),pt(An,An.current),!0}function l_(i,s,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=u_(i,s,gs),h.__reactInternalMemoizedMergedChildContext=i,yt(An),yt(ln),pt(ln,i)):yt(An),pt(An,l)}var ni=null,wc=!1,jp=!1;function c_(i){ni===null?ni=[i]:ni.push(i)}function SF(i){wc=!0,c_(i)}function Ri(){if(!jp&&ni!==null){jp=!0;var i=0,s=ut;try{var l=ni;for(ut=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}ni=null,wc=!1}catch(g){throw ni!==null&&(ni=ni.slice(i+1)),f2(cp,Ri),g}finally{ut=s,jp=!1}}return null}var Co=[],Ao=0,Sc=null,Cc=0,Jn=[],Zn=0,Es=null,ri=1,ii="";function ys(i,s){Co[Ao++]=Cc,Co[Ao++]=Sc,Sc=i,Cc=s}function d_(i,s,l){Jn[Zn++]=ri,Jn[Zn++]=ii,Jn[Zn++]=Es,Es=i;var h=ri;i=ii;var g=32-pr(h)-1;h&=~(1<<g),l+=1;var y=32-pr(s)+g;if(30<y){var x=g-g%5;y=(h&(1<<x)-1).toString(32),h>>=x,g-=x,ri=1<<32-pr(s)+g|l<<g|h,ii=y+i}else ri=1<<y|l<<g|h,ii=i}function $p(i){i.return!==null&&(ys(i,1),d_(i,1,0))}function Vp(i){for(;i===Sc;)Sc=Co[--Ao],Co[Ao]=null,Cc=Co[--Ao],Co[Ao]=null;for(;i===Es;)Es=Jn[--Zn],Jn[Zn]=null,ii=Jn[--Zn],Jn[Zn]=null,ri=Jn[--Zn],Jn[Zn]=null}var Un=null,Hn=null,wt=!1,gr=null;function f_(i,s){var l=rr(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 h_(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,Un=i,Hn=Oi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Un=i,Hn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=Es!==null?{id:ri,overflow:ii}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=rr(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Un=i,Hn=null,!0):!1;default:return!1}}function qp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Yp(i){if(wt){var s=Hn;if(s){var l=s;if(!h_(i,s)){if(qp(i))throw Error(n(418));s=Oi(l.nextSibling);var h=Un;s&&h_(i,s)?f_(h,l):(i.flags=i.flags&-4097|2,wt=!1,Un=i)}}else{if(qp(i))throw Error(n(418));i.flags=i.flags&-4097|2,wt=!1,Un=i}}}function p_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Un=i}function Ac(i){if(i!==Un)return!1;if(!wt)return p_(i),wt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Fp(i.type,i.memoizedProps)),s&&(s=Hn)){if(qp(i))throw m_(),Error(n(418));for(;s;)f_(i,s),s=Oi(s.nextSibling)}if(p_(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){Hn=Oi(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}Hn=null}}else Hn=Un?Oi(i.stateNode.nextSibling):null;return!0}function m_(){for(var i=Hn;i;)i=Oi(i.nextSibling)}function vo(){Hn=Un=null,wt=!1}function Wp(i){gr===null?gr=[i]:gr.push(i)}var CF=W.ReactCurrentBatchConfig;function cu(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 g=h,y=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===y?s.ref:(s=function(x){var I=g.refs;x===null?delete I[y]:I[y]=x},s._stringRef=y,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function vc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function g_(i){var s=i._init;return s(i._payload)}function E_(i){function s(z,U){if(i){var $=z.deletions;$===null?(z.deletions=[U],z.flags|=16):$.push(U)}}function l(z,U){if(!i)return null;for(;U!==null;)s(z,U),U=U.sibling;return null}function h(z,U){for(z=new Map;U!==null;)U.key!==null?z.set(U.key,U):z.set(U.index,U),U=U.sibling;return z}function g(z,U){return z=zi(z,U),z.index=0,z.sibling=null,z}function y(z,U,$){return z.index=$,i?($=z.alternate,$!==null?($=$.index,$<U?(z.flags|=2,U):$):(z.flags|=2,U)):(z.flags|=1048576,U)}function x(z){return i&&z.alternate===null&&(z.flags|=2),z}function I(z,U,$,Ee){return U===null||U.tag!==6?(U=Bm($,z.mode,Ee),U.return=z,U):(U=g(U,$),U.return=z,U)}function D(z,U,$,Ee){var Ne=$.type;return Ne===te?ae(z,U,$.props.children,Ee,$.key):U!==null&&(U.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ae&&g_(Ne)===U.type)?(Ee=g(U,$.props),Ee.ref=cu(z,U,$),Ee.return=z,Ee):(Ee=Xc($.type,$.key,$.props,null,z.mode,Ee),Ee.ref=cu(z,U,$),Ee.return=z,Ee)}function G(z,U,$,Ee){return U===null||U.tag!==4||U.stateNode.containerInfo!==$.containerInfo||U.stateNode.implementation!==$.implementation?(U=Um($,z.mode,Ee),U.return=z,U):(U=g(U,$.children||[]),U.return=z,U)}function ae(z,U,$,Ee,Ne){return U===null||U.tag!==7?(U=As($,z.mode,Ee,Ne),U.return=z,U):(U=g(U,$),U.return=z,U)}function de(z,U,$){if(typeof U=="string"&&U!==""||typeof U=="number")return U=Bm(""+U,z.mode,$),U.return=z,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case J:return $=Xc(U.type,U.key,U.props,null,z.mode,$),$.ref=cu(z,null,U),$.return=z,$;case B:return U=Um(U,z.mode,$),U.return=z,U;case Ae:var Ee=U._init;return de(z,Ee(U._payload),$)}if(je(U)||ne(U))return U=As(U,z.mode,$,null),U.return=z,U;vc(z,U)}return null}function re(z,U,$,Ee){var Ne=U!==null?U.key:null;if(typeof $=="string"&&$!==""||typeof $=="number")return Ne!==null?null:I(z,U,""+$,Ee);if(typeof $=="object"&&$!==null){switch($.$$typeof){case J:return $.key===Ne?D(z,U,$,Ee):null;case B:return $.key===Ne?G(z,U,$,Ee):null;case Ae:return Ne=$._init,re(z,U,Ne($._payload),Ee)}if(je($)||ne($))return Ne!==null?null:ae(z,U,$,Ee,null);vc(z,$)}return null}function xe(z,U,$,Ee,Ne){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number")return z=z.get($)||null,I(U,z,""+Ee,Ne);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case J:return z=z.get(Ee.key===null?$:Ee.key)||null,D(U,z,Ee,Ne);case B:return z=z.get(Ee.key===null?$:Ee.key)||null,G(U,z,Ee,Ne);case Ae:var Me=Ee._init;return xe(z,U,$,Me(Ee._payload),Ne)}if(je(Ee)||ne(Ee))return z=z.get($)||null,ae(U,z,Ee,Ne,null);vc(U,Ee)}return null}function ve(z,U,$,Ee){for(var Ne=null,Me=null,Fe=U,ze=U=0,Jt=null;Fe!==null&&ze<$.length;ze++){Fe.index>ze?(Jt=Fe,Fe=null):Jt=Fe.sibling;var it=re(z,Fe,$[ze],Ee);if(it===null){Fe===null&&(Fe=Jt);break}i&&Fe&&it.alternate===null&&s(z,Fe),U=y(it,U,ze),Me===null?Ne=it:Me.sibling=it,Me=it,Fe=Jt}if(ze===$.length)return l(z,Fe),wt&&ys(z,ze),Ne;if(Fe===null){for(;ze<$.length;ze++)Fe=de(z,$[ze],Ee),Fe!==null&&(U=y(Fe,U,ze),Me===null?Ne=Fe:Me.sibling=Fe,Me=Fe);return wt&&ys(z,ze),Ne}for(Fe=h(z,Fe);ze<$.length;ze++)Jt=xe(Fe,z,ze,$[ze],Ee),Jt!==null&&(i&&Jt.alternate!==null&&Fe.delete(Jt.key===null?ze:Jt.key),U=y(Jt,U,ze),Me===null?Ne=Jt:Me.sibling=Jt,Me=Jt);return i&&Fe.forEach(function(ji){return s(z,ji)}),wt&&ys(z,ze),Ne}function ke(z,U,$,Ee){var Ne=ne($);if(typeof Ne!="function")throw Error(n(150));if($=Ne.call($),$==null)throw Error(n(151));for(var Me=Ne=null,Fe=U,ze=U=0,Jt=null,it=$.next();Fe!==null&&!it.done;ze++,it=$.next()){Fe.index>ze?(Jt=Fe,Fe=null):Jt=Fe.sibling;var ji=re(z,Fe,it.value,Ee);if(ji===null){Fe===null&&(Fe=Jt);break}i&&Fe&&ji.alternate===null&&s(z,Fe),U=y(ji,U,ze),Me===null?Ne=ji:Me.sibling=ji,Me=ji,Fe=Jt}if(it.done)return l(z,Fe),wt&&ys(z,ze),Ne;if(Fe===null){for(;!it.done;ze++,it=$.next())it=de(z,it.value,Ee),it!==null&&(U=y(it,U,ze),Me===null?Ne=it:Me.sibling=it,Me=it);return wt&&ys(z,ze),Ne}for(Fe=h(z,Fe);!it.done;ze++,it=$.next())it=xe(Fe,z,ze,it.value,Ee),it!==null&&(i&&it.alternate!==null&&Fe.delete(it.key===null?ze:it.key),U=y(it,U,ze),Me===null?Ne=it:Me.sibling=it,Me=it);return i&&Fe.forEach(function(iB){return s(z,iB)}),wt&&ys(z,ze),Ne}function Mt(z,U,$,Ee){if(typeof $=="object"&&$!==null&&$.type===te&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case J:e:{for(var Ne=$.key,Me=U;Me!==null;){if(Me.key===Ne){if(Ne=$.type,Ne===te){if(Me.tag===7){l(z,Me.sibling),U=g(Me,$.props.children),U.return=z,z=U;break e}}else if(Me.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ae&&g_(Ne)===Me.type){l(z,Me.sibling),U=g(Me,$.props),U.ref=cu(z,Me,$),U.return=z,z=U;break e}l(z,Me);break}else s(z,Me);Me=Me.sibling}$.type===te?(U=As($.props.children,z.mode,Ee,$.key),U.return=z,z=U):(Ee=Xc($.type,$.key,$.props,null,z.mode,Ee),Ee.ref=cu(z,U,$),Ee.return=z,z=Ee)}return x(z);case B:e:{for(Me=$.key;U!==null;){if(U.key===Me)if(U.tag===4&&U.stateNode.containerInfo===$.containerInfo&&U.stateNode.implementation===$.implementation){l(z,U.sibling),U=g(U,$.children||[]),U.return=z,z=U;break e}else{l(z,U);break}else s(z,U);U=U.sibling}U=Um($,z.mode,Ee),U.return=z,z=U}return x(z);case Ae:return Me=$._init,Mt(z,U,Me($._payload),Ee)}if(je($))return ve(z,U,$,Ee);if(ne($))return ke(z,U,$,Ee);vc(z,$)}return typeof $=="string"&&$!==""||typeof $=="number"?($=""+$,U!==null&&U.tag===6?(l(z,U.sibling),U=g(U,$),U.return=z,z=U):(l(z,U),U=Bm($,z.mode,Ee),U.return=z,z=U),x(z)):l(z,U)}return Mt}var ko=E_(!0),y_=E_(!1),kc=Ii(null),Nc=null,No=null,Gp=null;function Kp(){Gp=No=Nc=null}function Qp(i){var s=kc.current;yt(kc),i._currentValue=s}function Xp(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 Oo(i,s){Nc=i,Gp=No=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(kn=!0),i.firstContext=null)}function er(i){var s=i._currentValue;if(Gp!==i)if(i={context:i,memoizedValue:s,next:null},No===null){if(Nc===null)throw Error(n(308));No=i,Nc.dependencies={lanes:0,firstContext:i}}else No=No.next=i;return s}var bs=null;function Jp(i){bs===null?bs=[i]:bs.push(i)}function b_(i,s,l,h){var g=s.interleaved;return g===null?(l.next=l,Jp(s)):(l.next=g.next,g.next=l),s.interleaved=l,si(i,h)}function si(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 Li=!1;function Zp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function T_(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 oi(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Di(i,s,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(nt&2)!==0){var g=h.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),h.pending=s,si(i,l)}return g=h.interleaved,g===null?(s.next=s,Jp(h)):(s.next=g.next,g.next=s),h.interleaved=s,si(i,l)}function Oc(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,hp(i,l)}}function __(i,s){var l=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var g=null,y=null;if(l=l.firstBaseUpdate,l!==null){do{var x={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};y===null?g=y=x:y=y.next=x,l=l.next}while(l!==null);y===null?g=y=s:y=y.next=s}else g=y=s;l={baseState:h.baseState,firstBaseUpdate:g,lastBaseUpdate:y,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 Ic(i,s,l,h){var g=i.updateQueue;Li=!1;var y=g.firstBaseUpdate,x=g.lastBaseUpdate,I=g.shared.pending;if(I!==null){g.shared.pending=null;var D=I,G=D.next;D.next=null,x===null?y=G:x.next=G,x=D;var ae=i.alternate;ae!==null&&(ae=ae.updateQueue,I=ae.lastBaseUpdate,I!==x&&(I===null?ae.firstBaseUpdate=G:I.next=G,ae.lastBaseUpdate=D))}if(y!==null){var de=g.baseState;x=0,ae=G=D=null,I=y;do{var re=I.lane,xe=I.eventTime;if((h&re)===re){ae!==null&&(ae=ae.next={eventTime:xe,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var ve=i,ke=I;switch(re=s,xe=l,ke.tag){case 1:if(ve=ke.payload,typeof ve=="function"){de=ve.call(xe,de,re);break e}de=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=ke.payload,re=typeof ve=="function"?ve.call(xe,de,re):ve,re==null)break e;de=S({},de,re);break e;case 2:Li=!0}}I.callback!==null&&I.lane!==0&&(i.flags|=64,re=g.effects,re===null?g.effects=[I]:re.push(I))}else xe={eventTime:xe,lane:re,tag:I.tag,payload:I.payload,callback:I.callback,next:null},ae===null?(G=ae=xe,D=de):ae=ae.next=xe,x|=re;if(I=I.next,I===null){if(I=g.shared.pending,I===null)break;re=I,I=re.next,re.next=null,g.lastBaseUpdate=re,g.shared.pending=null}}while(!0);if(ae===null&&(D=de),g.baseState=D,g.firstBaseUpdate=G,g.lastBaseUpdate=ae,s=g.shared.interleaved,s!==null){g=s;do x|=g.lane,g=g.next;while(g!==s)}else y===null&&(g.shared.lanes=0);xs|=x,i.lanes=x,i.memoizedState=de}}function x_(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var h=i[s],g=h.callback;if(g!==null){if(h.callback=null,h=l,typeof g!="function")throw Error(n(191,g));g.call(h)}}}var du={},Br=Ii(du),fu=Ii(du),hu=Ii(du);function Ts(i){if(i===du)throw Error(n(174));return i}function em(i,s){switch(pt(hu,s),pt(fu,i),pt(Br,du),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:oe(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=oe(s,i)}yt(Br),pt(Br,s)}function Io(){yt(Br),yt(fu),yt(hu)}function w_(i){Ts(hu.current);var s=Ts(Br.current),l=oe(s,i.type);s!==l&&(pt(fu,i),pt(Br,l))}function tm(i){fu.current===i&&(yt(Br),yt(fu))}var At=Ii(0);function Pc(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var nm=[];function rm(){for(var i=0;i<nm.length;i++)nm[i]._workInProgressVersionPrimary=null;nm.length=0}var Rc=W.ReactCurrentDispatcher,im=W.ReactCurrentBatchConfig,_s=0,vt=null,jt=null,Qt=null,Lc=!1,pu=!1,mu=0,AF=0;function cn(){throw Error(n(321))}function sm(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!mr(i[l],s[l]))return!1;return!0}function om(i,s,l,h,g,y){if(_s=y,vt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Rc.current=i===null||i.memoizedState===null?OF:IF,i=l(h,g),pu){y=0;do{if(pu=!1,mu=0,25<=y)throw Error(n(301));y+=1,Qt=jt=null,s.updateQueue=null,Rc.current=PF,i=l(h,g)}while(pu)}if(Rc.current=Fc,s=jt!==null&&jt.next!==null,_s=0,Qt=jt=vt=null,Lc=!1,s)throw Error(n(300));return i}function am(){var i=mu!==0;return mu=0,i}function Ur(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?vt.memoizedState=Qt=i:Qt=Qt.next=i,Qt}function tr(){if(jt===null){var i=vt.alternate;i=i!==null?i.memoizedState:null}else i=jt.next;var s=Qt===null?vt.memoizedState:Qt.next;if(s!==null)Qt=s,jt=i;else{if(i===null)throw Error(n(310));jt=i,i={memoizedState:jt.memoizedState,baseState:jt.baseState,baseQueue:jt.baseQueue,queue:jt.queue,next:null},Qt===null?vt.memoizedState=Qt=i:Qt=Qt.next=i}return Qt}function gu(i,s){return typeof s=="function"?s(i):s}function um(i){var s=tr(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=jt,g=h.baseQueue,y=l.pending;if(y!==null){if(g!==null){var x=g.next;g.next=y.next,y.next=x}h.baseQueue=g=y,l.pending=null}if(g!==null){y=g.next,h=h.baseState;var I=x=null,D=null,G=y;do{var ae=G.lane;if((_s&ae)===ae)D!==null&&(D=D.next={lane:0,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),h=G.hasEagerState?G.eagerState:i(h,G.action);else{var de={lane:ae,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null};D===null?(I=D=de,x=h):D=D.next=de,vt.lanes|=ae,xs|=ae}G=G.next}while(G!==null&&G!==y);D===null?x=h:D.next=I,mr(h,s.memoizedState)||(kn=!0),s.memoizedState=h,s.baseState=x,s.baseQueue=D,l.lastRenderedState=h}if(i=l.interleaved,i!==null){g=i;do y=g.lane,vt.lanes|=y,xs|=y,g=g.next;while(g!==i)}else g===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function lm(i){var s=tr(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,g=l.pending,y=s.memoizedState;if(g!==null){l.pending=null;var x=g=g.next;do y=i(y,x.action),x=x.next;while(x!==g);mr(y,s.memoizedState)||(kn=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),l.lastRenderedState=y}return[y,h]}function S_(){}function C_(i,s){var l=vt,h=tr(),g=s(),y=!mr(h.memoizedState,g);if(y&&(h.memoizedState=g,kn=!0),h=h.queue,cm(k_.bind(null,l,h,i),[i]),h.getSnapshot!==s||y||Qt!==null&&Qt.memoizedState.tag&1){if(l.flags|=2048,Eu(9,v_.bind(null,l,h,g,s),void 0,null),Xt===null)throw Error(n(349));(_s&30)!==0||A_(l,s,g)}return g}function A_(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=vt.updateQueue,s===null?(s={lastEffect:null,stores:null},vt.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function v_(i,s,l,h){s.value=l,s.getSnapshot=h,N_(s)&&O_(i)}function k_(i,s,l){return l(function(){N_(s)&&O_(i)})}function N_(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!mr(i,l)}catch(h){return!0}}function O_(i){var s=si(i,1);s!==null&&Tr(s,i,1,-1)}function I_(i){var s=Ur();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gu,lastRenderedState:i},s.queue=i,i=i.dispatch=NF.bind(null,vt,i),[s.memoizedState,i]}function Eu(i,s,l,h){return i={tag:i,create:s,destroy:l,deps:h,next:null},s=vt.updateQueue,s===null?(s={lastEffect:null,stores:null},vt.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 P_(){return tr().memoizedState}function Dc(i,s,l,h){var g=Ur();vt.flags|=i,g.memoizedState=Eu(1|s,l,void 0,h===void 0?null:h)}function Mc(i,s,l,h){var g=tr();h=h===void 0?null:h;var y=void 0;if(jt!==null){var x=jt.memoizedState;if(y=x.destroy,h!==null&&sm(h,x.deps)){g.memoizedState=Eu(s,l,y,h);return}}vt.flags|=i,g.memoizedState=Eu(1|s,l,y,h)}function R_(i,s){return Dc(8390656,8,i,s)}function cm(i,s){return Mc(2048,8,i,s)}function L_(i,s){return Mc(4,2,i,s)}function D_(i,s){return Mc(4,4,i,s)}function M_(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 F_(i,s,l){return l=l!=null?l.concat([i]):null,Mc(4,4,M_.bind(null,s,i),l)}function dm(){}function B_(i,s){var l=tr();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&sm(s,h[1])?h[0]:(l.memoizedState=[i,s],i)}function U_(i,s){var l=tr();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&sm(s,h[1])?h[0]:(i=i(),l.memoizedState=[i,s],i)}function H_(i,s,l){return(_s&21)===0?(i.baseState&&(i.baseState=!1,kn=!0),i.memoizedState=l):(mr(l,s)||(l=g2(),vt.lanes|=l,xs|=l,i.baseState=!0),s)}function vF(i,s){var l=ut;ut=l!==0&&4>l?l:4,i(!0);var h=im.transition;im.transition={};try{i(!1),s()}finally{ut=l,im.transition=h}}function z_(){return tr().memoizedState}function kF(i,s,l){var h=Ui(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},j_(i))$_(s,l);else if(l=b_(i,s,l,h),l!==null){var g=En();Tr(l,i,h,g),V_(l,s,h)}}function NF(i,s,l){var h=Ui(i),g={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(j_(i))$_(s,g);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=s.lastRenderedReducer,y!==null))try{var x=s.lastRenderedState,I=y(x,l);if(g.hasEagerState=!0,g.eagerState=I,mr(I,x)){var D=s.interleaved;D===null?(g.next=g,Jp(s)):(g.next=D.next,D.next=g),s.interleaved=g;return}}catch(G){}l=b_(i,s,g,h),l!==null&&(g=En(),Tr(l,i,h,g),V_(l,s,h))}}function j_(i){var s=i.alternate;return i===vt||s!==null&&s===vt}function $_(i,s){pu=Lc=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function V_(i,s,l){if((l&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,l|=h,s.lanes=l,hp(i,l)}}var Fc={readContext:er,useCallback:cn,useContext:cn,useEffect:cn,useImperativeHandle:cn,useInsertionEffect:cn,useLayoutEffect:cn,useMemo:cn,useReducer:cn,useRef:cn,useState:cn,useDebugValue:cn,useDeferredValue:cn,useTransition:cn,useMutableSource:cn,useSyncExternalStore:cn,useId:cn,unstable_isNewReconciler:!1},OF={readContext:er,useCallback:function(i,s){return Ur().memoizedState=[i,s===void 0?null:s],i},useContext:er,useEffect:R_,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,Dc(4194308,4,M_.bind(null,s,i),l)},useLayoutEffect:function(i,s){return Dc(4194308,4,i,s)},useInsertionEffect:function(i,s){return Dc(4,2,i,s)},useMemo:function(i,s){var l=Ur();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var h=Ur();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=kF.bind(null,vt,i),[h.memoizedState,i]},useRef:function(i){var s=Ur();return i={current:i},s.memoizedState=i},useState:I_,useDebugValue:dm,useDeferredValue:function(i){return Ur().memoizedState=i},useTransition:function(){var i=I_(!1),s=i[0];return i=vF.bind(null,i[1]),Ur().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var h=vt,g=Ur();if(wt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),Xt===null)throw Error(n(349));(_s&30)!==0||A_(h,s,l)}g.memoizedState=l;var y={value:l,getSnapshot:s};return g.queue=y,R_(k_.bind(null,h,y,i),[i]),h.flags|=2048,Eu(9,v_.bind(null,h,y,l,s),void 0,null),l},useId:function(){var i=Ur(),s=Xt.identifierPrefix;if(wt){var l=ii,h=ri;l=(h&~(1<<32-pr(h)-1)).toString(32)+l,s=":"+s+"R"+l,l=mu++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=AF++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},IF={readContext:er,useCallback:B_,useContext:er,useEffect:cm,useImperativeHandle:F_,useInsertionEffect:L_,useLayoutEffect:D_,useMemo:U_,useReducer:um,useRef:P_,useState:function(){return um(gu)},useDebugValue:dm,useDeferredValue:function(i){var s=tr();return H_(s,jt.memoizedState,i)},useTransition:function(){var i=um(gu)[0],s=tr().memoizedState;return[i,s]},useMutableSource:S_,useSyncExternalStore:C_,useId:z_,unstable_isNewReconciler:!1},PF={readContext:er,useCallback:B_,useContext:er,useEffect:cm,useImperativeHandle:F_,useInsertionEffect:L_,useLayoutEffect:D_,useMemo:U_,useReducer:lm,useRef:P_,useState:function(){return lm(gu)},useDebugValue:dm,useDeferredValue:function(i){var s=tr();return jt===null?s.memoizedState=i:H_(s,jt.memoizedState,i)},useTransition:function(){var i=lm(gu)[0],s=tr().memoizedState;return[i,s]},useMutableSource:S_,useSyncExternalStore:C_,useId:z_,unstable_isNewReconciler:!1};function Er(i,s){if(i&&i.defaultProps){s=S({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function fm(i,s,l,h){s=i.memoizedState,l=l(h,s),l=l==null?s:S({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Bc={isMounted:function(i){return(i=i._reactInternals)?ps(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var h=En(),g=Ui(i),y=oi(h,g);y.payload=s,l!=null&&(y.callback=l),s=Di(i,y,g),s!==null&&(Tr(s,i,g,h),Oc(s,i,g))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var h=En(),g=Ui(i),y=oi(h,g);y.tag=1,y.payload=s,l!=null&&(y.callback=l),s=Di(i,y,g),s!==null&&(Tr(s,i,g,h),Oc(s,i,g))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=En(),h=Ui(i),g=oi(l,h);g.tag=2,s!=null&&(g.callback=s),s=Di(i,g,h),s!==null&&(Tr(s,i,h,l),Oc(s,i,h))}};function q_(i,s,l,h,g,y,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,y,x):s.prototype&&s.prototype.isPureReactComponent?!ru(l,h)||!ru(g,y):!0}function Y_(i,s,l){var h=!1,g=Pi,y=s.contextType;return typeof y=="object"&&y!==null?y=er(y):(g=vn(s)?gs:ln.current,h=s.contextTypes,y=(h=h!=null)?So(i,g):Pi),s=new s(l,y),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Bc,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=g,i.__reactInternalMemoizedMaskedChildContext=y),s}function W_(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&&Bc.enqueueReplaceState(s,s.state,null)}function hm(i,s,l,h){var g=i.stateNode;g.props=l,g.state=i.memoizedState,g.refs={},Zp(i);var y=s.contextType;typeof y=="object"&&y!==null?g.context=er(y):(y=vn(s)?gs:ln.current,g.context=So(i,y)),g.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(fm(i,s,y,l),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&Bc.enqueueReplaceState(g,g.state,null),Ic(i,l,g,h),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308)}function Po(i,s){try{var l="",h=s;do l+=Le(h),h=h.return;while(h);var g=l}catch(y){g=`
|
|
27
30
|
Error generating stack: `+y.message+`
|
|
28
|
-
`+y.stack}return{value:i,source:s,stack:g,digest:null}}function hm(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function pm(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var vF=typeof WeakMap=="function"?WeakMap:Map;function Y_(i,s,l){l=oi(-1,l),l.tag=3,l.payload={element:null};var h=s.value;return l.callback=function(){Vc||(Vc=!0,Nm=h),pm(i,s)},l}function W_(i,s,l){l=oi(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var g=s.value;l.payload=function(){return h(g)},l.callback=function(){pm(i,s)}}var y=i.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(l.callback=function(){pm(i,s),typeof h!="function"&&(Fi===null?Fi=new Set([this]):Fi.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),l}function G_(i,s,l){var h=i.pingCache;if(h===null){h=i.pingCache=new vF;var g=new Set;h.set(s,g)}else g=h.get(s),g===void 0&&(g=new Set,h.set(s,g));g.has(l)||(g.add(l),i=zF.bind(null,i,s,l),s.then(i,i))}function K_(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 Q_(i,s,l,h,g){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=oi(-1,1),s.tag=2,Di(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var kF=W.ReactCurrentOwner,kn=!1;function gn(i,s,l,h){s.child=i===null?g_(s,null,l,h):ko(s,i.child,l,h)}function X_(i,s,l,h,g){l=l.render;var y=s.ref;return Oo(s,g),h=sm(i,s,l,h,y,g),l=om(),i!==null&&!kn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,ai(i,s,g)):(St&&l&&jp(s),s.flags|=1,gn(i,s,h,g),s.child)}function J_(i,s,l,h,g){if(i===null){var y=l.type;return typeof y=="function"&&!Mm(y)&&y.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=y,Z_(i,s,y,h,g)):(i=Qc(l.type,null,h,s,s.mode,g),i.ref=s.ref,i.return=s,s.child=i)}if(y=i.child,(i.lanes&g)===0){var x=y.memoizedProps;if(l=l.compare,l=l!==null?l:ru,l(x,h)&&i.ref===s.ref)return ai(i,s,g)}return s.flags|=1,i=zi(y,h),i.ref=s.ref,i.return=s,s.child=i}function Z_(i,s,l,h,g){if(i!==null){var y=i.memoizedProps;if(ru(y,h)&&i.ref===s.ref)if(kn=!1,s.pendingProps=h=y,(i.lanes&g)!==0)(i.flags&131072)!==0&&(kn=!0);else return s.lanes=i.lanes,ai(i,s,g)}return mm(i,s,l,h,g)}function ex(i,s,l){var h=s.pendingProps,g=h.children,y=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},mt(Lo,zn),zn|=l;else{if((l&1073741824)===0)return i=y!==null?y.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,mt(Lo,zn),zn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=y!==null?y.baseLanes:l,mt(Lo,zn),zn|=h}else y!==null?(h=y.baseLanes|l,s.memoizedState=null):h=l,mt(Lo,zn),zn|=h;return gn(i,s,g,l),s.child}function tx(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function mm(i,s,l,h,g){var y=vn(l)?ms:ln.current;return y=So(s,y),Oo(s,g),l=sm(i,s,l,h,y,g),h=om(),i!==null&&!kn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,ai(i,s,g)):(St&&h&&jp(s),s.flags|=1,gn(i,s,l,g),s.child)}function nx(i,s,l,h,g){if(vn(l)){var y=!0;_c(s)}else y=!1;if(Oo(s,g),s.stateNode===null)Uc(i,s),V_(s,l,h),fm(s,l,h,g),h=!0;else if(i===null){var x=s.stateNode,I=s.memoizedProps;x.props=I;var D=x.context,G=l.contextType;typeof G=="object"&&G!==null?G=Zn(G):(G=vn(l)?ms:ln.current,G=So(s,G));var se=l.getDerivedStateFromProps,ce=typeof se=="function"||typeof x.getSnapshotBeforeUpdate=="function";ce||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(I!==h||D!==G)&&q_(s,x,h,G),Li=!1;var re=s.memoizedState;x.state=re,Oc(s,h,x,g),D=s.memoizedState,I!==h||re!==D||An.current||Li?(typeof se=="function"&&(dm(s,l,se,h),D=s.memoizedState),(I=Li||$_(s,l,I,h,re,D,G))?(ce||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=D),x.props=h,x.state=D,x.context=G,h=I):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{x=s.stateNode,y_(i,s),I=s.memoizedProps,G=s.type===s.elementType?I:gr(s.type,I),x.props=G,ce=s.pendingProps,re=x.context,D=l.contextType,typeof D=="object"&&D!==null?D=Zn(D):(D=vn(l)?ms:ln.current,D=So(s,D));var xe=l.getDerivedStateFromProps;(se=typeof xe=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(I!==ce||re!==D)&&q_(s,x,h,D),Li=!1,re=s.memoizedState,x.state=re,Oc(s,h,x,g);var Ae=s.memoizedState;I!==ce||re!==Ae||An.current||Li?(typeof xe=="function"&&(dm(s,l,xe,h),Ae=s.memoizedState),(G=Li||$_(s,l,G,h,re,Ae,D)||!1)?(se||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,Ae,D),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,Ae,D)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=Ae),x.props=h,x.state=Ae,x.context=D,h=G):(typeof x.componentDidUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=1024),h=!1)}return gm(i,s,l,h,y,g)}function gm(i,s,l,h,g,y){tx(i,s);var x=(s.flags&128)!==0;if(!h&&!x)return g&&a_(s,l,!1),ai(i,s,y);h=s.stateNode,kF.current=s;var I=x&&typeof l.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&x?(s.child=ko(s,i.child,null,y),s.child=ko(s,null,I,y)):gn(i,s,I,y),s.memoizedState=h.state,g&&a_(s,l,!0),s.child}function rx(i){var s=i.stateNode;s.pendingContext?s_(i,s.pendingContext,s.pendingContext!==s.context):s.context&&s_(i,s.context,!1),Zp(i,s.containerInfo)}function ix(i,s,l,h,g){return vo(),Yp(g),s.flags|=256,gn(i,s,l,h),s.child}var Em={dehydrated:null,treeContext:null,retryLane:0};function ym(i){return{baseLanes:i,cachePool:null,transitions:null}}function sx(i,s,l){var h=s.pendingProps,g=At.current,y=!1,x=(s.flags&128)!==0,I;if((I=x)||(I=i!==null&&i.memoizedState===null?!1:(g&2)!==0),I?(y=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),mt(At,g&1),i===null)return qp(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):(x=h.children,i=h.fallback,y?(h=s.mode,y=s.child,x={mode:"hidden",children:x},(h&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=x):y=Xc(x,h,0,null),i=Cs(i,h,l,null),y.return=s,i.return=s,y.sibling=i,s.child=y,s.child.memoizedState=ym(l),s.memoizedState=Em,i):bm(s,x));if(g=i.memoizedState,g!==null&&(I=g.dehydrated,I!==null))return NF(i,s,x,h,I,g,l);if(y){y=h.fallback,x=s.mode,g=i.child,I=g.sibling;var D={mode:"hidden",children:h.children};return(x&1)===0&&s.child!==g?(h=s.child,h.childLanes=0,h.pendingProps=D,s.deletions=null):(h=zi(g,D),h.subtreeFlags=g.subtreeFlags&14680064),I!==null?y=zi(I,y):(y=Cs(y,x,l,null),y.flags|=2),y.return=s,h.return=s,h.sibling=y,s.child=h,h=y,y=s.child,x=i.child.memoizedState,x=x===null?ym(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},y.memoizedState=x,y.childLanes=i.childLanes&~l,s.memoizedState=Em,h}return y=i.child,i=y.sibling,h=zi(y,{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 bm(i,s){return s=Xc({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function Bc(i,s,l,h){return h!==null&&Yp(h),ko(s,i.child,null,l),i=bm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function NF(i,s,l,h,g,y,x){if(l)return s.flags&256?(s.flags&=-257,h=hm(Error(n(422))),Bc(i,s,x,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(y=h.fallback,g=s.mode,h=Xc({mode:"visible",children:h.children},g,0,null),y=Cs(y,g,x,null),y.flags|=2,h.return=s,y.return=s,h.sibling=y,s.child=h,(s.mode&1)!==0&&ko(s,i.child,null,x),s.child.memoizedState=ym(x),s.memoizedState=Em,y);if((s.mode&1)===0)return Bc(i,s,x,null);if(g.data==="$!"){if(h=g.nextSibling&&g.nextSibling.dataset,h)var I=h.dgst;return h=I,y=Error(n(419)),h=hm(y,h,void 0),Bc(i,s,x,h)}if(I=(x&i.childLanes)!==0,kn||I){if(h=Qt,h!==null){switch(x&-x){case 4:g=2;break;case 16:g=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:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(h.suspendedLanes|x))!==0?0:g,g!==0&&g!==y.retryLane&&(y.retryLane=g,si(i,g),br(h,i,g,-1))}return Dm(),h=hm(Error(n(421))),Bc(i,s,x,h)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=jF.bind(null,i),g._reactRetry=s,null):(i=y.treeContext,Hn=Oi(g.nextSibling),Un=s,St=!0,mr=null,i!==null&&(Xn[Jn++]=ri,Xn[Jn++]=ii,Xn[Jn++]=gs,ri=i.id,ii=i.overflow,gs=s),s=bm(s,h.children),s.flags|=4096,s)}function ox(i,s,l){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),Qp(i.return,s,l)}function Tm(i,s,l,h,g){var y=i.memoizedState;y===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:g}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=h,y.tail=l,y.tailMode=g)}function ax(i,s,l){var h=s.pendingProps,g=h.revealOrder,y=h.tail;if(gn(i,s,h.children,l),h=At.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&&ox(i,l,s);else if(i.tag===19)ox(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(mt(At,h),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(l=s.child,g=null;l!==null;)i=l.alternate,i!==null&&Ic(i)===null&&(g=l),l=l.sibling;l=g,l===null?(g=s.child,s.child=null):(g=l.sibling,l.sibling=null),Tm(s,!1,g,l,y);break;case"backwards":for(l=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&Ic(i)===null){s.child=g;break}i=g.sibling,g.sibling=l,l=g,g=i}Tm(s,!0,l,null,y);break;case"together":Tm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Uc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function ai(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),_s|=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 OF(i,s,l){switch(s.tag){case 3:rx(s),vo();break;case 5:__(s);break;case 1:vn(s.type)&&_c(s);break;case 4:Zp(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,g=s.memoizedProps.value;mt(vc,h._currentValue),h._currentValue=g;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(mt(At,At.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?sx(i,s,l):(mt(At,At.current&1),i=ai(i,s,l),i!==null?i.sibling:null);mt(At,At.current&1);break;case 19:if(h=(l&s.childLanes)!==0,(i.flags&128)!==0){if(h)return ax(i,s,l);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),mt(At,At.current),h)break;return null;case 22:case 23:return s.lanes=0,ex(i,s,l)}return ai(i,s,l)}var ux,_m,lx,cx;ux=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}},_m=function(){},lx=function(i,s,l,h){var g=i.memoizedProps;if(g!==h){i=s.stateNode,bs(Fr.current);var y=null;switch(l){case"input":g=_i(i,g),h=_i(i,h),y=[];break;case"select":g=S({},g,{value:void 0}),h=S({},h,{value:void 0}),y=[];break;case"textarea":g=dt(i,g),h=dt(i,h),y=[];break;default:typeof g.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=yc)}Zt(l,h);var x;l=null;for(G in g)if(!h.hasOwnProperty(G)&&g.hasOwnProperty(G)&&g[G]!=null)if(G==="style"){var I=g[G];for(x in I)I.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else G!=="dangerouslySetInnerHTML"&&G!=="children"&&G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&G!=="autoFocus"&&(o.hasOwnProperty(G)?y||(y=[]):(y=y||[]).push(G,null));for(G in h){var D=h[G];if(I=g!=null?g[G]:void 0,h.hasOwnProperty(G)&&D!==I&&(D!=null||I!=null))if(G==="style")if(I){for(x in I)!I.hasOwnProperty(x)||D&&D.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in D)D.hasOwnProperty(x)&&I[x]!==D[x]&&(l||(l={}),l[x]=D[x])}else l||(y||(y=[]),y.push(G,l)),l=D;else G==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,I=I?I.__html:void 0,D!=null&&I!==D&&(y=y||[]).push(G,D)):G==="children"?typeof D!="string"&&typeof D!="number"||(y=y||[]).push(G,""+D):G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&(o.hasOwnProperty(G)?(D!=null&&G==="onScroll"&&Et("scroll",i),y||I===D||(y=[])):(y=y||[]).push(G,D))}l&&(y=y||[]).push("style",l);var G=y;(s.updateQueue=G)&&(s.flags|=4)}},cx=function(i,s,l,h){l!==h&&(s.flags|=4)};function yu(i,s){if(!St)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 dn(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(s)for(var g=i.child;g!==null;)l|=g.lanes|g.childLanes,h|=g.subtreeFlags&14680064,h|=g.flags&14680064,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)l|=g.lanes|g.childLanes,h|=g.subtreeFlags,h|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=h,i.childLanes=l,s}function IF(i,s,l){var h=s.pendingProps;switch($p(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dn(s),null;case 1:return vn(s.type)&&Tc(),dn(s),null;case 3:return h=s.stateNode,Io(),yt(An),yt(ln),nm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Cc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,mr!==null&&(Pm(mr),mr=null))),_m(i,s),dn(s),null;case 5:em(s);var g=bs(hu.current);if(l=s.type,i!==null&&s.stateNode!=null)lx(i,s,l,h,g),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!h){if(s.stateNode===null)throw Error(n(166));return dn(s),null}if(i=bs(Fr.current),Cc(s)){h=s.stateNode,l=s.type;var y=s.memoizedProps;switch(h[Mr]=s,h[uu]=y,i=(s.mode&1)!==0,l){case"dialog":Et("cancel",h),Et("close",h);break;case"iframe":case"object":case"embed":Et("load",h);break;case"video":case"audio":for(g=0;g<su.length;g++)Et(su[g],h);break;case"source":Et("error",h);break;case"img":case"image":case"link":Et("error",h),Et("load",h);break;case"details":Et("toggle",h);break;case"input":ds(h,y),Et("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!y.multiple},Et("invalid",h);break;case"textarea":wt(h,y),Et("invalid",h)}Zt(l,y),g=null;for(var x in y)if(y.hasOwnProperty(x)){var I=y[x];x==="children"?typeof I=="string"?h.textContent!==I&&(y.suppressHydrationWarning!==!0&&Ec(h.textContent,I,i),g=["children",I]):typeof I=="number"&&h.textContent!==""+I&&(y.suppressHydrationWarning!==!0&&Ec(h.textContent,I,i),g=["children",""+I]):o.hasOwnProperty(x)&&I!=null&&x==="onScroll"&&Et("scroll",h)}switch(l){case"input":Kn(h),we(h,y,!0);break;case"textarea":Kn(h),st(h);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(h.onclick=yc)}h=g,s.updateQueue=h,h!==null&&(s.flags|=4)}else{x=g.nodeType===9?g:g.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ee(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=x.createElement(l,{is:h.is}):(i=x.createElement(l),l==="select"&&(x=i,h.multiple?x.multiple=!0:h.size&&(x.size=h.size))):i=x.createElementNS(i,l),i[Mr]=s,i[uu]=h,ux(i,s,!1,!1),s.stateNode=i;e:{switch(x=Lr(l,h),l){case"dialog":Et("cancel",i),Et("close",i),g=h;break;case"iframe":case"object":case"embed":Et("load",i),g=h;break;case"video":case"audio":for(g=0;g<su.length;g++)Et(su[g],i);g=h;break;case"source":Et("error",i),g=h;break;case"img":case"image":case"link":Et("error",i),Et("load",i),g=h;break;case"details":Et("toggle",i),g=h;break;case"input":ds(i,h),g=_i(i,h),Et("invalid",i);break;case"option":g=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},g=S({},h,{value:void 0}),Et("invalid",i);break;case"textarea":wt(i,h),g=dt(i,h),Et("invalid",i);break;default:g=h}Zt(l,g),I=g;for(y in I)if(I.hasOwnProperty(y)){var D=I[y];y==="style"?wi(i,D):y==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,D!=null&&Ve(i,D)):y==="children"?typeof D=="string"?(l!=="textarea"||D!=="")&&tt(i,D):typeof D=="number"&&tt(i,""+D):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(o.hasOwnProperty(y)?D!=null&&y==="onScroll"&&Et("scroll",i):D!=null&&R(i,y,D,x))}switch(l){case"input":Kn(i),we(i,h,!1);break;case"textarea":Kn(i),st(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Ye(h.value));break;case"select":i.multiple=!!h.multiple,y=h.value,y!=null?Xe(i,!!h.multiple,y,!1):h.defaultValue!=null&&Xe(i,!!h.multiple,h.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=yc)}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 dn(s),null;case 6:if(i&&s.stateNode!=null)cx(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(l=bs(hu.current),bs(Fr.current),Cc(s)){if(h=s.stateNode,l=s.memoizedProps,h[Mr]=s,(y=h.nodeValue!==l)&&(i=Un,i!==null))switch(i.tag){case 3:Ec(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Ec(h.nodeValue,l,(i.mode&1)!==0)}y&&(s.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Mr]=s,s.stateNode=h}return dn(s),null;case 13:if(yt(At),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(St&&Hn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)h_(),vo(),s.flags|=98560,y=!1;else if(y=Cc(s),h!==null&&h.dehydrated!==null){if(i===null){if(!y)throw Error(n(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[Mr]=s}else vo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;dn(s),y=!1}else mr!==null&&(Pm(mr),mr=null),y=!0;if(!y)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||(At.current&1)!==0?jt===0&&(jt=3):Dm())),s.updateQueue!==null&&(s.flags|=4),dn(s),null);case 4:return Io(),_m(i,s),i===null&&ou(s.stateNode.containerInfo),dn(s),null;case 10:return Kp(s.type._context),dn(s),null;case 17:return vn(s.type)&&Tc(),dn(s),null;case 19:if(yt(At),y=s.memoizedState,y===null)return dn(s),null;if(h=(s.flags&128)!==0,x=y.rendering,x===null)if(h)yu(y,!1);else{if(jt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=Ic(i),x!==null){for(s.flags|=128,yu(y,!1),h=x.updateQueue,h!==null&&(s.updateQueue=h,s.flags|=4),s.subtreeFlags=0,h=l,l=s.child;l!==null;)y=l,i=h,y.flags&=14680066,x=y.alternate,x===null?(y.childLanes=0,y.lanes=i,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=x.childLanes,y.lanes=x.lanes,y.child=x.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=x.memoizedProps,y.memoizedState=x.memoizedState,y.updateQueue=x.updateQueue,y.type=x.type,i=x.dependencies,y.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return mt(At,At.current&1|2),s.child}i=i.sibling}y.tail!==null&&Dt()>Do&&(s.flags|=128,h=!0,yu(y,!1),s.lanes=4194304)}else{if(!h)if(i=Ic(x),i!==null){if(s.flags|=128,h=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),yu(y,!0),y.tail===null&&y.tailMode==="hidden"&&!x.alternate&&!St)return dn(s),null}else 2*Dt()-y.renderingStartTime>Do&&l!==1073741824&&(s.flags|=128,h=!0,yu(y,!1),s.lanes=4194304);y.isBackwards?(x.sibling=s.child,s.child=x):(l=y.last,l!==null?l.sibling=x:s.child=x,y.last=x)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=Dt(),s.sibling=null,l=At.current,mt(At,h?l&1|2:l&1),s):(dn(s),null);case 22:case 23:return Lm(),h=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(zn&1073741824)!==0&&(dn(s),s.subtreeFlags&6&&(s.flags|=8192)):dn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function PF(i,s){switch($p(s),s.tag){case 1:return vn(s.type)&&Tc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Io(),yt(An),yt(ln),nm(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return em(s),null;case 13:if(yt(At),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));vo()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return yt(At),null;case 4:return Io(),null;case 10:return Kp(s.type._context),null;case 22:case 23:return Lm(),null;case 24:return null;default:return null}}var Hc=!1,fn=!1,RF=typeof WeakSet=="function"?WeakSet:Set,Se=null;function Ro(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){Ot(i,s,h)}else l.current=null}function xm(i,s,l){try{l()}catch(h){Ot(i,s,h)}}var dx=!1;function LF(i,s){if(Lp=oc,i=$2(),Ap(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 g=h.anchorOffset,y=h.focusNode;h=h.focusOffset;try{l.nodeType,y.nodeType}catch(Ee){l=null;break e}var x=0,I=-1,D=-1,G=0,se=0,ce=i,re=null;t:for(;;){for(var xe;ce!==l||g!==0&&ce.nodeType!==3||(I=x+g),ce!==y||h!==0&&ce.nodeType!==3||(D=x+h),ce.nodeType===3&&(x+=ce.nodeValue.length),(xe=ce.firstChild)!==null;)re=ce,ce=xe;for(;;){if(ce===i)break t;if(re===l&&++G===g&&(I=x),re===y&&++se===h&&(D=x),(xe=ce.nextSibling)!==null)break;ce=re,re=ce.parentNode}ce=xe}l=I===-1||D===-1?null:{start:I,end:D}}else l=null}l=l||{start:0,end:0}}else l=null;for(Dp={focusedElem:i,selectionRange:l},oc=!1,Se=s;Se!==null;)if(s=Se,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Se=i;else for(;Se!==null;){s=Se;try{var Ae=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ae!==null){var ke=Ae.memoizedProps,Mt=Ae.memoizedState,z=s.stateNode,U=z.getSnapshotBeforeUpdate(s.elementType===s.type?ke:gr(s.type,ke),Mt);z.__reactInternalSnapshotBeforeUpdate=U}break;case 3:var V=s.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Ee){Ot(s,s.return,Ee)}if(i=s.sibling,i!==null){i.return=s.return,Se=i;break}Se=s.return}return Ae=dx,dx=!1,Ae}function bu(i,s,l){var h=s.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var g=h=h.next;do{if((g.tag&i)===i){var y=g.destroy;g.destroy=void 0,y!==void 0&&xm(s,l,y)}g=g.next}while(g!==h)}}function zc(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 wm(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 fx(i){var s=i.alternate;s!==null&&(i.alternate=null,fx(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Mr],delete s[uu],delete s[Up],delete s[gF],delete s[EF])),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 hx(i){return i.tag===5||i.tag===3||i.tag===4}function px(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||hx(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Sm(i,s,l){var 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=yc));else if(h!==4&&(i=i.child,i!==null))for(Sm(i,s,l),i=i.sibling;i!==null;)Sm(i,s,l),i=i.sibling}function Cm(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(Cm(i,s,l),i=i.sibling;i!==null;)Cm(i,s,l),i=i.sibling}var en=null,Er=!1;function Mi(i,s,l){for(l=l.child;l!==null;)mx(i,s,l),l=l.sibling}function mx(i,s,l){if(Dr&&typeof Dr.onCommitFiberUnmount=="function")try{Dr.onCommitFiberUnmount(ec,l)}catch(I){}switch(l.tag){case 5:fn||Ro(l,s);case 6:var h=en,g=Er;en=null,Mi(i,s,l),en=h,Er=g,en!==null&&(Er?(i=en,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):en.removeChild(l.stateNode));break;case 18:en!==null&&(Er?(i=en,l=l.stateNode,i.nodeType===8?Bp(i.parentNode,l):i.nodeType===1&&Bp(i,l),Xa(i)):Bp(en,l.stateNode));break;case 4:h=en,g=Er,en=l.stateNode.containerInfo,Er=!0,Mi(i,s,l),en=h,Er=g;break;case 0:case 11:case 14:case 15:if(!fn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){g=h=h.next;do{var y=g,x=y.destroy;y=y.tag,x!==void 0&&((y&2)!==0||(y&4)!==0)&&xm(l,s,x),g=g.next}while(g!==h)}Mi(i,s,l);break;case 1:if(!fn&&(Ro(l,s),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(I){Ot(l,s,I)}Mi(i,s,l);break;case 21:Mi(i,s,l);break;case 22:l.mode&1?(fn=(h=fn)||l.memoizedState!==null,Mi(i,s,l),fn=h):Mi(i,s,l);break;default:Mi(i,s,l)}}function gx(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new RF),s.forEach(function(h){var g=$F.bind(null,i,h);l.has(h)||(l.add(h),h.then(g,g))})}}function yr(i,s){var l=s.deletions;if(l!==null)for(var h=0;h<l.length;h++){var g=l[h];try{var y=i,x=s,I=x;e:for(;I!==null;){switch(I.tag){case 5:en=I.stateNode,Er=!1;break e;case 3:en=I.stateNode.containerInfo,Er=!0;break e;case 4:en=I.stateNode.containerInfo,Er=!0;break e}I=I.return}if(en===null)throw Error(n(160));mx(y,x,g),en=null,Er=!1;var D=g.alternate;D!==null&&(D.return=null),g.return=null}catch(G){Ot(g,s,G)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Ex(s,i),s=s.sibling}function Ex(i,s){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(yr(s,i),Ur(i),h&4){try{bu(3,i,i.return),zc(3,i)}catch(ke){Ot(i,i.return,ke)}try{bu(5,i,i.return)}catch(ke){Ot(i,i.return,ke)}}break;case 1:yr(s,i),Ur(i),h&512&&l!==null&&Ro(l,l.return);break;case 5:if(yr(s,i),Ur(i),h&512&&l!==null&&Ro(l,l.return),i.flags&32){var g=i.stateNode;try{tt(g,"")}catch(ke){Ot(i,i.return,ke)}}if(h&4&&(g=i.stateNode,g!=null)){var y=i.memoizedProps,x=l!==null?l.memoizedProps:y,I=i.type,D=i.updateQueue;if(i.updateQueue=null,D!==null)try{I==="input"&&y.type==="radio"&&y.name!=null&&xi(g,y),Lr(I,x);var G=Lr(I,y);for(x=0;x<D.length;x+=2){var se=D[x],ce=D[x+1];se==="style"?wi(g,ce):se==="dangerouslySetInnerHTML"?Ve(g,ce):se==="children"?tt(g,ce):R(g,se,ce,G)}switch(I){case"input":Zr(g,y);break;case"textarea":mn(g,y);break;case"select":var re=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var xe=y.value;xe!=null?Xe(g,!!y.multiple,xe,!1):re!==!!y.multiple&&(y.defaultValue!=null?Xe(g,!!y.multiple,y.defaultValue,!0):Xe(g,!!y.multiple,y.multiple?[]:"",!1))}g[uu]=y}catch(ke){Ot(i,i.return,ke)}}break;case 6:if(yr(s,i),Ur(i),h&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,y=i.memoizedProps;try{g.nodeValue=y}catch(ke){Ot(i,i.return,ke)}}break;case 3:if(yr(s,i),Ur(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{Xa(s.containerInfo)}catch(ke){Ot(i,i.return,ke)}break;case 4:yr(s,i),Ur(i);break;case 13:yr(s,i),Ur(i),g=i.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(km=Dt())),h&4&&gx(i);break;case 22:if(se=l!==null&&l.memoizedState!==null,i.mode&1?(fn=(G=fn)||se,yr(s,i),fn=G):yr(s,i),Ur(i),h&8192){if(G=i.memoizedState!==null,(i.stateNode.isHidden=G)&&!se&&(i.mode&1)!==0)for(Se=i,se=i.child;se!==null;){for(ce=Se=se;Se!==null;){switch(re=Se,xe=re.child,re.tag){case 0:case 11:case 14:case 15:bu(4,re,re.return);break;case 1:Ro(re,re.return);var Ae=re.stateNode;if(typeof Ae.componentWillUnmount=="function"){h=re,l=re.return;try{s=h,Ae.props=s.memoizedProps,Ae.state=s.memoizedState,Ae.componentWillUnmount()}catch(ke){Ot(h,l,ke)}}break;case 5:Ro(re,re.return);break;case 22:if(re.memoizedState!==null){Tx(ce);continue}}xe!==null?(xe.return=re,Se=xe):Tx(ce)}se=se.sibling}e:for(se=null,ce=i;;){if(ce.tag===5){if(se===null){se=ce;try{g=ce.stateNode,G?(y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(I=ce.stateNode,D=ce.memoizedProps.style,x=D!=null&&D.hasOwnProperty("display")?D.display:null,I.style.display=Qn("display",x))}catch(ke){Ot(i,i.return,ke)}}}else if(ce.tag===6){if(se===null)try{ce.stateNode.nodeValue=G?"":ce.memoizedProps}catch(ke){Ot(i,i.return,ke)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===i)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===i)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===i)break e;se===ce&&(se=null),ce=ce.return}se===ce&&(se=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:yr(s,i),Ur(i),h&4&&gx(i);break;case 21:break;default:yr(s,i),Ur(i)}}function Ur(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(hx(l)){var h=l;break e}l=l.return}throw Error(n(160))}switch(h.tag){case 5:var g=h.stateNode;h.flags&32&&(tt(g,""),h.flags&=-33);var y=px(i);Cm(i,y,g);break;case 3:case 4:var x=h.stateNode.containerInfo,I=px(i);Sm(i,I,x);break;default:throw Error(n(161))}}catch(D){Ot(i,i.return,D)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function DF(i,s,l){Se=i,yx(i)}function yx(i,s,l){for(var h=(i.mode&1)!==0;Se!==null;){var g=Se,y=g.child;if(g.tag===22&&h){var x=g.memoizedState!==null||Hc;if(!x){var I=g.alternate,D=I!==null&&I.memoizedState!==null||fn;I=Hc;var G=fn;if(Hc=x,(fn=D)&&!G)for(Se=g;Se!==null;)x=Se,D=x.child,x.tag===22&&x.memoizedState!==null?_x(g):D!==null?(D.return=x,Se=D):_x(g);for(;y!==null;)Se=y,yx(y),y=y.sibling;Se=g,Hc=I,fn=G}bx(i)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,Se=y):bx(i)}}function bx(i){for(;Se!==null;){var s=Se;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:fn||zc(5,s);break;case 1:var h=s.stateNode;if(s.flags&4&&!fn)if(l===null)h.componentDidMount();else{var g=s.elementType===s.type?l.memoizedProps:gr(s.type,l.memoizedProps);h.componentDidUpdate(g,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var y=s.updateQueue;y!==null&&T_(s,y,h);break;case 3:var x=s.updateQueue;if(x!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}T_(s,x,l)}break;case 5:var I=s.stateNode;if(l===null&&s.flags&4){l=I;var D=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":D.autoFocus&&l.focus();break;case"img":D.src&&(l.src=D.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var G=s.alternate;if(G!==null){var se=G.memoizedState;if(se!==null){var ce=se.dehydrated;ce!==null&&Xa(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}fn||s.flags&512&&wm(s)}catch(re){Ot(s,s.return,re)}}if(s===i){Se=null;break}if(l=s.sibling,l!==null){l.return=s.return,Se=l;break}Se=s.return}}function Tx(i){for(;Se!==null;){var s=Se;if(s===i){Se=null;break}var l=s.sibling;if(l!==null){l.return=s.return,Se=l;break}Se=s.return}}function _x(i){for(;Se!==null;){var s=Se;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{zc(4,s)}catch(D){Ot(s,l,D)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var g=s.return;try{h.componentDidMount()}catch(D){Ot(s,g,D)}}var y=s.return;try{wm(s)}catch(D){Ot(s,y,D)}break;case 5:var x=s.return;try{wm(s)}catch(D){Ot(s,x,D)}}}catch(D){Ot(s,s.return,D)}if(s===i){Se=null;break}var I=s.sibling;if(I!==null){I.return=s.return,Se=I;break}Se=s.return}}var MF=Math.ceil,jc=W.ReactCurrentDispatcher,Am=W.ReactCurrentOwner,tr=W.ReactCurrentBatchConfig,nt=0,Qt=null,Ht=null,tn=0,zn=0,Lo=Ii(0),jt=0,Tu=null,_s=0,$c=0,vm=0,_u=null,Nn=null,km=0,Do=1/0,ui=null,Vc=!1,Nm=null,Fi=null,qc=!1,Bi=null,Yc=0,xu=0,Om=null,Wc=-1,Gc=0;function En(){return(nt&6)!==0?Dt():Wc!==-1?Wc:Wc=Dt()}function Ui(i){return(i.mode&1)===0?1:(nt&2)!==0&&tn!==0?tn&-tn:bF.transition!==null?(Gc===0&&(Gc=p2()),Gc):(i=lt,i!==0||(i=window.event,i=i===void 0?16:w2(i.type)),i)}function br(i,s,l,h){if(50<xu)throw xu=0,Om=null,Error(n(185));Ya(i,l,h),((nt&2)===0||i!==Qt)&&(i===Qt&&((nt&2)===0&&($c|=l),jt===4&&Hi(i,tn)),On(i,h),l===1&&nt===0&&(s.mode&1)===0&&(Do=Dt()+500,xc&&Ri()))}function On(i,s){var l=i.callbackNode;bM(i,s);var h=rc(i,i===Qt?tn:0);if(h===0)l!==null&&d2(l),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(l!=null&&d2(l),s===1)i.tag===0?yF(wx.bind(null,i)):u_(wx.bind(null,i)),pF(function(){(nt&6)===0&&Ri()}),l=null;else{switch(m2(h)){case 1:l=lp;break;case 4:l=f2;break;case 16:l=Zl;break;case 536870912:l=h2;break;default:l=Zl}l=Ix(l,xx.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function xx(i,s){if(Wc=-1,Gc=0,(nt&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Mo()&&i.callbackNode!==l)return null;var h=rc(i,i===Qt?tn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=Kc(i,h);else{s=h;var g=nt;nt|=2;var y=Cx();(Qt!==i||tn!==s)&&(ui=null,Do=Dt()+500,ws(i,s));do try{UF();break}catch(I){Sx(i,I)}while(!0);Gp(),jc.current=y,nt=g,Ht!==null?s=0:(Qt=null,tn=0,s=jt)}if(s!==0){if(s===2&&(g=cp(i),g!==0&&(h=g,s=Im(i,g))),s===1)throw l=Tu,ws(i,0),Hi(i,h),On(i,Dt()),l;if(s===6)Hi(i,h);else{if(g=i.current.alternate,(h&30)===0&&!FF(g)&&(s=Kc(i,h),s===2&&(y=cp(i),y!==0&&(h=y,s=Im(i,y))),s===1))throw l=Tu,ws(i,0),Hi(i,h),On(i,Dt()),l;switch(i.finishedWork=g,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:Ss(i,Nn,ui);break;case 3:if(Hi(i,h),(h&130023424)===h&&(s=km+500-Dt(),10<s)){if(rc(i,0)!==0)break;if(g=i.suspendedLanes,(g&h)!==h){En(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=Fp(Ss.bind(null,i,Nn,ui),s);break}Ss(i,Nn,ui);break;case 4:if(Hi(i,h),(h&4194240)===h)break;for(s=i.eventTimes,g=-1;0<h;){var x=31-hr(h);y=1<<x,x=s[x],x>g&&(g=x),h&=~y}if(h=g,h=Dt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*MF(h/1960))-h,10<h){i.timeoutHandle=Fp(Ss.bind(null,i,Nn,ui),h);break}Ss(i,Nn,ui);break;case 5:Ss(i,Nn,ui);break;default:throw Error(n(329))}}}return On(i,Dt()),i.callbackNode===l?xx.bind(null,i):null}function Im(i,s){var l=_u;return i.current.memoizedState.isDehydrated&&(ws(i,s).flags|=256),i=Kc(i,s),i!==2&&(s=Nn,Nn=l,s!==null&&Pm(s)),i}function Pm(i){Nn===null?Nn=i:Nn.push.apply(Nn,i)}function FF(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 g=l[h],y=g.getSnapshot;g=g.value;try{if(!pr(y(),g))return!1}catch(x){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 Hi(i,s){for(s&=~vm,s&=~$c,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-hr(s),h=1<<l;i[l]=-1,s&=~h}}function wx(i){if((nt&6)!==0)throw Error(n(327));Mo();var s=rc(i,0);if((s&1)===0)return On(i,Dt()),null;var l=Kc(i,s);if(i.tag!==0&&l===2){var h=cp(i);h!==0&&(s=h,l=Im(i,h))}if(l===1)throw l=Tu,ws(i,0),Hi(i,s),On(i,Dt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Ss(i,Nn,ui),On(i,Dt()),null}function Rm(i,s){var l=nt;nt|=1;try{return i(s)}finally{nt=l,nt===0&&(Do=Dt()+500,xc&&Ri())}}function xs(i){Bi!==null&&Bi.tag===0&&(nt&6)===0&&Mo();var s=nt;nt|=1;var l=tr.transition,h=lt;try{if(tr.transition=null,lt=1,i)return i()}finally{lt=h,tr.transition=l,nt=s,(nt&6)===0&&Ri()}}function Lm(){zn=Lo.current,yt(Lo)}function ws(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,hF(l)),Ht!==null)for(l=Ht.return;l!==null;){var h=l;switch($p(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Tc();break;case 3:Io(),yt(An),yt(ln),nm();break;case 5:em(h);break;case 4:Io();break;case 13:yt(At);break;case 19:yt(At);break;case 10:Kp(h.type._context);break;case 22:case 23:Lm()}l=l.return}if(Qt=i,Ht=i=zi(i.current,null),tn=zn=s,jt=0,Tu=null,vm=$c=_s=0,Nn=_u=null,ys!==null){for(s=0;s<ys.length;s++)if(l=ys[s],h=l.interleaved,h!==null){l.interleaved=null;var g=h.next,y=l.pending;if(y!==null){var x=y.next;y.next=g,h.next=x}l.pending=h}ys=null}return i}function Sx(i,s){do{var l=Ht;try{if(Gp(),Pc.current=Mc,Rc){for(var h=vt.memoizedState;h!==null;){var g=h.queue;g!==null&&(g.pending=null),h=h.next}Rc=!1}if(Ts=0,Kt=zt=vt=null,pu=!1,mu=0,Am.current=null,l===null||l.return===null){jt=1,Tu=s,Ht=null;break}e:{var y=i,x=l.return,I=l,D=s;if(s=tn,I.flags|=32768,D!==null&&typeof D=="object"&&typeof D.then=="function"){var G=D,se=I,ce=se.tag;if((se.mode&1)===0&&(ce===0||ce===11||ce===15)){var re=se.alternate;re?(se.updateQueue=re.updateQueue,se.memoizedState=re.memoizedState,se.lanes=re.lanes):(se.updateQueue=null,se.memoizedState=null)}var xe=K_(x);if(xe!==null){xe.flags&=-257,Q_(xe,x,I,y,s),xe.mode&1&&G_(y,G,s),s=xe,D=G;var Ae=s.updateQueue;if(Ae===null){var ke=new Set;ke.add(D),s.updateQueue=ke}else Ae.add(D);break e}else{if((s&1)===0){G_(y,G,s),Dm();break e}D=Error(n(426))}}else if(St&&I.mode&1){var Mt=K_(x);if(Mt!==null){(Mt.flags&65536)===0&&(Mt.flags|=256),Q_(Mt,x,I,y,s),Yp(Po(D,I));break e}}y=D=Po(D,I),jt!==4&&(jt=2),_u===null?_u=[y]:_u.push(y),y=x;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var z=Y_(y,D,s);b_(y,z);break e;case 1:I=D;var U=y.type,V=y.stateNode;if((y.flags&128)===0&&(typeof U.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(Fi===null||!Fi.has(V)))){y.flags|=65536,s&=-s,y.lanes|=s;var Ee=W_(y,I,s);b_(y,Ee);break e}}y=y.return}while(y!==null)}vx(l)}catch(Ne){s=Ne,Ht===l&&l!==null&&(Ht=l=l.return);continue}break}while(!0)}function Cx(){var i=jc.current;return jc.current=Mc,i===null?Mc:i}function Dm(){(jt===0||jt===3||jt===2)&&(jt=4),Qt===null||(_s&268435455)===0&&($c&268435455)===0||Hi(Qt,tn)}function Kc(i,s){var l=nt;nt|=2;var h=Cx();(Qt!==i||tn!==s)&&(ui=null,ws(i,s));do try{BF();break}catch(g){Sx(i,g)}while(!0);if(Gp(),nt=l,jc.current=h,Ht!==null)throw Error(n(261));return Qt=null,tn=0,jt}function BF(){for(;Ht!==null;)Ax(Ht)}function UF(){for(;Ht!==null&&!cM();)Ax(Ht)}function Ax(i){var s=Ox(i.alternate,i,zn);i.memoizedProps=i.pendingProps,s===null?vx(i):Ht=s,Am.current=null}function vx(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=IF(l,s,zn),l!==null){Ht=l;return}}else{if(l=PF(l,s),l!==null){l.flags&=32767,Ht=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{jt=6,Ht=null;return}}if(s=s.sibling,s!==null){Ht=s;return}Ht=s=i}while(s!==null);jt===0&&(jt=5)}function Ss(i,s,l){var h=lt,g=tr.transition;try{tr.transition=null,lt=1,HF(i,s,l,h)}finally{tr.transition=g,lt=h}return null}function HF(i,s,l,h){do Mo();while(Bi!==null);if((nt&6)!==0)throw Error(n(327));l=i.finishedWork;var g=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 y=l.lanes|l.childLanes;if(TM(i,y),i===Qt&&(Ht=Qt=null,tn=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||qc||(qc=!0,Ix(Zl,function(){return Mo(),null})),y=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||y){y=tr.transition,tr.transition=null;var x=lt;lt=1;var I=nt;nt|=4,Am.current=null,LF(i,l),Ex(l,i),oF(Dp),oc=!!Lp,Dp=Lp=null,i.current=l,DF(l),dM(),nt=I,lt=x,tr.transition=y}else i.current=l;if(qc&&(qc=!1,Bi=i,Yc=g),y=i.pendingLanes,y===0&&(Fi=null),pM(l.stateNode),On(i,Dt()),s!==null)for(h=i.onRecoverableError,l=0;l<s.length;l++)g=s[l],h(g.value,{componentStack:g.stack,digest:g.digest});if(Vc)throw Vc=!1,i=Nm,Nm=null,i;return(Yc&1)!==0&&i.tag!==0&&Mo(),y=i.pendingLanes,(y&1)!==0?i===Om?xu++:(xu=0,Om=i):xu=0,Ri(),null}function Mo(){if(Bi!==null){var i=m2(Yc),s=tr.transition,l=lt;try{if(tr.transition=null,lt=16>i?16:i,Bi===null)var h=!1;else{if(i=Bi,Bi=null,Yc=0,(nt&6)!==0)throw Error(n(331));var g=nt;for(nt|=4,Se=i.current;Se!==null;){var y=Se,x=y.child;if((Se.flags&16)!==0){var I=y.deletions;if(I!==null){for(var D=0;D<I.length;D++){var G=I[D];for(Se=G;Se!==null;){var se=Se;switch(se.tag){case 0:case 11:case 15:bu(8,se,y)}var ce=se.child;if(ce!==null)ce.return=se,Se=ce;else for(;Se!==null;){se=Se;var re=se.sibling,xe=se.return;if(fx(se),se===G){Se=null;break}if(re!==null){re.return=xe,Se=re;break}Se=xe}}}var Ae=y.alternate;if(Ae!==null){var ke=Ae.child;if(ke!==null){Ae.child=null;do{var Mt=ke.sibling;ke.sibling=null,ke=Mt}while(ke!==null)}}Se=y}}if((y.subtreeFlags&2064)!==0&&x!==null)x.return=y,Se=x;else e:for(;Se!==null;){if(y=Se,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:bu(9,y,y.return)}var z=y.sibling;if(z!==null){z.return=y.return,Se=z;break e}Se=y.return}}var U=i.current;for(Se=U;Se!==null;){x=Se;var V=x.child;if((x.subtreeFlags&2064)!==0&&V!==null)V.return=x,Se=V;else e:for(x=U;Se!==null;){if(I=Se,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:zc(9,I)}}catch(Ne){Ot(I,I.return,Ne)}if(I===x){Se=null;break e}var Ee=I.sibling;if(Ee!==null){Ee.return=I.return,Se=Ee;break e}Se=I.return}}if(nt=g,Ri(),Dr&&typeof Dr.onPostCommitFiberRoot=="function")try{Dr.onPostCommitFiberRoot(ec,i)}catch(Ne){}h=!0}return h}finally{lt=l,tr.transition=s}}return!1}function kx(i,s,l){s=Po(l,s),s=Y_(i,s,1),i=Di(i,s,1),s=En(),i!==null&&(Ya(i,1,s),On(i,s))}function Ot(i,s,l){if(i.tag===3)kx(i,i,l);else for(;s!==null;){if(s.tag===3){kx(s,i,l);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Fi===null||!Fi.has(h))){i=Po(l,i),i=W_(s,i,1),s=Di(s,i,1),i=En(),s!==null&&(Ya(s,1,i),On(s,i));break}}s=s.return}}function zF(i,s,l){var h=i.pingCache;h!==null&&h.delete(s),s=En(),i.pingedLanes|=i.suspendedLanes&l,Qt===i&&(tn&l)===l&&(jt===4||jt===3&&(tn&130023424)===tn&&500>Dt()-km?ws(i,0):vm|=l),On(i,s)}function Nx(i,s){s===0&&((i.mode&1)===0?s=1:(s=nc,nc<<=1,(nc&130023424)===0&&(nc=4194304)));var l=En();i=si(i,s),i!==null&&(Ya(i,s,l),On(i,l))}function jF(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),Nx(i,l)}function $F(i,s){var l=0;switch(i.tag){case 13:var h=i.stateNode,g=i.memoizedState;g!==null&&(l=g.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(s),Nx(i,l)}var Ox;Ox=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||An.current)kn=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return kn=!1,OF(i,s,l);kn=(i.flags&131072)!==0}else kn=!1,St&&(s.flags&1048576)!==0&&l_(s,Sc,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;Uc(i,s),i=s.pendingProps;var g=So(s,ln.current);Oo(s,l),g=sm(null,s,h,i,g,l);var y=om();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,vn(h)?(y=!0,_c(s)):y=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Jp(s),g.updater=Fc,s.stateNode=g,g._reactInternals=s,fm(s,h,i,l),s=gm(null,s,h,!0,y,l)):(s.tag=0,St&&y&&jp(s),gn(null,s,g,l),s=s.child),s;case 16:h=s.elementType;e:{switch(Uc(i,s),i=s.pendingProps,g=h._init,h=g(h._payload),s.type=h,g=s.tag=qF(h),i=gr(h,i),g){case 0:s=mm(null,s,h,i,l);break e;case 1:s=nx(null,s,h,i,l);break e;case 11:s=X_(null,s,h,i,l);break e;case 14:s=J_(null,s,h,gr(h.type,i),l);break e}throw Error(n(306,h,""))}return s;case 0:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:gr(h,g),mm(i,s,h,g,l);case 1:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:gr(h,g),nx(i,s,h,g,l);case 3:e:{if(rx(s),i===null)throw Error(n(387));h=s.pendingProps,y=s.memoizedState,g=y.element,y_(i,s),Oc(s,h,null,l);var x=s.memoizedState;if(h=x.element,y.isDehydrated)if(y={element:h,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){g=Po(Error(n(423)),s),s=ix(i,s,h,l,g);break e}else if(h!==g){g=Po(Error(n(424)),s),s=ix(i,s,h,l,g);break e}else for(Hn=Oi(s.stateNode.containerInfo.firstChild),Un=s,St=!0,mr=null,l=g_(s,null,h,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(vo(),h===g){s=ai(i,s,l);break e}gn(i,s,h,l)}s=s.child}return s;case 5:return __(s),i===null&&qp(s),h=s.type,g=s.pendingProps,y=i!==null?i.memoizedProps:null,x=g.children,Mp(h,g)?x=null:y!==null&&Mp(h,y)&&(s.flags|=32),tx(i,s),gn(i,s,x,l),s.child;case 6:return i===null&&qp(s),null;case 13:return sx(i,s,l);case 4:return Zp(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=ko(s,null,h,l):gn(i,s,h,l),s.child;case 11:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:gr(h,g),X_(i,s,h,g,l);case 7:return gn(i,s,s.pendingProps,l),s.child;case 8:return gn(i,s,s.pendingProps.children,l),s.child;case 12:return gn(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(h=s.type._context,g=s.pendingProps,y=s.memoizedProps,x=g.value,mt(vc,h._currentValue),h._currentValue=x,y!==null)if(pr(y.value,x)){if(y.children===g.children&&!An.current){s=ai(i,s,l);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var I=y.dependencies;if(I!==null){x=y.child;for(var D=I.firstContext;D!==null;){if(D.context===h){if(y.tag===1){D=oi(-1,l&-l),D.tag=2;var G=y.updateQueue;if(G!==null){G=G.shared;var se=G.pending;se===null?D.next=D:(D.next=se.next,se.next=D),G.pending=D}}y.lanes|=l,D=y.alternate,D!==null&&(D.lanes|=l),Qp(y.return,l,s),I.lanes|=l;break}D=D.next}}else if(y.tag===10)x=y.type===s.type?null:y.child;else if(y.tag===18){if(x=y.return,x===null)throw Error(n(341));x.lanes|=l,I=x.alternate,I!==null&&(I.lanes|=l),Qp(x,l,s),x=y.sibling}else x=y.child;if(x!==null)x.return=y;else for(x=y;x!==null;){if(x===s){x=null;break}if(y=x.sibling,y!==null){y.return=x.return,x=y;break}x=x.return}y=x}gn(i,s,g.children,l),s=s.child}return s;case 9:return g=s.type,h=s.pendingProps.children,Oo(s,l),g=Zn(g),h=h(g),s.flags|=1,gn(i,s,h,l),s.child;case 14:return h=s.type,g=gr(h,s.pendingProps),g=gr(h.type,g),J_(i,s,h,g,l);case 15:return Z_(i,s,s.type,s.pendingProps,l);case 17:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:gr(h,g),Uc(i,s),s.tag=1,vn(h)?(i=!0,_c(s)):i=!1,Oo(s,l),V_(s,h,g),fm(s,h,g,l),gm(null,s,h,!0,i,l);case 19:return ax(i,s,l);case 22:return ex(i,s,l)}throw Error(n(156,s.tag))};function Ix(i,s){return c2(i,s)}function VF(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 nr(i,s,l,h){return new VF(i,s,l,h)}function Mm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function qF(i){if(typeof i=="function")return Mm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===he)return 11;if(i===be)return 14}return 2}function zi(i,s){var l=i.alternate;return l===null?(l=nr(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 Qc(i,s,l,h,g,y){var x=2;if(h=i,typeof i=="function")Mm(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case te:return Cs(l.children,g,y,s);case ge:x=8,g|=8;break;case ye:return i=nr(12,l,s,g|2),i.elementType=ye,i.lanes=y,i;case ue:return i=nr(13,l,s,g),i.elementType=ue,i.lanes=y,i;case de:return i=nr(19,l,s,g),i.elementType=de,i.lanes=y,i;case oe:return Xc(l,g,y,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case M:x=10;break e;case ae:x=9;break e;case he:x=11;break e;case be:x=14;break e;case Ce:x=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=nr(x,l,s,g),s.elementType=i,s.type=h,s.lanes=y,s}function Cs(i,s,l,h){return i=nr(7,i,h,s),i.lanes=l,i}function Xc(i,s,l,h){return i=nr(22,i,h,s),i.elementType=oe,i.lanes=l,i.stateNode={isHidden:!1},i}function Fm(i,s,l){return i=nr(6,i,null,s),i.lanes=l,i}function Bm(i,s,l){return s=nr(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function YF(i,s,l,h,g){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=dp(0),this.expirationTimes=dp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dp(0),this.identifierPrefix=h,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Um(i,s,l,h,g,y,x,I,D){return i=new YF(i,s,l,I,D),s===1?(s=1,y===!0&&(s|=8)):s=0,y=nr(3,null,null,s),i.current=y,y.stateNode=i,y.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jp(y),i}function WF(i,s,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:h==null?null:""+h,children:i,containerInfo:s,implementation:l}}function Px(i){if(!i)return Pi;i=i._reactInternals;e:{if(hs(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(vn(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(vn(l))return o_(i,l,s)}return s}function Rx(i,s,l,h,g,y,x,I,D){return i=Um(l,h,!0,i,g,y,x,I,D),i.context=Px(null),l=i.current,h=En(),g=Ui(l),y=oi(h,g),y.callback=s!=null?s:null,Di(l,y,g),i.current.lanes=g,Ya(i,g,h),On(i,h),i}function Jc(i,s,l,h){var g=s.current,y=En(),x=Ui(g);return l=Px(l),s.context===null?s.context=l:s.pendingContext=l,s=oi(y,x),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=Di(g,s,x),i!==null&&(br(i,g,x,y),Nc(i,g,x)),x}function Zc(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function Lx(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function Hm(i,s){Lx(i,s),(i=i.alternate)&&Lx(i,s)}function GF(){return null}var Dx=typeof reportError=="function"?reportError:function(i){console.error(i)};function zm(i){this._internalRoot=i}ed.prototype.render=zm.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Jc(i,s,null,null)},ed.prototype.unmount=zm.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;xs(function(){Jc(null,i,null,null)}),s[ti]=null}};function ed(i){this._internalRoot=i}ed.prototype.unstable_scheduleHydration=function(i){if(i){var s=y2();i={blockedOn:null,target:i,priority:s};for(var l=0;l<vi.length&&s!==0&&s<vi[l].priority;l++);vi.splice(l,0,i),l===0&&_2(i)}};function jm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function td(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Mx(){}function KF(i,s,l,h,g){if(g){if(typeof h=="function"){var y=h;h=function(){var G=Zc(x);y.call(G)}}var x=Rx(s,h,i,0,null,!1,!1,"",Mx);return i._reactRootContainer=x,i[ti]=x.current,ou(i.nodeType===8?i.parentNode:i),xs(),x}for(;g=i.lastChild;)i.removeChild(g);if(typeof h=="function"){var I=h;h=function(){var G=Zc(D);I.call(G)}}var D=Um(i,0,!1,null,null,!1,!1,"",Mx);return i._reactRootContainer=D,i[ti]=D.current,ou(i.nodeType===8?i.parentNode:i),xs(function(){Jc(s,D,l,h)}),D}function nd(i,s,l,h,g){var y=l._reactRootContainer;if(y){var x=y;if(typeof g=="function"){var I=g;g=function(){var D=Zc(x);I.call(D)}}Jc(s,x,i,g)}else x=KF(l,s,i,g,h);return Zc(x)}g2=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=qa(s.pendingLanes);l!==0&&(fp(s,l|1),On(s,Dt()),(nt&6)===0&&(Do=Dt()+500,Ri()))}break;case 13:xs(function(){var h=si(i,1);if(h!==null){var g=En();br(h,i,1,g)}}),Hm(i,1)}},hp=function(i){if(i.tag===13){var s=si(i,134217728);if(s!==null){var l=En();br(s,i,134217728,l)}Hm(i,134217728)}},E2=function(i){if(i.tag===13){var s=Ui(i),l=si(i,s);if(l!==null){var h=En();br(l,i,s,h)}Hm(i,s)}},y2=function(){return lt},b2=function(i,s){var l=lt;try{return lt=i,s()}finally{lt=l}},sp=function(i,s,l){switch(s){case"input":if(Zr(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 g=bc(h);if(!g)throw Error(n(90));cs(h),Zr(h,g)}}}break;case"textarea":mn(i,l);break;case"select":s=l.value,s!=null&&Xe(i,!!l.multiple,s,!1)}},r2=Rm,i2=xs;var QF={usingClientEntryPoint:!1,Events:[lu,xo,bc,t2,n2,Rm]},wu={findFiberByHostInstance:ps,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},XF={bundleType:wu.bundleType,version:wu.version,rendererPackageName:wu.rendererPackageName,rendererConfig:wu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:W.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=u2(i),i===null?null:i.stateNode},findFiberByHostInstance:wu.findFiberByHostInstance||GF,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 rd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rd.isDisabled&&rd.supportsFiber)try{ec=rd.inject(XF),Dr=rd}catch(i){}}return Cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=QF,Cn.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jm(s))throw Error(n(200));return WF(i,s,null,l)},Cn.createRoot=function(i,s){if(!jm(i))throw Error(n(299));var l=!1,h="",g=Dx;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Um(i,1,!1,null,null,l,!1,h,g),i[ti]=s.current,ou(i.nodeType===8?i.parentNode:i),new zm(s)},Cn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=u2(s),i=i===null?null:i.stateNode,i},Cn.flushSync=function(i){return xs(i)},Cn.hydrate=function(i,s,l){if(!td(s))throw Error(n(200));return nd(null,i,s,!0,l)},Cn.hydrateRoot=function(i,s,l){if(!jm(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,g=!1,y="",x=Dx;if(l!=null&&(l.unstable_strictMode===!0&&(g=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),s=Rx(s,null,i,1,l!=null?l:null,g,!1,y,x),i[ti]=s.current,ou(i),h)for(i=0;i<h.length;i++)l=h[i],g=l._getVersion,g=g(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,g]:s.mutableSourceEagerHydrationData.push(l,g);return new ed(s)},Cn.render=function(i,s,l){if(!td(s))throw Error(n(200));return nd(null,i,s,!1,l)},Cn.unmountComponentAtNode=function(i){if(!td(i))throw Error(n(40));return i._reactRootContainer?(xs(function(){nd(null,null,i,!1,function(){i._reactRootContainer=null,i[ti]=null})}),!0):!1},Cn.unstable_batchedUpdates=Rm,Cn.unstable_renderSubtreeIntoContainer=function(i,s,l,h){if(!td(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return nd(i,s,l,!1,h)},Cn.version="18.3.1-next-f1338f8080-20240426",Cn}var eb;function tb(){if(eb)return gh.exports;eb=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(),gh.exports=WL(),gh.exports}var Ia=tb();function GL(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var bh=()=>e=>Array.from(new Set(e)),nb=typeof globalThis.document!="undefined"?$.useLayoutEffect:$.useEffect;function Pl(e){var E,T;const t=(E=e().value)!=null?E:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=$.useState(t),[o,a]=$.useState(r),u=e().value!==void 0,c=$.useRef(o);c.current=u?e().value:o;const d=$.useRef(c.current);nb(()=>{d.current=c.current},[o,e().value]);const f=b=>{var k,v;const _=d.current,w=Xs(b)?b(_):b;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:w,prev:_}),u||a(w),n(w,_)||(v=(k=e()).onChange)==null||v.call(k,w,_)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(b){(e().sync?Ia.flushSync:qR)(()=>f(b))},invoke(b,_){var w,k;(k=(w=e()).onChange)==null||k.call(w,b,_)},hash(b){var _,w,k;return(k=(w=(_=e()).hash)==null?void 0:w.call(_,b))!=null?k:String(b)}}}Pl.cleanup=e=>{$.useEffect(()=>e,[])},Pl.ref=e=>{const t=$.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function KL(e){const t=$.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var QL=(e,t)=>{const n=$.useRef(!1),r=$.useRef(!1);$.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),$.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Th(e,t={}){var ae,he,ue,de,be,Ce;const n=$.useMemo(()=>{const{id:oe,ids:q,getRootNode:ne}=t;return VL({id:oe,ids:q,getRootNode:ne})},[t]),r=(...oe)=>{e.debug&&console.log(...oe)},o=(he=(ae=e.props)==null?void 0:ae.call(e,{props:sh(t),scope:n}))!=null?he:t,a=XL(o),u=(ue=e.context)==null?void 0:ue.call(e,{prop:a,bindable:Pl,scope:n,flush:ib,getContext(){return d},getComputed(){return X},getRefs(){return w},getEvent(){return b()}}),c=rb(u),d={get(oe){var q;return(q=c.current)==null?void 0:q[oe].ref.current},set(oe,q){var ne;(ne=c.current)==null||ne[oe].set(q)},initial(oe){var q;return(q=c.current)==null?void 0:q[oe].initial},hash(oe){var ne,S;const q=(ne=c.current)==null?void 0:ne[oe].get();return(S=c.current)==null?void 0:S[oe].hash(q)}},f=$.useRef(new Map),p=$.useRef(null),E=$.useRef(null),T=$.useRef({type:""}),b=()=>Te(H({},T.current),{current(){return T.current},previous(){return E.current}}),_=()=>Te(H({},B),{matches(...oe){return oe.includes(B.ref.current)},hasTag(oe){var q,ne;return!!((ne=(q=e.states[B.ref.current])==null?void 0:q.tags)!=null&&ne.includes(oe))}}),w=KL((be=(de=e.refs)==null?void 0:de.call(e,{prop:a,context:d}))!=null?be:{}),k=()=>({state:_(),context:d,event:b(),prop:a,send:M,action:v,guard:F,track:QL,refs:w,computed:X,flush:ib,scope:n,choose:W}),v=oe=>{const q=Xs(oe)?oe(k()):oe;if(!q)return;const ne=q.map(S=>{var K,O;const L=(O=(K=e.implementations)==null?void 0:K.actions)==null?void 0:O[S];return L||oh(`[zag-js] No implementation found for action "${JSON.stringify(S)}"`),L});for(const S of ne)S==null||S(k())},F=oe=>{var q,ne;return Xs(oe)?oe(k()):(ne=(q=e.implementations)==null?void 0:q.guards)==null?void 0:ne[oe](k())},R=oe=>{const q=Xs(oe)?oe(k()):oe;if(!q)return;const ne=q.map(L=>{var O,_e;const K=(_e=(O=e.implementations)==null?void 0:O.effects)==null?void 0:_e[L];return K||oh(`[zag-js] No implementation found for effect "${JSON.stringify(L)}"`),K}),S=[];for(const L of ne){const K=L==null?void 0:L(k());K&&S.push(K)}return()=>S.forEach(L=>L==null?void 0:L())},W=oe=>DR(oe).find(q=>{let ne=!q.guard;return Cl(q.guard)?ne=!!F(q.guard):Xs(q.guard)&&(ne=q.guard(k())),ne}),X=oe=>{WR(e.computed,()=>"[zag-js] No computed object found on machine");const q=e.computed[oe];return q({context:d,event:b(),prop:a,refs:w,scope:n,computed:X})},B=Pl(()=>({defaultValue:e.initialState({prop:a}),onChange(oe,q){var S,L,K,O;if(q){const _e=f.current.get(q);_e==null||_e(),f.current.delete(q)}q&&v((S=e.states[q])==null?void 0:S.exit),v((L=p.current)==null?void 0:L.actions);const ne=R((K=e.states[oe])==null?void 0:K.effects);if(ne&&f.current.set(oe,ne),q===mh){v(e.entry);const _e=R(e.effects);_e&&f.current.set(mh,_e)}v((O=e.states[oe])==null?void 0:O.entry)}})),te=$.useRef(void 0),ge=$.useRef(eo.NotStarted);nb(()=>{queueMicrotask(()=>{var L;const ne=ge.current===eo.Started;ge.current=eo.Started,r(ne?"rehydrating...":"initializing...");const S=(L=te.current)!=null?L:B.initial;B.invoke(S,ne?B.get():mh)});const oe=f.current,q=B.ref.current;return()=>{r("unmounting..."),te.current=q,ge.current=eo.Stopped,oe.forEach(ne=>ne==null?void 0:ne()),f.current=new Map,p.current=null,queueMicrotask(()=>{v(e.exit)})}},[]);const ye=()=>"ref"in B?B.ref.current:B.get(),M=oe=>{queueMicrotask(()=>{var O,_e,Re,Oe,Ge;if(ge.current!==eo.Started)return;E.current=T.current,T.current=oe;let q=ye();const ne=(Re=(O=e.states[q].on)==null?void 0:O[oe.type])!=null?Re:(_e=e.on)==null?void 0:_e[oe.type],S=W(ne);if(!S)return;p.current=S;const L=(Oe=S.target)!=null?Oe:q;r("transition",oe.type,S.target||q,`(${S.actions})`);const K=L!==q;K?Ia.flushSync(()=>B.set(L)):S.reenter&&!K?B.invoke(q,q):v((Ge=S.actions)!=null?Ge:[])})};return(Ce=e.watch)==null||Ce.call(e,k()),{state:_(),send:M,context:d,prop:a,scope:n,refs:w,computed:X,event:b(),getStatus:()=>ge.current}}function rb(e){const t=$.useRef(e);return t.current=e,t}function XL(e){const t=rb(e);return function(r){return t.current[r]}}function ib(e){queueMicrotask(()=>{Ia.flushSync(()=>e())})}var sb=GL(e=>e);function Rl(...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 JL(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 _h=e=>{const t=$.memo($.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=nn(f,["asChild","children"]);if(!o)return $.createElement(e,Te(H({},u),{ref:r}),a);if(!$.isValidElement(a))return null;const c=$.Children.only(a),d=JL(c);return $.cloneElement(c,Te(H({},cr(u,c.props)),{ref:r?Rl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},yi=(()=>{const e=new Map;return new Proxy(_h,{apply(t,n,r){return _h(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,_h(r)),e.get(r)}})})();function ZL(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=$.createContext(u);c.displayName=t;function d(){var p;const f=$.useContext(c);if(!f&&n){const E=new Error(a!=null?a:ZL(r,o));throw E.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,E,d),E}return f}return[c.Provider,d,c]}const[e6,xh]=to({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[ob,Pa]=to({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),ab=$.forwardRef((e,t)=>{const n=xh(),r=Pa(),o=cr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:C.jsx(yi.div,Te(H({},o),{ref:Rl(r.ref,t)}))});ab.displayName="PopoverContent";const ub=$.forwardRef((e,t)=>{const n=xh(),r=Pa(),o=cr(n.getPositionerProps(),e);return r.unmounted?null:C.jsx(yi.div,Te(H({},o),{ref:t}))});ub.displayName="PopoverPositioner";const lb=()=>(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]},[{},H({},e)]),cb=e=>lb()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function t6(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var n6={props({props:e}){return Te(H({},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",Nl(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"});Sn(()=>{var c,d;const u=Ll(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})=>{Sn(()=>{e.set("prevAnimationName",Ll(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,E,T;((T=(E=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:E[0])!=null?T:d.target)===o&&e.set("prevAnimationName",Ll(t.get("styles")))},u=d=>{const f=Ll(t.get("styles"));Yr(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=Il(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),PL(()=>c())}}}}};function Ll(e){return(e==null?void 0:e.animationName)||"none"}bh()(["onExitComplete","present","immediate"]);function r6(e,t={}){const{sync:n=!1}=t,r=i6(e);return $.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 i6(e){const t=$.useRef(e);return t.current=e,t}const wh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=nn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=$.useRef(!1),c=Te(H({},a),{present:r,onExitComplete:r6(e.onExitComplete)}),d=Th(n6,c),f=t6(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,E=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:E,present:f.present,unmounted:p}};var no=(e,t=[])=>({parts:(...n)=>{if(s6(t))return no(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>no(e,[...t,...n]),omit:(...n)=>no(e,t.filter(r=>!n.includes(r))),rename:n=>no(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${ro(e)}"][data-part="${ro(r)}"]`,`& [data-scope="${ro(e)}"][data-part="${ro(r)}"]`].join(", "),attrs:{"data-scope":ro(e),"data-part":ro(r)}}}),{})}),ro=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),s6=e=>e.length===0;const o6=["top","right","bottom","left"],bi=Math.min,Dn=Math.max,Dl=Math.round,Ml=Math.floor,kr=e=>({x:e,y:e}),a6={left:"right",right:"left",bottom:"top",top:"bottom"},u6={start:"end",end:"start"};function Sh(e,t,n){return Dn(e,bi(t,n))}function Gr(e,t){return typeof e=="function"?e(t):e}function Kr(e){return e.split("-")[0]}function io(e){return e.split("-")[1]}function Ch(e){return e==="x"?"y":"x"}function Ah(e){return e==="y"?"height":"width"}const l6=new Set(["top","bottom"]);function Nr(e){return l6.has(Kr(e))?"y":"x"}function vh(e){return Ch(Nr(e))}function c6(e,t,n){n===void 0&&(n=!1);const r=io(e),o=vh(e),a=Ah(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Fl(u)),[u,Fl(u)]}function d6(e){const t=Fl(e);return[kh(e),t,kh(t)]}function kh(e){return e.replace(/start|end/g,t=>u6[t])}const db=["left","right"],fb=["right","left"],f6=["top","bottom"],h6=["bottom","top"];function p6(e,t,n){switch(e){case"top":case"bottom":return n?t?fb:db:t?db:fb;case"left":case"right":return t?f6:h6;default:return[]}}function m6(e,t,n,r){const o=io(e);let a=p6(Kr(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(kh)))),a}function Fl(e){return e.replace(/left|right|bottom|top/g,t=>a6[t])}function g6(e){return H({top:0,right:0,bottom:0,left:0},e)}function hb(e){return typeof e!="number"?g6(e):{top:e,right:e,bottom:e,left:e}}function Bl(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 pb(e,t,n){let{reference:r,floating:o}=e;const a=Nr(t),u=vh(t),c=Ah(u),d=Kr(t),f=a==="y",p=r.x+r.width/2-o.width/2,E=r.y+r.height/2-o.height/2,T=r[c]/2-o[c]/2;let b;switch(d){case"top":b={x:p,y:r.y-o.height};break;case"bottom":b={x:p,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:E};break;case"left":b={x:r.x-o.width,y:E};break;default:b={x:r.x,y:r.y}}switch(io(t)){case"start":b[u]-=T*(n&&f?-1:1);break;case"end":b[u]+=T*(n&&f?-1:1);break}return b}const E6=(e,t,n)=>rt(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:E}=pb(f,r,d),T=r,b={},_=0;for(let w=0;w<c.length;w++){const{name:k,fn:v}=c[w],{x:F,y:R,data:W,reset:X}=yield v({x:p,y:E,initialPlacement:r,placement:T,strategy:o,middlewareData:b,rects:f,platform:u,elements:{reference:e,floating:t}});p=F!=null?F:p,E=R!=null?R:E,b=Te(H({},b),{[k]:H(H({},b[k]),W)}),X&&_<=50&&(_++,typeof X=="object"&&(X.placement&&(T=X.placement),X.rects&&(f=X.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):X.rects),{x:p,y:E}=pb(f,T,d)),w=-1)}return{x:p,y:E,placement:T,strategy:o,middlewareData:b}});function Ra(e,t){return rt(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:E="floating",altBoundary:T=!1,padding:b=0}=Gr(t,e),_=hb(b),k=c[T?E==="floating"?"reference":"floating":E],v=Bl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(k))==null||n?k:k.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),F=E==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,R=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),W=(yield a.isElement==null?void 0:a.isElement(R))?(yield a.getScale==null?void 0:a.getScale(R))||{x:1,y:1}:{x:1,y:1},X=Bl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:F,offsetParent:R,strategy:d}):F);return{top:(v.top-X.top+_.top)/W.y,bottom:(X.bottom-v.bottom+_.bottom)/W.y,left:(v.left-X.left+_.left)/W.x,right:(X.right-v.right+_.right)/W.x}})}const y6=e=>({name:"arrow",options:e,fn(n){return rt(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:E=0}=Gr(e,n)||{};if(p==null)return{};const T=hb(E),b={x:r,y:o},_=vh(a),w=Ah(_),k=yield c.getDimensions(p),v=_==="y",F=v?"top":"left",R=v?"bottom":"right",W=v?"clientHeight":"clientWidth",X=u.reference[w]+u.reference[_]-b[_]-u.floating[w],B=b[_]-u.reference[_],te=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ge=te?te[W]:0;(!ge||!(yield c.isElement==null?void 0:c.isElement(te)))&&(ge=d.floating[W]||u.floating[w]);const ye=X/2-B/2,M=ge/2-k[w]/2-1,ae=bi(T[F],M),he=bi(T[R],M),ue=ae,de=ge-k[w]-he,be=ge/2-k[w]/2+ye,Ce=Sh(ue,be,de),oe=!f.arrow&&io(a)!=null&&be!==Ce&&u.reference[w]/2-(be<ue?ae:he)-k[w]/2<0,q=oe?be<ue?be-ue:be-de:0;return{[_]:b[_]+q,data:H({[_]:Ce,centerOffset:be-Ce-q},oe&&{alignmentOffset:q}),reset:oe}})}}),b6=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return rt(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,be=Gr(e,n),{mainAxis:E=!0,crossAxis:T=!0,fallbackPlacements:b,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:k=!0}=be,v=nn(be,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const F=Kr(a),R=Nr(d),W=Kr(d)===d,X=yield f.isRTL==null?void 0:f.isRTL(p.floating),B=b||(W||!k?[Fl(d)]:d6(d)),te=w!=="none";!b&&te&&B.push(...m6(d,k,w,X));const ge=[d,...B],ye=yield Ra(n,v),M=[];let ae=((o=u.flip)==null?void 0:o.overflows)||[];if(E&&M.push(ye[F]),T){const Ce=c6(a,c,X);M.push(ye[Ce[0]],ye[Ce[1]])}if(ae=[...ae,{placement:a,overflows:M}],!M.every(Ce=>Ce<=0)){var he,ue;const Ce=(((he=u.flip)==null?void 0:he.index)||0)+1,oe=ge[Ce];if(oe&&(!(T==="alignment"?R!==Nr(oe):!1)||ae.every(S=>Nr(S.placement)===R?S.overflows[0]>0:!0)))return{data:{index:Ce,overflows:ae},reset:{placement:oe}};let q=(ue=ae.filter(ne=>ne.overflows[0]<=0).sort((ne,S)=>ne.overflows[1]-S.overflows[1])[0])==null?void 0:ue.placement;if(!q)switch(_){case"bestFit":{var de;const ne=(de=ae.filter(S=>{if(te){const L=Nr(S.placement);return L===R||L==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(L=>L>0).reduce((L,K)=>L+K,0)]).sort((S,L)=>S[1]-L[1])[0])==null?void 0:de[0];ne&&(q=ne);break}case"initialPlacement":q=d;break}if(a!==q)return{reset:{placement:q}}}return{}})}}};function mb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gb(e){return o6.some(t=>e[t]>=0)}const T6=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return rt(this,null,function*(){const{rects:r}=n,u=Gr(e,n),{strategy:o="referenceHidden"}=u,a=nn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield Ra(n,Te(H({},a),{elementContext:"reference"})),d=mb(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:gb(d)}}}case"escaped":{const c=yield Ra(n,Te(H({},a),{altBoundary:!0})),d=mb(c,r.floating);return{data:{escapedOffsets:d,escaped:gb(d)}}}default:return{}}})}}},Eb=new Set(["left","top"]);function _6(e,t){return rt(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Kr(n),c=io(n),d=Nr(n)==="y",f=Eb.has(u)?-1:1,p=a&&d?-1:1,E=Gr(t,e);let{mainAxis:T,crossAxis:b,alignmentAxis:_}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:E.mainAxis||0,crossAxis:E.crossAxis||0,alignmentAxis:E.alignmentAxis};return c&&typeof _=="number"&&(b=c==="end"?_*-1:_),d?{x:b*p,y:T*f}:{x:T*f,y:b*p}})}const x6=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return rt(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield _6(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:Te(H({},f),{placement:c})}})}}},w6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return rt(this,null,function*(){const{x:r,y:o,placement:a}=n,v=Gr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:F=>{let{x:R,y:W}=F;return{x:R,y:W}}}}=v,f=nn(v,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},E=yield Ra(n,f),T=Nr(Kr(a)),b=Ch(T);let _=p[b],w=p[T];if(u){const F=b==="y"?"top":"left",R=b==="y"?"bottom":"right",W=_+E[F],X=_-E[R];_=Sh(W,_,X)}if(c){const F=T==="y"?"top":"left",R=T==="y"?"bottom":"right",W=w+E[F],X=w-E[R];w=Sh(W,w,X)}const k=d.fn(Te(H({},n),{[b]:_,[T]:w}));return Te(H({},k),{data:{x:k.x-r,y:k.y-o,enabled:{[b]:u,[T]:c}}})})}}},S6=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}=Gr(e,t),p={x:n,y:r},E=Nr(o),T=Ch(E);let b=p[T],_=p[E];const w=Gr(c,t),k=typeof w=="number"?{mainAxis:w,crossAxis:0}:H({mainAxis:0,crossAxis:0},w);if(d){const R=T==="y"?"height":"width",W=a.reference[T]-a.floating[R]+k.mainAxis,X=a.reference[T]+a.reference[R]-k.mainAxis;b<W?b=W:b>X&&(b=X)}if(f){var v,F;const R=T==="y"?"width":"height",W=Eb.has(Kr(o)),X=a.reference[E]-a.floating[R]+(W&&((v=u.offset)==null?void 0:v[E])||0)+(W?0:k.crossAxis),B=a.reference[E]+a.reference[R]+(W?0:((F=u.offset)==null?void 0:F[E])||0)-(W?k.crossAxis:0);_<X?_=X:_>B&&(_=B)}return{[T]:b,[E]:_}}}},C6=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return rt(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,ae=Gr(e,n),{apply:f=()=>{}}=ae,p=nn(ae,["apply"]),E=yield Ra(n,p),T=Kr(a),b=io(a),_=Nr(a)==="y",{width:w,height:k}=u.floating;let v,F;T==="top"||T==="bottom"?(v=T,F=b===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(F=T,v=b==="end"?"top":"bottom");const R=k-E.top-E.bottom,W=w-E.left-E.right,X=bi(k-E[v],R),B=bi(w-E[F],W),te=!n.middlewareData.shift;let ge=X,ye=B;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(ye=W),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ge=R),te&&!b){const he=Dn(E.left,0),ue=Dn(E.right,0),de=Dn(E.top,0),be=Dn(E.bottom,0);_?ye=w-2*(he!==0||ue!==0?he+ue:Dn(E.left,E.right)):ge=k-2*(de!==0||be!==0?de+be:Dn(E.top,E.bottom))}yield f(Te(H({},n),{availableWidth:ye,availableHeight:ge}));const M=yield c.getDimensions(d.floating);return w!==M.width||k!==M.height?{reset:{rects:!0}}:{}})}}};function Ul(){return typeof window!="undefined"}function so(e){return yb(e)?(e.nodeName||"").toLowerCase():"#document"}function Mn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Or(e){var t;return(t=(yb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yb(e){return Ul()?e instanceof Node||e instanceof Mn(e).Node:!1}function dr(e){return Ul()?e instanceof Element||e instanceof Mn(e).Element:!1}function Ir(e){return Ul()?e instanceof HTMLElement||e instanceof Mn(e).HTMLElement:!1}function bb(e){return!Ul()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Mn(e).ShadowRoot}const A6=new Set(["inline","contents"]);function La(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=fr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!A6.has(o)}const v6=new Set(["table","td","th"]);function k6(e){return v6.has(so(e))}const N6=[":popover-open",":modal"];function Hl(e){return N6.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const O6=["transform","translate","scale","rotate","perspective"],I6=["transform","translate","scale","rotate","perspective","filter"],P6=["paint","layout","strict","content"];function Nh(e){const t=Oh(),n=dr(e)?fr(e):e;return O6.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)||I6.some(r=>(n.willChange||"").includes(r))||P6.some(r=>(n.contain||"").includes(r))}function R6(e){let t=Ti(e);for(;Ir(t)&&!oo(t);){if(Nh(t))return t;if(Hl(t))return null;t=Ti(t)}return null}function Oh(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const L6=new Set(["html","body","#document"]);function oo(e){return L6.has(so(e))}function fr(e){return Mn(e).getComputedStyle(e)}function zl(e){return dr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ti(e){if(so(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bb(e)&&e.host||Or(e);return bb(t)?t.host:t}function Tb(e){const t=Ti(e);return oo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ir(t)&&La(t)?t:Tb(t)}function Da(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Tb(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Mn(o);if(a){const c=Ih(u);return t.concat(u,u.visualViewport||[],La(o)?o:[],c&&n?Da(c):[])}return t.concat(o,Da(o,[],n))}function Ih(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _b(e){const t=fr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ir(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=Dl(n)!==a||Dl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Ph(e){return dr(e)?e:e.contextElement}function ao(e){const t=Ph(e);if(!Ir(t))return kr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=_b(t);let u=(a?Dl(n.width):n.width)/r,c=(a?Dl(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const D6=kr(0);function xb(e){const t=Mn(e);return!Oh()||!t.visualViewport?D6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function M6(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Mn(e)?!1:t}function as(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ph(e);let u=kr(1);t&&(r?dr(r)&&(u=ao(r)):u=ao(e));const c=M6(a,n,r)?xb(a):kr(0);let d=(o.left+c.x)/u.x,f=(o.top+c.y)/u.y,p=o.width/u.x,E=o.height/u.y;if(a){const T=Mn(a),b=r&&dr(r)?Mn(r):r;let _=T,w=Ih(_);for(;w&&r&&b!==_;){const k=ao(w),v=w.getBoundingClientRect(),F=fr(w),R=v.left+(w.clientLeft+parseFloat(F.paddingLeft))*k.x,W=v.top+(w.clientTop+parseFloat(F.paddingTop))*k.y;d*=k.x,f*=k.y,p*=k.x,E*=k.y,d+=R,f+=W,_=Mn(w),w=Ih(_)}}return Bl({width:p,height:E,x:d,y:f})}function jl(e,t){const n=zl(e).scrollLeft;return t?t.left+n:as(Or(e)).left+n}function wb(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-jl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function F6(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Or(r),c=t?Hl(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=kr(1);const p=kr(0),E=Ir(r);if((E||!E&&!a)&&((so(r)!=="body"||La(u))&&(d=zl(r)),Ir(r))){const b=as(r);f=ao(r),p.x=b.x+r.clientLeft,p.y=b.y+r.clientTop}const T=u&&!E&&!a?wb(u,d):kr(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 B6(e){return Array.from(e.getClientRects())}function U6(e){const t=Or(e),n=zl(e),r=e.ownerDocument.body,o=Dn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Dn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+jl(e);const c=-n.scrollTop;return fr(r).direction==="rtl"&&(u+=Dn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const Sb=25;function H6(e,t){const n=Mn(e),r=Or(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=Oh();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const f=jl(r);if(f<=0){const p=r.ownerDocument,E=p.body,T=getComputedStyle(E),b=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,_=Math.abs(r.clientWidth-E.clientWidth-b);_<=Sb&&(a-=_)}else f<=Sb&&(a+=f);return{width:a,height:u,x:c,y:d}}const z6=new Set(["absolute","fixed"]);function j6(e,t){const n=as(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Ir(e)?ao(e):kr(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 Cb(e,t,n){let r;if(t==="viewport")r=H6(e,n);else if(t==="document")r=U6(Or(e));else if(dr(t))r=j6(t,n);else{const o=xb(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Bl(r)}function Ab(e,t){const n=Ti(e);return n===t||!dr(n)||oo(n)?!1:fr(n).position==="fixed"||Ab(n,t)}function $6(e,t){const n=t.get(e);if(n)return n;let r=Da(e,[],!1).filter(c=>dr(c)&&so(c)!=="body"),o=null;const a=fr(e).position==="fixed";let u=a?Ti(e):e;for(;dr(u)&&!oo(u);){const c=fr(u),d=Nh(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&z6.has(o.position)||La(u)&&!d&&Ab(e,u))?r=r.filter(p=>p!==u):o=c,u=Ti(u)}return t.set(e,r),r}function V6(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?Hl(t)?[]:$6(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const E=Cb(t,p,o);return f.top=Dn(E.top,f.top),f.right=bi(E.right,f.right),f.bottom=bi(E.bottom,f.bottom),f.left=Dn(E.left,f.left),f},Cb(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function q6(e){const{width:t,height:n}=_b(e);return{width:t,height:n}}function Y6(e,t,n){const r=Ir(t),o=Or(t),a=n==="fixed",u=as(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=kr(0);function f(){d.x=jl(o)}if(r||!r&&!a)if((so(t)!=="body"||La(o))&&(c=zl(t)),r){const b=as(t,!0,a,t);d.x=b.x+t.clientLeft,d.y=b.y+t.clientTop}else o&&f();a&&!r&&o&&f();const p=o&&!r&&!a?wb(o,c):kr(0),E=u.left+c.scrollLeft-d.x-p.x,T=u.top+c.scrollTop-d.y-p.y;return{x:E,y:T,width:u.width,height:u.height}}function Rh(e){return fr(e).position==="static"}function vb(e,t){if(!Ir(e)||fr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Or(e)===n&&(n=n.ownerDocument.body),n}function kb(e,t){const n=Mn(e);if(Hl(e))return n;if(!Ir(e)){let o=Ti(e);for(;o&&!oo(o);){if(dr(o)&&!Rh(o))return o;o=Ti(o)}return n}let r=vb(e,t);for(;r&&k6(r)&&Rh(r);)r=vb(r,t);return r&&oo(r)&&Rh(r)&&!Nh(r)?n:r||R6(e)||n}const W6=function(e){return rt(this,null,function*(){const t=this.getOffsetParent||kb,n=this.getDimensions,r=yield n(e.floating);return{reference:Y6(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function G6(e){return fr(e).direction==="rtl"}const K6={convertOffsetParentRelativeRectToViewportRelativeRect:F6,getDocumentElement:Or,getClippingRect:V6,getOffsetParent:kb,getElementRects:W6,getClientRects:B6,getDimensions:q6,getScale:ao,isElement:dr,isRTL:G6};function Nb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Q6(e,t){let n=null,r;const o=Or(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:E,width:T,height:b}=f;if(c||t(),!T||!b)return;const _=Ml(E),w=Ml(o.clientWidth-(p+T)),k=Ml(o.clientHeight-(E+b)),v=Ml(p),R={rootMargin:-_+"px "+-w+"px "+-k+"px "+-v+"px",threshold:Dn(0,bi(1,d))||1};let W=!0;function X(B){const te=B[0].intersectionRatio;if(te!==d){if(!W)return u();te?u(!1,te):r=setTimeout(()=>{u(!1,1e-7)},1e3)}te===1&&!Nb(f,e.getBoundingClientRect())&&u(),W=!1}try{n=new IntersectionObserver(X,Te(H({},R),{root:o.ownerDocument}))}catch(B){n=new IntersectionObserver(X,R)}n.observe(e)}return u(!0),a}function X6(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=Ph(e),p=o||a?[...f?Da(f):[],...Da(t)]:[];p.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const E=f&&c?Q6(f,n):null;let T=-1,b=null;u&&(b=new ResizeObserver(v=>{let[F]=v;F&&F.target===f&&b&&(b.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var R;(R=b)==null||R.observe(t)})),n()}),f&&!d&&b.observe(f),b.observe(t));let _,w=d?as(e):null;d&&k();function k(){const v=as(e);w&&!Nb(w,v)&&n(),w=v,_=requestAnimationFrame(k)}return n(),()=>{var v;p.forEach(F=>{o&&F.removeEventListener("scroll",n),a&&F.removeEventListener("resize",n)}),E==null||E(),(v=b)==null||v.disconnect(),b=null,d&&cancelAnimationFrame(_)}}const J6=x6,Z6=w6,e4=b6,t4=C6,n4=T6,r4=y6,i4=S6,s4=(e,t,n)=>{const r=new Map,o=H({platform:K6},n),a=Te(H({},o.platform),{_c:r});return E6(e,t,Te(H({},o),{platform:a}))};function Ob(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 Te(H({},o),{toJSON:()=>o})}function o4(e){if(!e)return Ob();const{x:t,y:n,width:r,height:o}=e;return Ob(t,n,r,o)}function a4(e,t){return{contextElement:Gt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?o4(r):n.getBoundingClientRect()}}}var Ma=e=>({variable:e,reference:`var(${e})`}),Qr={arrowSize:Ma("--arrow-size"),arrowSizeHalf:Ma("--arrow-size-half"),arrowBg:Ma("--arrow-background"),transformOrigin:Ma("--transform-origin"),arrowOffset:Ma("--arrow-offset")},u4=e=>e==="top"||e==="bottom"?"y":"x";function l4(e,t){return{name:"transformOrigin",fn(n){var ye,M,ae,he,ue;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=u4(d),p=((ye=o.arrow)==null?void 0:ye.x)||0,E=((M=o.arrow)==null?void 0:M.y)||0,T=(t==null?void 0:t.clientWidth)||0,b=(t==null?void 0:t.clientHeight)||0,_=p+T/2,w=E+b/2,k=Math.abs(((ae=o.shift)==null?void 0:ae.y)||0),v=u.reference.height/2,F=b/2,R=(ue=(he=e.offset)==null?void 0:he.mainAxis)!=null?ue:e.gutter,W=typeof R=="number"?R+F:R!=null?R:F,X=k>W,B={top:`${_}px calc(100% + ${W}px)`,bottom:`${_}px ${-W}px`,left:`calc(100% + ${W}px) ${w}px`,right:`${-W}px ${w}px`}[d],te=`${_}px ${u.reference.y+v-c}px`,ge=!!e.overlap&&f==="y"&&X;return r.floating.style.setProperty(Qr.transformOrigin.variable,ge?te:B),{data:{transformOrigin:ge?te:B}}}}}var c4={name:"rects",fn({rects:e}){return{data:e}}},d4=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% + ${Qr.arrowOffset.reference})`}),{}}}};function f4(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var h4={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Ib(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Lh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function p4(e,t,n){const r=e||t.createElement("div");return r4({element:r,padding:n.arrowPadding})}function m4(e,t){var n;if(!FR((n=t.offset)!=null?n:t.gutter))return J6(({placement:r})=>{var p,E,T,b;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(E=(p=t.offset)==null?void 0:p.mainAxis)!=null?E:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=f4(r),d=c?void 0:t.shift,f=(b=(T=t.offset)==null?void 0:T.crossAxis)!=null?b:d;return sh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function g4(e){if(!e.flip)return;const t=Lh(e.boundary);return e4(Te(H({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function E4(e){if(!e.slide&&!e.overlap)return;const t=Lh(e.boundary);return Z6(Te(H({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:i4()}))}function y4(e){return t4({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function b4(e){var t;if(e.hideWhenDetached)return n4({strategy:"referenceHidden",boundary:(t=Lh(e.boundary))!=null?t:"clippingAncestors"})}function T4(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function _4(e,t,n={}){const r=a4(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},h4,n),a=t.querySelector("[data-part=arrow]"),u=[m4(a,o),g4(o),E4(o),p4(a,t.ownerDocument,o),d4(a),l4({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),y4(o),b4(o),c4],{placement:c,strategy:d,onComplete:f,onPositioned:p}=o,E=()=>rt(null,null,function*(){var W;if(!r||!t)return;const w=yield s4(r,t,{placement:c,middleware:u,strategy:d});f==null||f(w),p==null||p({placed:!0});const k=Js(t),v=Ib(k,w.x),F=Ib(k,w.y);t.style.setProperty("--x",`${v}px`),t.style.setProperty("--y",`${F}px`),o.hideWhenDetached&&(((W=w.middlewareData.hide)==null?void 0:W.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const R=t.firstElementChild;if(R){const X=Nl(R);t.style.setProperty("--z-index",X.zIndex)}}),T=()=>rt(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:E,floatingElement:t}),p==null||p({placed:!0})):yield E()}),b=T4(o.listeners),_=o.listeners?X6(r,t,T,b):YR;return T(),()=>{_==null||_(),p==null||p({placed:!1})}}function Pb(e,t,n={}){const c=n,{defer:r}=c,o=nn(c,["defer"]),a=r?Sn:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(_4(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var x4={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function w4(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Qr.arrowSize.reference,height:Qr.arrowSize.reference,[Qr.arrowSizeHalf.variable]:`calc(${Qr.arrowSize.reference} / 2)`,[Qr.arrowOffset.variable]:`calc(${Qr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?x4[t.split("-")[0]]:void 0,background:Qr.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 uo=new WeakMap,$l=new WeakMap,Vl={},Dh=0,Rb=e=>e&&(e.host||Rb(e.parentNode)),S4=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Rb(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),C4=new Set(["script","output","status","next-route-announcer"]),A4=e=>C4.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),v4=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=S4(n,Array.isArray(e)?e:[e]);Vl[r]||(Vl[r]=new WeakMap);const c=Vl[r],d=[],f=new Set,p=new Set(u),E=b=>{!b||f.has(b)||(f.add(b),E(b.parentNode))};u.forEach(b=>{E(b),a&&Gt(b)&&jy(b,_=>{E(_)})});const T=b=>{!b||p.has(b)||Array.prototype.forEach.call(b.children,_=>{if(f.has(_))T(_);else try{if(A4(_))return;const k=_.getAttribute(o)==="true",v=(uo.get(_)||0)+1,F=(c.get(_)||0)+1;uo.set(_,v),c.set(_,F),d.push(_),v===1&&k&&$l.set(_,!0),F===1&&_.setAttribute(r,""),k||_.setAttribute(o,"true")}catch(w){console.error("[zag-js > ariaHidden] cannot operate on ",_,w)}})};return T(n),f.clear(),Dh++,()=>{d.forEach(b=>{const _=uo.get(b)-1,w=c.get(b)-1;uo.set(b,_),c.set(b,w),_||($l.has(b)||b.removeAttribute(o),$l.delete(b)),w||b.removeAttribute(r)}),Dh--,Dh||(uo=new WeakMap,uo=new WeakMap,$l=new WeakMap,Vl={})}},k4=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,N4=(e,t=k4(e),n="data-aria-hidden",r=!0)=>{if(t)return v4(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},O4=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Lb(e,t={}){const{defer:n=!0}=t,r=n?O4:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(N4(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function I4(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 P4(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 Db="pointerdown.outside",Mb="focus.outside";function R4(e){for(const t of e)if(Gt(t)&&Wr(t))return!0;return!1}var Fb=e=>"clientY"in e;function L4(e,t){if(!Fb(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 D4(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Bb(e,t){if(!t||!Fb(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 D4(u,c)?r||a:!1}function M4(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=vr(e),f=Js(e),p=I4(f),E=P4(f);function T(R,W){if(!Gt(W)||!W.isConnected||kl(e,W)||L4(e,R)||c&&zy(e,W))return!1;const X=d.querySelector(`[aria-controls="${e.id}"]`);if(X){const te=ph(X);if(Bb(R,te))return!1}const B=ph(e);return Bb(R,B)?!1:!(n!=null&&n(W))}const b=new Set,_=ss(e==null?void 0:e.getRootNode());function w(R){function W(X){var ye,M;const B=u&&!$y()?Sn:ae=>ae(),te=X!=null?X:R,ge=(M=(ye=te==null?void 0:te.composedPath)==null?void 0:ye.call(te))!=null?M:[te==null?void 0:te.target];B(()=>{const ae=_?ge[0]:Yr(R);if(!(!e||!T(R,ae))){if(o||a){const he=ih(o,a);e.addEventListener(Db,he,{once:!0})}Ub(e,Db,{bubbles:!1,cancelable:!0,detail:{originalEvent:te,contextmenu:SL(te),focusable:R4(ge),target:ae}})}})}R.pointerType==="touch"?(b.forEach(X=>X()),b.add(lr(d,"click",W,{once:!0})),b.add(E.addEventListener("click",W,{once:!0})),b.add(p.addEventListener("click",W,{once:!0}))):W()}const k=new Set,v=setTimeout(()=>{k.add(lr(d,"pointerdown",w,!0)),k.add(E.addEventListener("pointerdown",w,!0)),k.add(p.addEventListener("pointerdown",w,!0))},0);function F(R){(u?Sn:X=>X())(()=>{var te,ge;const X=(ge=(te=R==null?void 0:R.composedPath)==null?void 0:te.call(R))!=null?ge:[R==null?void 0:R.target],B=_?X[0]:Yr(R);if(!(!e||!T(R,B))){if(r||a){const ye=ih(r,a);e.addEventListener(Mb,ye,{once:!0})}Ub(e,Mb,{bubbles:!1,cancelable:!0,detail:{originalEvent:R,contextmenu:!1,focusable:Wr(B),target:B}})}})}return $y()||(k.add(lr(d,"focusin",F,!0)),k.add(E.addEventListener("focusin",F,!0)),k.add(p.addEventListener("focusin",F,!0))),()=>{clearTimeout(v),b.forEach(R=>R()),k.forEach(R=>R())}}function F4(e,t){const{defer:n}=t,r=n?Sn:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(M4(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function Ub(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function B4(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return lr(vr(e),"keydown",n,{capture:!0})}var Hb="layer:request-dismiss",Gn={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=>kl(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>kl(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=>Gn.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];H4(e,Hb,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),U4(e,Hb,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function U4(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 H4(e,t,n){e.addEventListener(t,n,{once:!0})}var zb;function jb(){Gn.layers.forEach(({node:e})=>{e.style.pointerEvents=Gn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function z4(e){e.style.pointerEvents=""}function j4(e,t){const n=vr(e),r=[];return Gn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(zb=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=HL(()=>{const c=o();return Gt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Il(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Gn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=zb,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function $4(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){oh("[@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};Gn.add(f),jb();function p(w){var v,F;const k=Yr(w.detail.originalEvent);Gn.isBelowPointerBlockingLayer(e)||Gn.isInBranch(k)||((v=t.onPointerDownOutside)==null||v.call(t,w),(F=t.onInteractOutside)==null||F.call(t,w),!w.defaultPrevented&&(c&&console.log("onPointerDownOutside:",w.detail.originalEvent),r==null||r()))}function E(w){var v,F;const k=Yr(w.detail.originalEvent);Gn.isInBranch(k)||((v=t.onFocusOutside)==null||v.call(t,w),(F=t.onInteractOutside)==null||F.call(t,w),!w.defaultPrevented&&(c&&console.log("onFocusOutside:",w.detail.originalEvent),r==null||r()))}function T(w){var k;Gn.isTopMost(e)&&((k=t.onEscapeKeyDown)==null||k.call(t,w),!w.defaultPrevented&&r&&(w.preventDefault(),r()))}function b(w){var R;if(!e)return!1;const k=typeof u=="function"?u():u,v=Array.isArray(k)?k:[k],F=(R=t.persistentElements)==null?void 0:R.map(W=>W()).filter(Gt);return F&&v.push(...F),v.some(W=>kl(W,w))||Gn.isInNestedLayer(e,w)}const _=[a?j4(e,t.persistentElements):void 0,B4(e,T),F4(e,{exclude:b,onFocusOutside:E,onPointerDownOutside:p,defer:t.defer})];return()=>{Gn.remove(e),jb(),z4(e),_.forEach(w=>w==null?void 0:w())}}function $b(e,t){const{defer:n}=t,r=n?Sn:a=>a(),o=[];return o.push(r(()=>{const a=Xs(e)?e():e;o.push($4(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var V4=Object.defineProperty,q4=(e,t,n)=>t in e?V4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xt=(e,t,n)=>q4(e,typeof t!="symbol"?t+"":t,n),Vb={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()}},Y4=[],W4=class{constructor(e,t){xt(this,"trapStack"),xt(this,"config"),xt(this,"doc"),xt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),xt(this,"portalContainers",new Set),xt(this,"listenerCleanups",[]),xt(this,"handleFocus",r=>{const o=Yr(r),a=this.findContainerIndex(o,r)>=0;if(a||vl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Oa(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(E=>E===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=>Oa(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}),xt(this,"handlePointerDown",r=>{const o=Yr(r);if(!(this.findContainerIndex(o,r)>=0)){if(Ba(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Ba(this.config.allowOutsideClick,r)||r.preventDefault()}}),xt(this,"handleClick",r=>{const o=Yr(r);this.findContainerIndex(o,r)>=0||Ba(this.config.clickOutsideDeactivates,r)||Ba(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),xt(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;Fa(r)&&r.preventDefault(),this.tryFocus(a)}}),xt(this,"handleEscapeKey",r=>{G4(r)&&Ba(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),xt(this,"_mutationObserver"),xt(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 pL(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?mL(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),xt(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)}))}),xt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Wr(r)){const o=Zs(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}),xt(this,"tryFocus",r=>{if(r!==!1&&r!==Zs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,K4(r)&&r.select()}}),xt(this,"deactivate",r=>{if(!this.state.active)return this;const o=H({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(),Vb.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=()=>{qb(()=>{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}),xt(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}),xt(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}),xt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),xt(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),xt(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),xt(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}),xt(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Yr(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:E})=>u===E);if(p<0&&((f==null?void 0:f.container)===u||Wr(u)&&!os(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const E=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[E];c=Oa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Fa(o)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:E})=>u===E);if(p<0&&((f==null?void 0:f.container)===u||Wr(u)&&!os(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const E=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[E];c=Oa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Fa(o)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||Y4;const n=H({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Fa(r)&&!r.shiftKey},isKeyBackward(r){return Fa(r)&&r.shiftKey}},t);this.doc=n.document||vr(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=>{dL(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?zy(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Na(e,{getShadowRoot:this.config.getShadowRoot}),n=Gy(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(Oa(t[f])>0){c=!0;break}function d(f,p=!0){const E=t.indexOf(f);if(E>=0)return t[E+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let b=T+1;b<n.length;b++)if(os(n[b]))return n[b]}else for(let b=T-1;b>=0;b--)if(os(n[b]))return n[b]}}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 Vb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?qb(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(lr(this.doc,"focusin",this.handleFocus,!0),lr(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),lr(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),lr(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),lr(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),lr(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=Zs(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)}},Fa=e=>e.key==="Tab",Ba=(e,...t)=>typeof e=="function"?e(...t):e,G4=e=>!e.isComposing&&e.key==="Escape",qb=e=>setTimeout(e,0),K4=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Yb(e,t={}){let n;const r=Sn(()=>{const o=typeof e=="function"?e():e;if(o){n=new W4(o,Te(H({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:vr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Mh="data-scroll-lock";function Q4(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Wb(e){const t=Nl(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Gb(e){var b;const t=e!=null?e:document,n=(b=t.defaultView)!=null?b:window,{documentElement:r,body:o}=t;if(o.hasAttribute(Mh))return;const u=Wb(r)||Wb(o),c=n.innerWidth-r.clientWidth;o.setAttribute(Mh,"");const d=()=>BL(r,"--scrollbar-width",`${c}px`),f=Q4(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Il(o,_)},E=()=>{var X,B;const{scrollX:_,scrollY:w,visualViewport:k}=n,v=(X=k==null?void 0:k.offsetLeft)!=null?X:0,F=(B=k==null?void 0:k.offsetTop)!=null?B:0,R={position:"fixed",overflow:"hidden",top:`${-(w-Math.floor(F))}px`,left:`${-(_-Math.floor(v))}px`,right:"0"};!u&&c>0&&(R[f]=`${c}px`);const W=Il(o,R);return()=>{W==null||W(),n.scrollTo({left:_,top:w,behavior:"instant"})}},T=[d(),Vy()?E():p()];return()=>{T.forEach(_=>_==null?void 0:_()),o.removeAttribute(Mh)}}var X4=no("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Pr=X4.build(),Kb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},Qb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Fh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},Xb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},J4=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Bh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Uh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},Z4=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},Jb=e=>e.getById(Kb(e)),lo=e=>e.getById(Qb(e)),co=e=>e.getById(Fh(e)),Zb=e=>e.getById(Xb(e)),eD=e=>e.getById(Bh(e)),tD=e=>e.getById(Uh(e));function nD(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"),E=r.get("renderedElements"),T=w4(Te(H({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(b){n.matches("open")!==b&&o({type:b?"OPEN":"CLOSE"})},reposition(b={}){o({type:"POSITIONING.SET",options:b})},getArrowProps(){return t.element(Te(H({id:J4(c)},Pr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(Te(H({},Pr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(Te(H({},Pr.anchor.attrs),{dir:u("dir"),id:Kb(c)}))},getTriggerProps(){return t.button(Te(H({},Pr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:Qb(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Fh(c),onPointerDown(b){wL(b)&&_L()&&b.currentTarget.focus()},onClick(b){b.defaultPrevented||o({type:"TOGGLE"})},onBlur(b){o({type:"TRIGGER_BLUR",target:b.relatedTarget})}}))},getIndicatorProps(){return t.element(Te(H({},Pr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(Te(H({id:Xb(c)},Pr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(Te(H({},Pr.content.attrs),{dir:u("dir"),id:Fh(c),tabIndex:-1,role:"dialog","aria-modal":XR(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":QR(d),"aria-labelledby":E.title?Bh(c):void 0,"aria-describedby":E.description?Uh(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(Te(H({},Pr.title.attrs),{id:Bh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(Te(H({},Pr.description.attrs),{id:Uh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(Te(H({},Pr.closeTrigger.attrs),{dir:u("dir"),id:Z4(c),type:"button","aria-label":"close",onClick(b){b.defaultPrevented||(b.stopPropagation(),o({type:"CLOSE"}))}}))}}}var rD={props({props:e}){return Te(H({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:H({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=Jb(n))!=null?a:lo(n);return Pb(r,()=>Zb(n),Te(H({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>co(n);let o=!0;return $b(r,{type:"popover",pointerBlocking:t("modal"),exclude:lo(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:FL(()=>co(t),{triggerElement:lo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?Lb(()=>[co(t),lo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Gb(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?Yb(()=>co(t),{initialFocus:()=>Ky({root:co(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=Jb(n))!=null?u:lo(n);Pb(o,()=>Zb(n),Te(H(H({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Sn(()=>{Object.assign(e.get("renderedElements"),{title:!!eD(t),description:!!tD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Sn(()=>{const n=Ky({root:co(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||Sn(()=>{const a=lo(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})}}}};bh()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[VB,Hh]=to({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[qB,eT]=to({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),iD=e=>{const t=$.useId(),{getRootNode:n}=Hh(),{dir:r}=eT(),o=H({id:t,dir:r,getRootNode:n},e),a=Th(rD,o);return nD(a,sb)},sD=e=>{const[t,u]=cb(e),c=u,{children:n}=c,r=nn(c,["children"]),o=iD(r),a=wh(cr({present:o.open},t));return C.jsx(e6,{value:o,children:C.jsx(ob,{value:a,children:n})})},tT=$.forwardRef((e,t)=>{const n=xh(),r=Pa(),o=cr(Te(H({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return C.jsx(yi.button,Te(H({},o),{ref:t}))});tT.displayName="PopoverTrigger";function oD(e){return qt({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 aD(e){return qt({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 uD(e){return qt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"},child:[]}]})(e)}function nT(e){return qt({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 lD=({onClearChat:e,componentType:t})=>{const{resetConversation:n}=wr(),r=()=>{n(),e()};return C.jsxs("button",{className:J(`${Y}-overflow-menu-button`,"clear-chat-button",t),onClick:r,children:[C.jsx(nT,{}),"Clear chat"]})},cD=({className:e,componentType:t,children:n})=>{const[r,o]=$.useState(!1),{globalClassName:a}=Rt(),u=()=>{o(!1)},c=d=>{o(d.open)};return C.jsxs(sD,{open:r,onOpenChange:c,positioning:{placement:"bottom-end"},children:[C.jsx(tT,{"aria-label":`Overflow menu for ${t}`,className:J(`${Y}-overflow-menu-button-trigger`,`${Y}-icon-button`,a,e,t),children:C.jsx(uD,{})}),C.jsx(ub,{children:C.jsxs(ab,{className:J(`${Y}-overflow-menu-list`,a,t),children:[n,C.jsx(lD,{componentType:t,onClearChat:u})]})})]})};function rT(e){return qt({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 iT(e){return qt({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 sT=r=>{var o=r,{onClearChat:e,componentType:t}=o,n=nn(o,["onClearChat","componentType"]);const{globalClassName:a}=Rt(),{resetConversation:u}=wr(),c=()=>{u(),e==null||e()};return C.jsx(Vr,H({icon:C.jsx(nT,{size:"0.875rem"}),ariaLabel:"Clear Chat",className:J(a,`${Y}-clear-chat-icon-button`,t),onClick:c},n))},oT=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=Rt();if(!r)return null;const o=()=>{Qi(!1),Jd(!0)};return t?C.jsx(Vr,{className:J(n,`${Y}-toggle-minimize-button`,e),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:C.jsx(Gg,{})}):C.jsxs("button",{className:J(n,`${Y}-overflow-menu-button`,`${Y}-toggle-minimize-button`,e),onClick:o,children:[C.jsx(Gg,{}),"Minimize"]})},aT=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Rt(),r=()=>{Qu("modal")};return t?C.jsx(Vr,{className:J(n,`${Y}-toggle-modal-button`,e),ariaLabel:"Toggle Modal",onClick:r,icon:C.jsx(iT,{})}):C.jsxs("button",{className:J(n,`${Y}-overflow-menu-button`,`${Y}-toggle-modal-button`,e),onClick:r,children:[C.jsx(iT,{}),"Show modal"]})},dD=({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),E=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return C.jsxs("div",{className:J(r,`${Y}-product-tile`,{embedded:!e,standalone:e}),children:[C.jsx("img",{className:J(r,`${Y}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),C.jsxs("div",{className:J(r,`${Y}-product-tile-details`,{embedded:!e,standalone:e}),children:[C.jsxs("div",{className:J(r,`${Y}-product-tile-content`),children:[u&&C.jsx("p",{className:`${Y}-product-tile-brand`,children:u}),E?C.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:J(r,`${Y}-product-tile-pdp`),href:`${E}`,target:o?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",C.jsx("span",{className:J(r,`${Y}-product-tile-pdp-arrow`),children:"→"})]}):C.jsx("p",{className:J(r,`${Y}-product-tile-name`),title:a,children:a})]}),C.jsx("div",{className:J(r,`${Y}-product-tile-footer`),children:C.jsx("p",{className:J(r,`${Y}-product-tile-price`),children:c})})]})]})},fD=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=Rt(),o=t;return n?C.jsxs("div",{className:J(r,`${Y}-display-products widget-message`),children:[C.jsx("p",{children:o.message}),o.products&&o.products.length>0&&C.jsx("div",{className:J(r,`${Y}-product-list`,{embedded:!e,standalone:e}),children:o.products.map(a=>{const u=n.getPid(a);return C.jsx(dD,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},hD=({globalClassName:e,message:t,isWidgetStandalone:n})=>C.jsx("div",{className:J(e,`${Y}-error-message`,{standalone:n,embedded:!n}),children:C.jsxs("p",{className:J(e,`${Y}-error-message-text`,{standalone:n,embedded:!n}),children:[C.jsx(YA,{})," ",t.message||"An error occurred while processing your request."]})});function pD(e){return qt({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{d:"M10.75 6.75a.75.75 0 0 0-1.5 0v2.5h-2.5a.75.75 0 0 0 0 1.5h2.5v2.5a.75.75 0 0 0 1.5 0v-2.5h2.5a.75.75 0 0 0 0-1.5h-2.5v-2.5Z"},child:[]}]})(e)}const mD=({globalClassName:e,messageId:t,messageEventSourceId:n,isLoading:r,suggestions:o,handleSuggestionClick:a})=>C.jsx("div",{className:J(e,`${Y}-suggestion-container standalone`),children:o.map(u=>C.jsxs(rf,{disabled:r,className:J(e,`${Y}-suggestion-button standalone`),onClick:()=>a(u,n||t),children:[C.jsx(pD,{size:"1.5rem",style:{minHeight:"1.5rem",minWidth:"1.5rem"}})," ",u.displayText]},u.displayText))}),gD=({globalClassName:e,message:t,isWidgetStandalone:n,handleSuggestionClick:r})=>{const{isLoading:o}=wr();return C.jsxs("div",{className:J(e,`${Y}-follow-up`),children:[C.jsx("p",{className:J(e,`${Y}-text`),children:t.message}),n&&C.jsx(mD,{globalClassName:e,isLoading:o,messageId:t.id,messageEventSourceId:t.eventSourceId,suggestions:t.suggestions,handleSuggestionClick:r}),!n&&C.jsx("div",{className:J(e,`${Y}-suggestion-container embedded`),children:t.suggestions.map(a=>C.jsx("button",{disabled:o,className:J(e,`${Y}-suggestion-button embedded`),onClick:()=>r(a,t.eventSourceId||t.id),children:a.displayText},a.displayText))})]})};function uT(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 ED(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function yD(e,t,n){const o=dl((n||{}).ignore||[]),a=bD(t);let u=-1;for(;++u<a.length;)oE(e,"text",c);function c(f,p){let E=-1,T;for(;++E<p.length;){const b=p[E],_=T?T.children:void 0;if(o(b,_?_.indexOf(b):void 0,T))return;T=b}if(T)return d(f,p)}function d(f,p){const E=p[p.length-1],T=a[u][0],b=a[u][1];let _=0;const k=E.children.indexOf(f);let v=!1,F=[];T.lastIndex=0;let R=T.exec(f.value);for(;R;){const W=R.index,X={index:R.index,input:R.input,stack:[...p,f]};let B=b(...R,X);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?T.lastIndex=W+1:(_!==W&&F.push({type:"text",value:f.value.slice(_,W)}),Array.isArray(B)?F.push(...B):B&&F.push(B),_=W+R[0].length,v=!0),!T.global)break;R=T.exec(f.value)}return v?(_<f.value.length&&F.push({type:"text",value:f.value.slice(_)}),E.children.splice(k,1,...F)):F=[f],k+F.length}}function bD(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([TD(o[0]),_D(o[1])])}return t}function TD(e){return typeof e=="string"?new RegExp(ED(e),"g"):e}function _D(e){return typeof e=="function"?e:function(){return e}}const zh="phrasing",jh=["autolink","link","image","label"];function xD(){return{transforms:[ND],enter:{literalAutolink:SD,literalAutolinkEmail:$h,literalAutolinkHttp:$h,literalAutolinkWww:$h},exit:{literalAutolink:kD,literalAutolinkEmail:vD,literalAutolinkHttp:CD,literalAutolinkWww:AD}}}function wD(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:zh,notInConstruct:jh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:zh,notInConstruct:jh},{character:":",before:"[ps]",after:"\\/",inConstruct:zh,notInConstruct:jh}]}}function SD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function $h(e){this.config.enter.autolinkProtocol.call(this,e)}function CD(e){this.config.exit.autolinkProtocol.call(this,e)}function AD(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 vD(e){this.config.exit.autolinkEmail.call(this,e)}function kD(e){this.exit(e)}function ND(e){yD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,OD],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),ID]],{ignore:["link","linkReference"]})}function OD(e,t,n,r,o){let a="";if(!lT(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!PD(n)))return!1;const u=RD(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 ID(e,t,n,r){return!lT(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function PD(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 RD(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=uT(e,"(");let a=uT(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 lT(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ji(n)||il(n))&&(!t||n!==47)}cT.peek=jD;function LD(){this.buffer()}function DD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function MD(){this.buffer()}function FD(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function BD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ar(this.sliceSerialize(e)).toLowerCase(),n.label=t}function UD(e){this.exit(e)}function HD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ar(this.sliceSerialize(e)).toLowerCase(),n.label=t}function zD(e){this.exit(e)}function jD(){return"["}function cT(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 $D(){return{enter:{gfmFootnoteCallString:LD,gfmFootnoteCall:DD,gfmFootnoteDefinitionLabelString:MD,gfmFootnoteDefinition:FD},exit:{gfmFootnoteCallString:BD,gfmFootnoteCall:UD,gfmFootnoteDefinitionLabelString:HD,gfmFootnoteDefinition:zD}}}function VD(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:cT},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?`
|
|
29
|
-
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?
|
|
30
|
-
`)}function
|
|
31
|
-
`&&
|
|
32
|
-
`}function
|
|
33
|
-
`,encode:["`"]},c.current()))),E()}return
|
|
34
|
-
`),a&&(
|
|
35
|
-
`)),
|
|
36
|
-
`},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,H({before:f,after:o},d.current()))),f+=d.move(o),c()),u(),f}function
|
|
31
|
+
`+y.stack}return{value:i,source:s,stack:g,digest:null}}function pm(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function mm(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var RF=typeof WeakMap=="function"?WeakMap:Map;function G_(i,s,l){l=oi(-1,l),l.tag=3,l.payload={element:null};var h=s.value;return l.callback=function(){qc||(qc=!0,Om=h),mm(i,s)},l}function K_(i,s,l){l=oi(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var g=s.value;l.payload=function(){return h(g)},l.callback=function(){mm(i,s)}}var y=i.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(l.callback=function(){mm(i,s),typeof h!="function"&&(Fi===null?Fi=new Set([this]):Fi.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),l}function Q_(i,s,l){var h=i.pingCache;if(h===null){h=i.pingCache=new RF;var g=new Set;h.set(s,g)}else g=h.get(s),g===void 0&&(g=new Set,h.set(s,g));g.has(l)||(g.add(l),i=WF.bind(null,i,s,l),s.then(i,i))}function X_(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 J_(i,s,l,h,g){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=oi(-1,1),s.tag=2,Di(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var LF=W.ReactCurrentOwner,kn=!1;function gn(i,s,l,h){s.child=i===null?y_(s,null,l,h):ko(s,i.child,l,h)}function Z_(i,s,l,h,g){l=l.render;var y=s.ref;return Oo(s,g),h=om(i,s,l,h,y,g),l=am(),i!==null&&!kn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,ai(i,s,g)):(wt&&l&&$p(s),s.flags|=1,gn(i,s,h,g),s.child)}function ex(i,s,l,h,g){if(i===null){var y=l.type;return typeof y=="function"&&!Fm(y)&&y.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=y,tx(i,s,y,h,g)):(i=Xc(l.type,null,h,s,s.mode,g),i.ref=s.ref,i.return=s,s.child=i)}if(y=i.child,(i.lanes&g)===0){var x=y.memoizedProps;if(l=l.compare,l=l!==null?l:ru,l(x,h)&&i.ref===s.ref)return ai(i,s,g)}return s.flags|=1,i=zi(y,h),i.ref=s.ref,i.return=s,s.child=i}function tx(i,s,l,h,g){if(i!==null){var y=i.memoizedProps;if(ru(y,h)&&i.ref===s.ref)if(kn=!1,s.pendingProps=h=y,(i.lanes&g)!==0)(i.flags&131072)!==0&&(kn=!0);else return s.lanes=i.lanes,ai(i,s,g)}return gm(i,s,l,h,g)}function nx(i,s,l){var h=s.pendingProps,g=h.children,y=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},pt(Lo,zn),zn|=l;else{if((l&1073741824)===0)return i=y!==null?y.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,pt(Lo,zn),zn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=y!==null?y.baseLanes:l,pt(Lo,zn),zn|=h}else y!==null?(h=y.baseLanes|l,s.memoizedState=null):h=l,pt(Lo,zn),zn|=h;return gn(i,s,g,l),s.child}function rx(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function gm(i,s,l,h,g){var y=vn(l)?gs:ln.current;return y=So(s,y),Oo(s,g),l=om(i,s,l,h,y,g),h=am(),i!==null&&!kn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,ai(i,s,g)):(wt&&h&&$p(s),s.flags|=1,gn(i,s,l,g),s.child)}function ix(i,s,l,h,g){if(vn(l)){var y=!0;xc(s)}else y=!1;if(Oo(s,g),s.stateNode===null)Hc(i,s),Y_(s,l,h),hm(s,l,h,g),h=!0;else if(i===null){var x=s.stateNode,I=s.memoizedProps;x.props=I;var D=x.context,G=l.contextType;typeof G=="object"&&G!==null?G=er(G):(G=vn(l)?gs:ln.current,G=So(s,G));var ae=l.getDerivedStateFromProps,de=typeof ae=="function"||typeof x.getSnapshotBeforeUpdate=="function";de||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(I!==h||D!==G)&&W_(s,x,h,G),Li=!1;var re=s.memoizedState;x.state=re,Ic(s,h,x,g),D=s.memoizedState,I!==h||re!==D||An.current||Li?(typeof ae=="function"&&(fm(s,l,ae,h),D=s.memoizedState),(I=Li||q_(s,l,I,h,re,D,G))?(de||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=D),x.props=h,x.state=D,x.context=G,h=I):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{x=s.stateNode,T_(i,s),I=s.memoizedProps,G=s.type===s.elementType?I:Er(s.type,I),x.props=G,de=s.pendingProps,re=x.context,D=l.contextType,typeof D=="object"&&D!==null?D=er(D):(D=vn(l)?gs:ln.current,D=So(s,D));var xe=l.getDerivedStateFromProps;(ae=typeof xe=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(I!==de||re!==D)&&W_(s,x,h,D),Li=!1,re=s.memoizedState,x.state=re,Ic(s,h,x,g);var ve=s.memoizedState;I!==de||re!==ve||An.current||Li?(typeof xe=="function"&&(fm(s,l,xe,h),ve=s.memoizedState),(G=Li||q_(s,l,G,h,re,ve,D)||!1)?(ae||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,ve,D),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,ve,D)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=ve),x.props=h,x.state=ve,x.context=D,h=G):(typeof x.componentDidUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=1024),h=!1)}return Em(i,s,l,h,y,g)}function Em(i,s,l,h,g,y){rx(i,s);var x=(s.flags&128)!==0;if(!h&&!x)return g&&l_(s,l,!1),ai(i,s,y);h=s.stateNode,LF.current=s;var I=x&&typeof l.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&x?(s.child=ko(s,i.child,null,y),s.child=ko(s,null,I,y)):gn(i,s,I,y),s.memoizedState=h.state,g&&l_(s,l,!0),s.child}function sx(i){var s=i.stateNode;s.pendingContext?a_(i,s.pendingContext,s.pendingContext!==s.context):s.context&&a_(i,s.context,!1),em(i,s.containerInfo)}function ox(i,s,l,h,g){return vo(),Wp(g),s.flags|=256,gn(i,s,l,h),s.child}var ym={dehydrated:null,treeContext:null,retryLane:0};function bm(i){return{baseLanes:i,cachePool:null,transitions:null}}function ax(i,s,l){var h=s.pendingProps,g=At.current,y=!1,x=(s.flags&128)!==0,I;if((I=x)||(I=i!==null&&i.memoizedState===null?!1:(g&2)!==0),I?(y=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),pt(At,g&1),i===null)return Yp(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):(x=h.children,i=h.fallback,y?(h=s.mode,y=s.child,x={mode:"hidden",children:x},(h&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=x):y=Jc(x,h,0,null),i=As(i,h,l,null),y.return=s,i.return=s,y.sibling=i,s.child=y,s.child.memoizedState=bm(l),s.memoizedState=ym,i):Tm(s,x));if(g=i.memoizedState,g!==null&&(I=g.dehydrated,I!==null))return DF(i,s,x,h,I,g,l);if(y){y=h.fallback,x=s.mode,g=i.child,I=g.sibling;var D={mode:"hidden",children:h.children};return(x&1)===0&&s.child!==g?(h=s.child,h.childLanes=0,h.pendingProps=D,s.deletions=null):(h=zi(g,D),h.subtreeFlags=g.subtreeFlags&14680064),I!==null?y=zi(I,y):(y=As(y,x,l,null),y.flags|=2),y.return=s,h.return=s,h.sibling=y,s.child=h,h=y,y=s.child,x=i.child.memoizedState,x=x===null?bm(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},y.memoizedState=x,y.childLanes=i.childLanes&~l,s.memoizedState=ym,h}return y=i.child,i=y.sibling,h=zi(y,{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 Tm(i,s){return s=Jc({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function Uc(i,s,l,h){return h!==null&&Wp(h),ko(s,i.child,null,l),i=Tm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function DF(i,s,l,h,g,y,x){if(l)return s.flags&256?(s.flags&=-257,h=pm(Error(n(422))),Uc(i,s,x,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(y=h.fallback,g=s.mode,h=Jc({mode:"visible",children:h.children},g,0,null),y=As(y,g,x,null),y.flags|=2,h.return=s,y.return=s,h.sibling=y,s.child=h,(s.mode&1)!==0&&ko(s,i.child,null,x),s.child.memoizedState=bm(x),s.memoizedState=ym,y);if((s.mode&1)===0)return Uc(i,s,x,null);if(g.data==="$!"){if(h=g.nextSibling&&g.nextSibling.dataset,h)var I=h.dgst;return h=I,y=Error(n(419)),h=pm(y,h,void 0),Uc(i,s,x,h)}if(I=(x&i.childLanes)!==0,kn||I){if(h=Xt,h!==null){switch(x&-x){case 4:g=2;break;case 16:g=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:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(h.suspendedLanes|x))!==0?0:g,g!==0&&g!==y.retryLane&&(y.retryLane=g,si(i,g),Tr(h,i,g,-1))}return Mm(),h=pm(Error(n(421))),Uc(i,s,x,h)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=GF.bind(null,i),g._reactRetry=s,null):(i=y.treeContext,Hn=Oi(g.nextSibling),Un=s,wt=!0,gr=null,i!==null&&(Jn[Zn++]=ri,Jn[Zn++]=ii,Jn[Zn++]=Es,ri=i.id,ii=i.overflow,Es=s),s=Tm(s,h.children),s.flags|=4096,s)}function ux(i,s,l){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),Xp(i.return,s,l)}function _m(i,s,l,h,g){var y=i.memoizedState;y===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:g}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=h,y.tail=l,y.tailMode=g)}function lx(i,s,l){var h=s.pendingProps,g=h.revealOrder,y=h.tail;if(gn(i,s,h.children,l),h=At.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&&ux(i,l,s);else if(i.tag===19)ux(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(pt(At,h),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(l=s.child,g=null;l!==null;)i=l.alternate,i!==null&&Pc(i)===null&&(g=l),l=l.sibling;l=g,l===null?(g=s.child,s.child=null):(g=l.sibling,l.sibling=null),_m(s,!1,g,l,y);break;case"backwards":for(l=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&Pc(i)===null){s.child=g;break}i=g.sibling,g.sibling=l,l=g,g=i}_m(s,!0,l,null,y);break;case"together":_m(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Hc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function ai(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),xs|=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 MF(i,s,l){switch(s.tag){case 3:sx(s),vo();break;case 5:w_(s);break;case 1:vn(s.type)&&xc(s);break;case 4:em(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,g=s.memoizedProps.value;pt(kc,h._currentValue),h._currentValue=g;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(pt(At,At.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?ax(i,s,l):(pt(At,At.current&1),i=ai(i,s,l),i!==null?i.sibling:null);pt(At,At.current&1);break;case 19:if(h=(l&s.childLanes)!==0,(i.flags&128)!==0){if(h)return lx(i,s,l);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),pt(At,At.current),h)break;return null;case 22:case 23:return s.lanes=0,nx(i,s,l)}return ai(i,s,l)}var cx,xm,dx,fx;cx=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}},xm=function(){},dx=function(i,s,l,h){var g=i.memoizedProps;if(g!==h){i=s.stateNode,Ts(Br.current);var y=null;switch(l){case"input":g=_i(i,g),h=_i(i,h),y=[];break;case"select":g=S({},g,{value:void 0}),h=S({},h,{value:void 0}),y=[];break;case"textarea":g=ct(i,g),h=ct(i,h),y=[];break;default:typeof g.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=bc)}Zt(l,h);var x;l=null;for(G in g)if(!h.hasOwnProperty(G)&&g.hasOwnProperty(G)&&g[G]!=null)if(G==="style"){var I=g[G];for(x in I)I.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else G!=="dangerouslySetInnerHTML"&&G!=="children"&&G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&G!=="autoFocus"&&(o.hasOwnProperty(G)?y||(y=[]):(y=y||[]).push(G,null));for(G in h){var D=h[G];if(I=g!=null?g[G]:void 0,h.hasOwnProperty(G)&&D!==I&&(D!=null||I!=null))if(G==="style")if(I){for(x in I)!I.hasOwnProperty(x)||D&&D.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in D)D.hasOwnProperty(x)&&I[x]!==D[x]&&(l||(l={}),l[x]=D[x])}else l||(y||(y=[]),y.push(G,l)),l=D;else G==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,I=I?I.__html:void 0,D!=null&&I!==D&&(y=y||[]).push(G,D)):G==="children"?typeof D!="string"&&typeof D!="number"||(y=y||[]).push(G,""+D):G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&(o.hasOwnProperty(G)?(D!=null&&G==="onScroll"&&Et("scroll",i),y||I===D||(y=[])):(y=y||[]).push(G,D))}l&&(y=y||[]).push("style",l);var G=y;(s.updateQueue=G)&&(s.flags|=4)}},fx=function(i,s,l,h){l!==h&&(s.flags|=4)};function yu(i,s){if(!wt)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 dn(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(s)for(var g=i.child;g!==null;)l|=g.lanes|g.childLanes,h|=g.subtreeFlags&14680064,h|=g.flags&14680064,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)l|=g.lanes|g.childLanes,h|=g.subtreeFlags,h|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=h,i.childLanes=l,s}function FF(i,s,l){var h=s.pendingProps;switch(Vp(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dn(s),null;case 1:return vn(s.type)&&_c(),dn(s),null;case 3:return h=s.stateNode,Io(),yt(An),yt(ln),rm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Ac(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,gr!==null&&(Rm(gr),gr=null))),xm(i,s),dn(s),null;case 5:tm(s);var g=Ts(hu.current);if(l=s.type,i!==null&&s.stateNode!=null)dx(i,s,l,h,g),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!h){if(s.stateNode===null)throw Error(n(166));return dn(s),null}if(i=Ts(Br.current),Ac(s)){h=s.stateNode,l=s.type;var y=s.memoizedProps;switch(h[Fr]=s,h[uu]=y,i=(s.mode&1)!==0,l){case"dialog":Et("cancel",h),Et("close",h);break;case"iframe":case"object":case"embed":Et("load",h);break;case"video":case"audio":for(g=0;g<su.length;g++)Et(su[g],h);break;case"source":Et("error",h);break;case"img":case"image":case"link":Et("error",h),Et("load",h);break;case"details":Et("toggle",h);break;case"input":fs(h,y),Et("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!y.multiple},Et("invalid",h);break;case"textarea":gt(h,y),Et("invalid",h)}Zt(l,y),g=null;for(var x in y)if(y.hasOwnProperty(x)){var I=y[x];x==="children"?typeof I=="string"?h.textContent!==I&&(y.suppressHydrationWarning!==!0&&yc(h.textContent,I,i),g=["children",I]):typeof I=="number"&&h.textContent!==""+I&&(y.suppressHydrationWarning!==!0&&yc(h.textContent,I,i),g=["children",""+I]):o.hasOwnProperty(x)&&I!=null&&x==="onScroll"&&Et("scroll",h)}switch(l){case"input":Kn(h),we(h,y,!0);break;case"textarea":Kn(h),Ct(h);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(h.onclick=bc)}h=g,s.updateQueue=h,h!==null&&(s.flags|=4)}else{x=g.nodeType===9?g:g.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=X(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=x.createElement(l,{is:h.is}):(i=x.createElement(l),l==="select"&&(x=i,h.multiple?x.multiple=!0:h.size&&(x.size=h.size))):i=x.createElementNS(i,l),i[Fr]=s,i[uu]=h,cx(i,s,!1,!1),s.stateNode=i;e:{switch(x=Dr(l,h),l){case"dialog":Et("cancel",i),Et("close",i),g=h;break;case"iframe":case"object":case"embed":Et("load",i),g=h;break;case"video":case"audio":for(g=0;g<su.length;g++)Et(su[g],i);g=h;break;case"source":Et("error",i),g=h;break;case"img":case"image":case"link":Et("error",i),Et("load",i),g=h;break;case"details":Et("toggle",i),g=h;break;case"input":fs(i,h),g=_i(i,h),Et("invalid",i);break;case"option":g=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},g=S({},h,{value:void 0}),Et("invalid",i);break;case"textarea":gt(i,h),g=ct(i,h),Et("invalid",i);break;default:g=h}Zt(l,g),I=g;for(y in I)if(I.hasOwnProperty(y)){var D=I[y];y==="style"?wi(i,D):y==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,D!=null&&$e(i,D)):y==="children"?typeof D=="string"?(l!=="textarea"||D!=="")&&Je(i,D):typeof D=="number"&&Je(i,""+D):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(o.hasOwnProperty(y)?D!=null&&y==="onScroll"&&Et("scroll",i):D!=null&&L(i,y,D,x))}switch(l){case"input":Kn(i),we(i,h,!1);break;case"textarea":Kn(i),Ct(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Ye(h.value));break;case"select":i.multiple=!!h.multiple,y=h.value,y!=null?Xe(i,!!h.multiple,y,!1):h.defaultValue!=null&&Xe(i,!!h.multiple,h.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=bc)}switch(l){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return dn(s),null;case 6:if(i&&s.stateNode!=null)fx(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(l=Ts(hu.current),Ts(Br.current),Ac(s)){if(h=s.stateNode,l=s.memoizedProps,h[Fr]=s,(y=h.nodeValue!==l)&&(i=Un,i!==null))switch(i.tag){case 3:yc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&yc(h.nodeValue,l,(i.mode&1)!==0)}y&&(s.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Fr]=s,s.stateNode=h}return dn(s),null;case 13:if(yt(At),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(wt&&Hn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)m_(),vo(),s.flags|=98560,y=!1;else if(y=Ac(s),h!==null&&h.dehydrated!==null){if(i===null){if(!y)throw Error(n(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[Fr]=s}else vo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;dn(s),y=!1}else gr!==null&&(Rm(gr),gr=null),y=!0;if(!y)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||(At.current&1)!==0?$t===0&&($t=3):Mm())),s.updateQueue!==null&&(s.flags|=4),dn(s),null);case 4:return Io(),xm(i,s),i===null&&ou(s.stateNode.containerInfo),dn(s),null;case 10:return Qp(s.type._context),dn(s),null;case 17:return vn(s.type)&&_c(),dn(s),null;case 19:if(yt(At),y=s.memoizedState,y===null)return dn(s),null;if(h=(s.flags&128)!==0,x=y.rendering,x===null)if(h)yu(y,!1);else{if($t!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=Pc(i),x!==null){for(s.flags|=128,yu(y,!1),h=x.updateQueue,h!==null&&(s.updateQueue=h,s.flags|=4),s.subtreeFlags=0,h=l,l=s.child;l!==null;)y=l,i=h,y.flags&=14680066,x=y.alternate,x===null?(y.childLanes=0,y.lanes=i,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=x.childLanes,y.lanes=x.lanes,y.child=x.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=x.memoizedProps,y.memoizedState=x.memoizedState,y.updateQueue=x.updateQueue,y.type=x.type,i=x.dependencies,y.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return pt(At,At.current&1|2),s.child}i=i.sibling}y.tail!==null&&Dt()>Do&&(s.flags|=128,h=!0,yu(y,!1),s.lanes=4194304)}else{if(!h)if(i=Pc(x),i!==null){if(s.flags|=128,h=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),yu(y,!0),y.tail===null&&y.tailMode==="hidden"&&!x.alternate&&!wt)return dn(s),null}else 2*Dt()-y.renderingStartTime>Do&&l!==1073741824&&(s.flags|=128,h=!0,yu(y,!1),s.lanes=4194304);y.isBackwards?(x.sibling=s.child,s.child=x):(l=y.last,l!==null?l.sibling=x:s.child=x,y.last=x)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=Dt(),s.sibling=null,l=At.current,pt(At,h?l&1|2:l&1),s):(dn(s),null);case 22:case 23:return Dm(),h=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(zn&1073741824)!==0&&(dn(s),s.subtreeFlags&6&&(s.flags|=8192)):dn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function BF(i,s){switch(Vp(s),s.tag){case 1:return vn(s.type)&&_c(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Io(),yt(An),yt(ln),rm(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return tm(s),null;case 13:if(yt(At),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));vo()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return yt(At),null;case 4:return Io(),null;case 10:return Qp(s.type._context),null;case 22:case 23:return Dm(),null;case 24:return null;default:return null}}var zc=!1,fn=!1,UF=typeof WeakSet=="function"?WeakSet:Set,Se=null;function Ro(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){Ot(i,s,h)}else l.current=null}function wm(i,s,l){try{l()}catch(h){Ot(i,s,h)}}var hx=!1;function HF(i,s){if(Dp=ac,i=q2(),vp(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 g=h.anchorOffset,y=h.focusNode;h=h.focusOffset;try{l.nodeType,y.nodeType}catch(Ee){l=null;break e}var x=0,I=-1,D=-1,G=0,ae=0,de=i,re=null;t:for(;;){for(var xe;de!==l||g!==0&&de.nodeType!==3||(I=x+g),de!==y||h!==0&&de.nodeType!==3||(D=x+h),de.nodeType===3&&(x+=de.nodeValue.length),(xe=de.firstChild)!==null;)re=de,de=xe;for(;;){if(de===i)break t;if(re===l&&++G===g&&(I=x),re===y&&++ae===h&&(D=x),(xe=de.nextSibling)!==null)break;de=re,re=de.parentNode}de=xe}l=I===-1||D===-1?null:{start:I,end:D}}else l=null}l=l||{start:0,end:0}}else l=null;for(Mp={focusedElem:i,selectionRange:l},ac=!1,Se=s;Se!==null;)if(s=Se,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Se=i;else for(;Se!==null;){s=Se;try{var ve=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ve!==null){var ke=ve.memoizedProps,Mt=ve.memoizedState,z=s.stateNode,U=z.getSnapshotBeforeUpdate(s.elementType===s.type?ke:Er(s.type,ke),Mt);z.__reactInternalSnapshotBeforeUpdate=U}break;case 3:var $=s.stateNode.containerInfo;$.nodeType===1?$.textContent="":$.nodeType===9&&$.documentElement&&$.removeChild($.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Ee){Ot(s,s.return,Ee)}if(i=s.sibling,i!==null){i.return=s.return,Se=i;break}Se=s.return}return ve=hx,hx=!1,ve}function bu(i,s,l){var h=s.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var g=h=h.next;do{if((g.tag&i)===i){var y=g.destroy;g.destroy=void 0,y!==void 0&&wm(s,l,y)}g=g.next}while(g!==h)}}function jc(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 Sm(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 px(i){var s=i.alternate;s!==null&&(i.alternate=null,px(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Fr],delete s[uu],delete s[Hp],delete s[xF],delete s[wF])),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 mx(i){return i.tag===5||i.tag===3||i.tag===4}function gx(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||mx(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 Cm(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=bc));else if(h!==4&&(i=i.child,i!==null))for(Cm(i,s,l),i=i.sibling;i!==null;)Cm(i,s,l),i=i.sibling}function Am(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(Am(i,s,l),i=i.sibling;i!==null;)Am(i,s,l),i=i.sibling}var en=null,yr=!1;function Mi(i,s,l){for(l=l.child;l!==null;)Ex(i,s,l),l=l.sibling}function Ex(i,s,l){if(Mr&&typeof Mr.onCommitFiberUnmount=="function")try{Mr.onCommitFiberUnmount(tc,l)}catch(I){}switch(l.tag){case 5:fn||Ro(l,s);case 6:var h=en,g=yr;en=null,Mi(i,s,l),en=h,yr=g,en!==null&&(yr?(i=en,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):en.removeChild(l.stateNode));break;case 18:en!==null&&(yr?(i=en,l=l.stateNode,i.nodeType===8?Up(i.parentNode,l):i.nodeType===1&&Up(i,l),Xa(i)):Up(en,l.stateNode));break;case 4:h=en,g=yr,en=l.stateNode.containerInfo,yr=!0,Mi(i,s,l),en=h,yr=g;break;case 0:case 11:case 14:case 15:if(!fn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){g=h=h.next;do{var y=g,x=y.destroy;y=y.tag,x!==void 0&&((y&2)!==0||(y&4)!==0)&&wm(l,s,x),g=g.next}while(g!==h)}Mi(i,s,l);break;case 1:if(!fn&&(Ro(l,s),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(I){Ot(l,s,I)}Mi(i,s,l);break;case 21:Mi(i,s,l);break;case 22:l.mode&1?(fn=(h=fn)||l.memoizedState!==null,Mi(i,s,l),fn=h):Mi(i,s,l);break;default:Mi(i,s,l)}}function yx(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new UF),s.forEach(function(h){var g=KF.bind(null,i,h);l.has(h)||(l.add(h),h.then(g,g))})}}function br(i,s){var l=s.deletions;if(l!==null)for(var h=0;h<l.length;h++){var g=l[h];try{var y=i,x=s,I=x;e:for(;I!==null;){switch(I.tag){case 5:en=I.stateNode,yr=!1;break e;case 3:en=I.stateNode.containerInfo,yr=!0;break e;case 4:en=I.stateNode.containerInfo,yr=!0;break e}I=I.return}if(en===null)throw Error(n(160));Ex(y,x,g),en=null,yr=!1;var D=g.alternate;D!==null&&(D.return=null),g.return=null}catch(G){Ot(g,s,G)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)bx(s,i),s=s.sibling}function bx(i,s){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(br(s,i),Hr(i),h&4){try{bu(3,i,i.return),jc(3,i)}catch(ke){Ot(i,i.return,ke)}try{bu(5,i,i.return)}catch(ke){Ot(i,i.return,ke)}}break;case 1:br(s,i),Hr(i),h&512&&l!==null&&Ro(l,l.return);break;case 5:if(br(s,i),Hr(i),h&512&&l!==null&&Ro(l,l.return),i.flags&32){var g=i.stateNode;try{Je(g,"")}catch(ke){Ot(i,i.return,ke)}}if(h&4&&(g=i.stateNode,g!=null)){var y=i.memoizedProps,x=l!==null?l.memoizedProps:y,I=i.type,D=i.updateQueue;if(i.updateQueue=null,D!==null)try{I==="input"&&y.type==="radio"&&y.name!=null&&xi(g,y),Dr(I,x);var G=Dr(I,y);for(x=0;x<D.length;x+=2){var ae=D[x],de=D[x+1];ae==="style"?wi(g,de):ae==="dangerouslySetInnerHTML"?$e(g,de):ae==="children"?Je(g,de):L(g,ae,de,G)}switch(I){case"input":ei(g,y);break;case"textarea":mn(g,y);break;case"select":var re=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var xe=y.value;xe!=null?Xe(g,!!y.multiple,xe,!1):re!==!!y.multiple&&(y.defaultValue!=null?Xe(g,!!y.multiple,y.defaultValue,!0):Xe(g,!!y.multiple,y.multiple?[]:"",!1))}g[uu]=y}catch(ke){Ot(i,i.return,ke)}}break;case 6:if(br(s,i),Hr(i),h&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,y=i.memoizedProps;try{g.nodeValue=y}catch(ke){Ot(i,i.return,ke)}}break;case 3:if(br(s,i),Hr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{Xa(s.containerInfo)}catch(ke){Ot(i,i.return,ke)}break;case 4:br(s,i),Hr(i);break;case 13:br(s,i),Hr(i),g=i.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(Nm=Dt())),h&4&&yx(i);break;case 22:if(ae=l!==null&&l.memoizedState!==null,i.mode&1?(fn=(G=fn)||ae,br(s,i),fn=G):br(s,i),Hr(i),h&8192){if(G=i.memoizedState!==null,(i.stateNode.isHidden=G)&&!ae&&(i.mode&1)!==0)for(Se=i,ae=i.child;ae!==null;){for(de=Se=ae;Se!==null;){switch(re=Se,xe=re.child,re.tag){case 0:case 11:case 14:case 15:bu(4,re,re.return);break;case 1:Ro(re,re.return);var ve=re.stateNode;if(typeof ve.componentWillUnmount=="function"){h=re,l=re.return;try{s=h,ve.props=s.memoizedProps,ve.state=s.memoizedState,ve.componentWillUnmount()}catch(ke){Ot(h,l,ke)}}break;case 5:Ro(re,re.return);break;case 22:if(re.memoizedState!==null){xx(de);continue}}xe!==null?(xe.return=re,Se=xe):xx(de)}ae=ae.sibling}e:for(ae=null,de=i;;){if(de.tag===5){if(ae===null){ae=de;try{g=de.stateNode,G?(y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(I=de.stateNode,D=de.memoizedProps.style,x=D!=null&&D.hasOwnProperty("display")?D.display:null,I.style.display=Xn("display",x))}catch(ke){Ot(i,i.return,ke)}}}else if(de.tag===6){if(ae===null)try{de.stateNode.nodeValue=G?"":de.memoizedProps}catch(ke){Ot(i,i.return,ke)}}else if((de.tag!==22&&de.tag!==23||de.memoizedState===null||de===i)&&de.child!==null){de.child.return=de,de=de.child;continue}if(de===i)break e;for(;de.sibling===null;){if(de.return===null||de.return===i)break e;ae===de&&(ae=null),de=de.return}ae===de&&(ae=null),de.sibling.return=de.return,de=de.sibling}}break;case 19:br(s,i),Hr(i),h&4&&yx(i);break;case 21:break;default:br(s,i),Hr(i)}}function Hr(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(mx(l)){var h=l;break e}l=l.return}throw Error(n(160))}switch(h.tag){case 5:var g=h.stateNode;h.flags&32&&(Je(g,""),h.flags&=-33);var y=gx(i);Am(i,y,g);break;case 3:case 4:var x=h.stateNode.containerInfo,I=gx(i);Cm(i,I,x);break;default:throw Error(n(161))}}catch(D){Ot(i,i.return,D)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function zF(i,s,l){Se=i,Tx(i)}function Tx(i,s,l){for(var h=(i.mode&1)!==0;Se!==null;){var g=Se,y=g.child;if(g.tag===22&&h){var x=g.memoizedState!==null||zc;if(!x){var I=g.alternate,D=I!==null&&I.memoizedState!==null||fn;I=zc;var G=fn;if(zc=x,(fn=D)&&!G)for(Se=g;Se!==null;)x=Se,D=x.child,x.tag===22&&x.memoizedState!==null?wx(g):D!==null?(D.return=x,Se=D):wx(g);for(;y!==null;)Se=y,Tx(y),y=y.sibling;Se=g,zc=I,fn=G}_x(i)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,Se=y):_x(i)}}function _x(i){for(;Se!==null;){var s=Se;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:fn||jc(5,s);break;case 1:var h=s.stateNode;if(s.flags&4&&!fn)if(l===null)h.componentDidMount();else{var g=s.elementType===s.type?l.memoizedProps:Er(s.type,l.memoizedProps);h.componentDidUpdate(g,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var y=s.updateQueue;y!==null&&x_(s,y,h);break;case 3:var x=s.updateQueue;if(x!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}x_(s,x,l)}break;case 5:var I=s.stateNode;if(l===null&&s.flags&4){l=I;var D=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":D.autoFocus&&l.focus();break;case"img":D.src&&(l.src=D.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var G=s.alternate;if(G!==null){var ae=G.memoizedState;if(ae!==null){var de=ae.dehydrated;de!==null&&Xa(de)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}fn||s.flags&512&&Sm(s)}catch(re){Ot(s,s.return,re)}}if(s===i){Se=null;break}if(l=s.sibling,l!==null){l.return=s.return,Se=l;break}Se=s.return}}function xx(i){for(;Se!==null;){var s=Se;if(s===i){Se=null;break}var l=s.sibling;if(l!==null){l.return=s.return,Se=l;break}Se=s.return}}function wx(i){for(;Se!==null;){var s=Se;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{jc(4,s)}catch(D){Ot(s,l,D)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var g=s.return;try{h.componentDidMount()}catch(D){Ot(s,g,D)}}var y=s.return;try{Sm(s)}catch(D){Ot(s,y,D)}break;case 5:var x=s.return;try{Sm(s)}catch(D){Ot(s,x,D)}}}catch(D){Ot(s,s.return,D)}if(s===i){Se=null;break}var I=s.sibling;if(I!==null){I.return=s.return,Se=I;break}Se=s.return}}var jF=Math.ceil,$c=W.ReactCurrentDispatcher,vm=W.ReactCurrentOwner,nr=W.ReactCurrentBatchConfig,nt=0,Xt=null,zt=null,tn=0,zn=0,Lo=Ii(0),$t=0,Tu=null,xs=0,Vc=0,km=0,_u=null,Nn=null,Nm=0,Do=1/0,ui=null,qc=!1,Om=null,Fi=null,Yc=!1,Bi=null,Wc=0,xu=0,Im=null,Gc=-1,Kc=0;function En(){return(nt&6)!==0?Dt():Gc!==-1?Gc:Gc=Dt()}function Ui(i){return(i.mode&1)===0?1:(nt&2)!==0&&tn!==0?tn&-tn:CF.transition!==null?(Kc===0&&(Kc=g2()),Kc):(i=ut,i!==0||(i=window.event,i=i===void 0?16:C2(i.type)),i)}function Tr(i,s,l,h){if(50<xu)throw xu=0,Im=null,Error(n(185));Ya(i,l,h),((nt&2)===0||i!==Xt)&&(i===Xt&&((nt&2)===0&&(Vc|=l),$t===4&&Hi(i,tn)),On(i,h),l===1&&nt===0&&(s.mode&1)===0&&(Do=Dt()+500,wc&&Ri()))}function On(i,s){var l=i.callbackNode;CM(i,s);var h=ic(i,i===Xt?tn:0);if(h===0)l!==null&&h2(l),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(l!=null&&h2(l),s===1)i.tag===0?SF(Cx.bind(null,i)):c_(Cx.bind(null,i)),TF(function(){(nt&6)===0&&Ri()}),l=null;else{switch(E2(h)){case 1:l=cp;break;case 4:l=p2;break;case 16:l=ec;break;case 536870912:l=m2;break;default:l=ec}l=Rx(l,Sx.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function Sx(i,s){if(Gc=-1,Kc=0,(nt&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Mo()&&i.callbackNode!==l)return null;var h=ic(i,i===Xt?tn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=Qc(i,h);else{s=h;var g=nt;nt|=2;var y=vx();(Xt!==i||tn!==s)&&(ui=null,Do=Dt()+500,Ss(i,s));do try{qF();break}catch(I){Ax(i,I)}while(!0);Kp(),$c.current=y,nt=g,zt!==null?s=0:(Xt=null,tn=0,s=$t)}if(s!==0){if(s===2&&(g=dp(i),g!==0&&(h=g,s=Pm(i,g))),s===1)throw l=Tu,Ss(i,0),Hi(i,h),On(i,Dt()),l;if(s===6)Hi(i,h);else{if(g=i.current.alternate,(h&30)===0&&!$F(g)&&(s=Qc(i,h),s===2&&(y=dp(i),y!==0&&(h=y,s=Pm(i,y))),s===1))throw l=Tu,Ss(i,0),Hi(i,h),On(i,Dt()),l;switch(i.finishedWork=g,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:Cs(i,Nn,ui);break;case 3:if(Hi(i,h),(h&130023424)===h&&(s=Nm+500-Dt(),10<s)){if(ic(i,0)!==0)break;if(g=i.suspendedLanes,(g&h)!==h){En(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=Bp(Cs.bind(null,i,Nn,ui),s);break}Cs(i,Nn,ui);break;case 4:if(Hi(i,h),(h&4194240)===h)break;for(s=i.eventTimes,g=-1;0<h;){var x=31-pr(h);y=1<<x,x=s[x],x>g&&(g=x),h&=~y}if(h=g,h=Dt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*jF(h/1960))-h,10<h){i.timeoutHandle=Bp(Cs.bind(null,i,Nn,ui),h);break}Cs(i,Nn,ui);break;case 5:Cs(i,Nn,ui);break;default:throw Error(n(329))}}}return On(i,Dt()),i.callbackNode===l?Sx.bind(null,i):null}function Pm(i,s){var l=_u;return i.current.memoizedState.isDehydrated&&(Ss(i,s).flags|=256),i=Qc(i,s),i!==2&&(s=Nn,Nn=l,s!==null&&Rm(s)),i}function Rm(i){Nn===null?Nn=i:Nn.push.apply(Nn,i)}function $F(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 g=l[h],y=g.getSnapshot;g=g.value;try{if(!mr(y(),g))return!1}catch(x){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 Hi(i,s){for(s&=~km,s&=~Vc,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 Cx(i){if((nt&6)!==0)throw Error(n(327));Mo();var s=ic(i,0);if((s&1)===0)return On(i,Dt()),null;var l=Qc(i,s);if(i.tag!==0&&l===2){var h=dp(i);h!==0&&(s=h,l=Pm(i,h))}if(l===1)throw l=Tu,Ss(i,0),Hi(i,s),On(i,Dt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Cs(i,Nn,ui),On(i,Dt()),null}function Lm(i,s){var l=nt;nt|=1;try{return i(s)}finally{nt=l,nt===0&&(Do=Dt()+500,wc&&Ri())}}function ws(i){Bi!==null&&Bi.tag===0&&(nt&6)===0&&Mo();var s=nt;nt|=1;var l=nr.transition,h=ut;try{if(nr.transition=null,ut=1,i)return i()}finally{ut=h,nr.transition=l,nt=s,(nt&6)===0&&Ri()}}function Dm(){zn=Lo.current,yt(Lo)}function Ss(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,bF(l)),zt!==null)for(l=zt.return;l!==null;){var h=l;switch(Vp(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&_c();break;case 3:Io(),yt(An),yt(ln),rm();break;case 5:tm(h);break;case 4:Io();break;case 13:yt(At);break;case 19:yt(At);break;case 10:Qp(h.type._context);break;case 22:case 23:Dm()}l=l.return}if(Xt=i,zt=i=zi(i.current,null),tn=zn=s,$t=0,Tu=null,km=Vc=xs=0,Nn=_u=null,bs!==null){for(s=0;s<bs.length;s++)if(l=bs[s],h=l.interleaved,h!==null){l.interleaved=null;var g=h.next,y=l.pending;if(y!==null){var x=y.next;y.next=g,h.next=x}l.pending=h}bs=null}return i}function Ax(i,s){do{var l=zt;try{if(Kp(),Rc.current=Fc,Lc){for(var h=vt.memoizedState;h!==null;){var g=h.queue;g!==null&&(g.pending=null),h=h.next}Lc=!1}if(_s=0,Qt=jt=vt=null,pu=!1,mu=0,vm.current=null,l===null||l.return===null){$t=1,Tu=s,zt=null;break}e:{var y=i,x=l.return,I=l,D=s;if(s=tn,I.flags|=32768,D!==null&&typeof D=="object"&&typeof D.then=="function"){var G=D,ae=I,de=ae.tag;if((ae.mode&1)===0&&(de===0||de===11||de===15)){var re=ae.alternate;re?(ae.updateQueue=re.updateQueue,ae.memoizedState=re.memoizedState,ae.lanes=re.lanes):(ae.updateQueue=null,ae.memoizedState=null)}var xe=X_(x);if(xe!==null){xe.flags&=-257,J_(xe,x,I,y,s),xe.mode&1&&Q_(y,G,s),s=xe,D=G;var ve=s.updateQueue;if(ve===null){var ke=new Set;ke.add(D),s.updateQueue=ke}else ve.add(D);break e}else{if((s&1)===0){Q_(y,G,s),Mm();break e}D=Error(n(426))}}else if(wt&&I.mode&1){var Mt=X_(x);if(Mt!==null){(Mt.flags&65536)===0&&(Mt.flags|=256),J_(Mt,x,I,y,s),Wp(Po(D,I));break e}}y=D=Po(D,I),$t!==4&&($t=2),_u===null?_u=[y]:_u.push(y),y=x;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var z=G_(y,D,s);__(y,z);break e;case 1:I=D;var U=y.type,$=y.stateNode;if((y.flags&128)===0&&(typeof U.getDerivedStateFromError=="function"||$!==null&&typeof $.componentDidCatch=="function"&&(Fi===null||!Fi.has($)))){y.flags|=65536,s&=-s,y.lanes|=s;var Ee=K_(y,I,s);__(y,Ee);break e}}y=y.return}while(y!==null)}Nx(l)}catch(Ne){s=Ne,zt===l&&l!==null&&(zt=l=l.return);continue}break}while(!0)}function vx(){var i=$c.current;return $c.current=Fc,i===null?Fc:i}function Mm(){($t===0||$t===3||$t===2)&&($t=4),Xt===null||(xs&268435455)===0&&(Vc&268435455)===0||Hi(Xt,tn)}function Qc(i,s){var l=nt;nt|=2;var h=vx();(Xt!==i||tn!==s)&&(ui=null,Ss(i,s));do try{VF();break}catch(g){Ax(i,g)}while(!0);if(Kp(),nt=l,$c.current=h,zt!==null)throw Error(n(261));return Xt=null,tn=0,$t}function VF(){for(;zt!==null;)kx(zt)}function qF(){for(;zt!==null&&!gM();)kx(zt)}function kx(i){var s=Px(i.alternate,i,zn);i.memoizedProps=i.pendingProps,s===null?Nx(i):zt=s,vm.current=null}function Nx(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=FF(l,s,zn),l!==null){zt=l;return}}else{if(l=BF(l,s),l!==null){l.flags&=32767,zt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{$t=6,zt=null;return}}if(s=s.sibling,s!==null){zt=s;return}zt=s=i}while(s!==null);$t===0&&($t=5)}function Cs(i,s,l){var h=ut,g=nr.transition;try{nr.transition=null,ut=1,YF(i,s,l,h)}finally{nr.transition=g,ut=h}return null}function YF(i,s,l,h){do Mo();while(Bi!==null);if((nt&6)!==0)throw Error(n(327));l=i.finishedWork;var g=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 y=l.lanes|l.childLanes;if(AM(i,y),i===Xt&&(zt=Xt=null,tn=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Yc||(Yc=!0,Rx(ec,function(){return Mo(),null})),y=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||y){y=nr.transition,nr.transition=null;var x=ut;ut=1;var I=nt;nt|=4,vm.current=null,HF(i,l),bx(l,i),fF(Mp),ac=!!Dp,Mp=Dp=null,i.current=l,zF(l),EM(),nt=I,ut=x,nr.transition=y}else i.current=l;if(Yc&&(Yc=!1,Bi=i,Wc=g),y=i.pendingLanes,y===0&&(Fi=null),TM(l.stateNode),On(i,Dt()),s!==null)for(h=i.onRecoverableError,l=0;l<s.length;l++)g=s[l],h(g.value,{componentStack:g.stack,digest:g.digest});if(qc)throw qc=!1,i=Om,Om=null,i;return(Wc&1)!==0&&i.tag!==0&&Mo(),y=i.pendingLanes,(y&1)!==0?i===Im?xu++:(xu=0,Im=i):xu=0,Ri(),null}function Mo(){if(Bi!==null){var i=E2(Wc),s=nr.transition,l=ut;try{if(nr.transition=null,ut=16>i?16:i,Bi===null)var h=!1;else{if(i=Bi,Bi=null,Wc=0,(nt&6)!==0)throw Error(n(331));var g=nt;for(nt|=4,Se=i.current;Se!==null;){var y=Se,x=y.child;if((Se.flags&16)!==0){var I=y.deletions;if(I!==null){for(var D=0;D<I.length;D++){var G=I[D];for(Se=G;Se!==null;){var ae=Se;switch(ae.tag){case 0:case 11:case 15:bu(8,ae,y)}var de=ae.child;if(de!==null)de.return=ae,Se=de;else for(;Se!==null;){ae=Se;var re=ae.sibling,xe=ae.return;if(px(ae),ae===G){Se=null;break}if(re!==null){re.return=xe,Se=re;break}Se=xe}}}var ve=y.alternate;if(ve!==null){var ke=ve.child;if(ke!==null){ve.child=null;do{var Mt=ke.sibling;ke.sibling=null,ke=Mt}while(ke!==null)}}Se=y}}if((y.subtreeFlags&2064)!==0&&x!==null)x.return=y,Se=x;else e:for(;Se!==null;){if(y=Se,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:bu(9,y,y.return)}var z=y.sibling;if(z!==null){z.return=y.return,Se=z;break e}Se=y.return}}var U=i.current;for(Se=U;Se!==null;){x=Se;var $=x.child;if((x.subtreeFlags&2064)!==0&&$!==null)$.return=x,Se=$;else e:for(x=U;Se!==null;){if(I=Se,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:jc(9,I)}}catch(Ne){Ot(I,I.return,Ne)}if(I===x){Se=null;break e}var Ee=I.sibling;if(Ee!==null){Ee.return=I.return,Se=Ee;break e}Se=I.return}}if(nt=g,Ri(),Mr&&typeof Mr.onPostCommitFiberRoot=="function")try{Mr.onPostCommitFiberRoot(tc,i)}catch(Ne){}h=!0}return h}finally{ut=l,nr.transition=s}}return!1}function Ox(i,s,l){s=Po(l,s),s=G_(i,s,1),i=Di(i,s,1),s=En(),i!==null&&(Ya(i,1,s),On(i,s))}function Ot(i,s,l){if(i.tag===3)Ox(i,i,l);else for(;s!==null;){if(s.tag===3){Ox(s,i,l);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Fi===null||!Fi.has(h))){i=Po(l,i),i=K_(s,i,1),s=Di(s,i,1),i=En(),s!==null&&(Ya(s,1,i),On(s,i));break}}s=s.return}}function WF(i,s,l){var h=i.pingCache;h!==null&&h.delete(s),s=En(),i.pingedLanes|=i.suspendedLanes&l,Xt===i&&(tn&l)===l&&($t===4||$t===3&&(tn&130023424)===tn&&500>Dt()-Nm?Ss(i,0):km|=l),On(i,s)}function Ix(i,s){s===0&&((i.mode&1)===0?s=1:(s=rc,rc<<=1,(rc&130023424)===0&&(rc=4194304)));var l=En();i=si(i,s),i!==null&&(Ya(i,s,l),On(i,l))}function GF(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),Ix(i,l)}function KF(i,s){var l=0;switch(i.tag){case 13:var h=i.stateNode,g=i.memoizedState;g!==null&&(l=g.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(s),Ix(i,l)}var Px;Px=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||An.current)kn=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return kn=!1,MF(i,s,l);kn=(i.flags&131072)!==0}else kn=!1,wt&&(s.flags&1048576)!==0&&d_(s,Cc,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;Hc(i,s),i=s.pendingProps;var g=So(s,ln.current);Oo(s,l),g=om(null,s,h,i,g,l);var y=am();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,vn(h)?(y=!0,xc(s)):y=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Zp(s),g.updater=Bc,s.stateNode=g,g._reactInternals=s,hm(s,h,i,l),s=Em(null,s,h,!0,y,l)):(s.tag=0,wt&&y&&$p(s),gn(null,s,g,l),s=s.child),s;case 16:h=s.elementType;e:{switch(Hc(i,s),i=s.pendingProps,g=h._init,h=g(h._payload),s.type=h,g=s.tag=XF(h),i=Er(h,i),g){case 0:s=gm(null,s,h,i,l);break e;case 1:s=ix(null,s,h,i,l);break e;case 11:s=Z_(null,s,h,i,l);break e;case 14:s=ex(null,s,h,Er(h.type,i),l);break e}throw Error(n(306,h,""))}return s;case 0:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:Er(h,g),gm(i,s,h,g,l);case 1:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:Er(h,g),ix(i,s,h,g,l);case 3:e:{if(sx(s),i===null)throw Error(n(387));h=s.pendingProps,y=s.memoizedState,g=y.element,T_(i,s),Ic(s,h,null,l);var x=s.memoizedState;if(h=x.element,y.isDehydrated)if(y={element:h,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){g=Po(Error(n(423)),s),s=ox(i,s,h,l,g);break e}else if(h!==g){g=Po(Error(n(424)),s),s=ox(i,s,h,l,g);break e}else for(Hn=Oi(s.stateNode.containerInfo.firstChild),Un=s,wt=!0,gr=null,l=y_(s,null,h,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(vo(),h===g){s=ai(i,s,l);break e}gn(i,s,h,l)}s=s.child}return s;case 5:return w_(s),i===null&&Yp(s),h=s.type,g=s.pendingProps,y=i!==null?i.memoizedProps:null,x=g.children,Fp(h,g)?x=null:y!==null&&Fp(h,y)&&(s.flags|=32),rx(i,s),gn(i,s,x,l),s.child;case 6:return i===null&&Yp(s),null;case 13:return ax(i,s,l);case 4:return em(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=ko(s,null,h,l):gn(i,s,h,l),s.child;case 11:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:Er(h,g),Z_(i,s,h,g,l);case 7:return gn(i,s,s.pendingProps,l),s.child;case 8:return gn(i,s,s.pendingProps.children,l),s.child;case 12:return gn(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(h=s.type._context,g=s.pendingProps,y=s.memoizedProps,x=g.value,pt(kc,h._currentValue),h._currentValue=x,y!==null)if(mr(y.value,x)){if(y.children===g.children&&!An.current){s=ai(i,s,l);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var I=y.dependencies;if(I!==null){x=y.child;for(var D=I.firstContext;D!==null;){if(D.context===h){if(y.tag===1){D=oi(-1,l&-l),D.tag=2;var G=y.updateQueue;if(G!==null){G=G.shared;var ae=G.pending;ae===null?D.next=D:(D.next=ae.next,ae.next=D),G.pending=D}}y.lanes|=l,D=y.alternate,D!==null&&(D.lanes|=l),Xp(y.return,l,s),I.lanes|=l;break}D=D.next}}else if(y.tag===10)x=y.type===s.type?null:y.child;else if(y.tag===18){if(x=y.return,x===null)throw Error(n(341));x.lanes|=l,I=x.alternate,I!==null&&(I.lanes|=l),Xp(x,l,s),x=y.sibling}else x=y.child;if(x!==null)x.return=y;else for(x=y;x!==null;){if(x===s){x=null;break}if(y=x.sibling,y!==null){y.return=x.return,x=y;break}x=x.return}y=x}gn(i,s,g.children,l),s=s.child}return s;case 9:return g=s.type,h=s.pendingProps.children,Oo(s,l),g=er(g),h=h(g),s.flags|=1,gn(i,s,h,l),s.child;case 14:return h=s.type,g=Er(h,s.pendingProps),g=Er(h.type,g),ex(i,s,h,g,l);case 15:return tx(i,s,s.type,s.pendingProps,l);case 17:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:Er(h,g),Hc(i,s),s.tag=1,vn(h)?(i=!0,xc(s)):i=!1,Oo(s,l),Y_(s,h,g),hm(s,h,g,l),Em(null,s,h,!0,i,l);case 19:return lx(i,s,l);case 22:return nx(i,s,l)}throw Error(n(156,s.tag))};function Rx(i,s){return f2(i,s)}function QF(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 rr(i,s,l,h){return new QF(i,s,l,h)}function Fm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function XF(i){if(typeof i=="function")return Fm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===he)return 11;if(i===be)return 14}return 2}function zi(i,s){var l=i.alternate;return l===null?(l=rr(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 Xc(i,s,l,h,g,y){var x=2;if(h=i,typeof i=="function")Fm(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case te:return As(l.children,g,y,s);case ge:x=8,g|=8;break;case ye:return i=rr(12,l,s,g|2),i.elementType=ye,i.lanes=y,i;case le:return i=rr(13,l,s,g),i.elementType=le,i.lanes=y,i;case fe:return i=rr(19,l,s,g),i.elementType=fe,i.lanes=y,i;case ue:return Jc(l,g,y,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case F:x=10;break e;case se:x=9;break e;case he:x=11;break e;case be:x=14;break e;case Ae:x=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=rr(x,l,s,g),s.elementType=i,s.type=h,s.lanes=y,s}function As(i,s,l,h){return i=rr(7,i,h,s),i.lanes=l,i}function Jc(i,s,l,h){return i=rr(22,i,h,s),i.elementType=ue,i.lanes=l,i.stateNode={isHidden:!1},i}function Bm(i,s,l){return i=rr(6,i,null,s),i.lanes=l,i}function Um(i,s,l){return s=rr(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function JF(i,s,l,h,g){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=fp(0),this.expirationTimes=fp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fp(0),this.identifierPrefix=h,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Hm(i,s,l,h,g,y,x,I,D){return i=new JF(i,s,l,I,D),s===1?(s=1,y===!0&&(s|=8)):s=0,y=rr(3,null,null,s),i.current=y,y.stateNode=i,y.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zp(y),i}function ZF(i,s,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:h==null?null:""+h,children:i,containerInfo:s,implementation:l}}function Lx(i){if(!i)return Pi;i=i._reactInternals;e:{if(ps(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(vn(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(vn(l))return u_(i,l,s)}return s}function Dx(i,s,l,h,g,y,x,I,D){return i=Hm(l,h,!0,i,g,y,x,I,D),i.context=Lx(null),l=i.current,h=En(),g=Ui(l),y=oi(h,g),y.callback=s!=null?s:null,Di(l,y,g),i.current.lanes=g,Ya(i,g,h),On(i,h),i}function Zc(i,s,l,h){var g=s.current,y=En(),x=Ui(g);return l=Lx(l),s.context===null?s.context=l:s.pendingContext=l,s=oi(y,x),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=Di(g,s,x),i!==null&&(Tr(i,g,x,y),Oc(i,g,x)),x}function ed(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function Mx(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function zm(i,s){Mx(i,s),(i=i.alternate)&&Mx(i,s)}function eB(){return null}var Fx=typeof reportError=="function"?reportError:function(i){console.error(i)};function jm(i){this._internalRoot=i}td.prototype.render=jm.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Zc(i,s,null,null)},td.prototype.unmount=jm.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;ws(function(){Zc(null,i,null,null)}),s[ti]=null}};function td(i){this._internalRoot=i}td.prototype.unstable_scheduleHydration=function(i){if(i){var s=T2();i={blockedOn:null,target:i,priority:s};for(var l=0;l<vi.length&&s!==0&&s<vi[l].priority;l++);vi.splice(l,0,i),l===0&&w2(i)}};function $m(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function nd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Bx(){}function tB(i,s,l,h,g){if(g){if(typeof h=="function"){var y=h;h=function(){var G=ed(x);y.call(G)}}var x=Dx(s,h,i,0,null,!1,!1,"",Bx);return i._reactRootContainer=x,i[ti]=x.current,ou(i.nodeType===8?i.parentNode:i),ws(),x}for(;g=i.lastChild;)i.removeChild(g);if(typeof h=="function"){var I=h;h=function(){var G=ed(D);I.call(G)}}var D=Hm(i,0,!1,null,null,!1,!1,"",Bx);return i._reactRootContainer=D,i[ti]=D.current,ou(i.nodeType===8?i.parentNode:i),ws(function(){Zc(s,D,l,h)}),D}function rd(i,s,l,h,g){var y=l._reactRootContainer;if(y){var x=y;if(typeof g=="function"){var I=g;g=function(){var D=ed(x);I.call(D)}}Zc(s,x,i,g)}else x=tB(l,s,i,g,h);return ed(x)}y2=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=qa(s.pendingLanes);l!==0&&(hp(s,l|1),On(s,Dt()),(nt&6)===0&&(Do=Dt()+500,Ri()))}break;case 13:ws(function(){var h=si(i,1);if(h!==null){var g=En();Tr(h,i,1,g)}}),zm(i,1)}},pp=function(i){if(i.tag===13){var s=si(i,134217728);if(s!==null){var l=En();Tr(s,i,134217728,l)}zm(i,134217728)}},b2=function(i){if(i.tag===13){var s=Ui(i),l=si(i,s);if(l!==null){var h=En();Tr(l,i,s,h)}zm(i,s)}},T2=function(){return ut},_2=function(i,s){var l=ut;try{return ut=i,s()}finally{ut=l}},op=function(i,s,l){switch(s){case"input":if(ei(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 g=Tc(h);if(!g)throw Error(n(90));ds(h),ei(h,g)}}}break;case"textarea":mn(i,l);break;case"select":s=l.value,s!=null&&Xe(i,!!l.multiple,s,!1)}},s2=Lm,o2=ws;var nB={usingClientEntryPoint:!1,Events:[lu,xo,Tc,r2,i2,Lm]},wu={findFiberByHostInstance:ms,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},rB={bundleType:wu.bundleType,version:wu.version,rendererPackageName:wu.rendererPackageName,rendererConfig:wu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:W.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=c2(i),i===null?null:i.stateNode},findFiberByHostInstance:wu.findFiberByHostInstance||eB,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 id=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!id.isDisabled&&id.supportsFiber)try{tc=id.inject(rB),Mr=id}catch(i){}}return Cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nB,Cn.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$m(s))throw Error(n(200));return ZF(i,s,null,l)},Cn.createRoot=function(i,s){if(!$m(i))throw Error(n(299));var l=!1,h="",g=Fx;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Hm(i,1,!1,null,null,l,!1,h,g),i[ti]=s.current,ou(i.nodeType===8?i.parentNode:i),new jm(s)},Cn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=c2(s),i=i===null?null:i.stateNode,i},Cn.flushSync=function(i){return ws(i)},Cn.hydrate=function(i,s,l){if(!nd(s))throw Error(n(200));return rd(null,i,s,!0,l)},Cn.hydrateRoot=function(i,s,l){if(!$m(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,g=!1,y="",x=Fx;if(l!=null&&(l.unstable_strictMode===!0&&(g=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),s=Dx(s,null,i,1,l!=null?l:null,g,!1,y,x),i[ti]=s.current,ou(i),h)for(i=0;i<h.length;i++)l=h[i],g=l._getVersion,g=g(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,g]:s.mutableSourceEagerHydrationData.push(l,g);return new td(s)},Cn.render=function(i,s,l){if(!nd(s))throw Error(n(200));return rd(null,i,s,!1,l)},Cn.unmountComponentAtNode=function(i){if(!nd(i))throw Error(n(40));return i._reactRootContainer?(ws(function(){rd(null,null,i,!1,function(){i._reactRootContainer=null,i[ti]=null})}),!0):!1},Cn.unstable_batchedUpdates=Lm,Cn.unstable_renderSubtreeIntoContainer=function(i,s,l,h){if(!nd(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return rd(i,s,l,!1,h)},Cn.version="18.3.1-next-f1338f8080-20240426",Cn}var nb;function rb(){if(nb)return Eh.exports;nb=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(),Eh.exports=ZL(),Eh.exports}var Ia=rb();function e6(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Th=()=>e=>Array.from(new Set(e)),ib=typeof globalThis.document!="undefined"?V.useLayoutEffect:V.useEffect;function Rl(e){var E,T;const t=(E=e().value)!=null?E:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=V.useState(t),[o,a]=V.useState(r),u=e().value!==void 0,c=V.useRef(o);c.current=u?e().value:o;const d=V.useRef(c.current);ib(()=>{d.current=c.current},[o,e().value]);const f=b=>{var v,A;const _=d.current,w=Xs(b)?b(_):b;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:w,prev:_}),u||a(w),n(w,_)||(A=(v=e()).onChange)==null||A.call(v,w,_)};function m(){return u?e().value:o}return{initial:r,ref:c,get:m,set(b){(e().sync?Ia.flushSync:XR)(()=>f(b))},invoke(b,_){var w,v;(v=(w=e()).onChange)==null||v.call(w,b,_)},hash(b){var _,w,v;return(v=(w=(_=e()).hash)==null?void 0:w.call(_,b))!=null?v:String(b)}}}Rl.cleanup=e=>{V.useEffect(()=>e,[])},Rl.ref=e=>{const t=V.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function t6(e){const t=V.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var n6=(e,t)=>{const n=V.useRef(!1),r=V.useRef(!1);V.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),V.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function _h(e,t={}){var se,he,le,fe,be,Ae;const n=V.useMemo(()=>{const{id:ue,ids:q,getRootNode:ne}=t;return QL({id:ue,ids:q,getRootNode:ne})},[t]),r=(...ue)=>{e.debug&&console.log(...ue)},o=(he=(se=e.props)==null?void 0:se.call(e,{props:oh(t),scope:n}))!=null?he:t,a=r6(o),u=(le=e.context)==null?void 0:le.call(e,{prop:a,bindable:Rl,scope:n,flush:ob,getContext(){return d},getComputed(){return J},getRefs(){return w},getEvent(){return b()}}),c=sb(u),d={get(ue){var q;return(q=c.current)==null?void 0:q[ue].ref.current},set(ue,q){var ne;(ne=c.current)==null||ne[ue].set(q)},initial(ue){var q;return(q=c.current)==null?void 0:q[ue].initial},hash(ue){var ne,S;const q=(ne=c.current)==null?void 0:ne[ue].get();return(S=c.current)==null?void 0:S[ue].hash(q)}},f=V.useRef(new Map),m=V.useRef(null),E=V.useRef(null),T=V.useRef({type:""}),b=()=>Te(H({},T.current),{current(){return T.current},previous(){return E.current}}),_=()=>Te(H({},B),{matches(...ue){return ue.includes(B.ref.current)},hasTag(ue){var q,ne;return!!((ne=(q=e.states[B.ref.current])==null?void 0:q.tags)!=null&&ne.includes(ue))}}),w=t6((be=(fe=e.refs)==null?void 0:fe.call(e,{prop:a,context:d}))!=null?be:{}),v=()=>({state:_(),context:d,event:b(),prop:a,send:F,action:A,guard:M,track:n6,refs:w,computed:J,flush:ob,scope:n,choose:W}),A=ue=>{const q=Xs(ue)?ue(v()):ue;if(!q)return;const ne=q.map(S=>{var Q,O;const R=(O=(Q=e.implementations)==null?void 0:Q.actions)==null?void 0:O[S];return R||ah(`[zag-js] No implementation found for action "${JSON.stringify(S)}"`),R});for(const S of ne)S==null||S(v())},M=ue=>{var q,ne;return Xs(ue)?ue(v()):(ne=(q=e.implementations)==null?void 0:q.guards)==null?void 0:ne[ue](v())},L=ue=>{const q=Xs(ue)?ue(v()):ue;if(!q)return;const ne=q.map(R=>{var O,_e;const Q=(_e=(O=e.implementations)==null?void 0:O.effects)==null?void 0:_e[R];return Q||ah(`[zag-js] No implementation found for effect "${JSON.stringify(R)}"`),Q}),S=[];for(const R of ne){const Q=R==null?void 0:R(v());Q&&S.push(Q)}return()=>S.forEach(R=>R==null?void 0:R())},W=ue=>zR(ue).find(q=>{let ne=!q.guard;return Al(q.guard)?ne=!!M(q.guard):Xs(q.guard)&&(ne=q.guard(v())),ne}),J=ue=>{ZR(e.computed,()=>"[zag-js] No computed object found on machine");const q=e.computed[ue];return q({context:d,event:b(),prop:a,refs:w,scope:n,computed:J})},B=Rl(()=>({defaultValue:e.initialState({prop:a}),onChange(ue,q){var S,R,Q,O;if(q){const _e=f.current.get(q);_e==null||_e(),f.current.delete(q)}q&&A((S=e.states[q])==null?void 0:S.exit),A((R=m.current)==null?void 0:R.actions);const ne=L((Q=e.states[ue])==null?void 0:Q.effects);if(ne&&f.current.set(ue,ne),q===gh){A(e.entry);const _e=L(e.effects);_e&&f.current.set(gh,_e)}A((O=e.states[ue])==null?void 0:O.entry)}})),te=V.useRef(void 0),ge=V.useRef(eo.NotStarted);ib(()=>{queueMicrotask(()=>{var R;const ne=ge.current===eo.Started;ge.current=eo.Started,r(ne?"rehydrating...":"initializing...");const S=(R=te.current)!=null?R:B.initial;B.invoke(S,ne?B.get():gh)});const ue=f.current,q=B.ref.current;return()=>{r("unmounting..."),te.current=q,ge.current=eo.Stopped,ue.forEach(ne=>ne==null?void 0:ne()),f.current=new Map,m.current=null,queueMicrotask(()=>{A(e.exit)})}},[]);const ye=()=>"ref"in B?B.ref.current:B.get(),F=ue=>{queueMicrotask(()=>{var O,_e,Le,Oe,Ge;if(ge.current!==eo.Started)return;E.current=T.current,T.current=ue;let q=ye();const ne=(Le=(O=e.states[q].on)==null?void 0:O[ue.type])!=null?Le:(_e=e.on)==null?void 0:_e[ue.type],S=W(ne);if(!S)return;m.current=S;const R=(Oe=S.target)!=null?Oe:q;r("transition",ue.type,S.target||q,`(${S.actions})`);const Q=R!==q;Q?Ia.flushSync(()=>B.set(R)):S.reenter&&!Q?B.invoke(q,q):A((Ge=S.actions)!=null?Ge:[])})};return(Ae=e.watch)==null||Ae.call(e,v()),{state:_(),send:F,context:d,prop:a,scope:n,refs:w,computed:J,event:b(),getStatus:()=>ge.current}}function sb(e){const t=V.useRef(e);return t.current=e,t}function r6(e){const t=sb(e);return function(r){return t.current[r]}}function ob(e){queueMicrotask(()=>{Ia.flushSync(()=>e())})}var ab=e6(e=>e);function Ll(...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 i6(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 xh=e=>{const t=V.memo(V.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=nn(f,["asChild","children"]);if(!o)return V.createElement(e,Te(H({},u),{ref:r}),a);if(!V.isValidElement(a))return null;const c=V.Children.only(a),d=i6(c);return V.cloneElement(c,Te(H({},dr(u,c.props)),{ref:r?Ll(r,d):d}))}));return t.displayName=e.displayName||e.name,t},yi=(()=>{const e=new Map;return new Proxy(xh,{apply(t,n,r){return xh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,xh(r)),e.get(r)}})})();function s6(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=V.createContext(u);c.displayName=t;function d(){var m;const f=V.useContext(c);if(!f&&n){const E=new Error(a!=null?a:s6(r,o));throw E.name="ContextError",(m=Error.captureStackTrace)==null||m.call(Error,E,d),E}return f}return[c.Provider,d,c]}const[o6,wh]=to({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[ub,Pa]=to({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),lb=V.forwardRef((e,t)=>{const n=wh(),r=Pa(),o=dr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:C.jsx(yi.div,Te(H({},o),{ref:Ll(r.ref,t)}))});lb.displayName="PopoverContent";const cb=V.forwardRef((e,t)=>{const n=wh(),r=Pa(),o=dr(n.getPositionerProps(),e);return r.unmounted?null:C.jsx(yi.div,Te(H({},o),{ref:t}))});cb.displayName="PopoverPositioner";const db=()=>(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]},[{},H({},e)]),fb=e=>db()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function a6(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 u6={props({props:e}){return Te(H({},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",Ol(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"});Sn(()=>{var c,d;const u=Dl(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})=>{Sn(()=>{e.set("prevAnimationName",Dl(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 m,E,T;((T=(E=(m=d.composedPath)==null?void 0:m.call(d))==null?void 0:E[0])!=null?T:d.target)===o&&e.set("prevAnimationName",Dl(t.get("styles")))},u=d=>{const f=Dl(t.get("styles"));Wr(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=Pl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),BL(()=>c())}}}}};function Dl(e){return(e==null?void 0:e.animationName)||"none"}Th()(["onExitComplete","present","immediate"]);function l6(e,t={}){const{sync:n=!1}=t,r=c6(e);return V.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function c6(e){const t=V.useRef(e);return t.current=e,t}const Sh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=nn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=V.useRef(!1),c=Te(H({},a),{present:r,onExitComplete:l6(e.onExitComplete)}),d=_h(u6,c),f=a6(d);f.present&&(u.current=!0);const m=!f.present&&!u.current&&t||n&&!f.present&&u.current,E=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:E,present:f.present,unmounted:m}};var no=(e,t=[])=>({parts:(...n)=>{if(d6(t))return no(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>no(e,[...t,...n]),omit:(...n)=>no(e,t.filter(r=>!n.includes(r))),rename:n=>no(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${ro(e)}"][data-part="${ro(r)}"]`,`& [data-scope="${ro(e)}"][data-part="${ro(r)}"]`].join(", "),attrs:{"data-scope":ro(e),"data-part":ro(r)}}}),{})}),ro=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),d6=e=>e.length===0;const f6=["top","right","bottom","left"],bi=Math.min,Dn=Math.max,Ml=Math.round,Fl=Math.floor,Nr=e=>({x:e,y:e}),h6={left:"right",right:"left",bottom:"top",top:"bottom"},p6={start:"end",end:"start"};function Ch(e,t,n){return Dn(e,bi(t,n))}function Kr(e,t){return typeof e=="function"?e(t):e}function Qr(e){return e.split("-")[0]}function io(e){return e.split("-")[1]}function Ah(e){return e==="x"?"y":"x"}function vh(e){return e==="y"?"height":"width"}const m6=new Set(["top","bottom"]);function Or(e){return m6.has(Qr(e))?"y":"x"}function kh(e){return Ah(Or(e))}function g6(e,t,n){n===void 0&&(n=!1);const r=io(e),o=kh(e),a=vh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Bl(u)),[u,Bl(u)]}function E6(e){const t=Bl(e);return[Nh(e),t,Nh(t)]}function Nh(e){return e.replace(/start|end/g,t=>p6[t])}const hb=["left","right"],pb=["right","left"],y6=["top","bottom"],b6=["bottom","top"];function T6(e,t,n){switch(e){case"top":case"bottom":return n?t?pb:hb:t?hb:pb;case"left":case"right":return t?y6:b6;default:return[]}}function _6(e,t,n,r){const o=io(e);let a=T6(Qr(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Nh)))),a}function Bl(e){return e.replace(/left|right|bottom|top/g,t=>h6[t])}function x6(e){return H({top:0,right:0,bottom:0,left:0},e)}function mb(e){return typeof e!="number"?x6(e):{top:e,right:e,bottom:e,left:e}}function Ul(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 gb(e,t,n){let{reference:r,floating:o}=e;const a=Or(t),u=kh(t),c=vh(u),d=Qr(t),f=a==="y",m=r.x+r.width/2-o.width/2,E=r.y+r.height/2-o.height/2,T=r[c]/2-o[c]/2;let b;switch(d){case"top":b={x:m,y:r.y-o.height};break;case"bottom":b={x:m,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:E};break;case"left":b={x:r.x-o.width,y:E};break;default:b={x:r.x,y:r.y}}switch(io(t)){case"start":b[u]-=T*(n&&f?-1:1);break;case"end":b[u]+=T*(n&&f?-1:1);break}return b}const w6=(e,t,n)=>rt(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:m,y:E}=gb(f,r,d),T=r,b={},_=0;for(let w=0;w<c.length;w++){const{name:v,fn:A}=c[w],{x:M,y:L,data:W,reset:J}=yield A({x:m,y:E,initialPlacement:r,placement:T,strategy:o,middlewareData:b,rects:f,platform:u,elements:{reference:e,floating:t}});m=M!=null?M:m,E=L!=null?L:E,b=Te(H({},b),{[v]:H(H({},b[v]),W)}),J&&_<=50&&(_++,typeof J=="object"&&(J.placement&&(T=J.placement),J.rects&&(f=J.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):J.rects),{x:m,y:E}=gb(f,T,d)),w=-1)}return{x:m,y:E,placement:T,strategy:o,middlewareData:b}});function Ra(e,t){return rt(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:m="viewport",elementContext:E="floating",altBoundary:T=!1,padding:b=0}=Kr(t,e),_=mb(b),v=c[T?E==="floating"?"reference":"floating":E],A=Ul(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(v))==null||n?v:v.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:m,strategy:d})),M=E==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,L=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),W=(yield a.isElement==null?void 0:a.isElement(L))?(yield a.getScale==null?void 0:a.getScale(L))||{x:1,y:1}:{x:1,y:1},J=Ul(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:M,offsetParent:L,strategy:d}):M);return{top:(A.top-J.top+_.top)/W.y,bottom:(J.bottom-A.bottom+_.bottom)/W.y,left:(A.left-J.left+_.left)/W.x,right:(J.right-A.right+_.right)/W.x}})}const S6=e=>({name:"arrow",options:e,fn(n){return rt(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:m,padding:E=0}=Kr(e,n)||{};if(m==null)return{};const T=mb(E),b={x:r,y:o},_=kh(a),w=vh(_),v=yield c.getDimensions(m),A=_==="y",M=A?"top":"left",L=A?"bottom":"right",W=A?"clientHeight":"clientWidth",J=u.reference[w]+u.reference[_]-b[_]-u.floating[w],B=b[_]-u.reference[_],te=yield c.getOffsetParent==null?void 0:c.getOffsetParent(m);let ge=te?te[W]:0;(!ge||!(yield c.isElement==null?void 0:c.isElement(te)))&&(ge=d.floating[W]||u.floating[w]);const ye=J/2-B/2,F=ge/2-v[w]/2-1,se=bi(T[M],F),he=bi(T[L],F),le=se,fe=ge-v[w]-he,be=ge/2-v[w]/2+ye,Ae=Ch(le,be,fe),ue=!f.arrow&&io(a)!=null&&be!==Ae&&u.reference[w]/2-(be<le?se:he)-v[w]/2<0,q=ue?be<le?be-le:be-fe:0;return{[_]:b[_]+q,data:H({[_]:Ae,centerOffset:be-Ae-q},ue&&{alignmentOffset:q}),reset:ue}})}}),C6=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return rt(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:m}=n,be=Kr(e,n),{mainAxis:E=!0,crossAxis:T=!0,fallbackPlacements:b,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:v=!0}=be,A=nn(be,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const M=Qr(a),L=Or(d),W=Qr(d)===d,J=yield f.isRTL==null?void 0:f.isRTL(m.floating),B=b||(W||!v?[Bl(d)]:E6(d)),te=w!=="none";!b&&te&&B.push(..._6(d,v,w,J));const ge=[d,...B],ye=yield Ra(n,A),F=[];let se=((o=u.flip)==null?void 0:o.overflows)||[];if(E&&F.push(ye[M]),T){const Ae=g6(a,c,J);F.push(ye[Ae[0]],ye[Ae[1]])}if(se=[...se,{placement:a,overflows:F}],!F.every(Ae=>Ae<=0)){var he,le;const Ae=(((he=u.flip)==null?void 0:he.index)||0)+1,ue=ge[Ae];if(ue&&(!(T==="alignment"?L!==Or(ue):!1)||se.every(S=>Or(S.placement)===L?S.overflows[0]>0:!0)))return{data:{index:Ae,overflows:se},reset:{placement:ue}};let q=(le=se.filter(ne=>ne.overflows[0]<=0).sort((ne,S)=>ne.overflows[1]-S.overflows[1])[0])==null?void 0:le.placement;if(!q)switch(_){case"bestFit":{var fe;const ne=(fe=se.filter(S=>{if(te){const R=Or(S.placement);return R===L||R==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(R=>R>0).reduce((R,Q)=>R+Q,0)]).sort((S,R)=>S[1]-R[1])[0])==null?void 0:fe[0];ne&&(q=ne);break}case"initialPlacement":q=d;break}if(a!==q)return{reset:{placement:q}}}return{}})}}};function Eb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function yb(e){return f6.some(t=>e[t]>=0)}const A6=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return rt(this,null,function*(){const{rects:r}=n,u=Kr(e,n),{strategy:o="referenceHidden"}=u,a=nn(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield Ra(n,Te(H({},a),{elementContext:"reference"})),d=Eb(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:yb(d)}}}case"escaped":{const c=yield Ra(n,Te(H({},a),{altBoundary:!0})),d=Eb(c,r.floating);return{data:{escapedOffsets:d,escaped:yb(d)}}}default:return{}}})}}},bb=new Set(["left","top"]);function v6(e,t){return rt(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Qr(n),c=io(n),d=Or(n)==="y",f=bb.has(u)?-1:1,m=a&&d?-1:1,E=Kr(t,e);let{mainAxis:T,crossAxis:b,alignmentAxis:_}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:E.mainAxis||0,crossAxis:E.crossAxis||0,alignmentAxis:E.alignmentAxis};return c&&typeof _=="number"&&(b=c==="end"?_*-1:_),d?{x:b*m,y:T*f}:{x:T*f,y:b*m}})}const k6=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return rt(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield v6(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:Te(H({},f),{placement:c})}})}}},N6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return rt(this,null,function*(){const{x:r,y:o,placement:a}=n,A=Kr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:M=>{let{x:L,y:W}=M;return{x:L,y:W}}}}=A,f=nn(A,["mainAxis","crossAxis","limiter"]),m={x:r,y:o},E=yield Ra(n,f),T=Or(Qr(a)),b=Ah(T);let _=m[b],w=m[T];if(u){const M=b==="y"?"top":"left",L=b==="y"?"bottom":"right",W=_+E[M],J=_-E[L];_=Ch(W,_,J)}if(c){const M=T==="y"?"top":"left",L=T==="y"?"bottom":"right",W=w+E[M],J=w-E[L];w=Ch(W,w,J)}const v=d.fn(Te(H({},n),{[b]:_,[T]:w}));return Te(H({},v),{data:{x:v.x-r,y:v.y-o,enabled:{[b]:u,[T]:c}}})})}}},O6=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}=Kr(e,t),m={x:n,y:r},E=Or(o),T=Ah(E);let b=m[T],_=m[E];const w=Kr(c,t),v=typeof w=="number"?{mainAxis:w,crossAxis:0}:H({mainAxis:0,crossAxis:0},w);if(d){const L=T==="y"?"height":"width",W=a.reference[T]-a.floating[L]+v.mainAxis,J=a.reference[T]+a.reference[L]-v.mainAxis;b<W?b=W:b>J&&(b=J)}if(f){var A,M;const L=T==="y"?"width":"height",W=bb.has(Qr(o)),J=a.reference[E]-a.floating[L]+(W&&((A=u.offset)==null?void 0:A[E])||0)+(W?0:v.crossAxis),B=a.reference[E]+a.reference[L]+(W?0:((M=u.offset)==null?void 0:M[E])||0)-(W?v.crossAxis:0);_<J?_=J:_>B&&(_=B)}return{[T]:b,[E]:_}}}},I6=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return rt(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,se=Kr(e,n),{apply:f=()=>{}}=se,m=nn(se,["apply"]),E=yield Ra(n,m),T=Qr(a),b=io(a),_=Or(a)==="y",{width:w,height:v}=u.floating;let A,M;T==="top"||T==="bottom"?(A=T,M=b===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(M=T,A=b==="end"?"top":"bottom");const L=v-E.top-E.bottom,W=w-E.left-E.right,J=bi(v-E[A],L),B=bi(w-E[M],W),te=!n.middlewareData.shift;let ge=J,ye=B;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(ye=W),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ge=L),te&&!b){const he=Dn(E.left,0),le=Dn(E.right,0),fe=Dn(E.top,0),be=Dn(E.bottom,0);_?ye=w-2*(he!==0||le!==0?he+le:Dn(E.left,E.right)):ge=v-2*(fe!==0||be!==0?fe+be:Dn(E.top,E.bottom))}yield f(Te(H({},n),{availableWidth:ye,availableHeight:ge}));const F=yield c.getDimensions(d.floating);return w!==F.width||v!==F.height?{reset:{rects:!0}}:{}})}}};function Hl(){return typeof window!="undefined"}function so(e){return Tb(e)?(e.nodeName||"").toLowerCase():"#document"}function Mn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ir(e){var t;return(t=(Tb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Tb(e){return Hl()?e instanceof Node||e instanceof Mn(e).Node:!1}function fr(e){return Hl()?e instanceof Element||e instanceof Mn(e).Element:!1}function Pr(e){return Hl()?e instanceof HTMLElement||e instanceof Mn(e).HTMLElement:!1}function _b(e){return!Hl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Mn(e).ShadowRoot}const P6=new Set(["inline","contents"]);function La(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=hr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!P6.has(o)}const R6=new Set(["table","td","th"]);function L6(e){return R6.has(so(e))}const D6=[":popover-open",":modal"];function zl(e){return D6.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const M6=["transform","translate","scale","rotate","perspective"],F6=["transform","translate","scale","rotate","perspective","filter"],B6=["paint","layout","strict","content"];function Oh(e){const t=Ih(),n=fr(e)?hr(e):e;return M6.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)||F6.some(r=>(n.willChange||"").includes(r))||B6.some(r=>(n.contain||"").includes(r))}function U6(e){let t=Ti(e);for(;Pr(t)&&!oo(t);){if(Oh(t))return t;if(zl(t))return null;t=Ti(t)}return null}function Ih(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const H6=new Set(["html","body","#document"]);function oo(e){return H6.has(so(e))}function hr(e){return Mn(e).getComputedStyle(e)}function jl(e){return fr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ti(e){if(so(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_b(e)&&e.host||Ir(e);return _b(t)?t.host:t}function xb(e){const t=Ti(e);return oo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pr(t)&&La(t)?t:xb(t)}function Da(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=xb(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Mn(o);if(a){const c=Ph(u);return t.concat(u,u.visualViewport||[],La(o)?o:[],c&&n?Da(c):[])}return t.concat(o,Da(o,[],n))}function Ph(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wb(e){const t=hr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Pr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=Ml(n)!==a||Ml(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Rh(e){return fr(e)?e:e.contextElement}function ao(e){const t=Rh(e);if(!Pr(t))return Nr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=wb(t);let u=(a?Ml(n.width):n.width)/r,c=(a?Ml(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const z6=Nr(0);function Sb(e){const t=Mn(e);return!Ih()||!t.visualViewport?z6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function j6(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Mn(e)?!1:t}function us(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Rh(e);let u=Nr(1);t&&(r?fr(r)&&(u=ao(r)):u=ao(e));const c=j6(a,n,r)?Sb(a):Nr(0);let d=(o.left+c.x)/u.x,f=(o.top+c.y)/u.y,m=o.width/u.x,E=o.height/u.y;if(a){const T=Mn(a),b=r&&fr(r)?Mn(r):r;let _=T,w=Ph(_);for(;w&&r&&b!==_;){const v=ao(w),A=w.getBoundingClientRect(),M=hr(w),L=A.left+(w.clientLeft+parseFloat(M.paddingLeft))*v.x,W=A.top+(w.clientTop+parseFloat(M.paddingTop))*v.y;d*=v.x,f*=v.y,m*=v.x,E*=v.y,d+=L,f+=W,_=Mn(w),w=Ph(_)}}return Ul({width:m,height:E,x:d,y:f})}function $l(e,t){const n=jl(e).scrollLeft;return t?t.left+n:us(Ir(e)).left+n}function Cb(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-$l(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function $6(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Ir(r),c=t?zl(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Nr(1);const m=Nr(0),E=Pr(r);if((E||!E&&!a)&&((so(r)!=="body"||La(u))&&(d=jl(r)),Pr(r))){const b=us(r);f=ao(r),m.x=b.x+r.clientLeft,m.y=b.y+r.clientTop}const T=u&&!E&&!a?Cb(u,d):Nr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+m.x+T.x,y:n.y*f.y-d.scrollTop*f.y+m.y+T.y}}function V6(e){return Array.from(e.getClientRects())}function q6(e){const t=Ir(e),n=jl(e),r=e.ownerDocument.body,o=Dn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Dn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+$l(e);const c=-n.scrollTop;return hr(r).direction==="rtl"&&(u+=Dn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const Ab=25;function Y6(e,t){const n=Mn(e),r=Ir(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(o){a=o.width,u=o.height;const m=Ih();(!m||m&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const f=$l(r);if(f<=0){const m=r.ownerDocument,E=m.body,T=getComputedStyle(E),b=m.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,_=Math.abs(r.clientWidth-E.clientWidth-b);_<=Ab&&(a-=_)}else f<=Ab&&(a+=f);return{width:a,height:u,x:c,y:d}}const W6=new Set(["absolute","fixed"]);function G6(e,t){const n=us(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Pr(e)?ao(e):Nr(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 vb(e,t,n){let r;if(t==="viewport")r=Y6(e,n);else if(t==="document")r=q6(Ir(e));else if(fr(t))r=G6(t,n);else{const o=Sb(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ul(r)}function kb(e,t){const n=Ti(e);return n===t||!fr(n)||oo(n)?!1:hr(n).position==="fixed"||kb(n,t)}function K6(e,t){const n=t.get(e);if(n)return n;let r=Da(e,[],!1).filter(c=>fr(c)&&so(c)!=="body"),o=null;const a=hr(e).position==="fixed";let u=a?Ti(e):e;for(;fr(u)&&!oo(u);){const c=hr(u),d=Oh(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&W6.has(o.position)||La(u)&&!d&&kb(e,u))?r=r.filter(m=>m!==u):o=c,u=Ti(u)}return t.set(e,r),r}function Q6(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?zl(t)?[]:K6(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,m)=>{const E=vb(t,m,o);return f.top=Dn(E.top,f.top),f.right=bi(E.right,f.right),f.bottom=bi(E.bottom,f.bottom),f.left=Dn(E.left,f.left),f},vb(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function X6(e){const{width:t,height:n}=wb(e);return{width:t,height:n}}function J6(e,t,n){const r=Pr(t),o=Ir(t),a=n==="fixed",u=us(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Nr(0);function f(){d.x=$l(o)}if(r||!r&&!a)if((so(t)!=="body"||La(o))&&(c=jl(t)),r){const b=us(t,!0,a,t);d.x=b.x+t.clientLeft,d.y=b.y+t.clientTop}else o&&f();a&&!r&&o&&f();const m=o&&!r&&!a?Cb(o,c):Nr(0),E=u.left+c.scrollLeft-d.x-m.x,T=u.top+c.scrollTop-d.y-m.y;return{x:E,y:T,width:u.width,height:u.height}}function Lh(e){return hr(e).position==="static"}function Nb(e,t){if(!Pr(e)||hr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ir(e)===n&&(n=n.ownerDocument.body),n}function Ob(e,t){const n=Mn(e);if(zl(e))return n;if(!Pr(e)){let o=Ti(e);for(;o&&!oo(o);){if(fr(o)&&!Lh(o))return o;o=Ti(o)}return n}let r=Nb(e,t);for(;r&&L6(r)&&Lh(r);)r=Nb(r,t);return r&&oo(r)&&Lh(r)&&!Oh(r)?n:r||U6(e)||n}const Z6=function(e){return rt(this,null,function*(){const t=this.getOffsetParent||Ob,n=this.getDimensions,r=yield n(e.floating);return{reference:J6(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function e4(e){return hr(e).direction==="rtl"}const t4={convertOffsetParentRelativeRectToViewportRelativeRect:$6,getDocumentElement:Ir,getClippingRect:Q6,getOffsetParent:Ob,getElementRects:Z6,getClientRects:V6,getDimensions:X6,getScale:ao,isElement:fr,isRTL:e4};function Ib(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function n4(e,t){let n=null,r;const o=Ir(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:m,top:E,width:T,height:b}=f;if(c||t(),!T||!b)return;const _=Fl(E),w=Fl(o.clientWidth-(m+T)),v=Fl(o.clientHeight-(E+b)),A=Fl(m),L={rootMargin:-_+"px "+-w+"px "+-v+"px "+-A+"px",threshold:Dn(0,bi(1,d))||1};let W=!0;function J(B){const te=B[0].intersectionRatio;if(te!==d){if(!W)return u();te?u(!1,te):r=setTimeout(()=>{u(!1,1e-7)},1e3)}te===1&&!Ib(f,e.getBoundingClientRect())&&u(),W=!1}try{n=new IntersectionObserver(J,Te(H({},L),{root:o.ownerDocument}))}catch(B){n=new IntersectionObserver(J,L)}n.observe(e)}return u(!0),a}function r4(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=Rh(e),m=o||a?[...f?Da(f):[],...Da(t)]:[];m.forEach(A=>{o&&A.addEventListener("scroll",n,{passive:!0}),a&&A.addEventListener("resize",n)});const E=f&&c?n4(f,n):null;let T=-1,b=null;u&&(b=new ResizeObserver(A=>{let[M]=A;M&&M.target===f&&b&&(b.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var L;(L=b)==null||L.observe(t)})),n()}),f&&!d&&b.observe(f),b.observe(t));let _,w=d?us(e):null;d&&v();function v(){const A=us(e);w&&!Ib(w,A)&&n(),w=A,_=requestAnimationFrame(v)}return n(),()=>{var A;m.forEach(M=>{o&&M.removeEventListener("scroll",n),a&&M.removeEventListener("resize",n)}),E==null||E(),(A=b)==null||A.disconnect(),b=null,d&&cancelAnimationFrame(_)}}const i4=k6,s4=N6,o4=C6,a4=I6,u4=A6,l4=S6,c4=O6,d4=(e,t,n)=>{const r=new Map,o=H({platform:t4},n),a=Te(H({},o.platform),{_c:r});return w6(e,t,Te(H({},o),{platform:a}))};function Pb(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 Te(H({},o),{toJSON:()=>o})}function f4(e){if(!e)return Pb();const{x:t,y:n,width:r,height:o}=e;return Pb(t,n,r,o)}function h4(e,t){return{contextElement:Kt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?f4(r):n.getBoundingClientRect()}}}var Ma=e=>({variable:e,reference:`var(${e})`}),Xr={arrowSize:Ma("--arrow-size"),arrowSizeHalf:Ma("--arrow-size-half"),arrowBg:Ma("--arrow-background"),transformOrigin:Ma("--transform-origin"),arrowOffset:Ma("--arrow-offset")},p4=e=>e==="top"||e==="bottom"?"y":"x";function m4(e,t){return{name:"transformOrigin",fn(n){var ye,F,se,he,le;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=p4(d),m=((ye=o.arrow)==null?void 0:ye.x)||0,E=((F=o.arrow)==null?void 0:F.y)||0,T=(t==null?void 0:t.clientWidth)||0,b=(t==null?void 0:t.clientHeight)||0,_=m+T/2,w=E+b/2,v=Math.abs(((se=o.shift)==null?void 0:se.y)||0),A=u.reference.height/2,M=b/2,L=(le=(he=e.offset)==null?void 0:he.mainAxis)!=null?le:e.gutter,W=typeof L=="number"?L+M:L!=null?L:M,J=v>W,B={top:`${_}px calc(100% + ${W}px)`,bottom:`${_}px ${-W}px`,left:`calc(100% + ${W}px) ${w}px`,right:`${-W}px ${w}px`}[d],te=`${_}px ${u.reference.y+A-c}px`,ge=!!e.overlap&&f==="y"&&J;return r.floating.style.setProperty(Xr.transformOrigin.variable,ge?te:B),{data:{transformOrigin:ge?te:B}}}}}var g4={name:"rects",fn({rects:e}){return{data:e}}},E4=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% + ${Xr.arrowOffset.reference})`}),{}}}};function y4(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var b4={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Rb(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Dh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function T4(e,t,n){const r=e||t.createElement("div");return l4({element:r,padding:n.arrowPadding})}function _4(e,t){var n;if(!$R((n=t.offset)!=null?n:t.gutter))return i4(({placement:r})=>{var m,E,T,b;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(E=(m=t.offset)==null?void 0:m.mainAxis)!=null?E:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=y4(r),d=c?void 0:t.shift,f=(b=(T=t.offset)==null?void 0:T.crossAxis)!=null?b:d;return oh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function x4(e){if(!e.flip)return;const t=Dh(e.boundary);return o4(Te(H({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function w4(e){if(!e.slide&&!e.overlap)return;const t=Dh(e.boundary);return s4(Te(H({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:c4()}))}function S4(e){return a4({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 C4(e){var t;if(e.hideWhenDetached)return u4({strategy:"referenceHidden",boundary:(t=Dh(e.boundary))!=null?t:"clippingAncestors"})}function A4(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function v4(e,t,n={}){const r=h4(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},b4,n),a=t.querySelector("[data-part=arrow]"),u=[_4(a,o),x4(o),w4(o),T4(a,t.ownerDocument,o),E4(a),m4({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),S4(o),C4(o),g4],{placement:c,strategy:d,onComplete:f,onPositioned:m}=o,E=()=>rt(null,null,function*(){var W;if(!r||!t)return;const w=yield d4(r,t,{placement:c,middleware:u,strategy:d});f==null||f(w),m==null||m({placed:!0});const v=Js(t),A=Rb(v,w.x),M=Rb(v,w.y);t.style.setProperty("--x",`${A}px`),t.style.setProperty("--y",`${M}px`),o.hideWhenDetached&&(((W=w.middlewareData.hide)==null?void 0:W.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const L=t.firstElementChild;if(L){const J=Ol(L);t.style.setProperty("--z-index",J.zIndex)}}),T=()=>rt(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:E,floatingElement:t}),m==null||m({placed:!0})):yield E()}),b=A4(o.listeners),_=o.listeners?r4(r,t,T,b):JR;return T(),()=>{_==null||_(),m==null||m({placed:!1})}}function Lb(e,t,n={}){const c=n,{defer:r}=c,o=nn(c,["defer"]),a=r?Sn:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(v4(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var k4={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function N4(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Xr.arrowSize.reference,height:Xr.arrowSize.reference,[Xr.arrowSizeHalf.variable]:`calc(${Xr.arrowSize.reference} / 2)`,[Xr.arrowOffset.variable]:`calc(${Xr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?k4[t.split("-")[0]]:void 0,background:Xr.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 uo=new WeakMap,Vl=new WeakMap,ql={},Mh=0,Db=e=>e&&(e.host||Db(e.parentNode)),O4=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Db(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),I4=new Set(["script","output","status","next-route-announcer"]),P4=e=>I4.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),R4=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=O4(n,Array.isArray(e)?e:[e]);ql[r]||(ql[r]=new WeakMap);const c=ql[r],d=[],f=new Set,m=new Set(u),E=b=>{!b||f.has(b)||(f.add(b),E(b.parentNode))};u.forEach(b=>{E(b),a&&Kt(b)&&Vy(b,_=>{E(_)})});const T=b=>{!b||m.has(b)||Array.prototype.forEach.call(b.children,_=>{if(f.has(_))T(_);else try{if(P4(_))return;const v=_.getAttribute(o)==="true",A=(uo.get(_)||0)+1,M=(c.get(_)||0)+1;uo.set(_,A),c.set(_,M),d.push(_),A===1&&v&&Vl.set(_,!0),M===1&&_.setAttribute(r,""),v||_.setAttribute(o,"true")}catch(w){console.error("[zag-js > ariaHidden] cannot operate on ",_,w)}})};return T(n),f.clear(),Mh++,()=>{d.forEach(b=>{const _=uo.get(b)-1,w=c.get(b)-1;uo.set(b,_),c.set(b,w),_||(Vl.has(b)||b.removeAttribute(o),Vl.delete(b)),w||b.removeAttribute(r)}),Mh--,Mh||(uo=new WeakMap,uo=new WeakMap,Vl=new WeakMap,ql={})}},L4=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,D4=(e,t=L4(e),n="data-aria-hidden",r=!0)=>{if(t)return R4(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},M4=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Mb(e,t={}){const{defer:n=!0}=t,r=n?M4:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(D4(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function F4(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 B4(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 Fb="pointerdown.outside",Bb="focus.outside";function U4(e){for(const t of e)if(Kt(t)&&Gr(t))return!0;return!1}var Ub=e=>"clientY"in e;function H4(e,t){if(!Ub(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 z4(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Hb(e,t){if(!t||!Ub(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 z4(u,c)?r||a:!1}function j4(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=kr(e),f=Js(e),m=F4(f),E=B4(f);function T(L,W){if(!Kt(W)||!W.isConnected||Nl(e,W)||H4(e,L)||c&&$y(e,W))return!1;const J=d.querySelector(`[aria-controls="${e.id}"]`);if(J){const te=mh(J);if(Hb(L,te))return!1}const B=mh(e);return Hb(L,B)?!1:!(n!=null&&n(W))}const b=new Set,_=os(e==null?void 0:e.getRootNode());function w(L){function W(J){var ye,F;const B=u&&!qy()?Sn:se=>se(),te=J!=null?J:L,ge=(F=(ye=te==null?void 0:te.composedPath)==null?void 0:ye.call(te))!=null?F:[te==null?void 0:te.target];B(()=>{const se=_?ge[0]:Wr(L);if(!(!e||!T(L,se))){if(o||a){const he=sh(o,a);e.addEventListener(Fb,he,{once:!0})}zb(e,Fb,{bubbles:!1,cancelable:!0,detail:{originalEvent:te,contextmenu:OL(te),focusable:U4(ge),target:se}})}})}L.pointerType==="touch"?(b.forEach(J=>J()),b.add(cr(d,"click",W,{once:!0})),b.add(E.addEventListener("click",W,{once:!0})),b.add(m.addEventListener("click",W,{once:!0}))):W()}const v=new Set,A=setTimeout(()=>{v.add(cr(d,"pointerdown",w,!0)),v.add(E.addEventListener("pointerdown",w,!0)),v.add(m.addEventListener("pointerdown",w,!0))},0);function M(L){(u?Sn:J=>J())(()=>{var te,ge;const J=(ge=(te=L==null?void 0:L.composedPath)==null?void 0:te.call(L))!=null?ge:[L==null?void 0:L.target],B=_?J[0]:Wr(L);if(!(!e||!T(L,B))){if(r||a){const ye=sh(r,a);e.addEventListener(Bb,ye,{once:!0})}zb(e,Bb,{bubbles:!1,cancelable:!0,detail:{originalEvent:L,contextmenu:!1,focusable:Gr(B),target:B}})}})}return qy()||(v.add(cr(d,"focusin",M,!0)),v.add(E.addEventListener("focusin",M,!0)),v.add(m.addEventListener("focusin",M,!0))),()=>{clearTimeout(A),b.forEach(L=>L()),v.forEach(L=>L())}}function $4(e,t){const{defer:n}=t,r=n?Sn:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(j4(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function zb(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function V4(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return cr(kr(e),"keydown",n,{capture:!0})}var jb="layer:request-dismiss",Gn={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=>Nl(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Nl(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=>Gn.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];Y4(e,jb,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),q4(e,jb,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function q4(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 Y4(e,t,n){e.addEventListener(t,n,{once:!0})}var $b;function Vb(){Gn.layers.forEach(({node:e})=>{e.style.pointerEvents=Gn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function W4(e){e.style.pointerEvents=""}function G4(e,t){const n=kr(e),r=[];return Gn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&($b=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=YL(()=>{const c=o();return Kt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Pl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Gn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=$b,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function K4(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){ah("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};Gn.add(f),Vb();function m(w){var A,M;const v=Wr(w.detail.originalEvent);Gn.isBelowPointerBlockingLayer(e)||Gn.isInBranch(v)||((A=t.onPointerDownOutside)==null||A.call(t,w),(M=t.onInteractOutside)==null||M.call(t,w),!w.defaultPrevented&&(c&&console.log("onPointerDownOutside:",w.detail.originalEvent),r==null||r()))}function E(w){var A,M;const v=Wr(w.detail.originalEvent);Gn.isInBranch(v)||((A=t.onFocusOutside)==null||A.call(t,w),(M=t.onInteractOutside)==null||M.call(t,w),!w.defaultPrevented&&(c&&console.log("onFocusOutside:",w.detail.originalEvent),r==null||r()))}function T(w){var v;Gn.isTopMost(e)&&((v=t.onEscapeKeyDown)==null||v.call(t,w),!w.defaultPrevented&&r&&(w.preventDefault(),r()))}function b(w){var L;if(!e)return!1;const v=typeof u=="function"?u():u,A=Array.isArray(v)?v:[v],M=(L=t.persistentElements)==null?void 0:L.map(W=>W()).filter(Kt);return M&&A.push(...M),A.some(W=>Nl(W,w))||Gn.isInNestedLayer(e,w)}const _=[a?G4(e,t.persistentElements):void 0,V4(e,T),$4(e,{exclude:b,onFocusOutside:E,onPointerDownOutside:m,defer:t.defer})];return()=>{Gn.remove(e),Vb(),W4(e),_.forEach(w=>w==null?void 0:w())}}function qb(e,t){const{defer:n}=t,r=n?Sn:a=>a(),o=[];return o.push(r(()=>{const a=Xs(e)?e():e;o.push(K4(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var Q4=Object.defineProperty,X4=(e,t,n)=>t in e?Q4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xt=(e,t,n)=>X4(e,typeof t!="symbol"?t+"":t,n),Yb={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()}},J4=[],Z4=class{constructor(e,t){xt(this,"trapStack"),xt(this,"config"),xt(this,"doc"),xt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),xt(this,"portalContainers",new Set),xt(this,"listenerCleanups",[]),xt(this,"handleFocus",r=>{const o=Wr(r),a=this.findContainerIndex(o,r)>=0;if(a||kl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Oa(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const m=f.findIndex(E=>E===this.state.mostRecentlyFocusedNode);m>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?m+1<f.length&&(u=f[m+1],c=!1):m-1>=0&&(u=f[m-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>Oa(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}),xt(this,"handlePointerDown",r=>{const o=Wr(r);if(!(this.findContainerIndex(o,r)>=0)){if(Ba(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Ba(this.config.allowOutsideClick,r)||r.preventDefault()}}),xt(this,"handleClick",r=>{const o=Wr(r);this.findContainerIndex(o,r)>=0||Ba(this.config.clickOutsideDeactivates,r)||Ba(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),xt(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;Fa(r)&&r.preventDefault(),this.tryFocus(a)}}),xt(this,"handleEscapeKey",r=>{eD(r)&&Ba(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),xt(this,"_mutationObserver"),xt(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 TL(f)?!0:f.id&&!this.state.containers.some(m=>m.contains(f))?_L(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),xt(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)}))}),xt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Gr(r)){const o=Zs(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}),xt(this,"tryFocus",r=>{if(r!==!1&&r!==Zs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,tD(r)&&r.select()}}),xt(this,"deactivate",r=>{if(!this.state.active)return this;const o=H({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(),Yb.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=()=>{Wb(()=>{if(d){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(m)}u==null||u()})};if(d&&c){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(m).then(f,f),this}return f(),this}),xt(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}),xt(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}),xt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),xt(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),xt(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),xt(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}),xt(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Wr(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 m=this.state.tabbableGroups.findIndex(({firstTabbableNode:E})=>u===E);if(m<0&&((f==null?void 0:f.container)===u||Gr(u)&&!as(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(m=d),m>=0){const E=m===0?this.state.tabbableGroups.length-1:m-1,T=this.state.tabbableGroups[E];c=Oa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Fa(o)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let m=this.state.tabbableGroups.findIndex(({lastTabbableNode:E})=>u===E);if(m<0&&((f==null?void 0:f.container)===u||Gr(u)&&!as(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(m=d),m>=0){const E=m===this.state.tabbableGroups.length-1?0:m+1,T=this.state.tabbableGroups[E];c=Oa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Fa(o)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||J4;const n=H({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Fa(r)&&!r.shiftKey},isKeyBackward(r){return Fa(r)&&r.shiftKey}},t);this.doc=n.document||kr(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=>{EL(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?$y(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Na(e,{getShadowRoot:this.config.getShadowRoot}),n=Qy(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(Oa(t[f])>0){c=!0;break}function d(f,m=!0){const E=t.indexOf(f);if(E>=0)return t[E+(m?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(m){for(let b=T+1;b<n.length;b++)if(as(n[b]))return n[b]}else for(let b=T-1;b>=0;b--)if(as(n[b]))return n[b]}}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 Yb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Wb(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(cr(this.doc,"focusin",this.handleFocus,!0),cr(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),cr(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),cr(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),cr(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),cr(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=Zs(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)}},Fa=e=>e.key==="Tab",Ba=(e,...t)=>typeof e=="function"?e(...t):e,eD=e=>!e.isComposing&&e.key==="Escape",Wb=e=>setTimeout(e,0),tD=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Gb(e,t={}){let n;const r=Sn(()=>{const o=typeof e=="function"?e():e;if(o){n=new Z4(o,Te(H({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:kr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Fh="data-scroll-lock";function nD(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Kb(e){const t=Ol(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Qb(e){var b;const t=e!=null?e:document,n=(b=t.defaultView)!=null?b:window,{documentElement:r,body:o}=t;if(o.hasAttribute(Fh))return;const u=Kb(r)||Kb(o),c=n.innerWidth-r.clientWidth;o.setAttribute(Fh,"");const d=()=>VL(r,"--scrollbar-width",`${c}px`),f=nD(r),m=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Pl(o,_)},E=()=>{var J,B;const{scrollX:_,scrollY:w,visualViewport:v}=n,A=(J=v==null?void 0:v.offsetLeft)!=null?J:0,M=(B=v==null?void 0:v.offsetTop)!=null?B:0,L={position:"fixed",overflow:"hidden",top:`${-(w-Math.floor(M))}px`,left:`${-(_-Math.floor(A))}px`,right:"0"};!u&&c>0&&(L[f]=`${c}px`);const W=Pl(o,L);return()=>{W==null||W(),n.scrollTo({left:_,top:w,behavior:"instant"})}},T=[d(),Yy()?E():m()];return()=>{T.forEach(_=>_==null?void 0:_()),o.removeAttribute(Fh)}}var rD=no("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Rr=rD.build(),Xb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},Jb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Bh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},Zb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},iD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Uh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Hh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},sD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},eT=e=>e.getById(Xb(e)),lo=e=>e.getById(Jb(e)),co=e=>e.getById(Bh(e)),tT=e=>e.getById(Zb(e)),oD=e=>e.getById(Uh(e)),aD=e=>e.getById(Hh(e));function uD(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),m=a("currentPortalled"),E=r.get("renderedElements"),T=N4(Te(H({},u("positioning")),{placement:f}));return{portalled:m,open:d,setOpen(b){n.matches("open")!==b&&o({type:b?"OPEN":"CLOSE"})},reposition(b={}){o({type:"POSITIONING.SET",options:b})},getArrowProps(){return t.element(Te(H({id:iD(c)},Rr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(Te(H({},Rr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(Te(H({},Rr.anchor.attrs),{dir:u("dir"),id:Xb(c)}))},getTriggerProps(){return t.button(Te(H({},Rr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:Jb(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Bh(c),onPointerDown(b){NL(b)&&vL()&&b.currentTarget.focus()},onClick(b){b.defaultPrevented||o({type:"TOGGLE"})},onBlur(b){o({type:"TRIGGER_BLUR",target:b.relatedTarget})}}))},getIndicatorProps(){return t.element(Te(H({},Rr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(Te(H({id:Zb(c)},Rr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(Te(H({},Rr.content.attrs),{dir:u("dir"),id:Bh(c),tabIndex:-1,role:"dialog","aria-modal":rL(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":nL(d),"aria-labelledby":E.title?Uh(c):void 0,"aria-describedby":E.description?Hh(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(Te(H({},Rr.title.attrs),{id:Uh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(Te(H({},Rr.description.attrs),{id:Hh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(Te(H({},Rr.closeTrigger.attrs),{dir:u("dir"),id:sD(c),type:"button","aria-label":"close",onClick(b){b.defaultPrevented||(b.stopPropagation(),o({type:"CLOSE"}))}}))}}}var lD={props({props:e}){return Te(H({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:H({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=eT(n))!=null?a:lo(n);return Lb(r,()=>tT(n),Te(H({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>co(n);let o=!0;return qb(r,{type:"popover",pointerBlocking:t("modal"),exclude:lo(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:$L(()=>co(t),{triggerElement:lo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?Mb(()=>[co(t),lo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Qb(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?Gb(()=>co(t),{initialFocus:()=>Xy({root:co(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=eT(n))!=null?u:lo(n);Lb(o,()=>tT(n),Te(H(H({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Sn(()=>{Object.assign(e.get("renderedElements"),{title:!!oD(t),description:!!aD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Sn(()=>{const n=Xy({root:co(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||Sn(()=>{const a=lo(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})}}}};Th()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[QB,zh]=to({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[XB,nT]=to({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),cD=e=>{const t=V.useId(),{getRootNode:n}=zh(),{dir:r}=nT(),o=H({id:t,dir:r,getRootNode:n},e),a=_h(lD,o);return uD(a,ab)},dD=e=>{const[t,u]=fb(e),c=u,{children:n}=c,r=nn(c,["children"]),o=cD(r),a=Sh(dr({present:o.open},t));return C.jsx(o6,{value:o,children:C.jsx(ub,{value:a,children:n})})},rT=V.forwardRef((e,t)=>{const n=wh(),r=Pa(),o=dr(Te(H({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return C.jsx(yi.button,Te(H({},o),{ref:t}))});rT.displayName="PopoverTrigger";function fD(e){return Yt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"},child:[]}]})(e)}function hD(e){return Yt({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 pD(e){return Yt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"},child:[]}]})(e)}function iT(e){return Yt({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 mD=({onClearChat:e,componentType:t})=>{const{resetConversation:n}=Sr(),r=()=>{n(),e()};return C.jsxs("button",{className:Z(`${Y}-overflow-menu-button`,"clear-chat-button",t),onClick:r,children:[C.jsx(iT,{}),"Clear chat"]})},gD=({className:e,componentType:t,children:n})=>{const[r,o]=V.useState(!1),{globalClassName:a}=Rt(),u=()=>{o(!1)},c=d=>{o(d.open)};return C.jsxs(dD,{open:r,onOpenChange:c,positioning:{placement:"bottom-end"},children:[C.jsx(rT,{"aria-label":`Overflow menu for ${t}`,className:Z(`${Y}-overflow-menu-button-trigger`,`${Y}-icon-button`,a,e,t),children:C.jsx(pD,{})}),C.jsx(cb,{children:C.jsxs(lb,{className:Z(`${Y}-overflow-menu-list`,a,t),children:[n,C.jsx(mD,{componentType:t,onClearChat:u})]})})]})};function sT(e){return Yt({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 oT(e){return Yt({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 aT=r=>{var o=r,{onClearChat:e,componentType:t}=o,n=nn(o,["onClearChat","componentType"]);const{globalClassName:a}=Rt(),{resetConversation:u}=Sr(),c=()=>{u(),e==null||e()};return C.jsx(qr,H({icon:C.jsx(iT,{size:"16px"}),ariaLabel:"Clear Chat",className:Z(a,`${Y}-clear-chat-icon-button`,t),onClick:c},n))},uT=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=Rt();if(!r)return null;const o=()=>{Qi(!1),Qu(!0)};return t?C.jsx(qr,{className:Z(n,`${Y}-toggle-minimize-button`,e),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:C.jsx(Qg,{})}):C.jsxs("button",{className:Z(n,`${Y}-overflow-menu-button`,`${Y}-toggle-minimize-button`,e),onClick:o,children:[C.jsx(Qg,{}),"Minimize"]})},lT=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Rt(),r=()=>{Xu("modal")};return t?C.jsx(qr,{className:Z(n,`${Y}-toggle-modal-button`,e),ariaLabel:"Toggle Modal",onClick:r,icon:C.jsx(oT,{})}):C.jsxs("button",{className:Z(n,`${Y}-overflow-menu-button`,`${Y}-toggle-modal-button`,e),onClick:r,children:[C.jsx(oT,{}),"Show modal"]})},ED=({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),m=n.getImage(t),E=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return C.jsxs("div",{className:Z(r,`${Y}-product-tile`,{embedded:!e,standalone:e}),children:[C.jsx("img",{className:Z(r,`${Y}-product-tile-image`,{embedded:!e,standalone:e}),src:`${m}`,alt:`${a}`,loading:"lazy"}),C.jsxs("div",{className:Z(r,`${Y}-product-tile-details`,{embedded:!e,standalone:e}),children:[C.jsxs("div",{className:Z(r,`${Y}-product-tile-content`),children:[u&&C.jsx("p",{className:`${Y}-product-tile-brand`,children:u}),E?C.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:Z(r,`${Y}-product-tile-pdp`),href:`${E}`,target:o?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",C.jsx("span",{className:Z(r,`${Y}-product-tile-pdp-arrow`),children:"→"})]}):C.jsx("p",{className:Z(r,`${Y}-product-tile-name`),title:a,children:a})]}),C.jsx("div",{className:Z(r,`${Y}-product-tile-footer`),children:C.jsx("p",{className:Z(r,`${Y}-product-tile-price`),children:c})})]})]})},yD=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=Rt(),o=t;return n?C.jsxs("div",{className:Z(r,`${Y}-display-products widget-message`),children:[C.jsx("p",{children:o.message}),o.products&&o.products.length>0&&C.jsx("div",{className:Z(r,`${Y}-product-list`,{embedded:!e,standalone:e}),children:o.products.map(a=>{const u=n.getPid(a);return C.jsx(ED,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},bD=({globalClassName:e,message:t,isWidgetStandalone:n})=>C.jsx("div",{className:Z(e,`${Y}-error-message`,{standalone:n,embedded:!n}),children:C.jsxs("p",{className:Z(e,`${Y}-error-message-text`,{standalone:n,embedded:!n}),children:[C.jsx(JA,{})," ",t.message||"An error occurred while processing your request."]})});function TD(e){return Yt({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{d:"M10.75 6.75a.75.75 0 0 0-1.5 0v2.5h-2.5a.75.75 0 0 0 0 1.5h2.5v2.5a.75.75 0 0 0 1.5 0v-2.5h2.5a.75.75 0 0 0 0-1.5h-2.5v-2.5Z"},child:[]}]})(e)}const _D=({globalClassName:e,messageId:t,messageEventSourceId:n,isLoading:r,hasSourceEvent:o,suggestions:a,handleSuggestionClick:u})=>C.jsx("div",{className:Z(e,`${Y}-suggestion-container standalone`),children:a.map(c=>C.jsxs(sf,{disabled:r||!o,className:Z(e,`${Y}-suggestion-button standalone`),onClick:()=>u(c,n||t),children:[C.jsx(TD,{size:"1.5rem",style:{minHeight:"1.5rem",minWidth:"1.5rem"}})," ",c.displayText]},c.displayText))}),xD=({globalClassName:e,message:t,isWidgetStandalone:n,handleSuggestionClick:r})=>{const{isLoading:o}=Sr(),{messages:a}=Xi(),u=a.some(c=>c.id===t.eventSourceId);return C.jsxs("div",{className:Z(e,`${Y}-follow-up`),children:[C.jsx("p",{className:Z(e,`${Y}-text`),children:t.message}),n&&C.jsx(_D,{globalClassName:e,isLoading:o,hasSourceEvent:u,messageId:t.id,messageEventSourceId:t.eventSourceId,suggestions:t.suggestions,handleSuggestionClick:r}),!n&&C.jsx("div",{className:Z(e,`${Y}-suggestion-container embedded`),children:t.suggestions.map(c=>C.jsx("button",{disabled:o||!u,className:Z(e,`${Y}-suggestion-button embedded`),onClick:()=>r(c,t.eventSourceId||t.id),children:c.displayText},c.displayText))})]})};function cT(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 wD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function SD(e,t,n){const o=fl((n||{}).ignore||[]),a=CD(t);let u=-1;for(;++u<a.length;)uE(e,"text",c);function c(f,m){let E=-1,T;for(;++E<m.length;){const b=m[E],_=T?T.children:void 0;if(o(b,_?_.indexOf(b):void 0,T))return;T=b}if(T)return d(f,m)}function d(f,m){const E=m[m.length-1],T=a[u][0],b=a[u][1];let _=0;const v=E.children.indexOf(f);let A=!1,M=[];T.lastIndex=0;let L=T.exec(f.value);for(;L;){const W=L.index,J={index:L.index,input:L.input,stack:[...m,f]};let B=b(...L,J);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?T.lastIndex=W+1:(_!==W&&M.push({type:"text",value:f.value.slice(_,W)}),Array.isArray(B)?M.push(...B):B&&M.push(B),_=W+L[0].length,A=!0),!T.global)break;L=T.exec(f.value)}return A?(_<f.value.length&&M.push({type:"text",value:f.value.slice(_)}),E.children.splice(v,1,...M)):M=[f],v+M.length}}function CD(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([AD(o[0]),vD(o[1])])}return t}function AD(e){return typeof e=="string"?new RegExp(wD(e),"g"):e}function vD(e){return typeof e=="function"?e:function(){return e}}const jh="phrasing",$h=["autolink","link","image","label"];function kD(){return{transforms:[DD],enter:{literalAutolink:OD,literalAutolinkEmail:Vh,literalAutolinkHttp:Vh,literalAutolinkWww:Vh},exit:{literalAutolink:LD,literalAutolinkEmail:RD,literalAutolinkHttp:ID,literalAutolinkWww:PD}}}function ND(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:jh,notInConstruct:$h},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:jh,notInConstruct:$h},{character:":",before:"[ps]",after:"\\/",inConstruct:jh,notInConstruct:$h}]}}function OD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Vh(e){this.config.enter.autolinkProtocol.call(this,e)}function ID(e){this.config.exit.autolinkProtocol.call(this,e)}function PD(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 RD(e){this.config.exit.autolinkEmail.call(this,e)}function LD(e){this.exit(e)}function DD(e){SD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,MD],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),FD]],{ignore:["link","linkReference"]})}function MD(e,t,n,r,o){let a="";if(!dT(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!BD(n)))return!1;const u=UD(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function FD(e,t,n,r){return!dT(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function BD(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function UD(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=cT(e,"(");let a=cT(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 dT(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Zi(n)||sl(n))&&(!t||n!==47)}fT.peek=GD;function HD(){this.buffer()}function zD(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function jD(){this.buffer()}function $D(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function VD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ur(this.sliceSerialize(e)).toLowerCase(),n.label=t}function qD(e){this.exit(e)}function YD(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ur(this.sliceSerialize(e)).toLowerCase(),n.label=t}function WD(e){this.exit(e)}function GD(){return"["}function fT(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function KD(){return{enter:{gfmFootnoteCallString:HD,gfmFootnoteCall:zD,gfmFootnoteDefinitionLabelString:jD,gfmFootnoteDefinition:$D},exit:{gfmFootnoteCallString:VD,gfmFootnoteCall:qD,gfmFootnoteDefinitionLabelString:YD,gfmFootnoteDefinition:WD}}}function QD(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:fT},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"),m=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),m(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
32
|
+
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?hT:XD))),f(),d}}function XD(e,t,n){return t===0?e:hT(e,t,n)}function hT(e,t,n){return(n?"":" ")+e}const JD=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];pT.peek=r5;function ZD(){return{canContainEols:["delete"],enter:{strikethrough:t5},exit:{strikethrough:n5}}}function e5(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:JD}],handlers:{delete:pT}}}function t5(e){this.enter({type:"delete",children:[]},e)}function n5(e){this.exit(e)}function pT(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,Te(H({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function r5(){return"~"}function i5(e){return e.length}function s5(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||i5,a=[],u=[],c=[],d=[];let f=0,m=-1;for(;++m<e.length;){const w=[],v=[];let A=-1;for(e[m].length>f&&(f=e[m].length);++A<e[m].length;){const M=o5(e[m][A]);if(n.alignDelimiters!==!1){const L=o(M);v[A]=L,(d[A]===void 0||L>d[A])&&(d[A]=L)}w.push(M)}u[m]=w,c[m]=v}let E=-1;if(typeof r=="object"&&"length"in r)for(;++E<f;)a[E]=mT(r[E]);else{const w=mT(r);for(;++E<f;)a[E]=w}E=-1;const T=[],b=[];for(;++E<f;){const w=a[E];let v="",A="";w===99?(v=":",A=":"):w===108?v=":":w===114&&(A=":");let M=n.alignDelimiters===!1?1:Math.max(1,d[E]-v.length-A.length);const L=v+"-".repeat(M)+A;n.alignDelimiters!==!1&&(M=v.length+M+A.length,M>d[E]&&(d[E]=M),b[E]=M),T[E]=L}u.splice(1,0,T),c.splice(1,0,b),m=-1;const _=[];for(;++m<u.length;){const w=u[m],v=c[m];E=-1;const A=[];for(;++E<f;){const M=w[E]||"";let L="",W="";if(n.alignDelimiters!==!1){const J=d[E]-(v[E]||0),B=a[E];B===114?L=" ".repeat(J):B===99?J%2?(L=" ".repeat(J/2+.5),W=" ".repeat(J/2-.5)):(L=" ".repeat(J/2),W=L):W=" ".repeat(J)}n.delimiterStart!==!1&&!E&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&M==="")&&(n.delimiterStart!==!1||E)&&A.push(" "),n.alignDelimiters!==!1&&A.push(L),A.push(M),n.alignDelimiters!==!1&&A.push(W),n.padding!==!1&&A.push(" "),(n.delimiterEnd!==!1||E!==f-1)&&A.push("|")}_.push(n.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return _.join(`
|
|
33
|
+
`)}function o5(e){return e==null?"":String(e)}function mT(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 a5(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()),u5);return o(),u}function u5(e,t,n){return">"+(n?"":" ")+e}function l5(e,t){return gT(e,t.inConstruct,!0)&&!gT(e,t.notInConstruct,!1)}function gT(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 ET(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
34
|
+
`&&l5(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
35
|
+
`}function c5(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>u&&(u=a):a=1,o=r+t.length,r=n.indexOf(t,o);return u}function d5(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function f5(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function h5(e,t,n,r){const o=f5(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(d5(e,n)){const E=n.enter("codeIndented"),T=n.indentLines(a,p5);return E(),T}const c=n.createTracker(r),d=o.repeat(Math.max(c5(a,o)+1,3)),f=n.enter("codeFenced");let m=c.move(d);if(e.lang){const E=n.enter(`codeFencedLang${u}`);m+=c.move(n.safe(e.lang,H({before:m,after:" ",encode:["`"]},c.current()))),E()}if(e.lang&&e.meta){const E=n.enter(`codeFencedMeta${u}`);m+=c.move(" "),m+=c.move(n.safe(e.meta,H({before:m,after:`
|
|
36
|
+
`,encode:["`"]},c.current()))),E()}return m+=c.move(`
|
|
37
|
+
`),a&&(m+=c.move(a+`
|
|
38
|
+
`)),m+=c.move(d),f(),m}function p5(e,t,n){return(n?"":" ")+e}function qh(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function m5(e,t,n,r){const o=qh(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),H({before:f,after:"]"},d.current()))),f+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,H({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,H({before:f,after:e.title?" ":`
|
|
39
|
+
`},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,H({before:f,after:o},d.current()))),f+=d.move(o),c()),u(),f}function g5(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ua(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Yl(e,t,n){const r=js(e),o=js(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}yT.peek=E5;function yT(e,t,n,r){const o=g5(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(o);let d=u.move(n.containerPhrasing(e,H({after:o,before:c},u.current())));const f=d.charCodeAt(0),m=Yl(r.before.charCodeAt(r.before.length-1),f,o);m.inside&&(d=Ua(f)+d.slice(1));const E=d.charCodeAt(d.length-1),T=Yl(r.after.charCodeAt(0),E,o);T.inside&&(d=d.slice(0,-1)+Ua(E));const b=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:m.outside},c+d+b}function E5(e,t,n){return n.options.emphasis||"*"}function y5(e,t){let n=!1;return pl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,kf}),!!((!e.depth||e.depth<3)&&Ef(e)&&(t.options.setext||n))}function b5(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(y5(e,n)){const m=n.enter("headingSetext"),E=n.enter("phrasing"),T=n.containerPhrasing(e,Te(H({},a.current()),{before:`
|
|
37
40
|
`,after:`
|
|
38
|
-
`}));return E(),
|
|
41
|
+
`}));return E(),m(),T+`
|
|
39
42
|
`+(o===1?"=":"-").repeat(T.length-(Math.max(T.lastIndexOf("\r"),T.lastIndexOf(`
|
|
40
43
|
`))+1))}const u="#".repeat(o),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,H({before:"# ",after:`
|
|
41
|
-
`},a.current()));return/^[\t ]/.test(f)&&(f=Ua(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}
|
|
42
|
-
`,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(b,_,w,
|
|
43
|
-
`))}function d(b,_,w,k){const v=w.enter("tableCell"),F=w.enter("phrasing"),R=w.containerPhrasing(b,Te(H({},k),{before:a,after:a}));return F(),v(),R}function f(b,_){return ZD(b,{align:_,alignDelimiters:r,padding:n,stringLength:o})}function p(b,_,w){const k=b.children;let v=-1;const F=[],R=_.enter("table");for(;++v<k.length;)F[v]=E(k[v],_,w);return R(),F}function E(b,_,w){const k=b.children;let v=-1;const F=[],R=_.enter("tableRow");for(;++v<k.length;)F[v]=d(k[v],b,_,w);return R(),F}function T(b,_,w){let k=AT.inlineCode(b,_,w);return w.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function H5(){return{exit:{taskListCheckValueChecked:kT,taskListCheckValueUnchecked:kT,paragraph:j5}}}function z5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:$5}}}function kT(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function j5(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 $5(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=AT.listItem(e,t,n,H(H({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function V5(){return[xD(),$D(),WD(),R5(),H5()]}function q5(e){return{extensions:[wD(),VD(e),GD(),U5(e),z5()]}}const Y5={tokenize:J5,partial:!0},NT={tokenize:Z5,partial:!0},OT={tokenize:e8,partial:!0},IT={tokenize:t8,partial:!0},W5={tokenize:n8,partial:!0},PT={name:"wwwAutolink",tokenize:Q5,previous:LT},RT={name:"protocolAutolink",tokenize:X5,previous:DT},Xr={name:"emailAutolink",tokenize:K5,previous:MT},Rr={};function G5(){return{text:Rr}}let us=48;for(;us<123;)Rr[us]=Xr,us++,us===58?us=65:us===91&&(us=97);Rr[43]=Xr,Rr[45]=Xr,Rr[46]=Xr,Rr[95]=Xr,Rr[72]=[Xr,RT],Rr[104]=[Xr,RT],Rr[87]=[Xr,PT],Rr[119]=[Xr,PT];function K5(e,t,n){const r=this;let o,a;return u;function u(E){return!Wh(E)||!MT.call(r,r.previous)||Gh(r.events)?n(E):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(E))}function c(E){return Wh(E)?(e.consume(E),c):E===64?(e.consume(E),d):n(E)}function d(E){return E===46?e.check(W5,p,f)(E):E===45||E===95||an(E)?(a=!0,e.consume(E),d):p(E)}function f(E){return e.consume(E),o=!0,d}function p(E){return a&&o&&pn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(E)):n(E)}}function Q5(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!LT.call(r,r.previous)||Gh(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Y5,e.attempt(NT,e.attempt(OT,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function X5(e,t,n){const r=this;let o="",a=!1;return u;function u(E){return(E===72||E===104)&&DT.call(r,r.previous)&&!Gh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(E),e.consume(E),c):n(E)}function c(E){if(pn(E)&&o.length<5)return o+=String.fromCodePoint(E),e.consume(E),c;if(E===58){const T=o.toLowerCase();if(T==="http"||T==="https")return e.consume(E),d}return n(E)}function d(E){return E===47?(e.consume(E),a?f:(a=!0,d)):n(E)}function f(E){return E===null||rl(E)||ft(E)||Ji(E)||il(E)?n(E):e.attempt(NT,e.attempt(OT,p),n)(E)}function p(E){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(E)}}function J5(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 Z5(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(IT,d,c)(f):f===null||ft(f)||Ji(f)||f!==45&&il(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 e8(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(IT,t,a)(u):u===null||ft(u)||Ji(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function t8(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||ft(c)||Ji(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||ft(c)||Ji(c)?t(c):r(c)}function a(c){return pn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):pn(c)?(e.consume(c),u):n(c)}}function n8(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return an(a)?n(a):t(a)}}function LT(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ft(e)}function DT(e){return!pn(e)}function MT(e){return!(e===47||Wh(e))}function Wh(e){return e===43||e===45||e===46||e===95||an(e)}function Gh(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 r8={tokenize:d8,partial:!0};function i8(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:u8,continuation:{tokenize:l8},exit:c8}},text:{91:{name:"gfmFootnoteCall",tokenize:a8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:s8,resolveTo:o8}}}}function s8(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=ar(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 o8(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 a8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(E){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),d}function d(E){return E!==94?n(E):(e.enter("gfmFootnoteCallMarker"),e.consume(E),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(E){if(a>999||E===93&&!u||E===null||E===91||ft(E))return n(E);if(E===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return o.includes(ar(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(E)}return ft(E)||(u=!0),a++,e.consume(E),E===92?p:f}function p(E){return E===91||E===92||E===93?(e.consume(E),a++,f):f(E)}}function u8(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||ft(_))return n(_);if(_===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=ar(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return ft(_)||(c=!0),u++,e.consume(_),_===92?E:p}function E(_){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),Ze(e,b,"gfmFootnoteDefinitionWhitespace")):n(_)}function b(_){return t(_)}}function l8(e,t,n){return e.check(la,t,e.attempt(r8,t,n))}function c8(e){e.exit("gfmFootnoteDefinition")}function d8(e,t,n){const r=this;return Ze(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 f8(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)},E={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",E,c]],b=c.parser.constructs.insideSpan.null;b&&Rn(T,T.length,0,sl(b,u.slice(f+1,d),c)),Rn(T,T.length,0,[["exit",E,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),Rn(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 E=0;return T;function T(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),b(_))}function b(_){const w=js(f);if(_===126)return E>1?d(_):(u.consume(_),E++,b);if(E<2&&!n)return d(_);const k=u.exit("strikethroughSequenceTemporary"),v=js(_);return k._open=!v||v===2&&!!w,k._close=!w||w===2&&!!v,c(_)}}}class h8{constructor(){this.map=[]}add(t,n,r){p8(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 p8(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 m8(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 g8(){return{flow:{null:{name:"table",tokenize:E8,resolveAll:y8}}}}function E8(e,t,n){const r=this;let o=0,a=0,u;return c;function c(M){let ae=r.events.length-1;for(;ae>-1;){const de=r.events[ae][1].type;if(de==="lineEnding"||de==="linePrefix")ae--;else break}const he=ae>-1?r.events[ae][1].type:null,ue=he==="tableHead"||he==="tableRow"?B:d;return ue===B&&r.parser.lazy[r.now().line]?n(M):ue(M)}function d(M){return e.enter("tableHead"),e.enter("tableRow"),f(M)}function f(M){return M===124||(u=!0,a+=1),p(M)}function p(M){return M===null?n(M):Le(M)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),b):n(M):Qe(M)?Ze(e,p,"whitespace")(M):(a+=1,u&&(u=!1,o+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),E(M)))}function E(M){return M===null||M===124||ft(M)?(e.exit("data"),p(M)):(e.consume(M),M===92?T:E)}function T(M){return M===92||M===124?(e.consume(M),E):E(M)}function b(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(M):(e.enter("tableDelimiterRow"),u=!1,Qe(M)?Ze(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):_(M))}function _(M){return M===45||M===58?k(M):M===124?(u=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),w):X(M)}function w(M){return Qe(M)?Ze(e,k,"whitespace")(M):k(M)}function k(M){return M===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),v):M===45?(a+=1,v(M)):M===null||Le(M)?W(M):X(M)}function v(M){return M===45?(e.enter("tableDelimiterFiller"),F(M)):X(M)}function F(M){return M===45?(e.consume(M),F):M===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(M))}function R(M){return Qe(M)?Ze(e,W,"whitespace")(M):W(M)}function W(M){return M===124?_(M):M===null||Le(M)?!u||o!==a?X(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(M)):X(M)}function X(M){return n(M)}function B(M){return e.enter("tableRow"),te(M)}function te(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),te):M===null||Le(M)?(e.exit("tableRow"),t(M)):Qe(M)?Ze(e,te,"whitespace")(M):(e.enter("data"),ge(M))}function ge(M){return M===null||M===124||ft(M)?(e.exit("data"),te(M)):(e.consume(M),M===92?ye:ge)}function ye(M){return M===92||M===124?(e.consume(M),ge):ge(M)}}function y8(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,E;const T=new h8;for(;++n<e.length;){const b=e[n],_=b[1];b[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(FT(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,E=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],E=Yl(T,t,a,o,void 0,E),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],E=Yl(T,t,a,o,void 0,E)),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],E=Yl(T,t,a,o,n,E)):u[1]!==0&&(E=Yl(T,t,u,o,n,E)),o=0):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&FT(T,t,d,f,p),T.consume(t.events),n=-1;++n<t.events.length;){const b=t.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=m8(t.events,n))}return e}function Yl(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},fo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=fo(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=fo(t.events,n[2]),p=fo(t.events,n[3]),E={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",E,t]]),r!==2){const T=t.events[n[2]],b=t.events[n[3]];if(T[1].end=Object.assign({},b[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",E,t]])}return o!==void 0&&(a.end=Object.assign({},fo(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function FT(e,t,n,r,o){const a=[],u=fo(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 fo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const b8={name:"tasklistCheck",tokenize:_8};function T8(){return{text:{91:b8}}}function _8(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 ft(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Le(d)?t(d):Qe(d)?e.check({tokenize:x8},t,n)(d):n(d)}}function x8(e,t,n){return Ze(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function w8(e){return v1([G5(),i8(),f8(e),g8(),T8()])}const S8={};function C8(e){const t=this,n=e||S8,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(w8(n)),a.push(V5()),u.push(q5(n))}const Wl=()=>C.jsx("span",{className:`${Y}-blinking-cursor`,children:C.jsx("svg",{height:"1rem",width:"1rem",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),BT=({globalClassName:e,openLinksInNewTab:t,message:n})=>{const{isLoading:r,isResponseLoading:o}=wr(),a=r&&o((n==null?void 0:n.eventSourceId)||"")&&n.name==="partial_inquiry";return C.jsx(EE,{remarkPlugins:[C8],rehypePlugins:[Ny],components:{h1:({children:u})=>C.jsx("h1",{className:J(e,`${Y}-header h1`),children:u}),h2:({children:u})=>C.jsx("h2",{className:J(e,`${Y}-header h2`),children:u}),h3:({children:u})=>C.jsx("h3",{className:J(e,`${Y}-header h3`),children:u}),ul:({children:u})=>C.jsx("ul",{className:J(e,`${Y}-ul`),children:u}),ol:({children:u})=>C.jsx("ol",{className:J(e,`${Y}-ol`),children:u}),li:({children:u})=>C.jsx("li",{className:J(e,`${Y}-li`),children:u}),a:({href:u,children:c})=>C.jsx(My,{globalClassName:e,openLinksInNewTab:t,href:u,children:c}),table:({children:u})=>C.jsx("table",{className:J(e,`${Y}-table`),children:u}),thead:({children:u})=>C.jsx("thead",{className:J(e,`${Y}-thead`),children:u}),tbody:({children:u})=>C.jsx("tbody",{className:J(e,`${Y}-tbody`),children:u}),tr:({children:u})=>C.jsx("tr",{className:J(e,`${Y}-tr`),children:u}),th:({children:u})=>C.jsx("th",{className:J(e,`${Y}-th`),children:u}),td:({children:u})=>C.jsx("td",{className:J(e,`${Y}-td`),children:u}),span:({className:u,children:c})=>u===`${Y}-blinking-cursor`?C.jsx(Wl,{}):C.jsx("span",{children:c})},children:n.message+(a?`<span className='${Y}-blinking-cursor'></span>`:"")})},A8=({globalClassName:e,message:t})=>{const[n,r]=$.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,c=()=>{r(d=>!d)};return C.jsxs("div",{children:[C.jsxs("div",{className:J(e,`${Y}-progress-message`,"standalone"),children:[C.jsx("span",{className:J(e,`${Y}-message-icon`,"progress-icon","standalone"),children:C.jsx(Wg,{})}),C.jsx("p",{className:J(e,`${Y}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&C.jsxs(C.Fragment,{children:[C.jsx(rf,{className:J(e,`${Y}-thought-context-button`),onClick:c,children:n?C.jsxs(C.Fragment,{children:["Hide ",C.jsx(WA,{})]}):C.jsxs(C.Fragment,{children:["Context ",C.jsx(GA,{})]})}),n&&C.jsx("div",{className:J(e,`${Y}-thought-container`),children:a&&C.jsx("p",{className:J(e,`${Y}-progress-thought`),children:t.thought})})]})]})},v8=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?C.jsx(A8,{globalClassName:e,message:t}):C.jsxs("div",{className:J(e,`${Y}-progress-message`,"embedded"),title:t.message,children:[C.jsx("span",{className:J(e,`${Y}-message-icon`,"progress-icon","embedded"),children:C.jsx(Wg,{})}),C.jsx("i",{className:J(e,`${Y}-progress-text`,"embedded"),children:t.message})]}),k8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return C.jsxs("div",{className:J(e,`${Y}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&C.jsxs("div",{className:J(e,`${Y}-refined-event-query`,{embedded:!n,standalone:n}),children:[C.jsx("span",{className:J(e,`${Y}-message-icon`,`${Y}-refined-event-icon`,{embedded:!n,standalone:n}),children:C.jsx(na,{role:"img"})}),C.jsx("p",{className:J(e,`${Y}-text`,`${Y}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),C.jsx(BT,{message:t})]})},UT=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,E)=>p+E.length,0);return{facetFiltersList:u,filterCount:c}},Gl=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>C.jsx("span",{className:J(t,`${Y}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),HT=({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 C.jsxs("div",{className:J(e,`${Y}-facets`),children:[C.jsx("p",{className:J(e,`${Y}-facet-category`),children:c}),C.jsx("p",{className:J(e,`${Y}-facet-values`),children:d})]},c)})},Ha=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>C.jsx("span",{className:J(e,`${Y}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),N8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=UT(t),c=new Date(o).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?C.jsxs("div",{className:J(e,`${Y}-user-message standalone`),children:[C.jsxs("div",{className:J(e,`${Y}-user-message-row standalone`),children:[d?C.jsx("img",{className:J(e,`${Y}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):C.jsx("span",{className:J(e,`${Y}-message-icon user-message-icon standalone`),children:C.jsx(Kg,{})}),C.jsx("p",{className:J(e,`${Y}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&C.jsx(Gl,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),C.jsx(HT,{globalClassName:e,facetFiltersList:a,message:t}),C.jsx(Ha,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):C.jsxs("div",{className:J(e,`${Y}-user-message embedded`),children:[C.jsxs("div",{className:J(e,`${Y}-user-message-row embedded`),children:[d?C.jsx("img",{className:J(e,`${Y}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):C.jsx("span",{className:J(e,`${Y}-message-icon user-message-icon embedded`),children:C.jsx(Kg,{})}),C.jsx("p",{className:J(e,`${Y}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&C.jsx(Gl,{isWidgetStandalone:!1,filterCount:u})]}),C.jsx(Ha,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},O8=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>C.jsxs("div",{className:J(e,`${Y}-user-search standalone`),children:[C.jsxs("div",{children:[C.jsxs("div",{className:J(e,`${Y}-user-search-query standalone`),children:[d?C.jsx("img",{className:J(e,`${Y}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):C.jsx("span",{className:J(e,`${Y}-message-icon user-search-icon standalone`),children:C.jsx(na,{})}),C.jsx("p",{className:J(e,`${Y}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&C.jsx(Gl,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),C.jsx(HT,{globalClassName:e,facetFiltersList:u,message:a})]}),C.jsx(Ha,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),I8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var b;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=UT(t),d=new Date(a).toLocaleString(),f=(b=r==null?void 0:r.attachments)==null?void 0:b.image,{actionLabel:p,query:E,queryLabel:T}=$.useMemo(()=>{var _;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:(_=r==null?void 0:r.browseParams)==null?void 0:_.categoryId,queryLabel:(r==null?void 0:r.label)||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:(r==null?void 0:r.label)||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[o,r]);return E?n?C.jsx(O8,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:E,queryLabel:T,facetFiltersList:u,filterCount:c}):C.jsxs("div",{className:J(e,`${Y}-user-search embedded`),children:[C.jsxs("div",{className:J(e,`${Y}-user-search-query embedded`),children:[f?C.jsx("img",{className:J(e,`${Y}-user-search-image embedded`),src:f,alt:T||E,loading:"lazy"}):C.jsx("span",{className:J(e,`${Y}-message-icon user-search-icon embedded`),children:C.jsx(na,{})}),C.jsx("p",{children:T||E}),u.length>0&&C.jsx(Gl,{isWidgetStandalone:!1,filterCount:c})]}),C.jsx(Ha,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},zT=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,isWidgetStandalone:o,handleSuggestionClick:a})=>{var d;if(!e)return null;const u=e.name,c=!!((d=e.request)!=null&&d.userPrompt);switch(u){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return c?C.jsx(N8,{globalClassName:t,isWidgetStandalone:o,message:e}):C.jsx(I8,{globalClassName:t,message:e,isWidgetStandalone:o});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return C.jsx(k8,{globalClassName:t,message:e,isWidgetStandalone:o});case"follow_up":return C.jsx(gD,{globalClassName:t,isWidgetStandalone:o,message:e,handleSuggestionClick:a});case"inquiry":case"partial_inquiry":return C.jsx(BT,{globalClassName:t,openLinksInNewTab:n,message:e});case"error":return C.jsx(hD,{message:e,isWidgetStandalone:o});case"display_products":return C.jsx(fD,{message:e,isWidgetStandalone:o});case"progress":return C.jsx(v8,{globalClassName:t,isWidgetStandalone:o,message:e});case"conversation_reset":return C.jsxs(C.Fragment,{children:[C.jsx("p",{className:J(t,`${Y}-reset-message`),children:"This conversation has been reset."}),C.jsx("p",{className:J(t,`${Y}-start-search-message`),children:r})]});default:return null}},Kh=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,entryMessage:r,openLinksInNewTab:o,resetConversationMessage:a}=Rt(),{groupedMessages:u,entryType:c}=Ms(),d=typeof r=="string"?r:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return C.jsxs(C.Fragment,{children:[c==="ask_cim"&&C.jsx("div",{className:J(n,`${Y}-ask-cim-entry-message`,`${Y}-message-group`,e?"standalone":"embedded"),children:d}),u.map(f=>{if(f.messages&&f.type==="group"){let p=new Date(f.createdAt).toLocaleString();const E=f.messages[f.messages.length-1];return E&&(p=new Date(E.createdAt).toLocaleString()),C.jsxs("div",{className:J(n,`${Y}-message-group`,e?"standalone":"embedded"),children:[f.messages.length>0&&f.messages.map(T=>C.jsx("div",{className:`${Y}-message-group-child`,children:C.jsx(zT,{id:T.id,openLinksInNewTab:o,globalClassName:n,isWidgetStandalone:e,message:T,resetConversationMessage:a,handleSuggestionClick:t})},T.id)),C.jsx(Ha,{globalClassName:n,timestamp:p,isWidgetStandalone:e})]},`group-${f.eventSourceId}`)}else if(f.type==="individual"&&f.message)return C.jsx("div",{className:J(n,`${Y}-message`,e?"standalone":"embedded",{error:f.message.name.includes("error")}),children:C.jsx(zT,{id:f.message.id,openLinksInNewTab:o,globalClassName:n,isWidgetStandalone:e,message:f.message,resetConversationMessage:a,handleSuggestionClick:t})},f.message.id);return null})]})},jT=()=>{const{globalClassName:e,themeVariables:t}=Rt(),{copilot:n,messages:r,isLoading:o,handleUserInput:a,handleSuggestion:u}=wr(),c=$.useRef(null),d=tf();return $.useEffect(()=>{c.current&&c.current.scrollIntoView({behavior:"smooth",block:"end"})},[r]),d?n?C.jsxs("div",{className:J(e,`${Y}-container`,`${Y}-embedded-chat`),style:t,children:[C.jsxs("div",{className:J(e,`${Y}-message-container`,"embedded"),children:[C.jsx(Kh,{isWidgetStandalone:!1,handleSuggestionClick:u}),o&&C.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:C.jsx(Wl,{})}),C.jsx("div",{ref:c})]}),C.jsx(rh,{componentType:"chat",className:"embedded-chat",isLoading:o,onSubmit:a}),C.jsx("div",{className:J(`${Y}-embedded-chat-menu`),children:C.jsx(cD,{componentType:"chat",children:C.jsx(aT,{componentType:"chat"})})})]}):C.jsx("div",{children:"Loading Copilot..."}):null},[P8,R8]=to({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),L8=e=>lb()(e,["lazyMount","unmountOnExit"]),[D8,za]=to({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),$T=$.forwardRef((e,t)=>{const n=za(),r=R8(),o=wh(Te(H({},r),{present:n.open})),a=cr(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:C.jsx(yi.div,Te(H({},a),{ref:Rl(o.ref,t)}))});$T.displayName="DialogBackdrop";const Qh=$.forwardRef((e,t)=>{const n=za(),r=Pa(),o=cr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:C.jsx(yi.div,Te(H({},o),{ref:Rl(r.ref,t)}))});Qh.displayName="DialogContent";const Xh=$.forwardRef((e,t)=>{const n=za(),r=cr(n.getDescriptionProps(),e);return C.jsx(yi.div,Te(H({},r),{ref:t}))});Xh.displayName="DialogDescription";const Jh=$.forwardRef((e,t)=>{const n=za(),r=cr(n.getPositionerProps(),e);return Pa().unmounted?null:C.jsx(yi.div,Te(H({},r),{ref:t}))});Jh.displayName="DialogPositioner";var M8=no("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),ls=M8.build(),VT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},qT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Zh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},YT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},tp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},WT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Kl=e=>e.getById(Zh(e)),F8=e=>e.getById(VT(e)),B8=e=>e.getById(qT(e)),U8=e=>e.getById(YT(e)),H8=e=>e.getById(ep(e)),z8=e=>e.getById(tp(e)),j8=e=>e.getById(WT(e));function $8(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(Te(H({},ls.trigger.attrs),{dir:a("dir"),id:YT(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Zh(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(Te(H({},ls.backdrop.attrs),{dir:a("dir"),hidden:!d,id:qT(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(Te(H({},ls.positioner.attrs),{dir:a("dir"),id:VT(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(Te(H({},ls.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Zh(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:ep(u),"aria-describedby":f.description?tp(u):void 0}))},getTitleProps(){return t.element(Te(H({},ls.title.attrs),{dir:a("dir"),id:ep(u)}))},getDescriptionProps(){return t.element(Te(H({},ls.description.attrs),{dir:a("dir"),id:tp(u)}))},getCloseTriggerProps(){return t.button(Te(H({},ls.closeTrigger.attrs),{dir:a("dir"),id:WT(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var V8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>j8(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return H({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 $b(()=>Kl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[U8(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 Gb(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Yb(()=>Kl(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")?Lb(()=>[Kl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Sn(()=>{e.set("rendered",{title:!!H8(t),description:!!z8(t)})})},syncZIndex({scope:e}){Sn(()=>{const t=Kl(e);if(!t)return;const n=Nl(t);[F8(e),B8(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})}}}};bh()(["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 q8=e=>{const t=$.useId(),{getRootNode:n}=Hh(),{dir:r}=eT(),o=H({id:t,getRootNode:n,dir:r},e),a=Th(V8,o);return $8(a,sb)},GT=e=>{const[t,c]=cb(e),d=c,{children:n}=d,r=nn(d,["children"]),[o]=L8(t),a=q8(r),u=wh(cr({present:a.open},t));return C.jsx(D8,{value:a,children:C.jsx(P8,{value:o,children:C.jsx(ob,{value:u,children:n})})})},np=$.forwardRef((e,t)=>{const n=za(),r=cr(n.getTitleProps(),e);return C.jsx(yi.h2,Te(H({},r),{ref:t}))});np.displayName="DialogTitle";const KT=e=>{var d;const{children:t,disabled:n}=e,[r,o]=$.useState((d=e.container)==null?void 0:d.current),a=$.useSyncExternalStore(W8,()=>!1,()=>!0),{getRootNode:u}=Hh();if($.useEffect(()=>{o(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return C.jsx(C.Fragment,{children:t});const c=r!=null?r:Y8(u);return C.jsx(C.Fragment,{children:$.Children.map(t,f=>Ia.createPortal(f,c))})},Y8=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return ss(n)?n:vr(t).body},W8=()=>()=>{},G8=()=>{const{globalClassName:e}=Rt(),{dialogPosition:t}=di(),n=t==="bottom-left",r=()=>{ef(n?"bottom-right":"bottom-left")},o=n?aD:oD,a=n?"Move right":"Move left";return C.jsx(Vr,{className:J(e,`${Y}-left-right-toggle-button`,"dialog"),ariaLabel:a,onClick:r,icon:C.jsx(o,{})})},QT=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=Rt(),{mode:o,status:a,dialogPosition:u}=di(),{copilot:c,messages:d,isLoading:f,handleUserInput:p,handleSuggestion:E}=wr(),T=$.useRef(null),b=tf(),{isOpen:_}=a||{},w=o==="standalone";$.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"end"})},[d]);const k=()=>{Qi(!1)};return b?c?C.jsx(GT,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:_,children:C.jsx(KT,{children:C.jsx(Jh,{className:J(n,`${Y}-container`,`${Y}-dialog`,u),style:r,children:C.jsxs(Qh,{className:J(n,`${Y}-dialog-content`,{standalone:w,embedded:!w}),children:[C.jsxs("div",{className:J(n,`${Y}-dialog-header`,{standalone:w,embedded:!w}),children:[e&&C.jsx("img",{alt:"",role:"img",className:J(n,`${Y}-dialog-logo`,{standalone:w,embedded:!w}),src:e}),C.jsx(np,{className:J(n,`${Y}-dialog-title`,{standalone:w,embedded:!w}),children:t}),C.jsxs("div",{className:J(n,`${Y}-dialog-controls`),children:[C.jsx(aT,{componentType:"dialog",isIcon:!0}),C.jsx(G8,{}),C.jsx(oT,{componentType:"dialog",isIcon:!0}),C.jsx(sT,{componentType:"dialog"}),C.jsx(nf,{className:`dialog ${n}`,onClick:k})]})]}),C.jsxs(Xh,{className:J(n,`${Y}-message-container`,{standalone:w,embedded:!w}),children:[C.jsx(Kh,{isWidgetStandalone:w,handleSuggestionClick:E}),f&&C.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:C.jsx(Wl,{})}),C.jsx("div",{ref:T})]}),C.jsx(rh,{componentType:"dialog",isLoading:f,onSubmit:p})]})})})}):C.jsx("div",{children:"Loading Copilot..."}):null},K8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Rt(),{previousComponentType:r}=di(),o=()=>{Qu(r||"dialog")};return t?C.jsx(Vr,{className:J(n,`${Y}-toggle-dialog-button`,e),ariaLabel:"Toggle Dialog",onClick:o,icon:C.jsx(rT,{})}):C.jsxs("button",{className:J(n,`${Y}-overflow-menu-button`,`${Y}-toggle-dialog-button`,e),onClick:o,children:[C.jsx(rT,{}),"Show ",r||"dialog"]})},Q8=()=>{const{globalClassName:e}=Rt(),{isModalFullscreen:t}=di(),n=()=>{Zd(!t)},r=t?KA:QA,o=`${t?"Exit":"Enter"} Fullscreen`;return C.jsx(Vr,{ariaLabel:o,title:o,className:J(e,`${Y}-modal-fullscreen-button`),icon:C.jsx(r,{}),onClick:n})},XT=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=Rt(),{mode:o,status:a,isModalFullscreen:u}=di(),{copilot:c,messages:d,isLoading:f,handleUserInput:p,handleSuggestion:E}=wr(),T=$.useRef(null),{isOpen:b}=a||{},_=o==="standalone",w=tf();$.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"end"})},[d]);const k=({open:F})=>{Qi(F)},v=()=>{Qi(!1)};return w?c?C.jsx(GT,{lazyMount:!0,open:b,onOpenChange:k,children:C.jsx(KT,{children:C.jsxs("div",{className:J(n,`${Y}-modal-container`),style:r,children:[C.jsx($T,{className:J(n,`${Y}-modal-backdrop`)}),C.jsx(Jh,{className:J(n,`${Y}-container`,`${Y}-modal`,{fullscreen:u,standalone:_,embedded:!_}),children:C.jsxs(Qh,{className:J(n,`${Y}-modal-content`,{standalone:_,embedded:!_}),children:[C.jsxs("div",{className:J(n,`${Y}-modal-header`,{standalone:_,embedded:!_}),children:[e&&C.jsx("img",{alt:"",role:"img",className:J(n,`${Y}-modal-logo`,{standalone:_,embedded:!_}),src:e}),C.jsx(np,{className:J(n,`${Y}-modal-title`,{standalone:_,embedded:!_}),children:t}),C.jsxs("div",{className:J(n,`${Y}-modal-controls`),children:[C.jsx(Q8,{}),C.jsx(K8,{componentType:"modal",isIcon:!0}),C.jsx(oT,{componentType:"modal",isIcon:!0}),C.jsx(sT,{componentType:"modal"}),C.jsx(nf,{className:`modal ${n}`,onClick:v})]})]}),C.jsxs(Xh,{className:J(n,`${Y}-message-container`,{standalone:_,embedded:!_}),children:[C.jsx(Kh,{isWidgetStandalone:_,handleSuggestionClick:E}),f&&C.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingLeft:"1rem",paddingBottom:"1rem"},children:C.jsx(Wl,{})}),C.jsx("div",{ref:T})]}),C.jsx(rh,{componentType:"modal",isLoading:f,onSubmit:p})]})})]})})}):C.jsx("div",{children:"Loading Copilot..."}):null},X8="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",J8=()=>{const{globalClassName:e,logoUrl:t,themeVariables:n}=Rt(),r=()=>{Jd(!1),Qi(!0)};return Ia.createPortal(C.jsx("div",{className:J(e,`${Y}-minimized-container`),style:n,children:C.jsx(Vr,{className:J(e,`${Y}-minimized-button`),ariaLabel:"Open Copilot",icon:C.jsx("img",{src:t||X8,alt:"Copilot",className:J(e,`${Y}-minimized-icon-img`)}),onClick:r})}),document.body)},Z8=()=>{const e=di(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?C.jsx(J8,{}):t==="dialog"?C.jsx(QT,{}):t==="modal"?C.jsx(XT,{}):C.jsx(jT,{})},rp=e=>C.jsx(zg,Te(H({},e),{children:C.jsx(Z8,{})}));var Ql={},JT;function eM(){if(JT)return Ql;JT=1;var e=tb();return Ql.createRoot=e.createRoot,Ql.hydrateRoot=e.hydrateRoot,Ql}var ZT=eM();const tM=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=nn(o,["elementId","timeout"]);let a;const u=(d,f)=>{var p;for(const E of d)if(E.type==="childList"&&E.addedNodes.length)for(const T of E.addedNodes)T.nodeType===Node.ELEMENT_NODE&&T.id===e&&(Ds(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=ZT.createRoot(T))==null||p.render(C.jsx(rp,H({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ds(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},nM=r=>{var o=r,{timeout:e,elementId:t}=o,n=nn(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Ds(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Ds(!0,"warn","Container element not found for id:",t),Ds(!0,"warn","Beginning observation for element"),tM(H({elementId:t,timeout:e},n));return}ZT.createRoot(a).render(C.jsx(rp,H({},n)))},rM={search:SA,browse:pA,pdp:{setPdpContext:Ig,updatePdpProductId:gA,updatePdpLink:EA},components:{setEntryType:ea,toggleWidgetOpen:Qi,toggleModalFullscreen:Zd,setWidgetType:Qu,setWidgetDialogPosition:ef},session:yA},iM=()=>Object.freeze({search:Object.freeze(gt.state),browse:Object.freeze(ut.state),pdp:Object.freeze(or.state),isConnected:at.state.connected,isOpen:at.isOpen,entryType:at.entryType});Ie.CopilotDialog=QT,Ie.CopilotEmbed=jT,Ie.CopilotModal=XT,Ie.CopilotWidget=rp,Ie.WidgetProvider=zg,Ie.eventHandlers=rM,Ie.injectCopilotWidget=nM,Ie.state=iM,Ie.useCopilot=wr,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})}));
|
|
44
|
+
`},a.current()));return/^[\t ]/.test(f)&&(f=Ua(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}bT.peek=T5;function bT(e){return e.value||""}function T5(){return"<"}TT.peek=_5;function TT(e,t,n,r){const o=qh(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,H({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,H({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,H({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,H({before:f,after:o},d.current()))),f+=d.move(o),c()),f+=d.move(")"),u(),f}function _5(){return"!"}_T.peek=x5;function _T(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,H({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const m=n.stack;n.stack=[],u=n.enter("reference");const E=n.safe(n.associationId(e),H({before:d,after:"]"},c.current()));return u(),n.stack=m,a(),o==="full"||!f||f!==E?d+=c.move(E+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function x5(){return"!"}xT.peek=w5;function xT(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 w5(){return"`"}function wT(e,t){const n=Ef(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))}ST.peek=S5;function ST(e,t,n,r){const o=qh(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(wT(e,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let E=u.move("<");return E+=u.move(n.containerPhrasing(e,H({before:E,after:">"},u.current()))),E+=u.move(">"),c(),n.stack=m,E}c=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,H({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,H({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,H({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,H({before:f,after:o},u.current()))),f+=u.move(o),d()),f+=u.move(")"),c(),f}function S5(e,t,n){return wT(e,n)?"<":"["}CT.peek=C5;function CT(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,H({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const m=n.stack;n.stack=[],u=n.enter("reference");const E=n.safe(n.associationId(e),H({before:d,after:"]"},c.current()));return u(),n.stack=m,a(),o==="full"||!f||f!==E?d+=c.move(E+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function C5(){return"["}function Yh(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 A5(e){const t=Yh(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 v5(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 AT(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 k5(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?v5(n):Yh(n);const c=e.ordered?u==="."?")":".":A5(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&m&&(!m.children||!m.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),AT(n)===u&&m){let E=-1;for(;++E<e.children.length;){const T=e.children[E];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 N5(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 O5(e,t,n,r){const o=N5(n);let a=n.bulletCurrent||Yh(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()),m);return d(),f;function m(E,T,b){return T?(b?"":" ".repeat(u))+E:(b?a:a+" ".repeat(u-a.length))+E}}function I5(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const P5=fl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function R5(e,t,n,r){return(e.children.some(function(u){return P5(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function L5(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}vT.peek=D5;function vT(e,t,n,r){const o=L5(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(o+o);let d=u.move(n.containerPhrasing(e,H({after:o,before:c},u.current())));const f=d.charCodeAt(0),m=Yl(r.before.charCodeAt(r.before.length-1),f,o);m.inside&&(d=Ua(f)+d.slice(1));const E=d.charCodeAt(d.length-1),T=Yl(r.after.charCodeAt(0),E,o);T.inside&&(d=d.slice(0,-1)+Ua(E));const b=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:m.outside},c+d+b}function D5(e,t,n){return n.options.strong||"*"}function M5(e,t,n,r){return n.safe(e.value,r)}function F5(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 B5(e,t,n){const r=(AT(n)+(n.options.ruleSpaces?" ":"")).repeat(F5(n));return n.options.ruleSpaces?r.slice(0,-1):r}const kT={blockquote:a5,break:ET,code:h5,definition:m5,emphasis:yT,hardBreak:ET,heading:b5,html:bT,image:TT,imageReference:_T,inlineCode:xT,link:ST,linkReference:CT,list:k5,listItem:O5,paragraph:I5,root:R5,strong:vT,text:M5,thematicBreak:B5};function U5(){return{enter:{table:H5,tableData:NT,tableHeader:NT,tableRow:j5},exit:{codeText:$5,table:z5,tableData:Wh,tableHeader:Wh,tableRow:Wh}}}function H5(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 z5(e){this.exit(e),this.data.inTable=void 0}function j5(e){this.enter({type:"tableRow",children:[]},e)}function Wh(e){this.exit(e)}function NT(e){this.enter({type:"tableCell",children:[]},e)}function $5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,V5));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function V5(e,t){return t==="|"?t:e}function q5(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
45
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:T,table:u,tableCell:d,tableRow:c}};function u(b,_,w,v){return f(m(b,w,v),b.align)}function c(b,_,w,v){const A=E(b,w,v),M=f([A]);return M.slice(0,M.indexOf(`
|
|
46
|
+
`))}function d(b,_,w,v){const A=w.enter("tableCell"),M=w.enter("phrasing"),L=w.containerPhrasing(b,Te(H({},v),{before:a,after:a}));return M(),A(),L}function f(b,_){return s5(b,{align:_,alignDelimiters:r,padding:n,stringLength:o})}function m(b,_,w){const v=b.children;let A=-1;const M=[],L=_.enter("table");for(;++A<v.length;)M[A]=E(v[A],_,w);return L(),M}function E(b,_,w){const v=b.children;let A=-1;const M=[],L=_.enter("tableRow");for(;++A<v.length;)M[A]=d(v[A],b,_,w);return L(),M}function T(b,_,w){let v=kT.inlineCode(b,_,w);return w.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function Y5(){return{exit:{taskListCheckValueChecked:OT,taskListCheckValueUnchecked:OT,paragraph:G5}}}function W5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:K5}}}function OT(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function G5(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,u;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function K5(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=kT.listItem(e,t,n,H(H({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(m){return m+u}}function Q5(){return[kD(),KD(),ZD(),U5(),Y5()]}function X5(e){return{extensions:[ND(),QD(e),e5(),q5(e),W5()]}}const J5={tokenize:i8,partial:!0},IT={tokenize:s8,partial:!0},PT={tokenize:o8,partial:!0},RT={tokenize:a8,partial:!0},Z5={tokenize:u8,partial:!0},LT={name:"wwwAutolink",tokenize:n8,previous:MT},DT={name:"protocolAutolink",tokenize:r8,previous:FT},Jr={name:"emailAutolink",tokenize:t8,previous:BT},Lr={};function e8(){return{text:Lr}}let ls=48;for(;ls<123;)Lr[ls]=Jr,ls++,ls===58?ls=65:ls===91&&(ls=97);Lr[43]=Jr,Lr[45]=Jr,Lr[46]=Jr,Lr[95]=Jr,Lr[72]=[Jr,DT],Lr[104]=[Jr,DT],Lr[87]=[Jr,LT],Lr[119]=[Jr,LT];function t8(e,t,n){const r=this;let o,a;return u;function u(E){return!Gh(E)||!BT.call(r,r.previous)||Kh(r.events)?n(E):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(E))}function c(E){return Gh(E)?(e.consume(E),c):E===64?(e.consume(E),d):n(E)}function d(E){return E===46?e.check(Z5,m,f)(E):E===45||E===95||an(E)?(a=!0,e.consume(E),d):m(E)}function f(E){return e.consume(E),o=!0,d}function m(E){return a&&o&&pn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(E)):n(E)}}function n8(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!MT.call(r,r.previous)||Kh(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(J5,e.attempt(IT,e.attempt(PT,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function r8(e,t,n){const r=this;let o="",a=!1;return u;function u(E){return(E===72||E===104)&&FT.call(r,r.previous)&&!Kh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(E),e.consume(E),c):n(E)}function c(E){if(pn(E)&&o.length<5)return o+=String.fromCodePoint(E),e.consume(E),c;if(E===58){const T=o.toLowerCase();if(T==="http"||T==="https")return e.consume(E),d}return n(E)}function d(E){return E===47?(e.consume(E),a?f:(a=!0,d)):n(E)}function f(E){return E===null||il(E)||dt(E)||Zi(E)||sl(E)?n(E):e.attempt(IT,e.attempt(PT,m),n)(E)}function m(E){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(E)}}function i8(e,t,n){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function s8(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(RT,d,c)(f):f===null||dt(f)||Zi(f)||f!==45&&sl(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 o8(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(RT,t,a)(u):u===null||dt(u)||Zi(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function a8(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||dt(c)||Zi(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||dt(c)||Zi(c)?t(c):r(c)}function a(c){return pn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):pn(c)?(e.consume(c),u):n(c)}}function u8(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return an(a)?n(a):t(a)}}function MT(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||dt(e)}function FT(e){return!pn(e)}function BT(e){return!(e===47||Gh(e))}function Gh(e){return e===43||e===45||e===46||e===95||an(e)}function Kh(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const l8={tokenize:E8,partial:!0};function c8(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:p8,continuation:{tokenize:m8},exit:g8}},text:{91:{name:"gfmFootnoteCall",tokenize:h8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:d8,resolveTo:f8}}}}function d8(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const f=ur(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 f8(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function h8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(E){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),d}function d(E){return E!==94?n(E):(e.enter("gfmFootnoteCallMarker"),e.consume(E),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(E){if(a>999||E===93&&!u||E===null||E===91||dt(E))return n(E);if(E===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return o.includes(ur(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(E)}return dt(E)||(u=!0),a++,e.consume(E),E===92?m:f}function m(E){return E===91||E===92||E===93?(e.consume(E),a++,f):f(E)}}function p8(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",m):n(_)}function m(_){if(u>999||_===93&&!c||_===null||_===91||dt(_))return n(_);if(_===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=ur(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return dt(_)||(c=!0),u++,e.consume(_),_===92?E:m}function E(_){return _===91||_===92||_===93?(e.consume(_),u++,m):m(_)}function T(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),o.includes(a)||o.push(a),et(e,b,"gfmFootnoteDefinitionWhitespace")):n(_)}function b(_){return t(_)}}function m8(e,t,n){return e.check(la,t,e.attempt(l8,t,n))}function g8(e){e.exit("gfmFootnoteDefinition")}function E8(e,t,n){const r=this;return et(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function y8(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let 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 m={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},E={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},T=[["enter",m,c],["enter",u[f][1],c],["exit",u[f][1],c],["enter",E,c]],b=c.parser.constructs.insideSpan.null;b&&Rn(T,T.length,0,ol(b,u.slice(f+1,d),c)),Rn(T,T.length,0,[["exit",E,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",m,c]]),Rn(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,m=this.events;let E=0;return T;function T(_){return f===126&&m[m.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),b(_))}function b(_){const w=js(f);if(_===126)return E>1?d(_):(u.consume(_),E++,b);if(E<2&&!n)return d(_);const v=u.exit("strikethroughSequenceTemporary"),A=js(_);return v._open=!A||A===2&&!!w,v._close=!w||w===2&&!!A,c(_)}}}class b8{constructor(){this.map=[]}add(t,n,r){T8(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function T8(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function _8(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 x8(){return{flow:{null:{name:"table",tokenize:w8,resolveAll:S8}}}}function w8(e,t,n){const r=this;let o=0,a=0,u;return c;function c(F){let se=r.events.length-1;for(;se>-1;){const fe=r.events[se][1].type;if(fe==="lineEnding"||fe==="linePrefix")se--;else break}const he=se>-1?r.events[se][1].type:null,le=he==="tableHead"||he==="tableRow"?B:d;return le===B&&r.parser.lazy[r.now().line]?n(F):le(F)}function d(F){return e.enter("tableHead"),e.enter("tableRow"),f(F)}function f(F){return F===124||(u=!0,a+=1),m(F)}function m(F){return F===null?n(F):De(F)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),b):n(F):Qe(F)?et(e,m,"whitespace")(F):(a+=1,u&&(u=!1,o+=1),F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),u=!0,m):(e.enter("data"),E(F)))}function E(F){return F===null||F===124||dt(F)?(e.exit("data"),m(F)):(e.consume(F),F===92?T:E)}function T(F){return F===92||F===124?(e.consume(F),E):E(F)}function b(F){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(F):(e.enter("tableDelimiterRow"),u=!1,Qe(F)?et(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):_(F))}function _(F){return F===45||F===58?v(F):F===124?(u=!0,e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),w):J(F)}function w(F){return Qe(F)?et(e,v,"whitespace")(F):v(F)}function v(F){return F===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),A):F===45?(a+=1,A(F)):F===null||De(F)?W(F):J(F)}function A(F){return F===45?(e.enter("tableDelimiterFiller"),M(F)):J(F)}function M(F){return F===45?(e.consume(F),M):F===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(F))}function L(F){return Qe(F)?et(e,W,"whitespace")(F):W(F)}function W(F){return F===124?_(F):F===null||De(F)?!u||o!==a?J(F):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(F)):J(F)}function J(F){return n(F)}function B(F){return e.enter("tableRow"),te(F)}function te(F){return F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),te):F===null||De(F)?(e.exit("tableRow"),t(F)):Qe(F)?et(e,te,"whitespace")(F):(e.enter("data"),ge(F))}function ge(F){return F===null||F===124||dt(F)?(e.exit("data"),te(F)):(e.consume(F),F===92?ye:ge)}function ye(F){return F===92||F===124?(e.consume(F),ge):ge(F)}}function S8(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,m,E;const T=new b8;for(;++n<e.length;){const b=e[n],_=b[1];b[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(UT(T,t,d,f,m),m=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,E=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},T.add(n,0,[["enter",m,t]])),o=_.type==="tableDelimiterRow"?2:m?3:1):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],E=Wl(T,t,a,o,void 0,E),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],E=Wl(T,t,a,o,void 0,E)),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],E=Wl(T,t,a,o,n,E)):u[1]!==0&&(E=Wl(T,t,u,o,n,E)),o=0):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&UT(T,t,d,f,m),T.consume(t.events),n=-1;++n<t.events.length;){const b=t.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=_8(t.events,n))}return e}function Wl(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},fo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=fo(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=fo(t.events,n[2]),m=fo(t.events,n[3]),E={type:c,start:Object.assign({},f),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",E,t]]),r!==2){const T=t.events[n[2]],b=t.events[n[3]];if(T[1].end=Object.assign({},b[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",E,t]])}return o!==void 0&&(a.end=Object.assign({},fo(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function UT(e,t,n,r,o){const a=[],u=fo(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 fo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const C8={name:"tasklistCheck",tokenize:v8};function A8(){return{text:{91:C8}}}function v8(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 dt(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 De(d)?t(d):Qe(d)?e.check({tokenize:k8},t,n)(d):n(d)}}function k8(e,t,n){return et(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function N8(e){return N1([e8(),c8(),y8(e),x8(),A8()])}const O8={};function I8(e){const t=this,n=e||O8,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(N8(n)),a.push(Q5()),u.push(X5(n))}const Gl=()=>C.jsx("span",{className:`${Y}-blinking-cursor`,children:C.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),HT=({globalClassName:e,openLinksInNewTab:t,message:n})=>{const{isLoading:r,isResponseLoading:o}=Sr(),a=r&&o((n==null?void 0:n.eventSourceId)||"")&&n.name==="partial_inquiry";return C.jsx(bE,{remarkPlugins:[I8],rehypePlugins:[Iy],components:{h1:({children:u})=>C.jsx("h1",{className:Z(e,`${Y}-header h1`),children:u}),h2:({children:u})=>C.jsx("h2",{className:Z(e,`${Y}-header h2`),children:u}),h3:({children:u})=>C.jsx("h3",{className:Z(e,`${Y}-header h3`),children:u}),ul:({children:u})=>C.jsx("ul",{className:Z(e,`${Y}-ul`),children:u}),ol:({children:u})=>C.jsx("ol",{className:Z(e,`${Y}-ol`),children:u}),li:({children:u})=>C.jsx("li",{className:Z(e,`${Y}-li`),children:u}),a:({href:u,children:c})=>C.jsx(By,{globalClassName:e,openLinksInNewTab:t,href:u,children:c}),table:({children:u})=>C.jsx("table",{className:Z(e,`${Y}-table`),children:u}),thead:({children:u})=>C.jsx("thead",{className:Z(e,`${Y}-thead`),children:u}),tbody:({children:u})=>C.jsx("tbody",{className:Z(e,`${Y}-tbody`),children:u}),tr:({children:u})=>C.jsx("tr",{className:Z(e,`${Y}-tr`),children:u}),th:({children:u})=>C.jsx("th",{className:Z(e,`${Y}-th`),children:u}),td:({children:u})=>C.jsx("td",{className:Z(e,`${Y}-td`),children:u}),span:({className:u,children:c})=>u===`${Y}-blinking-cursor`?C.jsx(Gl,{}):C.jsx("span",{children:c})},children:n.message+(a?`<span className='${Y}-blinking-cursor'></span>`:"")})},P8=({globalClassName:e,message:t})=>{const[n,r]=V.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,c=()=>{r(d=>!d)};return C.jsxs("div",{children:[C.jsxs("div",{className:Z(e,`${Y}-progress-message`,"standalone"),children:[C.jsx("span",{className:Z(e,`${Y}-message-icon`,"progress-icon","standalone"),children:C.jsx(Kg,{})}),C.jsx("p",{className:Z(e,`${Y}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&C.jsxs(C.Fragment,{children:[C.jsx(sf,{className:Z(e,`${Y}-thought-context-button`),onClick:c,children:n?C.jsxs(C.Fragment,{children:["Hide ",C.jsx(ZA,{})]}):C.jsxs(C.Fragment,{children:["Context ",C.jsx(ev,{})]})}),n&&C.jsx("div",{className:Z(e,`${Y}-thought-container`),children:a&&C.jsx("p",{className:Z(e,`${Y}-progress-thought`),children:t.thought})})]})]})},R8=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?C.jsx(P8,{globalClassName:e,message:t}):C.jsxs("div",{className:Z(e,`${Y}-progress-message`,"embedded"),title:t.message,children:[C.jsx("span",{className:Z(e,`${Y}-message-icon`,"progress-icon","embedded"),children:C.jsx(Kg,{})}),C.jsx("i",{className:Z(e,`${Y}-progress-text`,"embedded"),children:t.message})]}),L8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return C.jsxs("div",{className:Z(e,`${Y}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&C.jsxs("div",{className:Z(e,`${Y}-refined-event-query`,{embedded:!n,standalone:n}),children:[C.jsx("span",{className:Z(e,`${Y}-message-icon`,`${Y}-refined-event-icon`,{embedded:!n,standalone:n}),children:C.jsx(na,{role:"img"})}),C.jsx("p",{className:Z(e,`${Y}-text`,`${Y}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),C.jsx(HT,{message:t})]})},zT=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(([m])=>!r.includes(m))),u=Object.keys(a),c=Object.values(a).reduce((m,E)=>m+E.length,0);return{facetFiltersList:u,filterCount:c}},Kl=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>C.jsx("span",{className:Z(t,`${Y}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),jT=({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 C.jsxs("div",{className:Z(e,`${Y}-facets`),children:[C.jsx("p",{className:Z(e,`${Y}-facet-category`),children:c}),C.jsx("p",{className:Z(e,`${Y}-facet-values`),children:d})]},c)})},Ha=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>C.jsx("span",{className:Z(e,`${Y}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),D8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,m;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=zT(t),c=new Date(o).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?C.jsxs("div",{className:Z(e,`${Y}-user-message standalone`),children:[C.jsxs("div",{className:Z(e,`${Y}-user-message-row standalone`),children:[d?C.jsx("img",{className:Z(e,`${Y}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):C.jsx("span",{className:Z(e,`${Y}-message-icon user-message-icon standalone`),children:C.jsx(Xg,{})}),C.jsx("p",{className:Z(e,`${Y}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&C.jsx(Kl,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),C.jsx(jT,{globalClassName:e,facetFiltersList:a,message:t}),C.jsx(Ha,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):C.jsxs("div",{className:Z(e,`${Y}-user-message embedded`),children:[C.jsxs("div",{className:Z(e,`${Y}-user-message-row embedded`),children:[d?C.jsx("img",{className:Z(e,`${Y}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):C.jsx("span",{className:Z(e,`${Y}-message-icon user-message-icon embedded`),children:C.jsx(Xg,{})}),C.jsx("p",{className:Z(e,`${Y}-user-message-text embedded`),children:(m=t.request)==null?void 0:m.userPrompt}),a.length>0&&C.jsx(Kl,{isWidgetStandalone:!1,filterCount:u})]}),C.jsx(Ha,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},M8=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>C.jsxs("div",{className:Z(e,`${Y}-user-search standalone`),children:[C.jsxs("div",{children:[C.jsxs("div",{className:Z(e,`${Y}-user-search-query standalone`),children:[d?C.jsx("img",{className:Z(e,`${Y}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):C.jsx("span",{className:Z(e,`${Y}-message-icon user-search-icon standalone`),children:C.jsx(na,{})}),C.jsx("p",{className:Z(e,`${Y}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&C.jsx(Kl,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),C.jsx(jT,{globalClassName:e,facetFiltersList:u,message:a})]}),C.jsx(Ha,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),F8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var b;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=zT(t),d=new Date(a).toLocaleString(),f=(b=r==null?void 0:r.attachments)==null?void 0:b.image,{actionLabel:m,query:E,queryLabel:T}=V.useMemo(()=>{var w,v,A;const _=typeof((w=r==null?void 0:r.clientContext)==null?void 0:w.label)=="string"?(v=r==null?void 0:r.clientContext)==null?void 0:v.label: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 E?n?C.jsx(M8,{globalClassName:e,timestamp:d,message:t,actionLabel:m,query:E,queryLabel:T,facetFiltersList:u,filterCount:c}):C.jsxs("div",{className:Z(e,`${Y}-user-search embedded`),children:[C.jsxs("div",{className:Z(e,`${Y}-user-search-query embedded`),children:[f?C.jsx("img",{className:Z(e,`${Y}-user-search-image embedded`),src:f,alt:T||E,loading:"lazy"}):C.jsx("span",{className:Z(e,`${Y}-message-icon user-search-icon embedded`),children:C.jsx(na,{})}),C.jsx("p",{children:T||E}),u.length>0&&C.jsx(Kl,{isWidgetStandalone:!1,filterCount:c})]}),C.jsx(Ha,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},$T=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,isWidgetStandalone:o,handleSuggestionClick:a})=>{var d;if(!e)return null;const u=e.name,c=!!((d=e.request)!=null&&d.userPrompt);switch(u){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return c?C.jsx(D8,{globalClassName:t,isWidgetStandalone:o,message:e}):C.jsx(F8,{globalClassName:t,message:e,isWidgetStandalone:o});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return C.jsx(L8,{globalClassName:t,message:e,isWidgetStandalone:o});case"follow_up":return C.jsx(xD,{globalClassName:t,isWidgetStandalone:o,message:e,handleSuggestionClick:a});case"inquiry":case"partial_inquiry":return C.jsx(HT,{globalClassName:t,openLinksInNewTab:n,message:e});case"error":return C.jsx(bD,{message:e,isWidgetStandalone:o});case"display_products":return C.jsx(yD,{message:e,isWidgetStandalone:o});case"progress":return C.jsx(R8,{globalClassName:t,isWidgetStandalone:o,message:e});case"conversation_reset":return C.jsxs(C.Fragment,{children:[C.jsx("p",{className:Z(t,`${Y}-reset-message`),children:"This conversation has been reset."}),C.jsx("p",{className:Z(t,`${Y}-start-search-message`),children:r})]});default:return null}},Qh=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,entryMessage:r,openLinksInNewTab:o,resetConversationMessage:a}=Rt(),{groupedMessages:u,entryType:c}=Xi(),d=typeof r=="string"?r:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return C.jsxs(C.Fragment,{children:[c==="ask_cim"&&C.jsx("div",{className:Z(n,`${Y}-ask-cim-entry-message`,`${Y}-message-group`,e?"standalone":"embedded"),children:d}),u.map(f=>{if(f.messages&&f.type==="group"){let m=new Date(f.createdAt).toLocaleString();const E=f.messages[f.messages.length-1];return E&&(m=new Date(E.createdAt).toLocaleString()),C.jsxs("div",{className:Z(n,`${Y}-message-group`,e?"standalone":"embedded"),children:[f.messages.length>0&&f.messages.map(T=>C.jsx("div",{className:`${Y}-message-group-child`,children:C.jsx($T,{id:T.id,openLinksInNewTab:o,globalClassName:n,isWidgetStandalone:e,message:T,resetConversationMessage:a,handleSuggestionClick:t})},T.id)),C.jsx(Ha,{globalClassName:n,timestamp:m,isWidgetStandalone:e})]},`group-${f.eventSourceId}`)}else if(f.type==="individual"&&f.message)return C.jsx("div",{className:Z(n,`${Y}-message`,e?"standalone":"embedded",{error:f.message.name.includes("error")}),children:C.jsx($T,{id:f.message.id,openLinksInNewTab:o,globalClassName:n,isWidgetStandalone:e,message:f.message,resetConversationMessage:a,handleSuggestionClick:t})},f.message.id);return null})]})},VT=()=>{const{globalClassName:e,themeVariables:t}=Rt(),{copilot:n,messages:r,isLoading:o,handleUserInput:a,handleSuggestion:u}=Sr(),c=V.useRef(null),d=nf();return V.useEffect(()=>{c.current&&c.current.scrollIntoView({behavior:"smooth",block:"end"})},[r]),d?n?C.jsxs("div",{className:Z(e,`${Y}-container`,`${Y}-embedded-chat`),style:t,children:[C.jsxs("div",{className:Z(e,`${Y}-message-container`,"embedded"),children:[C.jsx(Qh,{isWidgetStandalone:!1,handleSuggestionClick:u}),o&&C.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:C.jsx(Gl,{})}),C.jsx("div",{ref:c})]}),C.jsx(ih,{componentType:"chat",className:"embedded-chat",isLoading:o,onSubmit:a}),C.jsx("div",{className:Z(`${Y}-embedded-chat-menu`),children:C.jsx(gD,{componentType:"chat",children:C.jsx(lT,{componentType:"chat"})})})]}):C.jsx("div",{children:"Loading Copilot..."}):null},[B8,U8]=to({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),H8=e=>db()(e,["lazyMount","unmountOnExit"]),[z8,za]=to({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),qT=V.forwardRef((e,t)=>{const n=za(),r=U8(),o=Sh(Te(H({},r),{present:n.open})),a=dr(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:C.jsx(yi.div,Te(H({},a),{ref:Ll(o.ref,t)}))});qT.displayName="DialogBackdrop";const Xh=V.forwardRef((e,t)=>{const n=za(),r=Pa(),o=dr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:C.jsx(yi.div,Te(H({},o),{ref:Ll(r.ref,t)}))});Xh.displayName="DialogContent";const Jh=V.forwardRef((e,t)=>{const n=za(),r=dr(n.getDescriptionProps(),e);return C.jsx(yi.div,Te(H({},r),{ref:t}))});Jh.displayName="DialogDescription";const Zh=V.forwardRef((e,t)=>{const n=za(),r=dr(n.getPositionerProps(),e);return Pa().unmounted?null:C.jsx(yi.div,Te(H({},r),{ref:t}))});Zh.displayName="DialogPositioner";var j8=no("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),cs=j8.build(),YT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},WT=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`},GT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},tp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},np=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},KT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Ql=e=>e.getById(ep(e)),$8=e=>e.getById(YT(e)),V8=e=>e.getById(WT(e)),q8=e=>e.getById(GT(e)),Y8=e=>e.getById(tp(e)),W8=e=>e.getById(np(e)),G8=e=>e.getById(KT(e));function K8(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(Te(H({},cs.trigger.attrs),{dir:a("dir"),id:GT(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(Te(H({},cs.backdrop.attrs),{dir:a("dir"),hidden:!d,id:WT(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(Te(H({},cs.positioner.attrs),{dir:a("dir"),id:YT(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(Te(H({},cs.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:tp(u),"aria-describedby":f.description?np(u):void 0}))},getTitleProps(){return t.element(Te(H({},cs.title.attrs),{dir:a("dir"),id:tp(u)}))},getDescriptionProps(){return t.element(Te(H({},cs.description.attrs),{dir:a("dir"),id:np(u)}))},getCloseTriggerProps(){return t.button(Te(H({},cs.closeTrigger.attrs),{dir:a("dir"),id:KT(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var Q8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>G8(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return H({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 qb(()=>Ql(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[q8(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 Qb(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Gb(()=>Ql(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")?Mb(()=>[Ql(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Sn(()=>{e.set("rendered",{title:!!Y8(t),description:!!W8(t)})})},syncZIndex({scope:e}){Sn(()=>{const t=Ql(e);if(!t)return;const n=Ol(t);[$8(e),V8(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})}}}};Th()(["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 X8=e=>{const t=V.useId(),{getRootNode:n}=zh(),{dir:r}=nT(),o=H({id:t,getRootNode:n,dir:r},e),a=_h(Q8,o);return K8(a,ab)},QT=e=>{const[t,c]=fb(e),d=c,{children:n}=d,r=nn(d,["children"]),[o]=H8(t),a=X8(r),u=Sh(dr({present:a.open},t));return C.jsx(z8,{value:a,children:C.jsx(B8,{value:o,children:C.jsx(ub,{value:u,children:n})})})},rp=V.forwardRef((e,t)=>{const n=za(),r=dr(n.getTitleProps(),e);return C.jsx(yi.h2,Te(H({},r),{ref:t}))});rp.displayName="DialogTitle";const XT=e=>{var d;const{children:t,disabled:n}=e,[r,o]=V.useState((d=e.container)==null?void 0:d.current),a=V.useSyncExternalStore(Z8,()=>!1,()=>!0),{getRootNode:u}=zh();if(V.useEffect(()=>{o(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return C.jsx(C.Fragment,{children:t});const c=r!=null?r:J8(u);return C.jsx(C.Fragment,{children:V.Children.map(t,f=>Ia.createPortal(f,c))})},J8=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return os(n)?n:kr(t).body},Z8=()=>()=>{},eM=()=>{const{globalClassName:e}=Rt(),{dialogPosition:t}=di(),n=t==="bottom-left",r=()=>{tf(n?"bottom-right":"bottom-left")},o=n?hD:fD,a=n?"Move right":"Move left";return C.jsx(qr,{className:Z(e,`${Y}-left-right-toggle-button`,"dialog"),ariaLabel:a,onClick:r,icon:C.jsx(o,{})})},JT=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=Rt(),{mode:o,status:a,dialogPosition:u}=di(),{copilot:c,messages:d,isLoading:f,handleUserInput:m,handleSuggestion:E}=Sr(),T=V.useRef(null),b=nf(),{isOpen:_}=a||{},w=o==="standalone";V.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"end"})},[d]);const v=()=>{Qi(!1)};return b?c?C.jsx(QT,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:_,children:C.jsx(XT,{children:C.jsx(Zh,{className:Z(n,`${Y}-container`,`${Y}-dialog`,u),style:r,children:C.jsxs(Xh,{className:Z(n,`${Y}-dialog-content`,{standalone:w,embedded:!w}),children:[C.jsxs("div",{className:Z(n,`${Y}-dialog-header`,{standalone:w,embedded:!w}),children:[e&&C.jsx("img",{alt:"",role:"img",className:Z(n,`${Y}-dialog-logo`,{standalone:w,embedded:!w}),src:e}),C.jsx(rp,{className:Z(n,`${Y}-dialog-title`,{standalone:w,embedded:!w}),children:t}),C.jsxs("div",{className:Z(n,`${Y}-dialog-controls`),children:[C.jsx(lT,{componentType:"dialog",isIcon:!0}),C.jsx(eM,{}),C.jsx(uT,{componentType:"dialog",isIcon:!0}),C.jsx(aT,{componentType:"dialog"}),C.jsx(rf,{className:`dialog ${n}`,onClick:v})]})]}),C.jsxs(Jh,{className:Z(n,`${Y}-message-container`,{standalone:w,embedded:!w}),children:[C.jsx(Qh,{isWidgetStandalone:w,handleSuggestionClick:E}),f&&C.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:C.jsx(Gl,{})}),C.jsx("div",{ref:T})]}),C.jsx(ih,{componentType:"dialog",isLoading:f,onSubmit:m})]})})})}):C.jsx("div",{children:"Loading Copilot..."}):null},tM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Rt(),{previousComponentType:r}=di(),o=()=>{Xu(r||"dialog")};return t?C.jsx(qr,{className:Z(n,`${Y}-toggle-dialog-button`,e),ariaLabel:"Toggle Dialog",onClick:o,icon:C.jsx(sT,{})}):C.jsxs("button",{className:Z(n,`${Y}-overflow-menu-button`,`${Y}-toggle-dialog-button`,e),onClick:o,children:[C.jsx(sT,{}),"Show ",r||"dialog"]})},nM=()=>{const{globalClassName:e}=Rt(),{isModalFullscreen:t}=di(),n=()=>{ef(!t)},r=t?tv:nv,o=`${t?"Exit":"Enter"} Fullscreen`;return C.jsx(qr,{ariaLabel:o,title:o,className:Z(e,`${Y}-modal-fullscreen-button`),icon:C.jsx(r,{}),onClick:n})},ZT=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=Rt(),{mode:o,status:a,isModalFullscreen:u}=di(),{copilot:c,messages:d,isLoading:f,handleUserInput:m,handleSuggestion:E}=Sr(),T=V.useRef(null),{isOpen:b}=a||{},_=o==="standalone",w=nf();V.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"end"})},[d]);const v=({open:M})=>{Qi(M)},A=()=>{Qi(!1)};return w?c?C.jsx(QT,{lazyMount:!0,open:b,onOpenChange:v,children:C.jsx(XT,{children:C.jsxs("div",{className:Z(n,`${Y}-modal-container`),style:r,children:[C.jsx(qT,{className:Z(n,`${Y}-modal-backdrop`)}),C.jsx(Zh,{className:Z(n,`${Y}-container`,`${Y}-modal`,{fullscreen:u,standalone:_,embedded:!_}),children:C.jsxs(Xh,{className:Z(n,`${Y}-modal-content`,{standalone:_,embedded:!_}),children:[C.jsxs("div",{className:Z(n,`${Y}-modal-header`,{standalone:_,embedded:!_}),children:[e&&C.jsx("img",{alt:"",role:"img",className:Z(n,`${Y}-modal-logo`,{standalone:_,embedded:!_}),src:e}),C.jsx(rp,{className:Z(n,`${Y}-modal-title`,{standalone:_,embedded:!_}),children:t}),C.jsxs("div",{className:Z(n,`${Y}-modal-controls`),children:[C.jsx(nM,{}),C.jsx(tM,{componentType:"modal",isIcon:!0}),C.jsx(uT,{componentType:"modal",isIcon:!0}),C.jsx(aT,{componentType:"modal"}),C.jsx(rf,{className:`modal ${n}`,onClick:A})]})]}),C.jsxs(Jh,{className:Z(n,`${Y}-message-container`,{standalone:_,embedded:!_}),children:[C.jsx(Qh,{isWidgetStandalone:_,handleSuggestionClick:E}),f&&C.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingLeft:"1rem",paddingBottom:"1rem"},children:C.jsx(Gl,{})}),C.jsx("div",{ref:T})]}),C.jsx(ih,{componentType:"modal",isLoading:f,onSubmit:m})]})})]})})}):C.jsx("div",{children:"Loading Copilot..."}):null},rM="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",iM=()=>{const{globalClassName:e,logoUrl:t,themeVariables:n}=Rt(),r=()=>{Qu(!1),Qi(!0)};return Ia.createPortal(C.jsx("div",{className:Z(e,`${Y}-minimized-container`),style:n,children:C.jsx(qr,{className:Z(e,`${Y}-minimized-button`),ariaLabel:"Open Copilot",icon:C.jsx("img",{src:t||rM,alt:"Copilot",className:Z(e,`${Y}-minimized-icon-img`)}),onClick:r})}),document.body)},sM=()=>{const e=di(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?C.jsx(iM,{}):t==="dialog"?C.jsx(JT,{}):t==="modal"?C.jsx(ZT,{}):C.jsx(VT,{})},ip=e=>C.jsx($g,Te(H({},e),{children:C.jsx(sM,{})}));var Xl={},e2;function oM(){if(e2)return Xl;e2=1;var e=rb();return Xl.createRoot=e.createRoot,Xl.hydrateRoot=e.hydrateRoot,Xl}var t2=oM();const aM=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=nn(o,["elementId","timeout"]);let a;const u=(d,f)=>{var m;for(const E of d)if(E.type==="childList"&&E.addedNodes.length)for(const T of E.addedNodes)T.nodeType===Node.ELEMENT_NODE&&T.id===e&&(Ms(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(m=t2.createRoot(T))==null||m.render(C.jsx(ip,H({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ms(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},uM=r=>{var o=r,{timeout:e,elementId:t}=o,n=nn(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Ms(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Ms(!0,"warn","Container element not found for id:",t),Ms(!0,"warn","Beginning observation for element"),aM(H({elementId:t,timeout:e},n));return}t2.createRoot(a).render(C.jsx(ip,H({},n)))},lM={search:OA,browse:TA,pdp:{setPdpContext:Rg,updatePdpProductId:xA,updatePdpLink:wA},components:{setEntryType:ea,toggleWidgetOpen:Qi,toggleWidgetMinimized:Qu,toggleModalFullscreen:ef,setWidgetType:Xu,setWidgetDialogPosition:tf},session:SA},cM=()=>Object.freeze({search:Object.freeze(mt.state),browse:Object.freeze(at.state),pdp:Object.freeze(ar.state),isConnected:ot.state.connected,isOpen:ot.isOpen,entryType:ot.entryType});Ie.CopilotDialog=JT,Ie.CopilotEmbed=VT,Ie.CopilotModal=ZT,Ie.CopilotWidget=ip,Ie.WidgetProvider=$g,Ie.eventHandlers=lM,Ie.injectCopilotWidget=uM,Ie.state=cM,Ie.useCopilot=Sr,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})}));
|